11 # include <vcl_msvc_warnings.h> 17 unsigned n_i,
unsigned j0,
unsigned n_j)
24 unsigned i0,
unsigned n_i,
25 unsigned j0,
unsigned n_j):
32 assert (i0+n_i <= src_->
ni() && j0 + n_j <= src_->
nj());
36 unsigned j0,
unsigned n_j)
const 38 if (i0 + n_i >
ni() || j0 + n_j >
nj())
41 "vil_crop_image_resource::get_copy_view") );
44 return src_->get_copy_view(i0+
i0_, n_i, j0+
j0_, n_j);
48 unsigned j0,
unsigned n_j)
const 50 if (i0 + n_i >
ni() || j0 + n_j >
nj())
53 "vil_crop_image_resource::get_view") );
56 return src_->get_view(i0+
i0_, n_i, j0+
j0_, n_j);
vil_crop_image_resource(vil_image_resource_sptr const &, unsigned i0, unsigned n_i, unsigned j0, unsigned n_j)
Exceptions thrown by vil, and a mechanism for turning them off.
Indicates that some reference was made to pixels beyond the bounds of an image.
unsigned ni() 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.
void vil_exception_warning(T exception)
Throw an exception indicating a potential problem.
vil_image_resource_sptr src_
vil_image_view< T > vil_crop(const vil_image_view< T > &im, unsigned i0, unsigned n_i, unsigned j0, unsigned n_j)
Create a view which is a cropped version of src.
unsigned nj() const override
Dimensions: Planes x ni x nj.
A generic_image adaptor that behaves like a cropped version of its input.
vil_image_view_base_sptr get_view() const
Create a read/write view of all the data.