Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
mitk::ModelFitResultRelationRule Class Reference

#include <mitkModelFitResultRelationRule.h>

Inheritance diagram for mitk::ModelFitResultRelationRule:
Collaboration diagram for mitk::ModelFitResultRelationRule:

Public Types

using RuleIDType = Superclass::RuleIDType
 
using RelationUIDType = Superclass::RelationUIDType
 
using RelationUIDVectorType = Superclass::RelationUIDVectorType
 
- Public Types inherited from mitk::SourceImageRelationRule
typedef SourceImageRelationRule Self
 
typedef PropertyRelationRuleBase Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
using RuleIDType = PropertyRelationRuleBase::RuleIDType
 
using RelationUIDType = PropertyRelationRuleBase::RelationUIDType
 
using RelationUIDVectorType = PropertyRelationRuleBase::RelationUIDVectorType
 
- Public Types inherited from mitk::PropertyRelationRuleBase
enum  RelationType { RelationType::None, RelationType::Data, RelationType::ID, RelationType::Complete }
 
typedef PropertyRelationRuleBase Self
 
typedef itk::Object Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
using RuleIDType = std::string
 
using RelationUIDType = Identifiable::UIDType
 
using RelationUIDVectorType = std::vector< RelationUIDType >
 
using RelationVectorType = std::vector< RelationType >
 
using InstanceIDType = std::string
 

Public Member Functions

 mitkClassMacro (ModelFitResultRelationRule, SourceImageRelationRule)
 
bool IsDestinationCandidate (const IPropertyProvider *owner) const override
 
- Public Member Functions inherited from mitk::SourceImageRelationRule
virtual std::vector< std::string > GetClassHierarchy () const override
 
virtual const char * GetClassName () const
 
RuleIDType GetRuleID () const override
 
bool IsAbstract () const override
 
std::string GetDisplayName () const override
 
std::string GetSourceRoleName () const override
 
std::string GetDestinationRoleName () const override
 
RelationUIDType Connect (Image *source, const Image *destination) const
 
- Public Member Functions inherited from mitk::PropertyRelationRuleBase
Pointer Clone () const
 
 itkCreateAnotherMacro (Self)
 
virtual bool IsSourceCandidate (const IPropertyProvider *owner) const
 
bool IsSource (const IPropertyProvider *owner) const
 
RelationVectorType GetRelationTypes (const IPropertyProvider *source, const IPropertyProvider *destination) const
 
bool HasRelation (const IPropertyProvider *source, const IPropertyProvider *destination, RelationType requiredRelation=RelationType::None) const
 
RelationUIDVectorType GetExistingRelations (const IPropertyProvider *source, RelationType layer=RelationType::None) const
 
RelationUIDVectorType GetRelationUIDs (const IPropertyProvider *source, const IPropertyProvider *destination) const
 
RelationUIDType GetRelationUID (const IPropertyProvider *source, const IPropertyProvider *destination) const
 
NodePredicateBase::ConstPointer GetSourceCandidateIndicator () const
 
NodePredicateBase::ConstPointer GetDestinationCandidateIndicator () const
 
NodePredicateBase::ConstPointer GetConnectedSourcesDetector () const
 
NodePredicateBase::ConstPointer GetSourcesDetector (const IPropertyProvider *destination, RelationType exclusiveRelation=RelationType::None) const
 
NodePredicateBase::ConstPointer GetDestinationsDetector (const IPropertyProvider *source, RelationType exclusiveRelation=RelationType::None) const
 
NodePredicateBase::ConstPointer GetDestinationDetector (const IPropertyProvider *source, RelationUIDType relationUID) const
 
void Disconnect (IPropertyOwner *source, const IPropertyProvider *destination, RelationType layer=RelationType::Complete) const
 
void Disconnect (IPropertyOwner *source, RelationUIDType relationUID, RelationType layer=RelationType::Complete) const
 
std::vector< PropertyKeyPathGetRelationPropertyPaths (const IPropertyProvider *source, RelationUIDType relationUID, RelationType layer=RelationType::Data) const
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from mitk::SourceImageRelationRule
static const char * GetStaticNameOfClass ()
 
static Pointer New ()
 
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 Public Member Functions inherited from mitk::PropertyRelationRuleBase
static const char * GetStaticNameOfClass ()
 
static PropertyKeyPath GetRootKeyPath ()
 
static PropertyKeyPath GetRIIPropertyKeyPath (const std::string propName, const InstanceIDType &instanceID)
 
