Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
#include <mitkGenericIDRelationRule.h>
Public Types | |
typedef GenericIDRelationRule | Self |
typedef PropertyRelationRuleBase | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
using | RuleIDType = PropertyRelationRuleBase::RuleIDType |
using | RelationUIDType = PropertyRelationRuleBase::RelationUIDType |
using | RelationUIDVectorType = PropertyRelationRuleBase::RelationUIDVectorType |
![]() | |
enum | RelationType { RelationType::None, RelationType::Implicit_Data, RelationType::Connected_Data, RelationType::Connected_ID } |
typedef PropertyRelationRuleBase | Self |
typedef itk::Object | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
using | RuleIDType = std::string |
using | RelationUIDType = Identifiable::UIDType |
using | RelationUIDVectorType = std::vector< RelationUIDType > |
Static Public Member Functions | |
static const char * | GetStaticNameOfClass () |
static Pointer | New (const RuleIDType &_arg) |
static Pointer | New (const RuleIDType &_arga, const std::string &_argb) |
static Pointer | New (const RuleIDType &_arga, const std::string &_argb, const std::string &_argc, const std::string &_argd) |
![]() | |
static const char * | GetStaticNameOfClass () |
static PropertyKeyPath | GetRootKeyPath () |
Protected Types | |
using | InstanceIDType = PropertyRelationRuleBase::InstanceIDType |
using | InstanceIDVectorType = PropertyRelationRuleBase::InstanceIDVectorType |
![]() | |
using | InstanceIDType = std::string |
using | InstanceIDVectorType = std::vector< InstanceIDType > |
Protected Member Functions | |
GenericIDRelationRule (const RuleIDType &ruleIDTag) | |
GenericIDRelationRule (const RuleIDType &ruleIDTag, const std::string &displayName) | |
GenericIDRelationRule (const RuleIDType &ruleIDTag, const std::string &displayName, const std::string &sourceRole, const std::string &destinationRole) | |
~GenericIDRelationRule () override=default | |
InstanceIDVectorType | GetInstanceID_datalayer (const IPropertyProvider *source, const IPropertyProvider *destination) const override |
bool | HasImplicitDataRelation (const IPropertyProvider *source, const IPropertyProvider *destination) const override |
void | Connect_datalayer (IPropertyOwner *source, const IPropertyProvider *destination, const InstanceIDType &instanceID) const override |
void | Disconnect_datalayer (IPropertyOwner *source, const InstanceIDType &instanceID) const override |
bool | IsSupportedRuleID (const RuleIDType &ruleID) const override |
itk::LightObject::Pointer | InternalClone () const override |
![]() | |
PropertyRelationRuleBase ()=default | |
~PropertyRelationRuleBase () override=default | |
InstanceIDVectorType | GetInstanceID_IDLayer (const IPropertyProvider *source, const IPropertyProvider *destination) const |
RelationUIDType | GetRelationUIDByInstanceID (const IPropertyProvider *source, const InstanceIDType &instanceID) const |
InstanceIDType | GetInstanceIDByRelationUID (const IPropertyProvider *source, const RelationUIDType &relationUID) const |
RelationUIDType | Connect (IPropertyOwner *source, const IPropertyProvider *destination) const |
std::string | GetRIIPropertyRegEx (const std::string propName="", const InstanceIDType &instanceID="") const |
RuleIDType | GetRuleIDByInstanceID (const IPropertyProvider *source, const InstanceIDType &instanceID) const |
itk::LightObject::Pointer | InternalClone () const override |
Additional Inherited Members | |
![]() | |
static InstanceIDType | NULL_INSTANCE_ID () |
static InstanceIDType | GetInstanceIDByPropertyName (const std::string propName) |
static std::vector< std::string > | GetPropertyKeys (const mitk::IPropertyProvider *owner) |
This rule class can be used for relations that are only defined on the ID-layer and where no connection on the Data-layer can be defined or deduced. So it can be used for all ID based relations between PropertyProviders that also implement the interface identifiable. In order to be able to use this class for different relation types based on ID, the ruleIDTag is used. It must be specified when creating a rule instance. The ruleIDTag will be used as suffix for the rule ID of the instance and therefore allows to create specific and distinguishable rules instances based on this class. One may also specify the display name and the role names of the instance. If not speficied the default values are used (display name: "<ruleIDTag> relation", source role name: "source of <ruleIDTag> relation", destination role name: "destination <ruleIDTag> of relation")
Definition at line 32 of file mitkGenericIDRelationRule.h.
typedef itk::SmartPointer<const Self> mitk::GenericIDRelationRule::ConstPointer |
Definition at line 35 of file mitkGenericIDRelationRule.h.
|
protected |
Definition at line 72 of file mitkGenericIDRelationRule.h.
|
protected |
Definition at line 73 of file mitkGenericIDRelationRule.h.
Definition at line 35 of file mitkGenericIDRelationRule.h.
Definition at line 42 of file mitkGenericIDRelationRule.h.
using mitk::GenericIDRelationRule::RelationUIDVectorType = PropertyRelationRuleBase::RelationUIDVectorType |
Definition at line 43 of file mitkGenericIDRelationRule.h.
Definition at line 41 of file mitkGenericIDRelationRule.h.
Definition at line 35 of file mitkGenericIDRelationRule.h.
Definition at line 35 of file mitkGenericIDRelationRule.h.
|
protected |
Definition at line 50 of file mitkGenericIDRelationRule.cpp.
|
protected |
Definition at line 53 of file mitkGenericIDRelationRule.cpp.
|
protected |
Definition at line 57 of file mitkGenericIDRelationRule.cpp.
|
overrideprotecteddefault |
Pointer mitk::GenericIDRelationRule::Clone | ( | ) | const |
mitk::GenericIDRelationRule::RelationUIDType mitk::GenericIDRelationRule::Connect | ( | IPropertyOwner * | source, |
const IPropertyProvider * | destination | ||
) | const |
Pass through to base implementation of PropertyRelationRuleBase. See PropertyRelationRuleBase::connect documentation for more information.
Definition at line 45 of file mitkGenericIDRelationRule.cpp.
References mitk::PropertyRelationRuleBase::Connect().
|
overrideprotectedvirtual |
Is called by Connect() to ensure that source has correctly set properties to resemble the relation on the data layer. This means that the method should set the properties that describe and encode the relation on the data layer (data-layer-specific relation properties). If the passed instance are already connected, the old settings should be overwritten. Connect() will ensure that source and destination are valid pointers.
instanceID | is the ID for the relation instance that should be connected. Existance of the relation instance is ensured. |
Implements mitk::PropertyRelationRuleBase.
Definition at line 77 of file mitkGenericIDRelationRule.cpp.
|
overrideprotectedvirtual |
This method is called by Disconnect() to remove all properties of the relation from the source that are set by Connect_datalayer().
Implements mitk::PropertyRelationRuleBase.
Definition at line 83 of file mitkGenericIDRelationRule.cpp.
|
inlineoverridevirtual |
Reimplemented from mitk::PropertyRelationRuleBase.
Definition at line 35 of file mitkGenericIDRelationRule.h.
|
virtual |
Reimplemented from mitk::PropertyRelationRuleBase.
|
overridevirtual |
Returns a human readable string that can be used to describe the role of a destination in context of the rule instance.
Implements mitk::PropertyRelationRuleBase.
Definition at line 40 of file mitkGenericIDRelationRule.cpp.
|
overridevirtual |
Returns a human readable string that can be used to describe the rule. Does not need to be unique.
Implements mitk::PropertyRelationRuleBase.
Definition at line 30 of file mitkGenericIDRelationRule.cpp.
|
overrideprotectedvirtual |
Is called if a instance ID cannot be deduced on the ID-layer. Implement this method to check which existing relation(s) as Connected_Data exists between both passed instances. If the passed instances have no explicit relation of type Connected_Data, an empty vector will be returned.
Implements mitk::PropertyRelationRuleBase.
Definition at line 63 of file mitkGenericIDRelationRule.cpp.
|
overridevirtual |
Returns an ID string that identifies the rule class
Implements mitk::PropertyRelationRuleBase.
Definition at line 25 of file mitkGenericIDRelationRule.cpp.
Referenced by IsSupportedRuleID().
|
overridevirtual |
Returns a human readable string that can be used to describe the role of a source in context of the rule instance.
Implements mitk::PropertyRelationRuleBase.
Definition at line 35 of file mitkGenericIDRelationRule.cpp.
|
inlinestatic |
Definition at line 35 of file mitkGenericIDRelationRule.h.
|
overrideprotectedvirtual |
Is called by HasRelation() if no relation of type Connected_ID (GetInstanceID_IDLayer()) or Connected_Data (GetInstanceID_datalayer()) is evident. Implement this method to deduce if the passed instances have a relation of type Implicit_Data.
Implements mitk::PropertyRelationRuleBase.
Definition at line 70 of file mitkGenericIDRelationRule.cpp.
|
overrideprotected |
Definition at line 87 of file mitkGenericIDRelationRule.cpp.
References New().
|
overridevirtual |
Returns if the instance is a abstract rule (true). Default implementation is true. Overwrite and reimplement if another behavior is needed.
Reimplemented from mitk::PropertyRelationRuleBase.
Definition at line 15 of file mitkGenericIDRelationRule.cpp.
Referenced by IsSupportedRuleID().
|
overrideprotectedvirtual |
Returns if the passed rule ID is supported/relevant for the rule. Either because it is the very ID of the rule (default implementation) or because it is an abstract rule which also supports the rule ID.
Reimplemented from mitk::PropertyRelationRuleBase.
Definition at line 20 of file mitkGenericIDRelationRule.cpp.
References GetRuleID(), and IsAbstract().
|
inlinestatic |
Definition at line 37 of file mitkGenericIDRelationRule.h.
Referenced by InternalClone().
|
inlinestatic |
Definition at line 38 of file mitkGenericIDRelationRule.h.
|
inlinestatic |
Definition at line 39 of file mitkGenericIDRelationRule.h.