ifw-odp  2.0.0-alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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
This class is C++ wrapper for a CPL image object. It provides a simplified interface that allows to c...
Definition: image.hpp:43
double GetMin() const
Get minimum pixel value over an image.
double GetMax() const
Get maximum pixel value over an image.
double GetStdev() const
Get standard deviation value over an image.
This class handle the errors produced by the calling of image processing routines.
Definition: error.hpp:34
double GetFlux() const
Get the sum of pixel values over an image.
double GetMean() const
Get mean pixel value over an image.
double GetSqFlux() const
Get sum of squared pixel values over an image.
This class is interface for a CPL image statistics functions. It provides a simplified interface that...
Definition: imageStatistics.hpp:38
Error class header file.
ImageStatistics(const odp::Image *image)
Class constructor.
Definition: imageStatistics.cpp:18
double GetMedian() const
Get median pixel value over an image.
double GetAbsFlux() const
Get sum of absolute pixel values over an image.
virtual ~ImageStatistics()
Class destructor.
Definition: imageStatistics.cpp:25
Image class header file.