|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Computes image statistics, optionally restricted by one or two masks. More...
#include <mitkImageStatisticsCalculator.h>


Public Types | |
| typedef ImageStatisticsCalculator | Self |
| typedef itk::Object | Superclass |
| typedef itk::SmartPointer< Self > | Pointer |
| typedef itk::SmartPointer< const Self > | ConstPointer |
| typedef double | statisticsValueType |
| Type for individual statistics values. More... | |
| typedef std::map< std::string, statisticsValueType > | statisticsMapType |
| Map type associating statistic names with their values. More... | |
| typedef itk::Statistics::Histogram< double > | HistogramType |
| Histogram type used for pixel value distribution. More... | |
| typedef unsigned short | MaskPixelType |
| Pixel type used for mask images. More... | |
| using | LabelIndex = ImageStatisticsContainer::LabelValueType |
| Type used for label indexing in statistics containers. More... | |
Public Member Functions | |
| virtual const char * | GetClassName () const |
| void | SetInputImage (const mitk::Image *image) |
| Set the image for which statistics are to be computed. More... | |
| void | SetMask (mitk::MaskGenerator *mask) |
| Set the primary mask generator for restricting statistics computation. More... | |
| void | SetSecondaryMask (mitk::MaskGenerator *mask) |
| Set a secondary mask generator for additional region restriction. More... | |
| void | SetNBinsForHistogramStatistics (unsigned int nBins) |
| Set the number of histogram bins for histogram statistics. More... | |
| unsigned int | GetNBinsForHistogramStatistics () const |
| Get the number of histogram bins. More... | |
| void | SetBinSizeForHistogramStatistics (double binSize) |
| Set the bin size for histogram statistics. More... | |
| double | GetBinSizeForHistogramStatistics () const |
| Get the histogram bin size. More... | |
| ImageStatisticsContainer * | GetStatistics () |
| Get the computed statistics container. More... | |
Static Public Member Functions | |
| static Pointer | New () |
Protected Member Functions | |
| ImageStatisticsCalculator () | |
Computes image statistics, optionally restricted by one or two masks.
ImageStatisticsCalculator is the central class for computing pixel statistics on MITK images. It supports single images and time-series images, and can restrict computation to regions defined by one or two MaskGenerator instances (combined via pixel-wise AND).
Computed statistics include: mean, standard deviation, variance, minimum, maximum, RMS, skewness, kurtosis, MPP (mean of positive pixels), entropy, uniformity, UPP, median, and a configurable histogram.
Results are stored in an ImageStatisticsContainer that organizes statistics by label value and time step.
Definition at line 42 of file mitkImageStatisticsCalculator.h.
| typedef itk::SmartPointer< const Self > mitk::ImageStatisticsCalculator::ConstPointer |
Definition at line 49 of file mitkImageStatisticsCalculator.h.
| typedef itk::Statistics::Histogram<double> mitk::ImageStatisticsCalculator::HistogramType |
Histogram type used for pixel value distribution.
Definition at line 60 of file mitkImageStatisticsCalculator.h.
Type used for label indexing in statistics containers.
Definition at line 64 of file mitkImageStatisticsCalculator.h.
| typedef unsigned short mitk::ImageStatisticsCalculator::MaskPixelType |
Pixel type used for mask images.
Definition at line 62 of file mitkImageStatisticsCalculator.h.
Definition at line 48 of file mitkImageStatisticsCalculator.h.
Standard Self typedef
Definition at line 46 of file mitkImageStatisticsCalculator.h.
| typedef std::map<std::string, statisticsValueType> mitk::ImageStatisticsCalculator::statisticsMapType |
Map type associating statistic names with their values.
Definition at line 58 of file mitkImageStatisticsCalculator.h.
| typedef double mitk::ImageStatisticsCalculator::statisticsValueType |
Type for individual statistics values.
Definition at line 56 of file mitkImageStatisticsCalculator.h.
| typedef itk::Object mitk::ImageStatisticsCalculator::Superclass |
Definition at line 47 of file mitkImageStatisticsCalculator.h.
|
inlineprotected |
Definition at line 142 of file mitkImageStatisticsCalculator.h.
| double mitk::ImageStatisticsCalculator::GetBinSizeForHistogramStatistics | ( | ) | const |
Get the histogram bin size.
|
virtual |
Runtime information support.
| unsigned int mitk::ImageStatisticsCalculator::GetNBinsForHistogramStatistics | ( | ) | const |
Get the number of histogram bins.
| ImageStatisticsContainer* mitk::ImageStatisticsCalculator::GetStatistics | ( | ) |
Get the computed statistics container.
If statistics have not been computed yet or are out of date, this method triggers recomputation before returning the results.
|
static |
Method for creation through the object factory.
| void mitk::ImageStatisticsCalculator::SetBinSizeForHistogramStatistics | ( | double | binSize | ) |
Set the bin size for histogram statistics.
If SetNBinsForHistogramStatistics() is called after this method, number of bins will take precedence over bin size.
| [in] | binSize | The desired histogram bin width. Default is 10.0. |
| void mitk::ImageStatisticsCalculator::SetInputImage | ( | const mitk::Image * | image | ) |
Set the image for which statistics are to be computed.
| [in] | image | Pointer to the input MITK image. |
| void mitk::ImageStatisticsCalculator::SetMask | ( | mitk::MaskGenerator * | mask | ) |
Set the primary mask generator for restricting statistics computation.
If no mask is desired, pass nullptr to clear the mask.
| [in] | mask | Pointer to a MaskGenerator, or nullptr. |
| void mitk::ImageStatisticsCalculator::SetNBinsForHistogramStatistics | ( | unsigned int | nBins | ) |
Set the number of histogram bins for histogram statistics.
If SetBinSizeForHistogramStatistics() is called after this method, bin size will take precedence over number of bins.
| [in] | nBins | Number of histogram bins. Default is 100. |
| void mitk::ImageStatisticsCalculator::SetSecondaryMask | ( | mitk::MaskGenerator * | mask | ) |
Set a secondary mask generator for additional region restriction.
When set, the secondary mask is combined with the primary mask via pixel-wise AND operation. The secondary mask does not need to be the same size as the primary, but they must have some spatial overlap.
| [in] | mask | Pointer to a secondary MaskGenerator, or nullptr. |