Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkImageStatisticsContainerManager.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 #ifndef mitkImageStatisticsContainerManager_h
13 #define mitkImageStatisticsContainerManager_h
14 
16 
17 #include <mitkDataStorage.h>
19 #include <mitkBaseData.h>
20 #include <mitkNodePredicateBase.h>
22 #include <mitkPropertyRelations.h>
23 
24 namespace mitk
25 {
26 
28  static const std::string STATS_HISTOGRAM_BIN_PROPERTY_NAME = "MITK.statistic.histogram_bins";
30  static const std::string STATS_IGNORE_ZERO_VOXEL_PROPERTY_NAME = "MITK.statistic.ignore_zero_voxel";
32  static const std::string STATS_GENERATION_STATUS_PROPERTY_NAME = "MITK.statistic.generation.status";
34  static const std::string STATS_GENERATION_STATUS_VALUE_WORK_IN_PROGRESS = "workInProgress";
36  static const std::string STATS_GENERATION_STATUS_VALUE_PENDING = "pending";
38  static const std::string STATS_GENERATION_STATUS_VALUE_BASE_DATA_FAILED = "failed";
39 
54  {
55  public:
76  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);
77 
93  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);
94 
103  static mitk::NodePredicateBase::ConstPointer GetStatisticsPredicateForSources(const mitk::BaseData* image, const mitk::BaseData* mask = nullptr);
104  };
105 }
106 #endif
#define MITKIMAGESTATISTICS_EXPORT
Base class of all data objects.
Definition: mitkBaseData.h:60
Abstract data management class that organizes DataNode objects in a directed acyclic graph.
Manages lookup of ImageStatisticsContainer nodes in a DataStorage.
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.
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.
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.
Find image slices visible on a given plane.
static const std::string STATS_GENERATION_STATUS_VALUE_WORK_IN_PROGRESS
Status value indicating statistics computation is in progress.
static const std::string STATS_HISTOGRAM_BIN_PROPERTY_NAME
Property name for the histogram bin count stored on statistics nodes.
static const std::string STATS_GENERATION_STATUS_PROPERTY_NAME
Property name for the generation status of the statistics.
static const std::string STATS_IGNORE_ZERO_VOXEL_PROPERTY_NAME
Property name indicating whether zero voxels were ignored.
static const std::string STATS_GENERATION_STATUS_VALUE_PENDING
Status value indicating statistics computation is pending.
static const std::string STATS_GENERATION_STATUS_VALUE_BASE_DATA_FAILED
Status value indicating statistics computation failed.