Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkSegSourceImageRelationRule.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 mitkSegSourceImageRelationRule_h
14 #define mitkSegSourceImageRelationRule_h
15 
18 
19 #include <MitkMultilabelExports.h>
20 
21 namespace mitk
22 {
23  class MultiLabelSegmentation;
24 
57  {
58  public:
60  itkNewMacro(Self);
61 
70  static const std::string& CanonicalPurposeTag();
71 
81  {
82  std::string relationUID;
84  TemporoSpatialStringProperty::ConstPointer instanceUIDsPerSlice;
85  TemporoSpatialStringProperty::ConstPointer classUIDsPerSlice;
86  };
87 
97  static std::vector<SourceImageRelation>
99 
116  const IPropertyProvider* sourceProvider) const;
117 
133  TemporoSpatialStringProperty* instanceUIDsPerSlice,
134  TemporoSpatialStringProperty* classUIDsPerSlice,
135  const std::string& sourceSeriesInstanceUID) const;
136 
153  const Image* source_image);
154 
155  protected:
158 
169  const IPropertyProvider* destination,
170  const InstanceIDType& instanceID) const override;
171 
181  const RelationUIDType& relationUID) const override;
182 
184  };
185 } // namespace mitk
186 
187 #endif
#define MITKMULTILABEL_EXPORT
Interface implemented by classes that provide write/read access to property information.
Interface implemented by classes that provide access to property information.
Image class for storing multi-dimensional medical image data.
Definition: mitkImage.h:76
MultiLabelSegmentation class for handling labels and layers in a segmentation session.
Relation rule for referencing a segmentation to a source-image derivations.
static std::vector< SourceImageRelation > GetSourceImageRelations(const MultiLabelSegmentation *seg)
Enumerates the seg-source relations established on seg.
mitkClassMacro(SegSourceImageRelationRule, SourceImageRelationRule)
void Disconnect_datalayer(IPropertyOwner *source, const RelationUIDType &relationUID) const override
Removes this rule's SourceSeriesInstanceUID extension before delegating to the base.
SegSourceImageRelationRule(const SegSourceImageRelationRule &other)
RelationUIDType Connect(MultiLabelSegmentation *seg, const IPropertyProvider *sourceProvider) const
Connects a segmentation to a source represented as an IPropertyProvider.
void Connect_datalayer(IPropertyOwner *source, const IPropertyProvider *destination, const InstanceIDType &instanceID) const override
Extends the base data-layer Connect by capturing the source SeriesInstanceUID per relation.
static RelationUIDType Connect(MultiLabelSegmentation *seg, const Image *source_image)
Static convenience that constructs an instance of this rule and connects seg to source_image.
static const std::string & CanonicalPurposeTag()
Returns the canonical DICOM Code Value used in the SEG's Source Image Sequence Purpose Of Reference C...
RelationUIDType Connect(MultiLabelSegmentation *seg, TemporoSpatialStringProperty *instanceUIDsPerSlice, TemporoSpatialStringProperty *classUIDsPerSlice, const std::string &sourceSeriesInstanceUID) const
Connects seg to a source described by its per-slice DICOM UID properties, assembling the intermediate...
Relation rule for referencing an image as the source of a destination entity.
Property for storing string values resolved by time step and slice index.
Find image slices visible on a given plane.
One seg-source relation as the DICOM SEG writer needs to see it.
TemporoSpatialStringProperty::ConstPointer classUIDsPerSlice
TemporoSpatialStringProperty::ConstPointer instanceUIDsPerSlice