Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::ImageStatisticsContainerManager Class Reference

Manages lookup of ImageStatisticsContainer nodes in a DataStorage. More...

#include <mitkImageStatisticsContainerManager.h>

Static Public Member Functions

static mitk::ImageStatisticsContainer::Pointer GetImageStatistics (const mitk::DataStorage *dataStorage, const mitk::BaseData *image, const mitk::BaseData *mask=nullptr, bool ignoreZeroVoxel=false, unsigned int histogramNBins=100, bool onlyIfUpToDate=true, bool noWIP=true)
 Find and return the ImageStatisticsContainer for the given image and mask. More...
 
static mitk::DataNode::Pointer GetImageStatisticsNode (const mitk::DataStorage *dataStorage, const mitk::BaseData *image, const mitk::BaseData *mask=nullptr, bool ignoreZeroVoxel=false, unsigned int histogramNBins=100, bool onlyIfUpToDate=true, bool noWIP=true)
 Find and return the DataNode containing the ImageStatisticsContainer. More...
 
static mitk::NodePredicateBase::ConstPointer GetStatisticsPredicateForSources (const mitk::BaseData *image, const mitk::BaseData *mask=nullptr)
 Create a predicate to search for statistics containers of the given sources. More...
 

Detailed Description

Manages lookup of ImageStatisticsContainer nodes in a DataStorage.

This utility class provides static methods to find or retrieve ImageStatisticsContainer instances that were previously computed for a given image and optional mask, and stored as DataNode objects in a DataStorage.

See also
ImageStatisticsContainer
ImageStatisticsCalculator
StatisticsToImageRelationRule
StatisticsToMaskRelationRule

Definition at line 53 of file mitkImageStatisticsContainerManager.h.

Member Function Documentation

◆ GetImageStatistics()

static mitk::ImageStatisticsContainer::Pointer mitk::ImageStatisticsContainerManager::GetImageStatistics ( const mitk::DataStorage *  dataStorage,
const mitk::BaseData *  image,
const mitk::BaseData *  mask = nullptr,
bool  ignoreZeroVoxel = false,
unsigned int  histogramNBins = 100,
bool  onlyIfUpToDate = true,
bool  noWIP = true 
)
static

Find and return the ImageStatisticsContainer for the given image and mask.

Searches the data storage for an ImageStatisticsContainer that was computed on the specified image (and optionally mask). If multiple containers match, the one with the newest modification time is returned.

Parameters
[in]dataStoragePointer to the DataStorage to search.
[in]imagePointer to the source image.
[in]maskPointer to the mask (can be nullptr if unmasked statistics are desired).
[in]ignoreZeroVoxelWhether the desired statistics exclude zero voxels.
[in]histogramNBinsNumber of histogram bins the desired statistics should have.
[in]onlyIfUpToDateIf true, only returns statistics that are newer than image and mask.
[in]noWIPIf true, only returns completed results (not work-in-progress placeholders).
Returns
A valid ImageStatisticsContainer, or nullptr if none is found.
Precondition
dataStorage must point to a valid instance.
image must point to a valid instance.

◆ GetImageStatisticsNode()

static mitk::DataNode::Pointer mitk::ImageStatisticsContainerManager::GetImageStatisticsNode ( const mitk::DataStorage *  dataStorage,
const mitk::BaseData *  image,
const mitk::BaseData *  mask = nullptr,
bool  ignoreZeroVoxel = false,
unsigned int  histogramNBins = 100,
bool  onlyIfUpToDate = true,
bool  noWIP = true 
)
static

Find and return the DataNode containing the ImageStatisticsContainer.

Same search logic as GetImageStatistics(), but returns the DataNode wrapper.

Parameters
[in]dataStoragePointer to the DataStorage to search.
[in]imagePointer to the source image.
[in]maskPointer to the mask (can be nullptr).
[in]ignoreZeroVoxelWhether zero voxels were ignored.
[in]histogramNBinsNumber of histogram bins.
[in]onlyIfUpToDateOnly return up-to-date results.
[in]noWIPOnly return completed results.
Returns
The matching DataNode, or nullptr if none is found.

◆ GetStatisticsPredicateForSources()

static mitk::NodePredicateBase::ConstPointer mitk::ImageStatisticsContainerManager::GetStatisticsPredicateForSources ( const mitk::BaseData *  image,
const mitk::BaseData *  mask = nullptr 
)
static

Create a predicate to search for statistics containers of the given sources.

Parameters
[in]imagePointer to the source image.
[in]maskPointer to the mask (can be nullptr).
Returns
A node predicate matching statistics containers for the given sources.

The documentation for this class was generated from the following file: