Example for usage of Image ROI (Region Of Interest)
, ROI
- Author
- MIP
#include <iostream>
#include <Base/Image/ImageBase.hh>
#include <Base/Image/ImageConvert.hh>
#include <Base/Image/ImageIO.hh>
using namespace BIAS;
using namespace std;
int main(int argc, char *argv[])
{
cerr << argv[0] << " <image>\n";
}
cout << "zero image outside of ("<<(w>>2)<<", "<<(h>>2)<<") <--> ("
<<(w-(w>>2))<<", "<<(h-(h>>2))<<")\n";
cout <<
"roi: "<<*im.
GetROI()<<endl;
if (w>3 && h>3){
for (int x=w-3; x<w; x++)
for (int y=h-3; y<h; y++)
} else {
cerr << "image too small\n";
}
cout <<
"im: "<<*im.
GetROI() << endl;
BIASERR("error loading image \"roi.mip\"");
return -1;
}
cout <<
"im2: "<<*im2.
GetROI()<<endl;
vector<Position> vec;
vec.resize(3);
BIASERR("error reading image \"zeroed.mip\"");
return -1;
}
return 0;
}