static PropertyKeyPath GetRIIRelationUIDPropertyKeyPath (const InstanceIDType &instanceID="")
 
static PropertyKeyPath GetRIIRuleIDPropertyKeyPath (const InstanceIDType &instanceID="")
 
static PropertyKeyPath GetRIIDestinationUIDPropertyKeyPath (const InstanceIDType &instanceID="")
 

Protected Types

using InstanceIDType = SourceImageRelationRule::InstanceIDType
 
using InstanceIDVectorType = SourceImageRelationRule::InstanceIDVectorType
 
using DataRelationUIDVectorType = Superclass::DataRelationUIDVectorType
 
- Protected Types inherited from mitk::SourceImageRelationRule
using InstanceIDType = PropertyRelationRuleBase::InstanceIDType
 
using InstanceIDVectorType = PropertyRelationRuleBase::InstanceIDVectorType
 
using DataRelationUIDVectorType = PropertyRelationRuleBase::DataRelationUIDVectorType
 
- Protected Types inherited from mitk::PropertyRelationRuleBase
using InstanceIDVectorType = std::vector< InstanceIDType >
 
using DataRelationUIDVectorType = std::vector< std::pair< RelationUIDType, RuleIDType > >
 

Protected Member Functions

 ModelFitResultRelationRule ()
 
 ~ModelFitResultRelationRule () override=default
 
virtual DataRelationUIDVectorType GetRelationUIDs_DataLayer (const IPropertyProvider *source, const IPropertyProvider *destination, const InstanceIDVectorType &instances_IDLayer) const override
 
void Disconnect_datalayer (IPropertyOwner *source, const RelationUIDType &relationUID) const override
 
itk::LightObject::Pointer InternalClone () const override
 
- Protected Member Functions inherited from mitk::SourceImageRelationRule
 SourceImageRelationRule ()
 
 SourceImageRelationRule (const RuleIDType &purposeTag)
 
 SourceImageRelationRule (const RuleIDType &purposeTag, const std::string &displayName)
 
 SourceImageRelationRule (const RuleIDType &purposeTag, const std::string &displayName, const std::string &sourceRole, const std::string &destinationRole)
 
 ~SourceImageRelationRule () override=default
 
std::vector< std::pair< size_t, std::string > > GetReferenceSequenceIndices (const IPropertyProvider *source, const IPropertyProvider *destination=nullptr, InstanceIDVectorType ignoreInstances={}) const
 
void Connect_datalayer (IPropertyOwner *source, const IPropertyProvider *destination, const InstanceIDType &instanceID) const override
 
bool IsSupportedRuleID (const RuleIDType &ruleID) const override
 
itk::LightObject::Pointer InternalClone () const override
 
PropertyKeyPath::ItemSelectionIndex CreateNewSourceImageSequenceItem (IPropertyOwner *source) const
 
std::string GenerateRuleID (const std::string &purpose) const
 
- Protected Member Functions inherited from mitk::PropertyRelationRuleBase
 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
 
std::string GetDestinationUIDByInstanceID (const IPropertyProvider *source, const InstanceIDType &instanceID) const
 
itk::LightObject::Pointer InternalClone () const override
 
const IdentifiableCastProviderAsIdentifiable (const mitk::IPropertyProvider *provider) const
 

Additional Inherited Members

- Static Protected Member Functions inherited from mitk::PropertyRelationRuleBase
static InstanceIDType NULL_INSTANCE_ID ()
 
static InstanceIDType GetInstanceIDByPropertyName (const std::string propName)
 
static std::vector< std::string > GetPropertyKeys (const IPropertyProvider *owner)
 

Detailed Description

This rule class can be used to represent the relation between an image generated by a model fit (rule source) and the image that was fitted (rule destination). The addition to the behavirID-layer is supported like for SourceImageRelationRule. In addition the rule uses the data-layer to deduce/define relations. For this layer it uses properties compliant to DICOM. Thus (1) the information is stored in a DICOM Source Image Sequence item (0x0008,0x2112) and (2) the destination must have properties DICOM SOP Instance UIDs (0x0008, 0x0018) and DICOM SOP Class UID (0x0008, 0x0016). If the destination does not have this properties, no connection can be made on the data-layer.

