Example for usage of Image ROI (Region Of Interest)
,ImageBase
- Author
- MIP
#include <Base/Image/ImageBase.hh>
#include <Base/Image/ImageIO.hh>
using namespace BIAS;
using namespace std;
int main(int argc, char *argv[])
{
if(argc<2)
{
cout<<"loads image and embeds a roi mask."<<endl ;
return -4;
}
{
cout<<"file not found "<<argv[1]<<endl;
return -8;
}
for(unsigned y=0; y<h; y++)
{
for(unsigned x=0; x<w; x++)
{
if((x>(w/4))&&(x<((w*3)/4))&&
(y>(h/4))&&(y<((h*3)/4))
)
dat[y][x]= 0;
else
dat[y][x]= 255;
}
}
return 0;
}