Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
mitkIPropertyRelations.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 mitkIPropertyRelations_h
14 #define mitkIPropertyRelations_h
15 
17 #include <mitkServiceInterface.h>
18 
19 namespace mitk
20 {
29  {
30  public:
32 
33  using RuleResultVectorType = std::list<PropertyRelationRuleBase::ConstPointer>;
35  using RuleIDVectorType = std::vector<RuleIDType>;
36 
47  virtual bool AddRule(const PropertyRelationRuleBase *rule, bool overwrite = false) = 0;
48 
53  virtual RuleResultVectorType GetRulesForSource(const IPropertyProvider* source) const = 0;
54 
59  virtual RuleResultVectorType GetRulesForSourceCandidate(const IPropertyProvider* sourceCandidate) const = 0;
60 
66 
71  virtual PropertyRelationRuleBase::ConstPointer GetRule(const RuleIDType &ruleID) const = 0;
72 
74  virtual RuleIDVectorType GetRuleIDs() const = 0;
75 
81  virtual bool HasRuleForSource(const IPropertyProvider* source) const = 0;
82 
85  virtual void RemoveAllRules() = 0;
86 
89  virtual void RemoveRule(const RuleIDType &ruleID) = 0;
90  };
91 }
92 
93 MITK_DECLARE_SERVICE_INTERFACE(mitk::IPropertyRelations, "org.mitk.IPropertyRelations")
94 
95 #endif
#define MITKCORE_EXPORT
Interface of property relations service.
virtual bool AddRule(const PropertyRelationRuleBase *rule, bool overwrite=false)=0
Add rule for a specific relation. If there is already a property rule instance it won't be added....
virtual RuleResultVectorType GetRulesForSource(const IPropertyProvider *source) const =0
Get all relation rules the passed source is really a source of. (PropertyRelationRuleBase::IsSource()...
std::vector< RuleIDType > RuleIDVectorType
virtual bool HasRuleForSource(const IPropertyProvider *source) const =0
Check if a passed instance has defined relation covered by the registered rules.
virtual RuleResultVectorType GetRulesForSourceCandidate(const IPropertyProvider *sourceCandidate) const =0
Get all relation rules that would accept the passed IPropertOwner as source.
virtual RuleResultVectorType GetRulesForDestinationCandidate(const IPropertyProvider *destCandidate) const =0
Get all relation rules that would accept the passed IPropertOwner as destination.
virtual PropertyRelationRuleBase::ConstPointer GetRule(const RuleIDType &ruleID) const =0
Get the relation rule that has the specified ruleID.
virtual void RemoveRule(const RuleIDType &ruleID)=0
Remove relation rule instance with the passed ID. If rule does not exist nothing happens.
virtual RuleIDVectorType GetRuleIDs() const =0
Get all IDs of registered rules.
virtual void RemoveAllRules()=0
Remove all relation rules.
PropertyRelationRuleBase::RuleIDType RuleIDType
std::list< PropertyRelationRuleBase::ConstPointer > RuleResultVectorType
#define MITK_DECLARE_SERVICE_INTERFACE(IFace, IId)
Find image slices visible on a given plane.