25 #include <Base/Image/ImageIO.hh>
26 #include <Image/HistogramImage.hh>
40 bool ignore_negative =
true;
51 if (*
id>=0.0) v.push_back(*
id);
63 int main(
int argc,
char *argv[])
65 const int num_bins = 200;
66 const int num_hist = 1;
75 cerr << argv[0] <<
" <image>\n";
80 cerr <<
"error loading image "<<argv[1]<<endl;
86 cerr <<
"only for float images"<<endl;
void AddDebugLevel(const long int lv)
bool IsEmpty() const
check if ImageData_ points to allocated image buffer or not
int InitHist(unsigned int bincount=256, unsigned int histcount=1)
reserves the internal data structures for histcount histograms with bincount bins in each in one imag...
int Draw()
actually draws histogram(s) from the internal data structures
void WriteASCII(std::ostream &os=std::cout)
writes ascii data to stream, can be used later e.g. with gnuplot
int ZeroHist(unsigned int hist=0)
zeros existing histogram
int AddHist(const Image< StorageType > &Image, unsigned int hist=0)
calculates the histogram of image and adds them to the internal data structures
void FillImageWithConstValue(StorageType Value)
fill grey images
Class for easy histogram image generation.
int SetColor(unsigned char R, unsigned char G, unsigned char B, unsigned int hist=0)
const StorageType * GetImageData() const
overloaded GetImageData() from ImageBase
int DrawLog()
actually draws histogram(s) from the internal data structures uses a logarithmic y axis ...
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...
unsigned long int GetPixelCount() const
returns number of pixels in image
This is the base class for images in BIAS.