2 #ifndef vil_blocked_image_resource_h_ 3 #define vil_blocked_image_resource_h_ 10 # include <vcl_msvc_warnings.h> 27 unsigned nplanes()
const override =0;
28 unsigned ni()
const override = 0;
29 unsigned nj()
const override = 0;
47 get_copy_view(
unsigned i0,
unsigned n_i,
unsigned j0,
unsigned n_j)
const override;
53 unsigned block_index_j )
const = 0;
57 virtual bool get_blocks(
unsigned start_block_i,
unsigned end_block_i,
58 unsigned start_block_j,
unsigned end_block_j,
59 std::vector< std::vector< vil_image_view_base_sptr > >& blocks )
const;
62 virtual bool put_block(
unsigned block_index_i,
63 unsigned block_index_j,
68 virtual bool put_blocks(
unsigned start_block_i,
unsigned end_block_i,
69 unsigned start_block_j,
unsigned end_block_j,
70 std::vector< std::vector< vil_image_view_base_sptr > >
const& blocks );
73 bool get_property(
char const* tag,
void* property_value =
nullptr)
const override = 0;
78 unsigned j0,
unsigned jcrop,
83 unsigned& i_offset)
const;
87 unsigned& j_offset)
const;
90 unsigned j0,
unsigned nj,
91 unsigned start_block_i,
92 unsigned start_block_j,
93 std::vector< std::vector< vil_image_view_base_sptr > >& blocks)
const;
96 glue_blocks_together(
const std::vector< std::vector< vil_image_view_base_sptr > >& blocks)
const;
102 #endif // vil_blocked_image_resource_h_
unsigned ni() const override=0
Dimensions: Planes x ni x nj.
virtual vil_image_view_base_sptr get_block(unsigned block_index_i, unsigned block_index_j) const =0
Block access.
An abstract base class of smart pointers to actual image data in memory.
virtual unsigned size_block_i() const =0
Block size in columns.
A templated smart pointer class.
bool put_view(const vil_image_view_base &im, unsigned i0, unsigned j0) override=0
Put the data in this view back into the image source.
bool block_i_offset(unsigned block_i, unsigned i, unsigned &i_offset) const
Get the offset from the start of the block row for pixel position i.
vil_blocked_image_resource()
enum vil_pixel_format pixel_format() const override=0
Pixel Format.
virtual unsigned n_block_i() const
Number of blocks in image width.
bool block_j_offset(unsigned block_j, unsigned j, unsigned &j_offset) const
Get the offset from the start of the block column for pixel position j.
vil_blocked_image_resource_sptr blocked_image_resource(const vil_image_resource_sptr &ir)
cast to blocked resource if possible.
virtual bool get_blocks(unsigned start_block_i, unsigned end_block_i, unsigned start_block_j, unsigned end_block_j, std::vector< std::vector< vil_image_view_base_sptr > > &blocks) const
the multiple blocks are in col row order, i.e. blocks[i][j].
~vil_blocked_image_resource() override
unsigned nplanes() const override=0
Dimensions: Planes x ni x nj.
Abstract representation of an image source or image destination.
bool get_property(char const *tag, void *property_value=nullptr) const override=0
Extra property information.
unsigned nj() const override=0
Dimensions: Planes x ni x nj.
bool trim_border_blocks(unsigned i0, unsigned ni, unsigned j0, unsigned nj, unsigned start_block_i, unsigned start_block_j, std::vector< std::vector< vil_image_view_base_sptr > > &blocks) const
vil_image_view_base_sptr get_copy_view() const
Create a read/write view of a copy of all the data.
virtual unsigned size_block_j() const =0
Block size in rows.
vil_image_view_base_sptr fill_block(unsigned i0, unsigned icrop, unsigned j0, unsigned jcrop, vil_image_view_base_sptr &view) const
Smart pointer to an image resource.
Representation of a generic image source or destination.
virtual bool put_blocks(unsigned start_block_i, unsigned end_block_i, unsigned start_block_j, unsigned end_block_j, std::vector< std::vector< vil_image_view_base_sptr > > const &blocks)
put multiple blocks in raster order, i.e., blocks[i][j].
virtual bool put_block(unsigned block_index_i, unsigned block_index_j, const vil_image_view_base &view)=0
put the block into the resource at the indicated location.
virtual unsigned n_block_j() const
Number of blocks in image height.
vil_image_view_base_sptr glue_blocks_together(const std::vector< std::vector< vil_image_view_base_sptr > > &blocks) const