Class holding the statistics information about a single mitk::Image.
More...
#include <mitkImageStatisticsHolder.h>
Class holding the statistics information about a single mitk::Image.
This computation was previously directly included in the definition and implementation of the mitk::Image class but for having a clear interface, all statistics computation is moved to the ImageStatisticsHolder class.
Each mitk::Image holds a normal pointer to its StatisticsHolder object. To get access to the methods, use the GetStatistics() method in mitk::Image class.
Minimum or maximum might be infinite values. 2nd minimum and maximum are guaranteed to be finite values.
- See also
- Image
-
Image::GetStatistics()
Definition at line 39 of file mitkImageStatisticsHolder.h.
◆ HistogramType
◆ ImageStatisticsHolder()
| mitk::ImageStatisticsHolder::ImageStatisticsHolder |
( |
mitk::Image * |
image | ) |
|
Constructor.
- Parameters
-
| image | The image whose statistics this holder manages. |
◆ ~ImageStatisticsHolder()
| virtual mitk::ImageStatisticsHolder::~ImageStatisticsHolder |
( |
| ) |
|
|
virtual |
◆ ComputeImageStatistics()
| virtual void mitk::ImageStatisticsHolder::ComputeImageStatistics |
( |
int |
t = 0, |
|
|
unsigned int |
component = 0 |
|
) |
| |
|
protectedvirtual |
Compute image statistics for the specified time step and component.
- Parameters
-
| t | The time step. Defaults to 0. |
| component | The component index for vector images. Defaults to 0. |
◆ Expand()
| virtual void mitk::ImageStatisticsHolder::Expand |
( |
unsigned int |
timeSteps | ) |
|
|
protectedvirtual |
Expand internal statistics storage to accommodate the given number of time steps.
- Parameters
-
| timeSteps | The number of time steps to support. |
◆ GetCountOfMaxValuedVoxels()
| mitk::ScalarType mitk::ImageStatisticsHolder::GetCountOfMaxValuedVoxels |
( |
int |
t = 0, |
|
|
unsigned int |
component = 0 |
|
) |
| |
Get the count of voxels with the largest scalar value. Recomputation performed only when necessary.
- Parameters
-
| t | The time step. Defaults to 0. |
| component | The component index for vector images. Defaults to 0. |
- Returns
- The number of voxels having the maximum scalar value.
◆ GetCountOfMaxValuedVoxelsNoRecompute()
| virtual unsigned int mitk::ImageStatisticsHolder::GetCountOfMaxValuedVoxelsNoRecompute |
( |
unsigned int |
t = 0 | ) |
|
|
inlinevirtual |
Get the count of voxels with the largest scalar value without triggering recomputation.
- Parameters
-
| t | The time step. Defaults to 0. |
- Returns
- The cached count, or 0 if unavailable.
Definition at line 182 of file mitkImageStatisticsHolder.h.
◆ GetCountOfMinValuedVoxels()
| mitk::ScalarType mitk::ImageStatisticsHolder::GetCountOfMinValuedVoxels |
( |
int |
t = 0, |
|
|
unsigned int |
component = 0 |
|
) |
| |
Get the count of voxels with the smallest scalar value. Recomputation performed only when necessary.
- Parameters
-
| t | The time step. Defaults to 0. |
| component | The component index for vector images. Defaults to 0. |
- Returns
- The number of voxels having the minimum scalar value.
◆ GetCountOfMinValuedVoxelsNoRecompute()
| virtual unsigned int mitk::ImageStatisticsHolder::GetCountOfMinValuedVoxelsNoRecompute |
( |
unsigned int |
t = 0 | ) |
const |
|
inlinevirtual |
Get the count of voxels with the smallest scalar value without triggering recomputation.
- Parameters
-
| t | The time step. Defaults to 0. |
- Returns
- The cached count, or 0 if unavailable.
Definition at line 196 of file mitkImageStatisticsHolder.h.
◆ GetScalarHistogram()
| virtual const HistogramType* mitk::ImageStatisticsHolder::GetScalarHistogram |
( |
int |
t = 0, |
|
|
unsigned int |
= 0 |
|
) |
| |
|
virtual |
Get the scalar histogram for the specified time step.
- Parameters
-
| t | The time step. Defaults to 0. |
- Returns
- Pointer to the histogram, or nullptr if unavailable.
◆ GetScalarValue2ndMax()
| virtual ScalarType mitk::ImageStatisticsHolder::GetScalarValue2ndMax |
( |
int |
t = 0, |
|
|
unsigned int |
component = 0 |
|
) |
| |
|
virtual |
Get the second largest scalar value. Recomputation performed only when necessary.
- Parameters
-
| t | The time step. Defaults to 0. |
| component | The component index for vector images. Defaults to 0. |
- Returns
- The second largest scalar value at the given time step.
- Postcondition
- The returned value is always a finite value.
◆ GetScalarValue2ndMaxNoRecompute()
| virtual mitk::ScalarType mitk::ImageStatisticsHolder::GetScalarValue2ndMaxNoRecompute |
( |
unsigned int |
t = 0 | ) |
|
|
inlinevirtual |
Get the second largest scalar value without triggering recomputation.
- Parameters
-
| t | The time step. Defaults to 0. |
- Returns
- The cached second maximum scalar value, or NonpositiveMin if unavailable.
Definition at line 150 of file mitkImageStatisticsHolder.h.
◆ GetScalarValue2ndMin()
| virtual ScalarType mitk::ImageStatisticsHolder::GetScalarValue2ndMin |
( |
int |
t = 0, |
|
|
unsigned int |
component = 0 |
|
) |
| |
|
virtual |
Get the second smallest scalar value. Recomputation performed only when necessary.
- Parameters
-
| t | The time step. Defaults to 0. |
| component | The component index for vector images. Defaults to 0. |
- Returns
- The second smallest scalar value at the given time step.
- Postcondition
- The returned value is always a finite value.
◆ GetScalarValue2ndMinNoRecompute()
| virtual mitk::ScalarType mitk::ImageStatisticsHolder::GetScalarValue2ndMinNoRecompute |
( |
unsigned int |
t = 0 | ) |
const |
|
inlinevirtual |
Get the second smallest scalar value without triggering recomputation.
- Parameters
-
| t | The time step. Defaults to 0. |
- Returns
- The cached second minimum scalar value, or max numeric limit if unavailable.
- Postcondition
- The returned value is always a finite value.
Definition at line 111 of file mitkImageStatisticsHolder.h.
◆ GetScalarValueMax()
| virtual ScalarType mitk::ImageStatisticsHolder::GetScalarValueMax |
( |
int |
t = 0, |
|
|
unsigned int |
component = 0 |
|
) |
| |
|
virtual |
Get the maximum scalar value. Recomputation performed only when necessary.
- Parameters
-
| t | The time step. Defaults to 0. |
| component | The component index for vector images. Defaults to 0. |
- Returns
- The maximum scalar value at the given time step.
◆ GetScalarValueMaxNoRecompute()
| virtual mitk::ScalarType mitk::ImageStatisticsHolder::GetScalarValueMaxNoRecompute |
( |
unsigned int |
t = 0 | ) |
|
|
inlinevirtual |
Get the largest scalar value without triggering recomputation.
- Parameters
-
| t | The time step. Defaults to 0. |
- Returns
- The cached maximum scalar value, or NonpositiveMin if unavailable.
- Postcondition
- The returned value is always a finite value.
Definition at line 136 of file mitkImageStatisticsHolder.h.
◆ GetScalarValueMin()
| virtual ScalarType mitk::ImageStatisticsHolder::GetScalarValueMin |
( |
int |
t = 0, |
|
|
unsigned int |
component = 0 |
|
) |
| |
|
virtual |
Get the minimum scalar value. Recomputation performed only when necessary.
- Parameters
-
| t | The time step. Defaults to 0. |
| component | The component index for vector images. Defaults to 0. |
- Returns
- The minimum scalar value at the given time step.
◆ GetScalarValueMinNoRecompute()
| virtual mitk::ScalarType mitk::ImageStatisticsHolder::GetScalarValueMinNoRecompute |
( |
unsigned int |
t = 0 | ) |
const |
|
inlinevirtual |
Get the smallest scalar value without triggering recomputation.
- Parameters
-
| t | The time step. Defaults to 0. |
- Returns
- The cached minimum scalar value, or max numeric limit if unavailable.
Definition at line 96 of file mitkImageStatisticsHolder.h.
◆ GetTimeSelector()
| ImageTimeSelector::Pointer mitk::ImageStatisticsHolder::GetTimeSelector |
( |
| ) |
|
|
protected |
◆ IsValidTimeStep()
| bool mitk::ImageStatisticsHolder::IsValidTimeStep |
( |
int |
t | ) |
const |
Check whether the given time step is valid for the associated image.
- Parameters
-
- Returns
- True if the time step is valid.
◆ ResetImageStatistics()
| virtual void mitk::ImageStatisticsHolder::ResetImageStatistics |
( |
| ) |
|
|
protectedvirtual |
Reset all cached statistics values to their initial state.
◆ m_CountOfMaxValuedVoxels
| std::vector<unsigned int> mitk::ImageStatisticsHolder::m_CountOfMaxValuedVoxels |
|
mutableprotected |
◆ m_CountOfMinValuedVoxels
| std::vector<unsigned int> mitk::ImageStatisticsHolder::m_CountOfMinValuedVoxels |
|
mutableprotected |
◆ m_HistogramGeneratorObject
| itk::Object::Pointer mitk::ImageStatisticsHolder::m_HistogramGeneratorObject |
|
mutableprotected |
◆ m_Image
◆ m_LastRecomputeTimeStamp
| itk::TimeStamp mitk::ImageStatisticsHolder::m_LastRecomputeTimeStamp |
|
protected |
◆ m_Scalar2ndMax
| std::vector<ScalarType> mitk::ImageStatisticsHolder::m_Scalar2ndMax |
|
mutableprotected |
◆ m_Scalar2ndMin
| std::vector<ScalarType> mitk::ImageStatisticsHolder::m_Scalar2ndMin |
|
mutableprotected |
◆ m_ScalarMax
| std::vector<ScalarType> mitk::ImageStatisticsHolder::m_ScalarMax |
|
mutableprotected |
◆ m_ScalarMin
| std::vector<ScalarType> mitk::ImageStatisticsHolder::m_ScalarMin |
|
mutableprotected |
◆ m_TimeSelectorForExtremaObject
| itk::Object::Pointer mitk::ImageStatisticsHolder::m_TimeSelectorForExtremaObject |
|
mutableprotected |
The documentation for this class was generated from the following file: