13 #ifndef mitkImageStatisticsCalculator_h
14 #define mitkImageStatisticsCalculator_h
143 m_nBinsForHistogramStatistics = 100;
144 m_binSizeForHistogramStatistics = 10;
145 m_UseBinSizeOverNBins =
false;
151 template <
typename TPixel,
unsigned int VImageDimension >
152 void InternalCalculateStatisticsUnmasked(
const itk::Image< TPixel, VImageDimension >* image,
TimeStepType timeStep);
154 template <
typename TPixel,
unsigned int VImageDimension >
155 void InternalCalculateStatisticsMasked(
const itk::Image< TPixel, VImageDimension >* image,
TimeStepType timeStep);
157 template <
typename TPixel,
unsigned int VImageDimension >
158 double GetVoxelVolume(
const itk::Image<TPixel, VImageDimension>* image)
const;
160 bool IsUpdateRequired()
const;
162 mitk::Image::ConstPointer m_Image;
163 mitk::Image::ConstPointer m_ImageTimeSlice;
164 mitk::Image::ConstPointer m_InternalImageForStatistics;
166 mitk::MaskGenerator::Pointer m_MaskGenerator;
167 mitk::Image::ConstPointer m_InternalMask;
169 mitk::MaskGenerator::Pointer m_SecondaryMaskGenerator;
170 mitk::Image::ConstPointer m_SecondaryMask;
172 unsigned int m_nBinsForHistogramStatistics;
173 double m_binSizeForHistogramStatistics;
174 bool m_UseBinSizeOverNBins;
176 ImageStatisticsContainer::Pointer m_StatisticContainer;
#define MITKIMAGESTATISTICS_EXPORT
Computes image statistics, optionally restricted by one or two masks.
void SetNBinsForHistogramStatistics(unsigned int nBins)
Set the number of histogram bins for histogram statistics.
itk::SmartPointer< const Self > ConstPointer
void SetInputImage(const mitk::Image *image)
Set the image for which statistics are to be computed.
double statisticsValueType
Type for individual statistics values.
void SetBinSizeForHistogramStatistics(double binSize)
Set the bin size for histogram statistics.
itk::Statistics::Histogram< double > HistogramType
Histogram type used for pixel value distribution.
ImageStatisticsCalculator()
double GetBinSizeForHistogramStatistics() const
Get the histogram bin size.
unsigned int GetNBinsForHistogramStatistics() const
Get the number of histogram bins.
unsigned short MaskPixelType
Pixel type used for mask images.
void SetMask(mitk::MaskGenerator *mask)
Set the primary mask generator for restricting statistics computation.
itk::SmartPointer< Self > Pointer
void SetSecondaryMask(mitk::MaskGenerator *mask)
Set a secondary mask generator for additional region restriction.
std::map< std::string, statisticsValueType > statisticsMapType
Map type associating statistic names with their values.
ImageStatisticsContainer * GetStatistics()
Get the computed statistics container.
ImageStatisticsContainer::LabelValueType LabelIndex
Type used for label indexing in statistics containers.
ImageStatisticsCalculator Self
Container class for storing a StatisticsObject for each time step.
MultiLabelSegmentation::LabelValueType LabelValueType
Image class for storing multi-dimensional medical image data.
Abstract base class for all mask generators used in image statistics.
Find image slices visible on a given plane.
std::size_t TimeStepType
Type for time step indices (non-negative integers starting from 0).