26 unsigned j0,
unsigned nj)
const 28 if (i0 +
ni >
src_->ni())
return nullptr;
30 if (!vs)
return nullptr;
32 switch (vs->pixel_format())
34 #define macro( F, T ) \ 36 return new vil_image_view<T > (vil_flip_lr(static_cast<const vil_image_view<T >&>(*vs))); 41 macro(VIL_PIXEL_FORMAT_UINT_64, vxl_uint_64)
42 macro(VIL_PIXEL_FORMAT_INT_64, vxl_int_64)
59 unsigned j0,
unsigned nj)
const 61 if (i0 +
ni >
src_->ni())
return nullptr;
63 if (!vs)
return nullptr;
65 switch (vs->pixel_format())
67 #define macro( F, T ) \ 69 return new vil_image_view<T > (vil_flip_lr(static_cast<const vil_image_view<T >&>(*vs))); 74 macro(VIL_PIXEL_FORMAT_UINT_64, vxl_uint_64)
75 macro(VIL_PIXEL_FORMAT_INT_64, vxl_int_64)
95 if (i0 + im.
ni() >
src_->ni())
return false;
98 #define macro( F, T ) \ 100 return src_->put_view(vil_flip_lr(static_cast<const vil_image_view<T >&>(im)), src_->ni()-i0-im.ni(), j0); 105 macro(VIL_PIXEL_FORMAT_UINT_64, vxl_uint_64)
106 macro(VIL_PIXEL_FORMAT_INT_64, vxl_int_64)
134 unsigned j0,
unsigned nj)
const 136 if (j0 +
nj >
src_->nj())
return nullptr;
138 if (!vs)
return nullptr;
140 switch (vs->pixel_format())
142 #define macro( F, T ) \ 144 return new vil_image_view<T > (vil_flip_ud(static_cast<const vil_image_view<T >&>(*vs))); 149 macro(VIL_PIXEL_FORMAT_UINT_64, vxl_uint_64)
150 macro(VIL_PIXEL_FORMAT_INT_64, vxl_int_64)
167 unsigned j0,
unsigned nj)
const 169 if (i0 +
ni >
src_->ni())
return nullptr;
171 if (!vs)
return nullptr;
173 switch (vs->pixel_format())
175 #define macro( F, T ) \ 177 return new vil_image_view<T > (vil_flip_ud(static_cast<const vil_image_view<T >&>(*vs))); 182 macro(VIL_PIXEL_FORMAT_UINT_64, vxl_uint_64)
183 macro(VIL_PIXEL_FORMAT_INT_64, vxl_int_64)
203 if (i0 + im.
ni() >
src_->ni())
return false;
206 #define macro( F, T ) \ 208 return src_->put_view(vil_flip_ud(static_cast<const vil_image_view<T >&>(im)), i0, src_->nj()-j0-im.nj()); \ 213 macro(VIL_PIXEL_FORMAT_UINT_64, vxl_uint_64)
214 macro(VIL_PIXEL_FORMAT_INT_64, vxl_int_64)
An abstract base class of smart pointers to actual image data in memory.
unsigned nj() const override
Dimensions: Planes x ni x nj.
vil_flip_ud_image_resource(vil_image_resource_sptr const &)
unsigned ni() const override
Dimensions: Planes x ni x nj.
unsigned ni() const override
Dimensions: Planes x ni x nj.
unsigned ni() const
Width.
vil_flip_lr_image_resource(vil_image_resource_sptr const &)
virtual enum vil_pixel_format pixel_format() const =0
Return a description of the concrete data pixel type.
vil_image_resource_sptr src_
Reference to underlying image source.
vil_image_view< T > vil_flip_ud(const vil_image_view< T > &v)
Create a reflected view in which y -> nj-1-j.
unsigned 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.
bool put_view(const vil_image_view_base &im, unsigned i0, unsigned j0) override
Put the data in this view back into the image source.
vil_image_view< T > vil_flip_lr(const vil_image_view< T > &v)
Create a reflected view in which i -> ni-1-i.
bool put_view(const vil_image_view_base &im, unsigned i0, unsigned j0) override
Put the data in this view back into the image source.
A generic_image adaptor that behaves like a flipped left to right version of its input.
vil_image_view_base_sptr get_view() const
Create a read/write view of all the data.
vil_image_resource_sptr src_
Reference to underlying image source.
A generic_image adaptor that behaves like a flipped left to right version of its input.