ifw-odp  2.0.0
imageStatistics.hpp
Go to the documentation of this file.
1 
9 #ifndef ODP_IMAGE_STATISTICS_HPP
10 #define ODP_IMAGE_STATISTICS_HPP
11 
12 
13 #ifndef __cplusplus
14 #error This is a C++ include file and cannot be used from plain C
15 #endif
16 
17 // System header files
18 
19 // CPL header files
20 
21 
22 // Local header files
23 #include "cppcpl/error.hpp"
24 #include "cppcpl/image.hpp"
25 
26 
27 namespace odp {
38  class ImageStatistics : virtual public odp::Error
39  {
40  public:
47  explicit ImageStatistics(const odp::Image *image);
48 
49 
56  virtual ~ImageStatistics();
57 
58 
59  // Statistical interface functions to CPL
60 
66  double GetMin () const;
67 
73  double GetMax () const;
74 
80  double GetMean () const;
81 
87  double GetMedian () const;
88 
94  double GetStdev () const;
95 
101  double GetFlux () const;
102 
108  double GetAbsFlux() const;
109 
115  double GetSqFlux () const;
116 
128  double GetMin (const cpl_size llx,
129  const cpl_size lly,
130  const cpl_size urx,
131  const cpl_size ury) const;
132 
145  double GetMax (const cpl_size llx,
146  const cpl_size lly,
147  const cpl_size urx,
148  const cpl_size ury) const;
149 
150 
163  double GetMean (const cpl_size llx,
164  const cpl_size lly,
165  const cpl_size urx,
166  const cpl_size ury) const;
167 
168 
181  double GetMedian (const cpl_size llx,
182  const cpl_size lly,
183  const cpl_size urx,
184  const cpl_size ury) const;
185 
186 
199  double GetStdev (const cpl_size llx,
200  const cpl_size lly,
201  const cpl_size urx,
202  const cpl_size ury) const;
203 
204 
217  double GetFlux (const cpl_size llx,
218  const cpl_size lly,
219  const cpl_size urx,
220  const cpl_size ury) const;
221 
222 
223 
236  double GetAbsFlux(const cpl_size llx,
237  const cpl_size lly,
238  const cpl_size urx,
239  const cpl_size ury) const;
240 
241 
254  double GetSqFlux(const cpl_size llx,
255  const cpl_size lly,
256  const cpl_size urx,
257  const cpl_size ury) const;
258 
259 
260  private:
261 
275  double CallCplStat(double (*fp)(const cpl_image *)) const ;
276 
294  double CallCplStatBox(double (*fp)(const cpl_image *,
295  const cpl_size,
296  const cpl_size,
297  const cpl_size,
298  const cpl_size),
299  const cpl_size llx,
300  const cpl_size lly,
301  const cpl_size urx,
302  const cpl_size ury) const;
303 
304  private:
305  const odp::Image* m_image_ptr;
306  };
307 
308 }
309 
310 #include "imageStatistics.ipp"
311 
312 
313 #endif
odp::ImageStatistics::GetMedian
double GetMedian() const
Get median pixel value over an image.
odp::ImageStatistics::GetFlux
double GetFlux(const cpl_size llx, const cpl_size lly, const cpl_size urx, const cpl_size ury) const
Get sum of pixel values over a window of an image.
odp::ImageStatistics::GetAbsFlux
double GetAbsFlux() const
Get sum of absolute pixel values over an image.
odp::ImageStatistics::GetMin
double GetMin() const
Get minimum pixel value over an image.
odp::ImageStatistics::GetFlux
double GetFlux() const
Get the sum of pixel values over an image.
odp::ImageStatistics::ImageStatistics
ImageStatistics(const odp::Image *image)
Class constructor.
Definition: imageStatistics.cpp:18
odp::ImageStatistics::GetMedian
double GetMedian(const cpl_size llx, const cpl_size lly, const cpl_size urx, const cpl_size ury) const
Get median pixel value over a window of an image.
odp::ImageStatistics::GetMean
double GetMean() const
Get mean pixel value over an image.
odp::Error
This class handle the errors produced by the calling of image processing routines.
Definition: error.hpp:35
odp
Definition: array.cpp:17
odp::ImageStatistics::GetMax
double GetMax(const cpl_size llx, const cpl_size lly, const cpl_size urx, const cpl_size ury) const
Get maximum pixel value over a window of an image.
odp::ImageStatistics::GetStdev
double GetStdev(const cpl_size llx, const cpl_size lly, const cpl_size urx, const cpl_size ury) const
Get standard deviation over a window of an image.
odp::ImageStatistics::~ImageStatistics
virtual ~ImageStatistics()
Class destructor.
Definition: imageStatistics.cpp:25
odp::ImageStatistics::GetSqFlux
double GetSqFlux() const
Get sum of squared pixel values over an image.
odp::ImageStatistics::GetStdev
double GetStdev() const
Get standard deviation value over an image.
odp::ImageStatistics::GetAbsFlux
double GetAbsFlux(const cpl_size llx, const cpl_size lly, const cpl_size urx, const cpl_size ury) const
Get sum of absolute pixel values over a window of an image.
image.hpp
Image class header file.
odp::ImageStatistics
This class is interface for a CPL image statistics functions. It provides a simplified interface that...
Definition: imageStatistics.hpp:39
odp::ImageStatistics::GetMean
double GetMean(const cpl_size llx, const cpl_size lly, const cpl_size urx, const cpl_size ury) const
Get mean pixel value over a window of an image.
odp::Image
This class is C++ wrapper for a CPL image object. It provides a simplified interface that allows to c...
Definition: image.hpp:44
odp::ImageStatistics::GetMin
double GetMin(const cpl_size llx, const cpl_size lly, const cpl_size urx, const cpl_size ury) const
Get minimum pixel value over a window of an image.
odp::ImageStatistics::GetMax
double GetMax() const
Get maximum pixel value over an image.
error.hpp
Error class header file.
odp::ImageStatistics::GetSqFlux
double GetSqFlux(const cpl_size llx, const cpl_size lly, const cpl_size urx, const cpl_size ury) const
Get sum of squared pixel values over a window of an image.