ifw-odp 5.0.0
Loading...
Searching...
No Matches
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#include <string>
19
20// CPL header files
21
22
23// Local header files
26
27
28namespace ifw::odp {
39 class ImageStatistics : virtual public odp::Error
40 {
41 public:
48 explicit ImageStatistics(const odp::Image *image);
49
50
57 virtual ~ImageStatistics();
58
59
60 // Statistical interface functions to CPL
61
67 double GetMin () const;
68
74 double GetMax () const;
75
81 double GetMean () const;
82
88 double GetMedian () const;
89
95 double GetStdev () const;
96
102 double GetFlux () const;
103
109 double GetAbsFlux() const;
110
116 double GetSqFlux () const;
117
129 double GetMin (const cpl_size llx,
130 const cpl_size lly,
131 const cpl_size urx,
132 const cpl_size ury) const;
133
146 double GetMax (const cpl_size llx,
147 const cpl_size lly,
148 const cpl_size urx,
149 const cpl_size ury) const;
150
151
164 double GetMean (const cpl_size llx,
165 const cpl_size lly,
166 const cpl_size urx,
167 const cpl_size ury) const;
168
169
182 double GetMedian (const cpl_size llx,
183 const cpl_size lly,
184 const cpl_size urx,
185 const cpl_size ury) const;
186
187
200 double GetStdev (const cpl_size llx,
201 const cpl_size lly,
202 const cpl_size urx,
203 const cpl_size ury) const;
204
205
218 double GetFlux (const cpl_size llx,
219 const cpl_size lly,
220 const cpl_size urx,
221 const cpl_size ury) const;
222
223
224
237 double GetAbsFlux(const cpl_size llx,
238 const cpl_size lly,
239 const cpl_size urx,
240 const cpl_size ury) const;
241
242
255 double GetSqFlux(const cpl_size llx,
256 const cpl_size lly,
257 const cpl_size urx,
258 const cpl_size ury) const;
259
260
261 private:
262
276 double CallCplStat(double (*fp)(const cpl_image *)) const ;
277
295 double CallCplStatBox(double (*fp)(const cpl_image *,
296 const cpl_size,
297 const cpl_size,
298 const cpl_size,
299 const cpl_size),
300 const cpl_size llx,
301 const cpl_size lly,
302 const cpl_size urx,
303 const cpl_size ury) const;
304
305 private:
306 const odp::Image* m_image_ptr;
307 };
308
309}
310
311#include "imageStatistics.ipp"
312
313
314#endif
This class handle the errors produced by the calling of image processing routines.
Definition error.hpp:35
This class is interface for a CPL image statistics functions. It provides a simplified interface that...
Definition imageStatistics.hpp:40
ImageStatistics(const odp::Image *image)
Class constructor.
Definition imageStatistics.cpp:17
double GetMedian() const
Get median pixel value over an image.
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.
virtual ~ImageStatistics()
Class destructor.
Definition imageStatistics.cpp:24
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.
double GetMax() const
Get maximum pixel value over an image.
double GetMean() const
Get mean pixel value over an image.
double GetFlux() const
Get the sum of pixel values over an image.
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.
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.
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.
double GetStdev() const
Get standard deviation value over an image.
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.
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.
double GetAbsFlux() const
Get sum of absolute pixel values over an image.
double GetSqFlux() const
Get sum of squared pixel values over an image.
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.
double GetMin() const
Get minimum pixel value over an image.
This class is C++ wrapper for a CPL image object. It provides a simplified interface that allows to c...
Definition image.hpp:44
Error class header file.
Image class header file.
Definition array.cpp:16