76template <
typename TMeasurement =
float,
typename TFrequencyContainer = DenseFrequencyContainer2>
101 using typename Superclass::MeasurementVectorType;
102 using typename Superclass::InstanceIdentifier;
103 using typename Superclass::MeasurementVectorSizeType;
160 itkGetConstMacro(ClipBinsAtEnds,
bool);
161 itkSetMacro(ClipBinsAtEnds,
bool);
162 itkBooleanMacro(ClipBinsAtEnds);
331 Mean(
unsigned int dimension)
const;
355 m_Histogram = histogram;
375 return m_Histogram->GetFrequency(m_Id);
387 return m_Histogram->GetMeasurementVector(m_Id);
393 return m_Histogram->GetIndex(m_Id);
406 return (m_Id == it.
m_Id);
414 , m_Histogram(histogram)
458 this->ConstIterator::operator=(it);
465 auto * histogram =
const_cast<Self *
>(this->m_Histogram);
467 return histogram->SetFrequency(this->m_Id, value);
482 return Iterator(m_OffsetTable[this->GetMeasurementVectorSize()],
this);
496 return ConstIterator(m_OffsetTable[this->GetMeasurementVectorSize()],
this);
510 unsigned int m_NumberOfInstances{ 0 };
519 std::vector<std::vector<MeasurementType>> m_Min{};
522 std::vector<std::vector<MeasurementType>> m_Max{};
527 bool m_ClipBinsAtEnds{
true };
532#ifndef ITK_MANUAL_INSTANTIATION
533# include "itkHistogram.hxx"
Array class with size defined at construction time.
itk::IndexValueType ValueType
Base class for all data objects in ITK.
Control indentation during Print() invocation.
Base class for most ITK classes.
class that walks through the elements of the histogram.
const IndexType & GetIndex() const
ConstIterator(const Self *histogram)
bool operator==(const ConstIterator &it) const
ConstIterator(const ConstIterator &it)
ConstIterator(InstanceIdentifier id, const Self *histogram)
ConstIterator & operator=(const ConstIterator &it)
ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(ConstIterator)
ConstIterator & operator++()
InstanceIdentifier GetInstanceIdentifier() const
AbsoluteFrequencyType GetFrequency() const
const MeasurementVectorType & GetMeasurementVector() const
class that walks through the elements of the histogram.
Iterator(const Self *histogram)=delete
Iterator(Self *histogram)
Iterator(const ConstIterator &it)=delete
Iterator & operator=(const Iterator &it)
Iterator(InstanceIdentifier id, const Self *histogram)=delete
ConstIterator & operator=(const ConstIterator &it)=delete
Iterator(const Iterator &it)
bool SetFrequency(const AbsoluteFrequencyType value)
Iterator(InstanceIdentifier id, Self *histogram)
This class stores measurement vectors in the context of n-dimensional histogram.
~Histogram() override=default
void Initialize(const SizeType &size, MeasurementVectorType &lowerBound, MeasurementVectorType &upperBound)
SizeValueType GetSize(unsigned int dimension) const
void Initialize() override
const BinMaxVectorType & GetDimensionMaxs(unsigned int dimension) const
MeasurementType GetMeasurement(InstanceIdentifier n, unsigned int dimension) const
const MeasurementType & GetBinMax(unsigned int dimension, InstanceIdentifier nbin) const
const MeasurementType & GetBinMaxFromValue(unsigned int dimension, float value) const
bool GetIndex(const MeasurementVectorType &measurement, IndexType &index) const
std::vector< BinMaxVectorType > BinMaxContainerType
typename FrequencyContainerType::Pointer FrequencyContainerPointer
double Mean(unsigned int dimension) const
InstanceIdentifier Size() const override
const BinMinVectorType & GetDimensionMins(unsigned int dimension) const
bool SetFrequencyOfMeasurement(const MeasurementVectorType &measurement, AbsoluteFrequencyType value)
bool IncreaseFrequency(InstanceIdentifier id, AbsoluteFrequencyType value)
AbsoluteFrequencyType GetFrequency(InstanceIdentifier id) const override
InstanceIdentifier GetInstanceIdentifier(const IndexType &index) const
const IndexType & GetIndex(InstanceIdentifier id) const
AbsoluteFrequencyType GetFrequency(InstanceIdentifier n, unsigned int dimension) const
typename FrequencyContainerType::TotalAbsoluteFrequencyType TotalAbsoluteFrequencyType
double Quantile(unsigned int dimension, double p) const
const MeasurementVectorType & GetHistogramMaxFromIndex(const IndexType &index) const
const MeasurementVectorType & GetMeasurementVector(InstanceIdentifier id) const override
typename FrequencyContainerType::AbsoluteFrequencyType AbsoluteFrequencyType
const MeasurementVectorType & GetMeasurementVector(const IndexType &index) const
ConstIterator Begin() const
ConstIterator End() const
void SetBinMax(unsigned int dimension, InstanceIdentifier nbin, MeasurementType max)
std::vector< MeasurementType > BinMaxVectorType
const MeasurementType & GetBinMinFromValue(unsigned int dimension, float value) const
typename FrequencyContainerType::RelativeFrequencyType RelativeFrequencyType
bool IncreaseFrequencyOfIndex(const IndexType &index, AbsoluteFrequencyType value)
typename SizeType::ValueType SizeValueType
const SizeType & GetSize() const
void Graft(const DataObject *) override
TFrequencyContainer FrequencyContainerType
void SetBinMin(unsigned int dimension, InstanceIdentifier nbin, MeasurementType min)
const BinMaxContainerType & GetMaxs() const
typename FrequencyContainerType::TotalRelativeFrequencyType TotalRelativeFrequencyType
TotalAbsoluteFrequencyType GetTotalFrequency() const override
std::vector< BinMinVectorType > BinMinContainerType
const MeasurementVectorType & GetHistogramMinFromIndex(const IndexType &index) const
const BinMinContainerType & GetMins() const
void PrintSelf(std::ostream &os, Indent indent) const override
TMeasurement MeasurementType
typename IndexType::ValueType IndexValueType
void Initialize(const SizeType &size)
bool IncreaseFrequencyOfMeasurement(const MeasurementVectorType &measurement, AbsoluteFrequencyType value)
AbsoluteFrequencyType GetFrequency(const IndexType &index) const
std::vector< InstanceIdentifier > OffsetTableType
const MeasurementType & GetBinMin(unsigned int dimension, InstanceIdentifier nbin) const
bool SetFrequencyOfIndex(const IndexType &index, AbsoluteFrequencyType value)
bool SetFrequency(InstanceIdentifier id, AbsoluteFrequencyType value)
bool IsIndexOutOfBounds(const IndexType &index) const
void SetFrequency(AbsoluteFrequencyType value)
std::vector< MeasurementType > BinMinVectorType
A collection of measurements for statistical analysis.
typename MeasurementVectorTraits::InstanceIdentifier InstanceIdentifier
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....