28 #ifndef LATTICES_LATTICEHISTOGRAMS_H
29 #define LATTICES_LATTICEHISTOGRAMS_H
46 template <
class T>
class MaskedLattice;
47 template <
class T>
class TempLattice;
471 virtual void init (
uInt nOutPixelsPerCollapse);
509 #ifndef CASACORE_NO_AUTO_TEMPLATES
510 #include <casacore/lattices/LatticeMath/LatticeHistograms.tcc>
511 #endif //# CASACORE_NO_AUTO_TEMPLATES
virtual void initAccumulator(uInt64 n1, uInt64 n3)
Initialize the accumulator.
A Vector of integers, for indexing into Array<T> objects.
Vector< Int > cursorAxes_p
void getStatistics(Vector< T > &stats, const IPosition &pos) const
Get the statistics from the statistics object for the current location of either the input lattice...
TempLattice< T > * pStoreLattice_p
A Lattice that can be used for temporary storage.
Bool needStorageLattice_p
Bool displayHistograms()
Display histograms as a function of display axis.
Generate histograms, tile by tile, from a masked lattice.
String errorMessage() const
Recover last error message.
Bool generateStorageLattice()
Iterate through the lattice and generate the histogram accumulation lattice.
unsigned long long uInt64
void closePlotting()
CLose the plotter.
void extractOneHistogram(T &linearSum, T &linearYMax, Vector< T > &values, Vector< T > &counts, const Vector< T > &stats, const Vector< T > &intCounts)
Fish out and convert to the appropriate form one histogram from the storage lattice.
Vector< Int > displayAxes_p
Bool setAxes(const Vector< Int > &cursorAxes)
Set the cursor axes (0 relative).
A templated, abstract base class for array-like objects with masks.
Bool getHistogram(Vector< T > &values, Vector< T > &counts, const IPosition &pos, const Bool posInLattice=False)
This function retrieves the histogram at the specified location into Vectors.
ostream-like interface to creating log messages.
IPosition locHistInLattice(const IPosition &histPosition, Bool relativeToParent=True) const
Given a location in the histogram storage lattice, convert those locations on the non-histogram axis ...
Bool setNBins(const uInt &nBins)
Set the number of bins for the histogram.
Bool setInclude(Vector< T > &range, Bool &noInclude, const Vector< T > &include, ostream &os)
Check/set include pixel range.
LatticeHistograms< T > & operator=(const LatticeHistograms< T > &other)
Assignment operator (copy semantics)
Char PrecisionType
Higher precision type (Float->Double)
virtual void endAccumulator(Array< T > &result, Array< Bool > &resultMask, const IPosition &shape)
End the accumulation process and return the result arrays.
Abstract base class to collapse chunks for LatticeApply.
Bool setPlotting(PGPlotter &plotter, const Vector< Int > &nxy)
This function sets the name of the PGPLOT plotting device and the number of subplots in x and y per p...
const MaskedLattice< T > * pInLattice_p
Bool setIncludeRange(const Vector< T > &include)
Specify a pixel intensity range for which all pixels in that range are included.
static T convertF(const Float value)
Convert a Float (from plotting) to a T
Bool setForm(const Bool &doLog, const Bool &doCumu)
Specify the form of the histogram.
virtual void process(uInt accumIndex1, uInt accumIndex3, const T *inData, const Bool *inMask, uInt inDataIncr, uInt inMaskIncr, uInt nrval, const IPosition &startPos, const IPosition &shape)
Process the data in the current chunk.
Bool goodParameterStatus_p
void listStatistics(LogIO &os, const Vector< T > &stats, T binWidth)
List statistics.
Compute and display various statistics from a lattice.
virtual void init(uInt nOutPixelsPerCollapse)
Initialize process, making some checks.
Bool setNewLattice(const MaskedLattice< T > &lattice)
Set a MaskedLattice.
HistTiledCollapser(LatticeStatistics< T > *pStats, uInt nBins)
Constructor.
Bool displayOneHistogram(const T &linearSum, const T &linearYMax, const IPosition &histPos, const Vector< T > &stats, const Vector< T > &values, const Vector< T > &counts, PGPlotter &plotter)
Display one histogram.
bool Bool
Define the standard types used by Casacore.
Bool setStatsList(const Bool &doList)
This function allows you to control whether some statistics of the data that contributed to the histo...
LatticeStatistics< T > * pStats_p
virtual ~LatticeHistograms()
Destructor.
Bool display()
Display the histograms by plotting them.
void resetError()
Reset argument error condition.
Bool writeDispAxesValues(const String &coords, PGPlotter &plotter, Float nchar) const
Write values of display axes on plots.
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape...
Standard plotting object for application programmers.
LogIO os_p
These things are protected only so that they are available to ImageHistograms which inherits from Lat...
Bool getHistograms(Array< T > &values, Array< T > &counts)
This function retrieves the histograms into Array.
NumericTraits< T >::PrecisionType AccumType
A useful typedef.
String: the storage and methods of handling collections of characters.
virtual ~HistTiledCollapser()
LatticeHistograms(const MaskedLattice< T > &lattice, LogIO &os, Bool showProgress=True, Bool forceDisk=False)
Constructor takes the MaskedLattice and a LogIO object for logging.
void setStream(ostream &os, Int oPrec)
Set stream attributes.
LatticeStatistics< T > * pStats_p
virtual String writeCoordinates(const IPosition &histPos) const
Make a string with pixel coordinates of display axes.
virtual Bool canHandleNullMask() const
Can handle null mask.
Vector< Int > displayAxes() const
Return the display axes.
LatticeExprNode real(const LatticeExprNode &expr)
Bool makeStatistics()
Create and fill statistics object.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
Displays histograms of regions from a lattice.
Bool setGaussian(const Bool &doGauss)
Specify that a Gaussian overlay should be plotted on the histogram.
void makeHistograms()
Fill histograms storage lattice.
static Float convertT(const T value)
Convert a T to a Float for plotting.