Task #12059 (new)
Opened 10 years ago
Last modified 8 years ago
C++ Image rescaling/resampling
Reported by: | rleigh | Owned by: | rleigh |
---|---|---|---|
Priority: | minor | Milestone: | Unscheduled |
Component: | Bio-Formats | Version: | 5.0.0 |
Keywords: | cpp | Cc: | |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | n.a. |
Sprint: | n.a. |
Description
In order to implement FormatReader::openThumbBytes, a solution is needed to downscale/downsample the image. The java implementation uses java.awt.image.BufferedImage? which is obviously not an option in C++.
Options include:
- OpenGL (render to offscreen framebuffer object at desired scale, with mipmaps handling smooth resampling)
- OpenCL (as for GL, but do it by hand with GPU and CPU variants)
- Hand-rolled bilinear filtering for each supported pixel type (can be templated).
- [future for NDIM: trilinear filter to give a 3D thumbnail]
The by hand bilinear filter would be the most flexible (but slow) solution.
A more fundamental question here is whether thumbnail generation really belongs in the base reader API? It might be better as a higher-level function/class which takes a reader/series and gives you a thumbnail.
Change History (4)
comment:1 Changed 10 years ago by rleigh
- Keywords cpp added
comment:2 Changed 9 years ago by rleigh
- Milestone changed from 5.1.0 to 5.1.2
comment:3 Changed 9 years ago by jamoore
- Milestone changed from 5.1.4 to B-F-5.1.4
comment:4 Changed 8 years ago by sbesson
- Milestone changed from B-F-5.2.0 to Unscheduled
Splitting 5.1.4 due to milestone decoupling