18 #ifndef itkHistogram_h
19 #define itkHistogram_h
76 template <
typename TMeasurement =
float,
typename TFrequencyContainer = DenseFrequencyContainer2>
92 itkOverrideGetNameOfClassMacro(
Histogram);
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);
168 IsIndexOutOfBounds(
const IndexType & index)
const;
174 GetInstanceIdentifier(
const IndexType & index)
const;
178 Size()
const override;
186 GetSize(
unsigned int dimension)
const;
207 GetBinMinFromValue(
unsigned int dimension,
float value)
const;
212 GetBinMaxFromValue(
unsigned int dimension,
float value)
const;
216 GetDimensionMins(
unsigned int dimension)
const;
220 GetDimensionMaxs(
unsigned int dimension)
const;
232 GetHistogramMinFromIndex(
const IndexType & index)
const;
236 GetHistogramMaxFromIndex(
const IndexType & index)
const;
244 GetFrequency(
const IndexType & index)
const;
295 GetMeasurementVector(
const IndexType & index)
const;
304 GetTotalFrequency()
const override;
326 Quantile(
unsigned int dimension,
double p)
const;
331 Mean(
unsigned int dimension)
const;
339 PrintSelf(std::ostream & os,
Indent indent)
const override;
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"