diff --git a/Modules/ImageStatistics/mitkImageStatisticsContainerManager.h b/Modules/ImageStatistics/mitkImageStatisticsContainerManager.h index 5d86be4e3f..c3f9687e9b 100644 --- a/Modules/ImageStatistics/mitkImageStatisticsContainerManager.h +++ b/Modules/ImageStatistics/mitkImageStatisticsContainerManager.h @@ -1,56 +1,70 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef QmitkImageStatisticsContainerManager_H__INCLUDED #define QmitkImageStatisticsContainerManager_H__INCLUDED #include "MitkImageStatisticsExports.h" #include #include #include #include #include #include /** -\brief Returns the image statistic to the given input -\details +\brief Returns the StatisticsContainer that was computed on given input (image/mask/planar figure) and is added as DataNode in a DataStorage */ namespace mitk { class MITKIMAGESTATISTICS_EXPORT ImageStatisticsContainerManager : public itk::Object { public: mitkClassMacroItkParent(ImageStatisticsContainerManager, itk::Object) itkNewMacro(Self) + /**Documentation + @brief Set the data storage + @pre data storage must be valid + */ void SetDataStorage(mitk::DataStorage::Pointer dataStorage); + + /**Documentation + @brief Set the rules for the relation statisticsContainer to image and mask + @details The RuleResultVectorType defines rules for one statisticsContainer to an image and [optionally + a mask]*/ void SetRules(const std::vector& rules); + /**Documentation + @brief Returns the StatisticContainer for the given image and mask + @return a valid StatisticsContainer or nullptr if no StatisticContainer is found or no rules have been defined + @details if more than one StatisticsContainer is found, only the newest (ModifiedTime) is returned + @exception if DataStorage is nullptr + */ mitk::StatisticsContainer::ConstPointer GetImageStatistics(mitk::BaseData::ConstPointer image, mitk::BaseData::ConstPointer mask=nullptr) const; protected: ImageStatisticsContainerManager(); private: mitk::NodePredicateBase::ConstPointer GetPredicateForSources(const mitk::PropertyRelations::RuleResultVectorType& rules, mitk::BaseData::ConstPointer image, mitk::BaseData::ConstPointer mask = nullptr) const; mitk::DataStorage::Pointer m_DataStorage = nullptr; std::vector m_ImageStatisticRules; }; } #endif