15 #ifndef mitkLabelStatisticsImageFilter_h 16 #define mitkLabelStatisticsImageFilter_h 18 #include <itkCompensatedSummation.h> 19 #include <itkHistogram.h> 20 #include <itkImageSink.h> 21 #include <itkNumericTraits.h> 22 #include <itkSimpleDataObjectDecorator.h> 25 #include <unordered_map> 32 template <
typename TInputImage>
41 itkFactorylessNewMacro(
Self);
46 using SizeType =
typename TInputImage::SizeType;
53 using RealType =
typename itk::NumericTraits<PixelType>::RealType;
76 itk::CompensatedSummation<RealType>
m_Sum;
94 using MapType = std::unordered_map<LabelPixelType, LabelStatistics>;
102 const std::unordered_map<LabelPixelType, unsigned int>& sizes,
103 const std::unordered_map<LabelPixelType, RealType>& lowerBounds,
104 const std::unordered_map<LabelPixelType, RealType>& upperBounds);
145 void PrintSelf(std::ostream& os, itk::Indent indent)
const override;
156 bool m_ComputeHistograms;
157 std::unordered_map<LabelPixelType, unsigned int> m_HistogramSizes;
158 std::unordered_map<LabelPixelType, RealType> m_HistogramLowerBounds;
159 std::unordered_map<LabelPixelType, RealType> m_HistogramUpperBounds;
165 #ifndef ITK_MANUAL_INSTANTIATION 166 #include <mitkLabelStatisticsImageFilter.hxx> RealType GetSigma(LabelPixelType label) const
RealType GetSum(LabelPixelType label) const
std::vector< LabelPixelType > ValidLabelValuesContainerType
RealType GetSumOfCubes(LabelPixelType label) const
PixelType GetMaximum(LabelPixelType label) const
typename itk::DataObject::Pointer DataObjectPointer
HistogramPointer m_Histogram
BoundingBoxType m_BoundingBox
itk::CompensatedSummation< RealType > m_SumOfPositivePixels
typename mitk::Label::PixelType LabelPixelType
RealType GetKurtosis(LabelPixelType label) const
RealType GetVariance(LabelPixelType label) const
~LabelStatisticsImageFilter()
void BeforeStreamedGenerateData() override
typename TInputImage::RegionType RegionType
DataCollection - Class to facilitate loading/accessing structured data.
unsigned int GetNumberOfObjects() const
itkSetInputMacro(LabelInput, LabelImageType)
itk::CompensatedSummation< RealType > m_Sum
RealType GetUniformity(LabelPixelType label) const
RealType GetMPP(LabelPixelType label) const
typename TInputImage::SizeType SizeType
BoundingBoxType GetBoundingBox(LabelPixelType label) const
itk::SimpleDataObjectDecorator< RealType > RealObjectType
std::unordered_map< LabelPixelType, LabelStatistics > MapType
RealType GetSumOfSquares(LabelPixelType label) const
itk::SizeValueType GetCount(LabelPixelType label) const
unsigned int GetNumberOfLabels() const
RegionType GetRegion(LabelPixelType label) const
static constexpr unsigned int ImageDimension
itkGetInputMacro(LabelInput, LabelImageType)
typename TInputImage::IndexType IndexType
RealType GetMedian(LabelPixelType label) const
bool HasLabel(LabelPixelType label) const
typename TInputImage::PixelType PixelType
itk::ProcessObject ProcessObject
typename MapType::iterator MapIterator
HistogramPointer GetHistogram(LabelPixelType label) const
void SetHistogramParameters(const std::unordered_map< LabelPixelType, unsigned int > &sizes, const std::unordered_map< LabelPixelType, RealType > &lowerBounds, const std::unordered_map< LabelPixelType, RealType > &upperBounds)
itk::CompensatedSummation< RealType > m_SumOfCubes
void ThreadedStreamedGenerateData(const RegionType &) override
typename itk::NumericTraits< PixelType >::RealType RealType
RealType GetMean(LabelPixelType label) const
typename HistogramType::Pointer HistogramPointer
PixelType GetMinimum(LabelPixelType label) const
LabelStatisticsImageFilter()
void PrintSelf(std::ostream &os, itk::Indent indent) const override
RealType GetUPP(LabelPixelType label) const
itk::SizeValueType m_CountOfPositivePixels
void AfterStreamedGenerateData() override
RealType GetEntropy(LabelPixelType label) const
itk::SizeValueType m_Count
RealType GetSkewness(LabelPixelType label) const
itk::ImageSink< TInputImage > Superclass
const ValidLabelValuesContainerType & GetValidLabelValues() const
itk::Statistics::Histogram< RealType > HistogramType
itk::Image< LabelPixelType, ImageDimension > LabelImageType
itk::CompensatedSummation< RealType > m_SumOfQuadruples
typename MapType::const_iterator MapConstIterator
RealType GetSumOfQuadruples(LabelPixelType label) const
itk::CompensatedSummation< RealType > m_SumOfSquares
std::vector< itk::IndexValueType > BoundingBoxType