Medical Imaging Interaction Toolkit  2025.12.02
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);
67  const std::string &displayName,
68  const std::string &sourceRole,
69  const std::string &destinationRole);
70  ~GenericIDRelationRule() override = default;
71 
74 
77  const IPropertyProvider* destination, const InstanceIDVectorType& instances_IDLayer) const override;
78 
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
#define MITKCORE_EXPORT
PropertyRelationRuleBase::DataRelationUIDVectorType DataRelationUIDVectorType
DataRelationUIDVectorType GetRelationUIDs_DataLayer(const IPropertyProvider *source, const IPropertyProvider *destination, const InstanceIDVectorType &instances_IDLayer) const override
PropertyRelationRuleBase::InstanceIDVectorType InstanceIDVectorType
std::string GetDestinationRoleName() const override
PropertyRelationRuleBase::RelationUIDType RelationUIDType
mitkNewMacro1Param(Self, const RuleIDType &)
void Disconnect_datalayer(IPropertyOwner *source, const RelationUIDType &relationUID) const override
PropertyRelationRuleBase::InstanceIDType InstanceIDType
itk::LightObject::Pointer InternalClone() const override
bool IsAbstract() const override
GenericIDRelationRule(const RuleIDType &ruleIDTag, const std::string &displayName)
GenericIDRelationRule(const RuleIDType &ruleIDTag)
mitkNewMacro2Param(Self, const RuleIDType &, const std::string &)
mitkClassMacro(GenericIDRelationRule, PropertyRelationRuleBase)
PropertyRelationRuleBase::RelationUIDVectorType RelationUIDVectorType
RelationUIDType Connect(IPropertyOwner *source, const IPropertyProvider *destination) const
~GenericIDRelationRule() override=default
std::string GetDisplayName() const override
PropertyRelationRuleBase::RuleIDType RuleIDType
GenericIDRelationRule(const RuleIDType &ruleIDTag, const std::string &displayName, const std::string &sourceRole, const std::string &destinationRole)
mitkNewMacro4Param(Self, const RuleIDType &, const std::string &, const std::string &, const std::string &)
bool IsSupportedRuleID(const RuleIDType &ruleID) const override
std::string GetSourceRoleName() const override
void Connect_datalayer(IPropertyOwner *source, const IPropertyProvider *destination, const InstanceIDType &instanceID) const override
RuleIDType GetRuleID() const override
std::vector< RelationUIDType > RelationUIDVectorType
std::vector< std::pair< RelationUIDType, RuleIDType > > DataRelationUIDVectorType
std::vector< InstanceIDType > InstanceIDVectorType
Find image slices visible on a given plane.