13 #ifndef mitkLabelStatisticsImageFilter_h
14 #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>
BoundingBoxType m_BoundingBox
LabelStatistics(unsigned int size, RealType lowerBound, RealType upperBound)
itk::SizeValueType m_Count
HistogramPointer m_Histogram
itk::CompensatedSummation< RealType > m_Sum
itk::CompensatedSummation< RealType > m_SumOfSquares
itk::CompensatedSummation< RealType > m_SumOfPositivePixels
itk::CompensatedSummation< RealType > m_SumOfQuadruples
itk::CompensatedSummation< RealType > m_SumOfCubes
itk::SizeValueType m_CountOfPositivePixels
void ThreadedStreamedGenerateData(const RegionType &) override
HistogramPointer GetHistogram(LabelPixelType label) const
itk::SizeValueType GetCount(LabelPixelType label) const
static constexpr unsigned int ImageDimension
unsigned int GetNumberOfLabels() const
RealType GetSumOfQuadruples(LabelPixelType label) const
unsigned int GetNumberOfObjects() const
RealType GetMean(LabelPixelType label) const
RealType GetUPP(LabelPixelType label) const
itk::Image< LabelPixelType, ImageDimension > LabelImageType
const ValidLabelValuesContainerType & GetValidLabelValues() const
BoundingBoxType GetBoundingBox(LabelPixelType label) const
typename TInputImage::IndexType IndexType
std::unordered_map< LabelPixelType, LabelStatistics > MapType
typename itk::NumericTraits< PixelType >::RealType RealType
bool HasLabel(LabelPixelType label) const
RegionType GetRegion(LabelPixelType label) const
typename MapType::const_iterator MapConstIterator
typename HistogramType::Pointer HistogramPointer
~LabelStatisticsImageFilter()
RealType GetVariance(LabelPixelType label) const
typename MapType::iterator MapIterator
itk::Statistics::Histogram< RealType > HistogramType
RealType GetMPP(LabelPixelType label) const
RealType GetSumOfCubes(LabelPixelType label) const
itk::ProcessObject ProcessObject
RealType GetEntropy(LabelPixelType label) const
void AfterStreamedGenerateData() override
PixelType GetMaximum(LabelPixelType label) const
void PrintSelf(std::ostream &os, itk::Indent indent) const override
itk::SimpleDataObjectDecorator< RealType > RealObjectType
itkGetInputMacro(LabelInput, LabelImageType)
RealType GetSum(LabelPixelType label) const
std::vector< LabelPixelType > ValidLabelValuesContainerType
RealType GetKurtosis(LabelPixelType label) const
std::vector< itk::IndexValueType > BoundingBoxType
RealType GetSkewness(LabelPixelType label) const
void BeforeStreamedGenerateData() override
typename itk::DataObject::Pointer DataObjectPointer
itkSetInputMacro(LabelInput, LabelImageType)
itk::ImageSink< TInputImage > Superclass
PixelType GetMinimum(LabelPixelType label) const
RealType GetMedian(LabelPixelType label) const
typename TInputImage::SizeType SizeType
RealType GetSigma(LabelPixelType label) const
typename TInputImage::PixelType PixelType
RealType GetUniformity(LabelPixelType label) const
RealType GetSumOfSquares(LabelPixelType label) const
typename TInputImage::RegionType RegionType
void SetHistogramParameters(const std::unordered_map< LabelPixelType, unsigned int > &sizes, const std::unordered_map< LabelPixelType, RealType > &lowerBounds, const std::unordered_map< LabelPixelType, RealType > &upperBounds)
typename mitk::Label::PixelType LabelPixelType
LabelStatisticsImageFilter()
Find image slices visible on a given plane.