14 #include <vxl_config.h> 16 # include <vcl_msvc_warnings.h> 48 if (width==0) width=5;
50 if (
v<0) {
v=-
v; os<<
'-'; }
else os<<
' ';
51 if (v<10 && width > 1) os<<
'0';
52 if (v<100 && width > 2) os<<
'0';
53 if (v<1000 && width > 3) os<<
'0';
54 if (v<10000 && width > 4) os<<
'0';
62 if (width==0) width=5;
63 if (value<10 && width > 1) os<<
'0';
64 if (value<100 && width > 2) os<<
'0';
65 if (value<1000 && width > 3) os<<
'0';
66 if (value<10000 && width > 4) os<<
'0';
74 if (width==0) width=8;
76 if (
v<0) {
v=-
v; os<<
'-'; }
else os<<
' ';
77 if (v<10 && width > 1) os<<
'0';
78 if (v<100 && width > 2) os<<
'0';
79 if (v<1000 && width > 3) os<<
'0';
80 if (v<10000 && width > 4) os<<
'0';
81 if (v<100000 && width > 5) os<<
'0';
82 if (v<1000000 && width > 6) os<<
'0';
83 if (v<10000000 && width > 7) os<<
'0';
91 if (width==0) width=8;
92 if (value<10 && width > 1) os<<
'0';
93 if (value<100 && width > 2) os<<
'0';
94 if (value<1000 && width > 3) os<<
'0';
95 if (value<10000 && width > 4) os<<
'0';
96 if (value<100000 && width > 5) os<<
'0';
97 if (value<1000000 && width > 6) os<<
'0';
98 if (value<10000000 && width > 7) os<<
'0';
106 void vil_print_value(std::ostream& os,
const vxl_uint_64& value,
unsigned width)
108 if (width==0) width=8;
109 if (value<10 && width > 1) os<<
'0';
110 if (value<100 && width > 2) os<<
'0';
111 if (value<1000 && width > 3) os<<
'0';
112 if (value<10000 && width > 4) os<<
'0';
113 if (value<100000 && width > 5) os<<
'0';
114 if (value<1000000 && width > 6) os<<
'0';
115 if (value<10000000 && width > 7) os<<
'0';
121 void vil_print_value(std::ostream& os,
const vxl_int_64& value,
unsigned width)
123 if (width==0) width=8;
125 if (v<0) {
v=-
v; os<<
'-'; }
else os<<
' ';
126 if (v<10 && width > 1) os<<
'0';
127 if (v<100 && width > 2) os<<
'0';
128 if (v<1000 && width > 3) os<<
'0';
129 if (v<10000 && width > 4) os<<
'0';
130 if (v<100000 && width > 5) os<<
'0';
131 if (v<1000000 && width > 6) os<<
'0';
132 if (v<10000000 && width > 7) os<<
'0';
170 int r = int(value.
r);
174 int g = int(value.
g);
178 int b = int(value.
b);
188 int r = int(value.
r);
189 if (r<0) r=-r,os<<
'-';
else os<<
'+';
193 int g = int(value.
g);
194 if (g<0) g=-g,os<<
'-';
else os<<
'+';
198 int b = int(value.
b);
199 if (b<0) b=-b,os<<
'-';
else os<<
'+';
279 os<<value.
r<<
'/'<<value.
g<<
'/'<<value.
b;
287 os<<value.
r<<
'/'<<value.
g<<
'/'<<value.
b;
294 int r = int(value.
r);
298 int g = int(value.
g);
302 int b = int(value.
b);
306 int a = int(value.
a);
316 int r = int(value.
r);
317 if (r<0) r=-r,os<<
'-';
else os<<
'+';
321 int g = int(value.
g);
322 if (g<0) g=-g,os<<
'-';
else os<<
'+';
326 int b = int(value.
b);
327 if (b<0) b=-b,os<<
'-';
else os<<
'+';
331 int a = int(value.
a);
332 if (a<0) a=-a,os<<
'-';
else os<<
'+';
424 os<<value.
r<<
'/'<<value.
g<<
'/'<<value.
b<<
'/'<<value.
a;
431 os<<value.
r<<
'/'<<value.
g<<
'/'<<value.
b<<
'/'<<value.
a;
438 vil_print_all(os, static_cast<vil_image_view< vil_pixel_format_type_of<T >::type > >(view) );\ 441 switch ( view->pixel_format() )
444 docase( VIL_PIXEL_FORMAT_UINT_64 );
445 docase( VIL_PIXEL_FORMAT_INT_64 );
458 docase( VIL_PIXEL_FORMAT_RGB_UINT_64 );
459 docase( VIL_PIXEL_FORMAT_RGB_INT_64 );
471 docase( VIL_PIXEL_FORMAT_RGBA_UINT_64 );
472 docase( VIL_PIXEL_FORMAT_RGBA_INT_64 );
A templated smart pointer class.
Pixel type for 24 bit images.
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).
void vil_print_value(std::ostream &s, const T &value, unsigned=0)
How to print value in vil_print_all(image_view).
This is the appropriate pixel type for RGBA colour images.
Templated four-value colour cell.
This is the appropriate pixel type for 24-bit colour images.