28 #ifndef LATTICES_LATTICEHISTOGRAMS_H 29 #define LATTICES_LATTICEHISTOGRAMS_H 33 #include <casacore/casa/aips.h> 34 #include <casacore/lattices/LatticeMath/TiledCollapser.h> 35 #include <casacore/lattices/LatticeMath/LatticeStatistics.h> 36 #include <casacore/lattices/LatticeMath/LatticeProgress.h> 37 #include <casacore/casa/Logging/LogIO.h> 38 #include <casacore/casa/System/PGPlotter.h> 39 #include <casacore/scimath/Mathematics/NumericTraits.h> 40 #include <casacore/casa/iosfwd.h> 45 template <
class T>
class MaskedLattice;
46 template <
class T>
class TempLattice;
47 template <
class T>
class Vector;
471 virtual void init (
uInt nOutPixelsPerCollapse);
477 virtual void process (
490 virtual void endAccumulator(
Array<T>& result,
495 virtual Bool canHandleNullMask()
const {
return True;};
509 #ifndef CASACORE_NO_AUTO_TEMPLATES 510 #include <casacore/lattices/LatticeMath/LatticeHistograms.tcc> 511 #endif //# CASACORE_NO_AUTO_TEMPLATES A Vector of integers, for indexing into Array<T> objects.
Vector< Int > cursorAxes_p
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.
Bool generateStorageLattice()
Iterate through the lattice and generate the histogram accumulation lattice.
String errorMessage() const
Recover last error message.
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.
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...
Vector< Int > displayAxes() const
Return the display axes.
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.
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 ...
LatticeHistograms< T > & operator=(const LatticeHistograms< T > &other)
Assignment operator (copy semantics)
Char PrecisionType
Higher precision type (Float->Double)
virtual String writeCoordinates(const IPosition &histPos) const
Make a string with pixel coordinates of display axes.
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 writeDispAxesValues(const String &coords, PGPlotter &plotter, Float nchar) const
Write values of display axes on plots.
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.
Bool goodParameterStatus_p
void listStatistics(LogIO &os, const Vector< T > &stats, T binWidth)
List statistics.
Compute and display various statistics from a lattice.
Bool setNewLattice(const MaskedLattice< T > &lattice)
Set a MaskedLattice.
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.
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape...
template <class T, class U> class vector;
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.
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
this file contains all the compiler specific defines
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.