#ifndef IImgStat_HH #define IImgStat_HH ////////////////////////////////////////////////////////////////////////// //! file="amma/Image/ScalarIm/IImgStat.hh" //! lib=ScalarIm //! userlevel=Normal //! author="Radek Marik" //! date="26.04.1996" //! docentry="Image.Image Processing" //! rcsid="$Id: IImgStat.hh,v 1.7 1999/12/02 11:30:50 ees1cg Exp $" #include "amma/IntImage.hh" #include "amma/Mean1d.hh" class LinearSums1dC; class IntMinMax1dC; // ------------------------------------------------------------------------ // **** IntImageStatC ***************************************************** // ------------------------------------------------------------------------ //: The class IntImageStatC is an engine for computation of statistics. // The class IntImageStatC is an engine for computation of statistics // on integer images. The engine can be attached to an integer image as its // another handle. class IntImageStatC: public IntImageC { public: // Constructors, copy, assigment, and destructor // --------------------------------------------- inline IntImageStatC(); // Creates the engine attached to the empty image. inline IntImageStatC(const IntImageC & img); // Creates the engine attached to the image 'img'. inline IntImageStatC(const IntImageStatC & eng); // Creates another engine attached to the image which is attached // to the engine 'eng'. inline IntImageStatC(const IntImageC & img, const ImageRectangleC & rect); // Creates the engine attached to the subimage of the image 'img' // limited by the rectangle 'rect'. inline const IntImageStatC & operator=(const IntImageStatC & im); // Assigment. // Extremal values // --------------- PixelC MaxPixel() const; // Returns the first pixel with the maximum value. PixelC MinPixel() const; // Returns the first pixel with the minimum value. IntMinMax1dC MinMax() const; // Returns the extremal values in the image. // Mean and variance // ----------------- Mean1dC::NumberT Count(GreyValueT level) const; // Returns the number of pixels at 'level' in the image. Mean1dC Mean() const; // Returns the mean of intensities of all pixel values. LinearSums1dC IntensitySums() const; // Returns the sums of intensities of all pixel values. }; // ------------------------------------------------------------------------ // *** IntImageStatC ***************************************************** // ------------------------------------------------------------------------ inline IntImageStatC::IntImageStatC() //============================ : IntImageC() {} inline IntImageStatC::IntImageStatC(const IntImageC & img) //================================================= : IntImageC(img) {} inline IntImageStatC::IntImageStatC(const IntImageStatC & eng) //===================================================== : IntImageC(eng) {} inline IntImageStatC::IntImageStatC(const IntImageC & img, const ImageRectangleC & rect) //======================================================== : IntImageC(img,rect) {} inline const IntImageStatC & IntImageStatC::operator=(const IntImageStatC & im) //================================================ { IntImageC::operator=(im); return *this; } #endif // IAPS - Image analysis program system. // End of include file IImgStat.hh