12 # include <vcl_msvc_warnings.h> 40 src.
nj() == dest.
nj() &&
41 src.
ni() == dest.
ni());
42 for (
unsigned p = 0; p < dest.
nplanes(); ++p)
43 for (
unsigned j = 0; j < dest.
nj(); ++j)
44 for (
unsigned i = 0; i < dest.
ni(); ++i)
45 dest(i,j,p) = src(i,j,p);
54 unsigned i0,
unsigned j0)
57 assert(i0+src.
ni() <= dest.
ni() && j0+src.
nj() <= dest.
nj());
60 for (
unsigned p = 0; p < dest.
nplanes(); ++p)
61 for (
unsigned j = 0; j < src.
nj(); ++j)
62 for (
unsigned i = 0; i < src.
ni(); ++i)
63 dest(i+i0,j+j0,p) = src(i,j,p);
68 #define VIL_COPY_INSTANTIATE(T) \ 69 template void vil_copy_deep(const vil_image_view<T > &src, vil_image_view<T > &dest); \ 70 template void vil_copy_to_window(const vil_image_view<T > &src, vil_image_view<T > &dest, \ 71 unsigned i0, unsigned j0); \ 72 template void vil_copy_reformat(const vil_image_view<T > &src, vil_image_view<T > &dest); \ 73 template vil_image_view<T > vil_copy_deep(const vil_image_view<T > &rhs) 75 #endif // vil_copy_hxx_ void vil_copy_to_window(const vil_image_view< T > &src, vil_image_view< T > &dest, unsigned i0, unsigned j0)
Copy src to window in dest.
Concrete view of image data of type T held in memory.
unsigned ni() const
Width.
unsigned nj() const
Height.
Various image copying functions.
void deep_copy(const vil_image_view< T > &src)
Make a copy of the data in src and set this to view it.
void vil_copy_reformat(const vil_image_view< T > &src, vil_image_view< T > &dest)
Copy src to dest, without changing dest's view parameters.
A base class reference-counting view of some image data.
unsigned nplanes() const
Number of planes.
bool vil_copy_deep(const vil_image_resource_sptr &src, vil_image_resource_sptr &dest)
Copy src to dest.