18 #ifndef itkHistogram_h
19 #define itkHistogram_h
75 template<
typename TMeasurement = float,
76 typename TFrequencyContainer = DenseFrequencyContainer2 >
78 public Sample< Array< TMeasurement > >
163 itkGetConstMacro(ClipBinsAtEnds,
bool);
167 itkSetMacro(ClipBinsAtEnds,
bool);
275 #ifdef ITKV3_COMPATIBILITY
306 unsigned int dimension)
const;
313 unsigned int dimension) const;
330 double Quantile(
unsigned int dimension,
double p) const;
334 double Mean(
unsigned int dimension) const;
357 m_Histogram = histogram;
375 return m_Histogram->GetFrequency(m_Id);
385 return m_Histogram->GetMeasurementVector(m_Id);
390 return m_Histogram->GetIndex(m_Id);
401 return ( m_Id != it.
m_Id );
406 return ( m_Id == it.
m_Id );
414 m_Id(id), m_Histogram(histogram)
452 return histogram->SetFrequency(this->
m_Id, value);
512 std::vector< std::vector< MeasurementType > >
m_Min;
515 std::vector< std::vector< MeasurementType > >
m_Max;
525 #ifndef ITK_MANUAL_INSTANTIATION
526 #include "itkHistogram.hxx"
Sample< ArrayType > Superclass
bool IsIndexOutOfBounds(const IndexType &index) const
Array class with size defined at construction time.
IndexType::ValueType IndexValueType
Iterator(Self *histogram)
double Quantile(unsigned int dimension, double p) const
InstanceIdentifier Size() const override
::itk::IndexValueType ValueType
ConstIterator(InstanceIdentifier id, const Self *histogram)
SmartPointer< Self > Pointer
bool IncreaseFrequencyOfMeasurement(const MeasurementVectorType &measurement, AbsoluteFrequencyType value)
MeasurementVectorTraits::InstanceIdentifier InstanceIdentifier
ConstIterator End() const
ConstIterator(const ConstIterator &it)
class that walks through the elements of the histogram.
itkLegacyMacro(const IndexType &GetIndex(const MeasurementVectorType &measurement) const)
const MeasurementVectorType & GetHistogramMaxFromIndex(const IndexType &index) const
void PrintSelf(std::ostream &os, Indent indent) const override
Superclass::InstanceIdentifier InstanceIdentifier
std::vector< BinMinVectorType > BinMinContainerType
const BinMinContainerType & GetMins() const
virtual void Graft(const DataObject *) override
void operator=(const Self &)
This class stores measurement vectors in the context of n-dimensional histogram.
InstanceIdentifier GetInstanceIdentifier(const IndexType &index) const
Superclass::MeasurementVectorSizeType MeasurementVectorSizeType
bool IncreaseFrequency(InstanceIdentifier id, AbsoluteFrequencyType value)
FrequencyContainerType::AbsoluteFrequencyType AbsoluteFrequencyType
TFrequencyContainer FrequencyContainerType
AbsoluteFrequencyType GetFrequency(InstanceIdentifier id) const override
SmartPointer< const Self > ConstPointer
ConstIterator & operator++()
virtual void Initialize() override
bool SetFrequency(const AbsoluteFrequencyType value)
const MeasurementVectorType & GetMeasurementVector() const
const BinMaxContainerType & GetMaxs() const
const MeasurementType & GetBinMax(unsigned int dimension, InstanceIdentifier nbin) const
void SetBinMax(unsigned int dimension, InstanceIdentifier nbin, MeasurementType max)
const BinMinVectorType & GetDimensionMins(unsigned int dimension) const
std::vector< MeasurementType > BinMaxVectorType
Array< ::itk::IndexValueType > IndexType
MeasurementType GetMeasurement(InstanceIdentifier n, unsigned int dimension) const
std::vector< std::vector< MeasurementType > > m_Max
std::vector< std::vector< MeasurementType > > m_Min
const IndexType & GetIndex() const
OffsetTableType m_OffsetTable
ConstIterator & operator=(const ConstIterator &it)
FrequencyContainerType::RelativeFrequencyType RelativeFrequencyType
Iterator(InstanceIdentifier id, Self *histogram)
const MeasurementType & GetBinMinFromValue(unsigned int dimension, float value) const
unsigned int m_NumberOfInstances
MeasurementVectorType ValueType
const MeasurementVectorType & GetHistogramMinFromIndex(const IndexType &index) const
Superclass::MeasurementVectorType MeasurementVectorType
Iterator(const Iterator &it)
bool IncreaseFrequencyOfIndex(const IndexType &index, AbsoluteFrequencyType value)
const MeasurementVectorType & GetMeasurementVector(InstanceIdentifier id) const override
bool GetIndex(const MeasurementVectorType &measurement, IndexType &index) const
std::vector< BinMaxVectorType > BinMaxContainerType
ConstIterator Begin() const
Iterator & operator=(const Iterator &it)
bool operator==(const ConstIterator &it)
TMeasurement MeasurementType
virtual MeasurementVectorSizeType GetMeasurementVectorSize() const
void SetBinMin(unsigned int dimension, InstanceIdentifier nbin, MeasurementType min)
MeasurementVectorType m_TempMeasurementVector
TotalAbsoluteFrequencyType GetTotalFrequency() const override
FrequencyContainerPointer m_FrequencyContainer
const MeasurementType & GetBinMin(unsigned int dimension, InstanceIdentifier nbin) const
TMeasurementVector MeasurementVectorType
unsigned int MeasurementVectorSizeType
double Mean(unsigned int dimension) const
const BinMaxVectorType & GetDimensionMaxs(unsigned int dimension) const
class that walks through the elements of the histogram.
const MeasurementType & GetBinMaxFromValue(unsigned int dimension, float value) const
FrequencyContainerType::TotalAbsoluteFrequencyType TotalAbsoluteFrequencyType
A collection of measurements for statistical analysis.
Control indentation during Print() invocation.
std::vector< MeasurementType > BinMinVectorType
FrequencyContainerType::Pointer FrequencyContainerPointer
bool SetFrequencyOfIndex(const IndexType &index, AbsoluteFrequencyType value)
Array< ::itk::SizeValueType > SizeType
void SetFrequency(AbsoluteFrequencyType value)
const SizeType & GetSize() const
bool SetFrequencyOfMeasurement(const MeasurementVectorType &measurement, AbsoluteFrequencyType value)
Base class for all data objects in ITK.
bool operator!=(const ConstIterator &it)
AbsoluteFrequencyType GetFrequency() const
Array< TMeasurement > ArrayType
InstanceIdentifier GetInstanceIdentifier() const
SizeType::ValueType SizeValueType
std::vector< InstanceIdentifier > OffsetTableType
ConstIterator(const Self *histogram)
FrequencyContainerType::TotalRelativeFrequencyType TotalRelativeFrequencyType