Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
QmitkImageStatisticsDataGenerator.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 
13 #ifndef QmitkImageStatisticsDataGenerator_h
14 #define QmitkImageStatisticsDataGenerator_h
15 
17 
19 
28 {
29 public:
30  QmitkImageStatisticsDataGenerator(mitk::DataStorage::Pointer storage, QObject* parent = nullptr) : QmitkImageAndRoiDataGeneratorBase(storage, parent) {};
32 
33  bool IsValidResultAvailable(const mitk::DataNode* imageNode, const mitk::DataNode* roiNode) const;
34 
41  mitk::DataNode::Pointer GetLatestResult(const mitk::DataNode* imageNode, const mitk::DataNode* roiNode, bool onlyIfUpToDate = false, bool noWIP = true) const;
42 
43  std::string GenerateStatisticsNodeName(const mitk::Image* image, const mitk::BaseData* roi) const;
44 
46  void SetIgnoreZeroValueVoxel(bool _arg);
48  bool GetIgnoreZeroValueVoxel() const;
49 
51  void SetHistogramNBins(unsigned int nbins);
53  unsigned int GetHistogramNBins() const;
54 
55 protected:
56  bool ChangedNodeIsRelevant(const mitk::DataNode* changedNode) const;
57  void IndicateFutureResults(const mitk::DataNode* imageNode, const mitk::DataNode* roiNode) const;
58  std::pair<QmitkDataGenerationJobBase*, mitk::DataNode::Pointer> GetNextMissingGenerationJob(const mitk::DataNode* imageNode, const mitk::DataNode* roiNode) const;
59  void RemoveObsoleteDataNodes(const mitk::DataNode* imageNode, const mitk::DataNode* roiNode) const;
60  mitk::DataNode::Pointer PrepareResultForStorage(const std::string& label, mitk::BaseData* result, const QmitkDataGenerationJobBase* job) const;
61 
64 
65  bool m_IgnoreZeroValueVoxel = false;
66  unsigned int m_HistogramNBins = 100;
67 };
68 
69 #endif
QmitkDataGeneratorBase::GetNextMissingGenerationJob
virtual std::pair< QmitkDataGenerationJobBase *, mitk::DataNode::Pointer > GetNextMissingGenerationJob(const mitk::DataNode *imageNode, const mitk::DataNode *roiNode) const =0
Is called to generate the next job instance that needs to be done and is associated dummy node in ord...
QmitkImageAndRoiDataGeneratorBase::ChangedNodeIsRelevant
bool ChangedNodeIsRelevant(const mitk::DataNode *changedNode) const override
QmitkDataGeneratorBase::PrepareResultForStorage
virtual mitk::DataNode::Pointer PrepareResultForStorage(const std::string &label, mitk::BaseData *result, const QmitkDataGenerationJobBase *job) const =0
QmitkImageStatisticsDataGenerator
Definition: QmitkImageStatisticsDataGenerator.h:27
QmitkImageAndRoiDataGeneratorBase::operator=
QmitkImageAndRoiDataGeneratorBase & operator=(const QmitkImageAndRoiDataGeneratorBase &)=delete
MitkImageStatisticsUIExports.h
QmitkImageStatisticsDataGenerator::QmitkImageStatisticsDataGenerator
QmitkImageStatisticsDataGenerator(mitk::DataStorage::Pointer storage, QObject *parent=nullptr)
Definition: QmitkImageStatisticsDataGenerator.h:30
mitk::Image
Image class for storing images.
Definition: mitkImage.h:69
itk::SmartPointer< Self >
QmitkImageAndRoiDataGeneratorBase.h
QmitkDataGeneratorBase::RemoveObsoleteDataNodes
virtual void RemoveObsoleteDataNodes(const mitk::DataNode *imageNode, const mitk::DataNode *roiNode) const =0
MITKIMAGESTATISTICSUI_EXPORT
#define MITKIMAGESTATISTICSUI_EXPORT
Definition: MitkImageStatisticsUIExports.h:15
QmitkImageStatisticsDataGenerator::QmitkImageStatisticsDataGenerator
QmitkImageStatisticsDataGenerator(QObject *parent=nullptr)
Definition: QmitkImageStatisticsDataGenerator.h:31
mitk::BaseData
Base of all data objects.
Definition: mitkBaseData.h:42
QmitkDataGeneratorBase::IndicateFutureResults
virtual void IndicateFutureResults(const mitk::DataNode *imageNode, const mitk::DataNode *roiNode) const =0
QmitkImageAndRoiDataGeneratorBase
Definition: QmitkImageAndRoiDataGeneratorBase.h:24
mitk::DataNode
Class for nodes of the DataTree.
Definition: mitkDataNode.h:63
QmitkDataGenerationJobBase
QmitkDataGenerationJobBase Base class for generation jobs used by QmitkDataGenerationBase and derived...
Definition: QmitkDataGenerationJobBase.h:32
QmitkDataGeneratorBase::IsValidResultAvailable
virtual bool IsValidResultAvailable(const mitk::DataNode *imageNode, const mitk::DataNode *roiNode) const =0