12 # include <vcl_msvc_warnings.h> 23 #ifndef DOXYGEN_SHOULD_SKIP_THIS 25 #define vil_print_declare_specialization( T ) \ 27 void vil_print_value(std::ostream& os, const T & value, unsigned) 29 vil_print_declare_specialization(
bool );
30 vil_print_declare_specialization( vxl_byte );
31 vil_print_declare_specialization( vxl_sbyte );
32 vil_print_declare_specialization( vxl_int_16 );
33 vil_print_declare_specialization( vxl_uint_16 );
34 vil_print_declare_specialization( vxl_int_32 );
35 vil_print_declare_specialization( vxl_uint_32 );
37 vil_print_declare_specialization( vxl_int_64 );
38 vil_print_declare_specialization( vxl_uint_64 );
40 vil_print_declare_specialization(
float );
41 vil_print_declare_specialization(
double );
42 vil_print_declare_specialization( std::complex<float> );
43 vil_print_declare_specialization( std::complex<double> );
69 #undef vil_print_declare_specialization 71 #endif // DOXYGEN_SHOULD_SKIP_THIS 79 if (!width) width = static_cast<unsigned>(os.width());
80 os<<view.
is_a()<<
' '<<view.
nplanes()<<
" planes, each "<<view.
ni()<<
" x "<<view.
nj()
81 <<
" istep: "<<(int)view.
istep()<<
' ' 82 <<
" jstep: "<<(int)view.
jstep()<<
' ' 83 <<
" planestep: "<<(int)view.
planestep()<<
'\n' << std::flush;
84 for (
unsigned int p=0;p<view.
nplanes();++p)
86 if (view.
nplanes()>1) os<<
"Plane "<<p<<
":\n" << std::flush;
87 for (
unsigned int j=0;j<view.
nj();++j)
89 for (
unsigned int i=0;i<view.
ni();++i)
91 os<<
' '<<std::setw(width);
103 #endif // vil_print_h_ A templated smart pointer class.
Concrete view of image data of type T held in memory.
std::ptrdiff_t jstep() const
Add this to your pixel pointer to get next j pixel.
unsigned ni() const
Width.
unsigned nj() const
Height.
void vil_print_all(std::ostream &os, const vil_image_view< T > &view, unsigned width=0)
Print all image data to os in a grid (rounds output to int).
std::ptrdiff_t planestep() const
Add this to your pixel pointer to get pixel on next plane.
void vil_print_value(std::ostream &s, const T &value, unsigned=0)
How to print value in vil_print_all(image_view).
A base class reference-counting view of some image data.
std::string is_a() const override
Return class name.
This is the appropriate pixel type for RGBA colour images.
unsigned nplanes() const
Number of planes.
std::ptrdiff_t istep() const
Add this to your pixel pointer to get next i pixel.
This is the appropriate pixel type for 24-bit colour images.