25 #include <Base/Image/ImageBase.hh>
26 #include <Base/Image/ImageIO.hh>
39 int main(
int argc,
char *argv[])
43 cout<<
"loads image and embeds a roi mask."<<endl ;
50 cout<<
"file not found "<<argv[1]<<endl;
57 for(
unsigned y=0; y<h; y++)
59 for(
unsigned x=0; x<w; x++)
61 if((x>(w/4))&&(x<((w*3)/4))&&
62 (y>(h/4))&&(y<((h*3)/4))
unsigned int GetWidth() const
int SetMaskImage(const ImageBase &im)
every pixel with value==0.0 is in the ROI, every pixel with value!=0.0 is not in the ROI ...
ROI * GetROI()
Returns a pointer to the roi object.
unsigned int GetHeight() const
static int Save(const std::string &filename, const ImageBase &img, const enum TFileFormat FileFormat=FF_auto, const bool sync=BIAS_DEFAULT_SYNC, const int c_jpeg_quality=BIAS_DEFAULT_IMAGE_QUALITY, const bool forceNewID=BIAS_DEFAULT_FORCENEWID, const bool &writeMetaData=true)
Export image as file using extrnal libs.
void Init(unsigned int Width, unsigned int Height, unsigned int channels=1, enum EStorageType storageType=ST_unsignedchar, const bool interleaved=true)
calls Init from ImageBase storageType is ignored, just dummy argument
static int Load(const std::string &FileName, ImageBase &img)
first tries a call to Read MIP image and if that fails, tries to Import Image with all other availabl...
const StorageType ** GetImageDataArray() const
overloaded GetImageDataArray() from ImageBase