#include <itkHistogram.h>
Inheritance diagram for itk::Statistics::Histogram< TMeasurement, VMeasurementVectorSize, TFrequencyContainer >:
Public Types | |
typedef Histogram | Self |
typedef Sample< FixedArray< TMeasurement, VMeasurementVectorSize > > | Superclass |
typedef SmartPointer< Self > | Pointer |
typedef SmartPointer< const Self > | ConstPointer |
typedef TMeasurement | MeasurementType |
typedef Superclass::MeasurementVectorType | MeasurementVectorType |
typedef Superclass::InstanceIdentifier | InstanceIdentifier |
typedef MeasurementVectorType | ValueType |
typedef Superclass::MeasurementVectorSizeType | MeasurementVectorSizeType |
typedef TFrequencyContainer | FrequencyContainerType |
typedef FrequencyContainerType::Pointer | FrequencyContainerPointer |
typedef FrequencyContainerType::FrequencyType | FrequencyType |
typedef FrequencyContainerType::TotalFrequencyType | TotalFrequencyType |
typedef itk::Index< VMeasurementVectorSize > | IndexType |
typedef IndexType::IndexValueType | IndexValueType |
typedef itk::Size< VMeasurementVectorSize > | SizeType |
typedef SizeType::SizeValueType | SizeValueType |
typedef std::vector< MeasurementType > | BinMinVectorType |
typedef std::vector< MeasurementType > | BinMaxVectorType |
typedef std::vector< BinMinVectorType > | BinMinContainerType |
typedef std::vector< BinMaxVectorType > | BinMaxContainerType |
Public Member Functions | |
virtual const char * | GetNameOfClass () const |
itkStaticConstMacro (MeasurementVectorSize, unsigned int, VMeasurementVectorSize) | |
void | Initialize (const SizeType &size) |
void | Initialize (const SizeType &size, MeasurementVectorType &lowerBound, MeasurementVectorType &upperBound) |
void | SetToZero () |
const IndexType & | GetIndex (const MeasurementVectorType &measurement) const |
bool | GetIndex (const MeasurementVectorType &measurement, IndexType &index) const |
const IndexType & | GetIndex (const InstanceIdentifier &id) const |
virtual bool | GetClipBinsAtEnds () |
virtual void | SetClipBinsAtEnds (bool _arg) |
bool | IsIndexOutOfBounds (const IndexType &index) const |
InstanceIdentifier | GetInstanceIdentifier (const IndexType &index) const |
unsigned int | Size () const |
SizeType | GetSize () const |
SizeValueType | GetSize (const unsigned int dimension) const |
const MeasurementType & | GetBinMin (const unsigned int dimension, const unsigned long nbin) const |
const MeasurementType & | GetBinMax (const unsigned int dimension, const unsigned long nbin) const |
void | SetBinMin (const unsigned int dimension, const unsigned long nbin, const MeasurementType min) |
void | SetBinMax (const unsigned int dimension, unsigned long nbin, const MeasurementType max) |
const MeasurementType & | GetBinMinFromValue (const unsigned int dimension, const float value) const |
const MeasurementType & | GetBinMaxFromValue (const unsigned int dimension, const float value) const |
const BinMinVectorType & | GetDimensionMins (const unsigned int dimension) const |
const BinMaxVectorType & | GetDimensionMaxs (const unsigned int dimension) const |
const BinMinContainerType & | GetMins () const |
const BinMaxContainerType & | GetMaxs () const |
MeasurementVectorType & | GetHistogramMinFromIndex (const IndexType &index) |
MeasurementVectorType & | GetHistogramMaxFromIndex (const IndexType &index) |
FrequencyType | GetFrequency (const InstanceIdentifier &id) const |
FrequencyType | GetFrequency (const IndexType &index) const |
void | SetFrequency (const FrequencyType value) |
bool | SetFrequency (const InstanceIdentifier &id, const FrequencyType value) |
bool | SetFrequency (const IndexType &index, const FrequencyType value) |
bool | SetFrequency (const MeasurementVectorType &measurement, const FrequencyType value) |
bool | IncreaseFrequency (const InstanceIdentifier &id, const FrequencyType value) |
bool | IncreaseFrequency (const IndexType &index, const FrequencyType value) |
bool | IncreaseFrequency (const MeasurementVectorType &measurement, const FrequencyType value) |
const MeasurementVectorType & | GetMeasurementVector (const InstanceIdentifier &id) const |
const MeasurementVectorType & | GetMeasurementVector (const IndexType &index) const |
MeasurementType | GetMeasurement (const unsigned long n, const unsigned int dimension) const |
TotalFrequencyType | GetTotalFrequency () const |
FrequencyType | GetFrequency (const unsigned long n, const unsigned int dimension) const |
Iterator | Begin () |
Iterator | End () |
ConstIterator | Begin () const |
ConstIterator | End () const |
virtual void | SetMeasurementVectorSize (const MeasurementVectorSizeType s) |
MeasurementVectorSizeType | GetMeasurementVectorSize () const |
double | Quantile (const unsigned int dimension, const double &p) const |
Static Public Member Functions | |
Pointer | New () |
Protected Member Functions | |
void | PrintSelf (std::ostream &os, Indent indent) const |
Histogram () | |
virtual | ~Histogram () |
Protected Attributes | |
SizeType | m_Size |
Histogram represents an ND histogram. Histogram bins can be regularly or irregularly spaced. The storage for the histogram is managed via the FrequencyContainer specified by the template argument. The default frequency container is a DenseFrequencyContainer. A SparseFrequencyContainer can be used as an alternative.
Frequencies of a bin (SetFrequency(), IncreaseFrequency()) can be specified by measurement, index, or instance identifier.
Measurements can be queried by bin index or instance identifier. In this case, the measurement returned in the centroid of the histogram bin.
The Initialize() method is used to specified the number of bins for each dimension of the histogram. An overloaded version also allows for regularly spaced bins to defined. To define irregularly sized bins, use the SetBinMin()/SetBinMax() methods.
If you do not know the length of the measurement vector at compile time, you can set the second template parameter to 0. This can conveniently be obtained from MeasurementVectorTraits. For instance, instantiate a histogram as below:
typedef Histogram< THistogramMeasurement, typename MeasurementVectorTraits< MeasurementVectorType >::MeasurementVectorLength, TFrequencyContainer > HistogramType;
Definition at line 82 of file itkHistogram.h.
|
Definition at line 134 of file itkHistogram.h. |
|
Definition at line 132 of file itkHistogram.h. |
|
Definition at line 133 of file itkHistogram.h. |
|
bin min max value storage types Definition at line 131 of file itkHistogram.h. |
|
Reimplemented from itk::Statistics::Sample< FixedArray< TMeasurement, VMeasurementVectorSize > >. Definition at line 92 of file itkHistogram.h. |
|
Definition at line 116 of file itkHistogram.h. |
|
frequency container typedef Definition at line 115 of file itkHistogram.h. |
|
Frequency and TotalFrequency value type from superclass Reimplemented from itk::Statistics::Sample< FixedArray< TMeasurement, VMeasurementVectorSize > >. Definition at line 119 of file itkHistogram.h. |
|
Index typedef support. An index is used to access pixel values. Definition at line 123 of file itkHistogram.h. |
|
Definition at line 124 of file itkHistogram.h. |
|
InstanceIdentifier typedef. This identifier is a unique sequential id for each measurement vector in a Sample subclass. Reimplemented from itk::Statistics::Sample< FixedArray< TMeasurement, VMeasurementVectorSize > >. Definition at line 110 of file itkHistogram.h. |
|
type of an element of a measurement vector Reimplemented from itk::Statistics::Sample< FixedArray< TMeasurement, VMeasurementVectorSize > >. Definition at line 106 of file itkHistogram.h. |
|
Typedef for the length of each measurement vector Reimplemented from itk::Statistics::Sample< FixedArray< TMeasurement, VMeasurementVectorSize > >. Definition at line 112 of file itkHistogram.h. |
|
Common sample class typedefs Reimplemented from itk::Statistics::Sample< FixedArray< TMeasurement, VMeasurementVectorSize > >. Definition at line 109 of file itkHistogram.h. Referenced by itk::Statistics::Histogram< TMeasurement, VMeasurementVectorSize, TFrequencyContainer >::ConstIterator::GetInstanceIdentifier(), and itk::Statistics::Histogram< TMeasurement, VMeasurementVectorSize, TFrequencyContainer >::Iterator::GetInstanceIdentifier(). |
|
Reimplemented from itk::Statistics::Sample< FixedArray< TMeasurement, VMeasurementVectorSize > >. Definition at line 91 of file itkHistogram.h. |
|
Standard typedefs Reimplemented from itk::Statistics::Sample< FixedArray< TMeasurement, VMeasurementVectorSize > >. Definition at line 89 of file itkHistogram.h. Referenced by itk::Statistics::Histogram< TMeasurement, VMeasurementVectorSize, TFrequencyContainer >::ConstIterator::ConstIterator(), and itk::Statistics::Histogram< TMeasurement, VMeasurementVectorSize, TFrequencyContainer >::Iterator::Iterator(). |
|
size array type Definition at line 127 of file itkHistogram.h. |
|
Definition at line 128 of file itkHistogram.h. |
|
Reimplemented from itk::Statistics::Sample< FixedArray< TMeasurement, VMeasurementVectorSize > >. Definition at line 90 of file itkHistogram.h. |
|
Total frequency type Reimplemented from itk::Statistics::Sample< FixedArray< TMeasurement, VMeasurementVectorSize > >. Definition at line 120 of file itkHistogram.h. |
|
Definition at line 111 of file itkHistogram.h. |
|
|
|
Definition at line 514 of file itkHistogram.h. |
|
Definition at line 486 of file itkHistogram.h. |
|
Definition at line 475 of file itkHistogram.h. |
|
Definition at line 492 of file itkHistogram.h. |
|
Definition at line 481 of file itkHistogram.h. |
|
Get the maximum value of nth bin of dimension d Definition at line 203 of file itkHistogram.h. |
|
Get the maximum of the bin along dimension d corresponding to a particular measurement. |
|
Get the minimum value of nth bin of dimension d Definition at line 198 of file itkHistogram.h. |
|
Get the minimum of the bin along dimension d corresponding to a particular measurement. |
|
Is set to false if the bins at edges of the histogram extend to +/- infinity. |
|
Get the vector of maximums along a dimension Definition at line 232 of file itkHistogram.h. |
|
Get the vector of bin minimums along a dimension Definition at line 228 of file itkHistogram.h. |
|
Get the frequency of a dimension's nth element. |
|
Get the frequency of an index |
|
Get the frequency of an instance indentifier Implements itk::Statistics::Sample< FixedArray< TMeasurement, VMeasurementVectorSize > >. Definition at line 259 of file itkHistogram.h. |
|
Get the maximums of the bin corresponding to a particular index |
|
Get the minimums of the bin corresponding to a particular index |
|
Get the index that is uniquely labelled by an instance identifier The corresponding id is the offset of the index This method uses ImageBase::ComputeIndex() method |
|
Get the index of histogram corresponding to the specified measurement value. Returns true if index is valid and false if the measurement is outside the histogram |
|
Get the index of a measurement value from the histogram.
|
|
Get the instance identifier of the bin that is indexed by the index. The corresponding instance identifier is the offset of the index This method uses ImageBase::ComputeIndex() method |
|
Method the maximums of the bins Definition at line 240 of file itkHistogram.h. |
|
Get the measurement a bin along a specified dimension. This is the midpoint of the bin along that dimension. |
|
Get the measurement of an index. This is the centroid of the bin. |
|
Get the measurement of an instance identifier. This is the centroid of the bin. Implements itk::Statistics::Sample< FixedArray< TMeasurement, VMeasurementVectorSize > >. |
|
Reimplemented from itk::Statistics::Sample< FixedArray< TMeasurement, VMeasurementVectorSize > >. Definition at line 506 of file itkHistogram.h. |
|
Get the minimums of the bins Definition at line 236 of file itkHistogram.h. |
|
Run-time type information (and related methods). Reimplemented from itk::Statistics::Sample< FixedArray< TMeasurement, VMeasurementVectorSize > >. |
|
Get the size of histogram along a specified dimension Definition at line 192 of file itkHistogram.h. |
|
Get the size (N-dimensional) of the histogram Definition at line 188 of file itkHistogram.h. |
|
Get the total frequency in the histogram Implements itk::Statistics::Sample< FixedArray< TMeasurement, VMeasurementVectorSize > >. |
|
Increase the frequency of a measurement. Frequency is increased by the specified value. Returns false if the measurement is outside the bounds of the histogram. |
|
Increase the frequency of an index. Frequency is increased by the specified value. Returns false if the bin is out of bounds. |
|
Increase the frequency of an instance identifier. Frequency is increased by the specified value. Returns false if the bin is out of bounds. Definition at line 287 of file itkHistogram.h. |
|
Initialize the histogram using equal size bins. To assign bin's min and max values along each dimension use SetBinMin() and SetBinMax() functions. |
|
Initialize the histogram, generating the offset table and preparing the frequency container. Subclasses should call this method in their Initialize() method. |
|
Returns true if the given index is out of bound meaning one of index is not between [0, last index] |
|
Dimension of a measurement vector |
|
standard New() method support Reimplemented from itk::Object. |
|
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes. Reimplemented from itk::Statistics::Sample< FixedArray< TMeasurement, VMeasurementVectorSize > >. |
|
Get the pth percentile value for a dimension. Let assume n = the index of the bin where the p-th percentile value is, min = min value of the dimension of the bin, max = max value of the dimension of the bin, interval = max - min , pp = cumlated proportion until n-1 bin ; and pb = frequency of the bin / total frequency of the dimension. If p is less than 0.5, the percentile value = min + ((p - pp ) / pb) * interval If p is greater than or equal to 0.5 the percentile value = max - ((pp - p) / pb) * interval |
|
Set the maximum value of nth bin of dimension d Definition at line 213 of file itkHistogram.h. |
|
Set the minimum value of nth bin of dimension d Definition at line 208 of file itkHistogram.h. |
|
Set to false to have the bins at edges of the histogram extend to +/- infinity. |
|
Set the frequency of a measurement. Returns false if the bin is out of bounds. |
|
Set the frequency of an index. Returns false if the bin is out of bounds. |
|
Set the frequency of an instance identifier. Returns false if the bin is out of bounds. Definition at line 270 of file itkHistogram.h. |
|
Set all the bins in the histogram to a specified frequency |
|
Set/Get macros for the length of the measurement vector Reimplemented from itk::Statistics::Sample< FixedArray< TMeasurement, VMeasurementVectorSize > >. Definition at line 497 of file itkHistogram.h. |
|
Initialize the values of the histogram bins to zero |
|
Returns the number of instances (bins or cells) in this container Implements itk::Statistics::Sample< FixedArray< TMeasurement, VMeasurementVectorSize > >. |
|
Definition at line 517 of file itkHistogram.h. |