casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ImageHistogramsCalculator.h
Go to the documentation of this file.
1 //# ImageHistogramCalculatorr.h: 2D convolution of an image
2 //# Copyright (C) 1996,1997,1998,1999,2000,2001,2002,2003
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //# $Id: Image2DConvolver.h 20229 2008-01-29 15:19:06Z gervandiepen $
27 
28 #ifndef IMAGEANALYSIS_IMAGEHISTOGRAMSCALCULATOR_H
29 #define IMAGEANALYSIS_IMAGEHISTOGRAMSCALCULATOR_H
30 
32 
33 #include <casa/aips.h>
34 
35 namespace casa {
36 
37 // <summary>
38 // This class computes histograms of image pixel values.
39 // </summary>
40 
41 // <use visibility=export>
42 
43 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
44 // </reviewed>
45 
46 // <prerequisite>
47 // </prerequisite>
48 
49 // <etymology>
50 // This class computes histograms of image pixel values.
51 // </etymology>
52 
53 // <synopsis>
54 // This class computes histograms of image pixel values.
55 // </synopsis>
56 
57 // <example>
58 // <srcBlock>
59 // </srcBlock>
60 // </example>
61 
62 // <motivation>
63 // users like histograms.
64 // </motivation>
65 // <li>
66 // </todo>
67 
68 template <class T> class ImageHistogramsCalculator : public ImageTask<T> {
69 public:
70 
72 
73  ImageHistogramsCalculator() = delete;
74 
76  const SPCIIT image, const casacore::Record *const &regionPtr,
77  const casacore::String& mask
78  );
79 
81 
83 
85  const ImageHistogramsCalculator &other
86  ) = delete;
87 
88  casacore::Record compute() const;
89 
90  casacore::String getClass() const { return CLASS_NAME; }
91 
92  // set cursor axes
93  void setAxes(const std::vector<casacore::uInt>& axes) { _axes = axes; };
94 
95  // should the histogram be cumulative
97 
98  // If true, force the storage lattice to be written to disk.
99  void setDisk(casacore::Bool b) { _disk = b; }
100 
101  // If true, the counts should be returned as log10 of the actual counts
103 
104  // set include range
105  void setIncludeRange(const std::vector<double>& r) { _includeRange = r; }
106 
107  // If true list stats to logger
109 
110  // set number of bins
111  void setNBins(casacore::uInt n) { _nbins = n; }
112 
113 protected:
114 
117  }
118 
119  std::vector<casacore::Coordinate::Type> _getNecessaryCoordinates() const {
120  return std::vector<casacore::Coordinate::Type>();
121  }
122 
123  inline casacore::Bool _supportsMultipleRegions() const {return true;}
124 
125 private:
130  std::vector<casacore::uInt> _axes;
132  std::vector<double> _includeRange;
133 
134 };
135 
136 }
137 
138 #ifndef AIPS_NO_TEMPLATE_SRC
139 #include <imageanalysis/ImageAnalysis/ImageHistogramsCalculator.tcc>
140 #endif
141 
142 #endif
static const casacore::String CLASS_NAME
void setDisk(casacore::Bool b)
If true, force the storage lattice to be written to disk.
LatticeExprNode mask(const LatticeExprNode &expr)
This function returns the mask of the given expression.
std::vector< casacore::uInt > _axes
void setNBins(casacore::uInt n)
set number of bins
casacore::Record compute() const
void setIncludeRange(const std::vector< double > &r)
set include range
void setAxes(const std::vector< casacore::uInt > &axes)
set cursor axes
void setListStats(casacore::Bool b)
If true list stats to logger.
This class computes histograms of image pixel values.
A hierarchical collection of named fields of various types.
Definition: Record.h:180
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
#define SPCIIT
Definition: ImageTypedefs.h:35
casacore::Bool _supportsMultipleRegions() const
String: the storage and methods of handling collections of characters.
Definition: String.h:223
std::vector< casacore::Coordinate::Type > _getNecessaryCoordinates() const
Represents the minimum set of coordinates necessary for the task to function.
void setDoLog10(casacore::Bool b)
If true, the counts should be returned as log10 of the actual counts.
void setCumulative(casacore::Bool b)
should the histogram be cumulative
ImageHistogramsCalculator & operator=(const ImageHistogramsCalculator &other)=delete
CasacRegionManager::StokesControl _getStokesControl() const
unsigned int uInt
Definition: aipstype.h:51