10 # include <vcl_msvc_warnings.h> 14 static float scale_at_level(
unsigned level)
18 float s = std::pow(2.0f, -static_cast<float>(level));
24 : openjpeg_sptr_(openjpeg)
74 return "openjpeg_pyramid";
91 unsigned j0,
unsigned nj,
106 unsigned j0,
unsigned nj,
108 float& actual_scale)
const 115 float f_lev = -std::log(scale) / std::log(2.0f);
116 auto level = static_cast<unsigned>(f_lev);
119 actual_scale = scale_at_level(level);
vil_openjpeg_pyramid_image_resource()
unsigned int nplanes() const override
Dimensions: Planes x ni x nj.
unsigned ni() const override
The number of pixels in each row.
virtual unsigned int nreductions() const
Reductions.
void print(const unsigned level) override
for debug purposes.
vil_openjpeg_image * ptr_
bool is_valid(void) const
enum vil_pixel_format pixel_format() const override
Pixel Format.
unsigned nj() const override
The number of pixels in each column.
enum vil_pixel_format pixel_format() const override
Pixel Format.
unsigned int nj() const override
Dimensions: Planes x ni x nj.
vil_image_view_base_sptr get_copy_view() const
Create a read/write view of a copy of all the data.
virtual vil_image_view_base_sptr get_copy_view_reduced(unsigned i0, unsigned ni, unsigned j0, unsigned nj, unsigned reduction) const
Create a read/write view of a copy of this data.
unsigned int ni() const override
Dimensions: Planes x ni x nj.
unsigned nplanes() const override
The number of planes (or components) in the image.
vil_image_resource_sptr openjpeg_sptr_
vil_image_resource_sptr get_resource(const unsigned level) const override
Get an image resource from the pyramid at the specified level.
Representation of a pyramid resolution hierarchy based on the openjpeg_image.
T * ptr() const
These methods all return the raw/dumb pointer.
char const * file_format() const override
Return a string describing the file format.
unsigned nlevels() const override
Number of pyramid levels.