Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
mitkDataStorageAccessRule.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 mitkDataStorageAccessRule_h
14 #define mitkDataStorageAccessRule_h
15 
16 #include <org_mitk_core_jobs_Export.h>
17 
18 #include "berryISchedulingRule.h"
19 #include "berryObject.h"
20 #include "mitkDataNode.h"
21 #include "mitkDataStorage.h"
23 
24 namespace mitk {
25 
77  class MITK_JOBS_EXPORT DataStorageAccessRule : public berry::ISchedulingRule {
78 
79  public:
80 
81 
82  enum RuleType {ADD_RULE = 0, REMOVE_RULE} ;
83 
85 
87 
88  DataStorageAccessRule (mitk::DataStorage::Pointer myDataStorage, mitk::DataNode::Pointer myDataNode,
90 
91  bool Contains (berry::ISchedulingRule::Pointer otherISchedulingRule) const override;
92  bool IsConflicting (berry::ISchedulingRule::Pointer otherISchedulingRule) const override;
93 
94 
95 
96 
97 
98 
99 private:
100 
101 
108  bool CompareTwoAddorRemoveRules() const ;
113  bool CompareAddandRemoveRules(mitk::DataStorageAccessRule::Pointer sptr_otherDataStorageAccessRule) const;
119  bool CompareDataStorages(mitk::DataStorage::Pointer otherDataStorage) const;
125  bool TestDataNode(mitk::DataNode::Pointer dataTreeToBeStored) const;
126 
130  mitk::DataNode::Pointer GetDataNode() const;
131 
135  mitk::DataStorage::Pointer GetDataStorage() const;
136 
137  mitk::DataStorageAccessRule::RuleType GetRuleType() const;
138 
139 
140 
141 
142  DataStorage::Pointer m_sptrMyDataStorage ;
143  DataNode::Pointer m_sptrMyDataNode ;
144 
145 
146  };
147 
148  }
149 
150 #endif
Implements transparent reference counting.
The DataStorageAccessRule inherits from the ISchedulingRule class. DataStorageAccessRule are used to ...
berryObjectMacro(DataStorageAccessRule)
bool IsConflicting(berry::ISchedulingRule::Pointer otherISchedulingRule) const override
bool Contains(berry::ISchedulingRule::Pointer otherISchedulingRule) const override
DataStorageAccessRule(mitk::DataStorage::Pointer myDataStorage, mitk::DataNode::Pointer myDataNode, DataStorageAccessRule::RuleType myRule)
Find image slices visible on a given plane.