Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
mitkGenericIDRelationRule.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 mitkGenericIDRelationRule_h
14 #define mitkGenericIDRelationRule_h
15 
17 
18 namespace mitk
19 {
33  {
34  public:
36  itkCloneMacro(Self);
38  mitkNewMacro2Param(Self, const RuleIDType &, const std::string &);
39  mitkNewMacro4Param(Self, const RuleIDType &, const std::string &, const std::string &, const std::string &);
40 
44 
46  RuleIDType GetRuleID() const override;
47 
48  bool IsAbstract() const override;
49 
51  std::string GetDisplayName() const override;
52 
55  std::string GetSourceRoleName() const override;
58  std::string GetDestinationRoleName() const override;
59 
61  RelationUIDType Connect(IPropertyOwner *source, const IPropertyProvider *destination) const;
62 
63  protected:
64  GenericIDRelationRule(const RuleIDType &ruleIDTag);
65  GenericIDRelationRule(const RuleIDType &ruleIDTag, const std::string &displayName);
66  GenericIDRelationRule(const RuleIDType &ruleIDTag,
67  const std::string &displayName,
68  const std::string &sourceRole,
69  const std::string &destinationRole);
70  ~GenericIDRelationRule() override = default;
71 
74 
76  DataRelationUIDVectorType GetRelationUIDs_DataLayer(const IPropertyProvider* source,
77  const IPropertyProvider* destination, const InstanceIDVectorType& instances_IDLayer) const override;
78 
79  void Connect_datalayer(IPropertyOwner *source,
80  const IPropertyProvider *destination,
81  const InstanceIDType &instanceID) const override;
82 
83  void Disconnect_datalayer(IPropertyOwner *source, const RelationUIDType& relationUID) const override;
84 
85  bool IsSupportedRuleID(const RuleIDType& ruleID) const override;
86 
87  itk::LightObject::Pointer InternalClone() const override;
88 
89  private:
90  RuleIDType m_RuleIDTag;
91  std::string m_DisplayName;
92  std::string m_SourceRole;
93  std::string m_DestinationRole;
94  };
95 
96 } // namespace mitk
97 
98 #endif
mitk::GenericIDRelationRule::RuleIDType
PropertyRelationRuleBase::RuleIDType RuleIDType
Definition: mitkGenericIDRelationRule.h:41
mitk::PropertyRelationRuleBase::DataRelationUIDVectorType
std::vector< std::pair< RelationUIDType, RuleIDType > > DataRelationUIDVectorType
Definition: mitkPropertyRelationRuleBase.h:286
mitkNewMacro2Param
#define mitkNewMacro2Param(classname, typea, typeb)
Definition: mitkCommon.h:81
mitk::PropertyRelationRuleBase::RuleIDType
std::string RuleIDType
Definition: mitkPropertyRelationRuleBase.h:81
mitk::PropertyRelationRuleBase
Definition: mitkPropertyRelationRuleBase.h:74
mitkNewMacro1Param
#define mitkNewMacro1Param(classname, type)
Definition: mitkCommon.h:68
mitk::GenericIDRelationRule::RelationUIDType
PropertyRelationRuleBase::RelationUIDType RelationUIDType
Definition: mitkGenericIDRelationRule.h:42
mitk::GenericIDRelationRule::RelationUIDVectorType
PropertyRelationRuleBase::RelationUIDVectorType RelationUIDVectorType
Definition: mitkGenericIDRelationRule.h:43
mitk::PropertyRelationRuleBase::InstanceIDType
std::string InstanceIDType
Definition: mitkPropertyRelationRuleBase.h:100
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::PropertyRelationRuleBase::InstanceIDVectorType
std::vector< InstanceIDType > InstanceIDVectorType
Definition: mitkPropertyRelationRuleBase.h:270
mitk::GenericIDRelationRule::DataRelationUIDVectorType
PropertyRelationRuleBase::DataRelationUIDVectorType DataRelationUIDVectorType
Definition: mitkGenericIDRelationRule.h:75
mitk::GenericIDRelationRule::InstanceIDType
PropertyRelationRuleBase::InstanceIDType InstanceIDType
Definition: mitkGenericIDRelationRule.h:72
mitk::PropertyRelationRuleBase::RelationUIDType
Identifiable::UIDType RelationUIDType
Definition: mitkPropertyRelationRuleBase.h:82
mitk::GenericIDRelationRule
Definition: mitkGenericIDRelationRule.h:32
mitk::PropertyRelationRuleBase::RelationUIDVectorType
std::vector< RelationUIDType > RelationUIDVectorType
Definition: mitkPropertyRelationRuleBase.h:83
mitk::GenericIDRelationRule::InstanceIDVectorType
PropertyRelationRuleBase::InstanceIDVectorType InstanceIDVectorType
Definition: mitkGenericIDRelationRule.h:73
mitkPropertyRelationRuleBase.h
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
mitk::IPropertyProvider
Definition: mitkIPropertyProvider.h:24
mitkNewMacro4Param
#define mitkNewMacro4Param(classname, typea, typeb, typec, typed)
Definition: mitkCommon.h:107
mitk::IPropertyOwner
Definition: mitkIPropertyOwner.h:22
MITKCORE_EXPORT
#define MITKCORE_EXPORT
Definition: MitkCoreExports.h:15