1 #include <Base/Image/Image.hh>
8 int main(
int argc,
char *argv[])
10 const unsigned width=640, height=480, cc=1;
11 const bool interleaved =
true;
29 cerr <<
"Assigning ImageBase float to ImageBase float failed:"<<ex.
What()<<endl;
35 cerr <<
"Assigning ImageBase unsigned char to ImageBase unsigned char "
36 <<
"failed:"<<ex.
What()<<endl;
43 cerr <<
"Assigning Image<float> to Image<float> failed:"<<ex.
What()<<endl;
49 cerr <<
"Assigning Image<unsigned char> to Image<unsigned char> failed:"<<ex.
What()<<endl;
56 cerr <<
"Assigning ImageBase float to Image<float> failed:"<<ex.
What()<<endl;
62 cerr <<
"Assigning ImageBase unsigned char to Image<unsigned char> failed:"<<ex.
What()<<endl;
69 cerr <<
"Assigning Image<float> to ImageBase float failed:"<<ex.
What()<<endl;
75 cerr <<
"Assigning Image<unsigned char> to ImageBase unsigned char "
76 <<
"failed:"<<ex.
What()<<endl;
85 bool caught_exception =
false;
87 catch (
BaseException &ex) { caught_exception =
true;cout<<
"Expected error:"<<ex.
What()<<endl; }
88 if (!caught_exception){
89 cerr <<
"Error: Assigning ImageBase unsigned char to ImageBase float "
93 caught_exception =
false;
95 catch (
BaseException &ex) { caught_exception =
true;cout<<
"Expected error:"<<ex.
What()<<endl; }
96 if (!caught_exception){
97 cerr <<
"Error: Assigning ImageBase float to ImageBase unsigned char "
104 caught_exception =
false;
106 catch (
BaseException &ex) { caught_exception =
true;cout<<
"Expected error:"<<ex.
What()<<endl; }
107 if (!caught_exception){
108 cerr <<
"Error: Assigning Image<unsigned char> to Image<float> "
112 caught_exception =
false;
114 catch (
BaseException &ex) { caught_exception =
true;cout<<
"Expected error:"<<ex.
What()<<endl; }
115 if (!caught_exception){
116 cerr <<
"Error: Assigning Image<float> to Image<unsigned char> "
122 caught_exception =
false;
124 catch (
BaseException &ex) { caught_exception =
true; cout<<
"Expected error:"<<ex.
What()<<endl;}
125 if (!caught_exception){
126 cerr <<
"Error: Assigning ImageBase float to Image<unsigned char> "
130 caught_exception =
false;
132 catch (
BaseException &ex) { caught_exception =
true; cout<<
"Expected error:"<<ex.
What()<<endl;}
133 if (!caught_exception){
134 cerr <<
"Error: Assigning ImageBase unsigned char to Image<float> "
140 caught_exception =
false;
142 catch (
BaseException &ex) { caught_exception =
true;cout<<
"Expected error:"<<ex.
What()<<endl; }
143 if (!caught_exception){
144 cerr <<
"Error: Assigning Image<float> to ImageBase unsigned char "
148 caught_exception =
false;
150 catch (
BaseException &ex) { caught_exception =
true;cout<<
"Expected error:"<<ex.
What()<<endl; }
151 if (!caught_exception){
152 cerr <<
"Error: Assigning Image<unsigned char> to ImageBase float "
157 if (argc==1){ cout <<
"OK\n"; }
(8bit) unsigned char image storage type
This is the base class for images in BIAS.
virtual const std::string & What() const