14 # include <vcl_msvc_warnings.h> 28 typedef typename T::value_type comp_type;
30 const unsigned ncomponents =
sizeof(T) /
sizeof(comp_type);
37 v.memory_chunk(),reinterpret_cast<comp_type const*>(
v.top_left_ptr()),
38 v.ni(),
v.nj(),ncomponents,
39 v.istep()*ncomponents,
v.jstep()*ncomponents,1);
49 if ((
v.nplanes()!=3) || (
v.planestep()!=1) || (
v.istep()!=3 &&
v.jstep()!=3))
53 reinterpret_cast<vil_rgb<T> const*
>(
v.top_left_ptr()),
55 v.istep()/3,
v.jstep()/3,1);
65 if ((
v.nplanes()!=4) || (
v.planestep()!=1) || (
v.istep()!=4 &&
v.jstep()!=4))
71 v.istep()/3,
v.jstep()/3,1);
86 if ((
v.nplanes()%2!=0) || (
v.planestep()!=1) || (
v.istep()!=2 &&
v.jstep()!=2))
91 reinterpret_cast<std::complex<T>
const *
> (
v.top_left_ptr()),
92 v.ni(),
v.nj(),
v.nplanes()/2,
93 v.istep()/2,
v.jstep()/2, 1);
109 reinterpret_cast<T *>(img.top_left_ptr()) + pt,
110 img.ni(), img.nj(), img.nplanes(),
111 2*img.istep(), 2*img.jstep(), 2*img.planestep());
142 #endif // vil_view_as_h_ vil_image_view< T > vil_view_imag_part(vil_image_view< std::complex< T > > img)
Return a view of the imaginary part of a complex image.
vil_image_view< std::complex< T > > vil_view_as_complex(const vil_image_view< T > &v)
Return a complex component view of a 2N-plane image.
Pixel type for 24 bit images.
Concrete view of image data of type T held in memory.
vil_image_view< T > vil_view_part(vil_image_view< std::complex< T > > img, int pt)
Base function to do the work for both vil_view_real/imag_part.
vil_image_view< vil_rgb< T > > vil_view_as_rgb(const vil_image_view< T > &v)
Return an RGB component view of a 3-plane image.
vil_image_view< T > vil_view_real_part(vil_image_view< std::complex< T > > img)
Return a view of the real part of a complex image.
A base class reference-counting view of some image data.
vil_image_view< typename T::value_type > vil_view_as_planes(const vil_image_view< T > &v)
Return a 3-plane view of an RGB image, or a 4-plane view of an RGBA, or a 2-plane view of a complex i...
This is the appropriate pixel type for RGBA colour images.
vil_image_view< vil_rgba< T > > vil_view_as_rgba(const vil_image_view< T > &v)
Return an RGBA component view of a 4-plane image.
Templated four-value colour cell.
This is the appropriate pixel type for 24-bit colour images.