Remarks
Please note that PropertyRelationRules and DICOM use the term "source" differently. The DICOM source (image) equals the PropertyRelationRule destination. This is due to an inverted relation direction. So in the context of the SourceImageRelationRule interface a derived data is the source and points to the original image, it derives from. In the context of DICOM this referenced original image would be called source image (as the name of this class). In order to be able to use this class for different relation types (DICOM would call it purposes), the purposeTag is used. It must be specified when creating a rule instance. The purposeTag 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 specified the default values are used (display name: "<purposeTag> relation", source role name: "derived data", destination role name: "source image")

Definition at line 43 of file mitkModelFitResultRelationRule.h.

Member Typedef Documentation

◆ DataRelationUIDVectorType

using mitk::ModelFitResultRelationRule::DataRelationUIDVectorType = Superclass::DataRelationUIDVectorType
protected

Definition at line 62 of file mitkModelFitResultRelationRule.h.

◆ InstanceIDType

◆ InstanceIDVectorType

◆ RelationUIDType

using mitk::ModelFitResultRelationRule::RelationUIDType = Superclass::RelationUIDType

Definition at line 50 of file mitkModelFitResultRelationRule.h.

◆ RelationUIDVectorType

using mitk::ModelFitResultRelationRule::RelationUIDVectorType = Superclass::RelationUIDVectorType

Definition at line 51 of file mitkModelFitResultRelationRule.h.

◆ RuleIDType

using mitk::ModelFitResultRelationRule::RuleIDType = Superclass::RuleIDType

Definition at line 49 of file mitkModelFitResultRelationRule.h.

Constructor & Destructor Documentation

◆ ModelFitResultRelationRule()

mitk::ModelFitResultRelationRule::ModelFitResultRelationRule ( )
protected

◆ ~ModelFitResultRelationRule()

mitk::ModelFitResultRelationRule::~ModelFitResultRelationRule ( )
overrideprotecteddefault

Member Function Documentation

◆ Disconnect_datalayer()

void mitk::ModelFitResultRelationRule::Disconnect_datalayer ( IPropertyOwner source,
const RelationUIDType relationUID 
) const
overrideprotectedvirtual

This method is called by Disconnect() to remove all properties of the relation from the source that are set by Connect_datalayer().

Remarks
This method should remove all properties that are set for a specific relation by Connect_datalayer(...). If the relationUID is not part of the source, nothing will be changed. Disconnect() ensures that source is a valid pointer if called.
Disconnect() ensures that source is valid and only invokes if instance exists.

Reimplemented from mitk::SourceImageRelationRule.

◆ GetRelationUIDs_DataLayer()

virtual DataRelationUIDVectorType mitk::ModelFitResultRelationRule::GetRelationUIDs_DataLayer ( const IPropertyProvider source,
const IPropertyProvider destination,
const InstanceIDVectorType instances_IDLayer 
) const
overrideprotectedvirtual

Returns the RelationUIDs of all relations that are defined by the data layer of source for this rule instance and, if defined, destination. If the passed source (and destination) instance has no relation on the data layer, an empty vector will be returned.

Remarks
Per definition for property relation rules only 0 or 1 instance should be found for one provider pair and concrete rule. But there might be more then one instance because either 1) the rule is abstract and supports multiple rule IDs or 2) the data layer may be ambiguous (e.g. because the destination was not specified) and therefore multiple relation instances of the rule instance could match. The implementation of this function should report all relation instances. The calling function will take care.
Parameters
source
destinationDestination the find relations should point to. If destination is NULL any relation on the data layer for this rule and source are wanted.
instances_IDLayerList of relation instances that are already defined by the ID layer. The implementation of this function should only cover relations that are not already resembled in the passed relarions_IDLayer.
Precondition
source must be a pointer to a valid IPropertyProvider instance.

Reimplemented from mitk::SourceImageRelationRule.

◆ InternalClone()

itk::LightObject::Pointer mitk::ModelFitResultRelationRule::InternalClone ( ) const
overrideprotected

◆ IsDestinationCandidate()

bool mitk::ModelFitResultRelationRule::IsDestinationCandidate ( const IPropertyProvider owner) const
overridevirtual

This method checks if owner is eligible to be a Destination for the rule. The default implementation returns a True for every valid IPropertyProvider (so only a null_ptr results into false). May be reimplement by derived rules if they have requirements on potential Sources).

Reimplemented from mitk::SourceImageRelationRule.

◆ mitkClassMacro()

mitk::ModelFitResultRelationRule::mitkClassMacro ( ModelFitResultRelationRule  ,
SourceImageRelationRule   
)

◆ New()

static Pointer mitk::ModelFitResultRelationRule::New ( )
static

The documentation for this class was generated from the following file: