Medical Imaging Interaction Toolkit  2022.04.99-b2814023
Medical Imaging Interaction Toolkit
mitk::SemanticRelationsDataStorageAccess Class Reference

The API provides functions to query and manipulate image relations and instances, that are helpful during follow-up examination, like control-points (time period), types of the images or lesions that may be visible on multiple images. More...

#include <mitkSemanticRelationsDataStorageAccess.h>

Public Types

using DataNodeVector = std::vector< DataNode::Pointer >
 

Public Member Functions

 SemanticRelationsDataStorageAccess (DataStorage *dataStorage)
 
DataNodeVector GetAllSegmentationsOfCase (const SemanticTypes::CaseID &caseID) const
 Return a vector of all segmentations that are currently available for the given case. The segmentations may be connected / not connected to a lesion of the case. If no segmentations are stored for the current case, an empty vector is returned. More...
 
DataNodeVector GetAllSegmentationsOfLesion (const SemanticTypes::CaseID &caseID, const SemanticTypes::Lesion &lesion) const
 Return a vector of all segmentations that define the given lesion. These segmentations don't have to be linked to the same image. If the lesion is not referred to by any segmentation, an empty vector is returned. More...
 
DataNodeVector GetAllImagesOfCase (const SemanticTypes::CaseID &caseID) const
 Return a vector of all images that are currently available for the given case. More...
 
DataNodeVector GetAllImagesByID (const SemanticTypes::IDVector &imageIDs) const
 Return a vector of all images that are specified by the given vector of image IDs. More...
 
DataNodeVector GetAllImagesOfLesion (const SemanticTypes::CaseID &caseID, const SemanticTypes::Lesion &lesion) const
 Return a vector of all images that are connected to those segmentations that are linked to the given lesion. If the lesion is not referred to by any segmentation, an empty vector is returned. More...
 
DataNodeVector GetAllSpecificImages (const SemanticTypes::CaseID &caseID, const SemanticTypes::ControlPoint &controlPoint, const SemanticTypes::InformationType &informationType) const
 Return a vector of all image nodes that are defined with the given control point and the given information type. More...
 
DataNodeVector GetAllSpecificImages (const SemanticTypes::CaseID &caseID, const SemanticTypes::InformationType &informationType, const SemanticTypes::ExaminationPeriod &examinationPeriod) const
 Return a vector of all image nodes that are defined with the given information type and the given examination period. The function uses the 'SemanticRelationsInference::GetAllImageIDsOfExaminationPeriod'-function to retrieve the imageIDs of the examination period and then compares the information type of all these images against the given information type. More...
 
DataNodeVector GetAllSpecificSegmentations (const SemanticTypes::CaseID &caseID, const SemanticTypes::ControlPoint &controlPoint, const SemanticTypes::InformationType &informationType) const
 Return a vector of all segmentation nodes that are defined with the given control point and the given information type. The function uses the 'GetAllSpecificImages'-function to retrieve the specific images and then searches for the derived nodes (segmentation child nodes). More...
 
DataNode::Pointer GetSpecificSegmentation (const SemanticTypes::CaseID &caseID, const SemanticTypes::ControlPoint &controlPoint, const SemanticTypes::InformationType &informationType, const SemanticTypes::Lesion &lesion) const
 Return the single segmentation node that is defined with the given information type, the given control point and is representing the given lesion. The function uses the 'GetAllSpecificSegmentations'-function to retrieve the specific segmentations and then checks for the represented lesion. More...
 

Detailed Description

The API provides functions to query and manipulate image relations and instances, that are helpful during follow-up examination, like control-points (time period), types of the images or lesions that may be visible on multiple images.

The class is able to generate IDs from given data nodes using DICOM information. These IDs are used to identify the corresponding instances of a specific case. The case can also be directly identified by the given case ID.

In order for most functions to work the case ID has to be used as a parameter. If not, these functions do nothing.

Definition at line 39 of file mitkSemanticRelationsDataStorageAccess.h.

Member Typedef Documentation

◆ DataNodeVector

Constructor & Destructor Documentation

◆ SemanticRelationsDataStorageAccess()

mitk::SemanticRelationsDataStorageAccess::SemanticRelationsDataStorageAccess ( DataStorage dataStorage)

Member Function Documentation

◆ GetAllImagesByID()

DataNodeVector mitk::SemanticRelationsDataStorageAccess::GetAllImagesByID ( const SemanticTypes::IDVector imageIDs) const

Return a vector of all images that are specified by the given vector of image IDs.

Precondition
The data storage member has to be valid (!nullptr).
Exceptions
SemanticRelationException,ifthe data storage member is invalid (==nullptr).
Parameters
imageIDsA vector of image IDs that represent the images in the data storage.
Returns
A vector of data nodes representing images.

◆ GetAllImagesOfCase()

DataNodeVector mitk::SemanticRelationsDataStorageAccess::GetAllImagesOfCase ( const SemanticTypes::CaseID caseID) const

Return a vector of all images that are currently available for the given case.

Precondition
The data storage member has to be valid (!nullptr).
Exceptions
SemanticRelationException,ifthe data storage member is invalid (==nullptr).
Parameters
caseIDThe current case identifier is defined by the given string.
Returns
A vector of data nodes representing images.

◆ GetAllImagesOfLesion()

DataNodeVector mitk::SemanticRelationsDataStorageAccess::GetAllImagesOfLesion ( const SemanticTypes::CaseID caseID,
const SemanticTypes::Lesion lesion 
) const

Return a vector of all images that are connected to those segmentations that are linked to the given lesion. If the lesion is not referred to by any segmentation, an empty vector is returned.

Precondition
The UID of the lesion has to exist for a lesion instance.
Exceptions
SemanticRelationException,ifUID of the lesion does not exist for a lesion instance (this can be checked via 'InstanceExists').
Parameters
caseIDThe current case identifier is defined by the given string.
lesionA lesion with a UID that identifies the corresponding lesion instance.
Returns
A vector of data nodes representing images on which the lesions are visible.

◆ GetAllSegmentationsOfCase()

DataNodeVector mitk::SemanticRelationsDataStorageAccess::GetAllSegmentationsOfCase ( const SemanticTypes::CaseID caseID) const

Return a vector of all segmentations that are currently available for the given case. The segmentations may be connected / not connected to a lesion of the case. If no segmentations are stored for the current case, an empty vector is returned.

Precondition
The data storage member has to be valid (!nullptr).
Exceptions
SemanticRelationException,ifthe data storage member is invalid (==nullptr).
Parameters
caseIDThe current case identifier is defined by the given string.
Returns
A vector of data nodes representing segmentations.

◆ GetAllSegmentationsOfLesion()

DataNodeVector mitk::SemanticRelationsDataStorageAccess::GetAllSegmentationsOfLesion ( const SemanticTypes::CaseID caseID,
const SemanticTypes::Lesion lesion 
) const

Return a vector of all segmentations that define the given lesion. These segmentations don't have to be linked to the same image. If the lesion is not referred to by any segmentation, an empty vector is returned.

Precondition
The data storage member has to be valid (!nullptr).
Exceptions
SemanticRelationException,ifthe data storage member is invalid (==nullptr).
Precondition
The UID of the lesion has to exist for a lesion instance.
Exceptions
SemanticRelationException,ifUID of the lesion does not exist for a lesion instance (this can be checked via 'InstanceExists').
Parameters
caseIDThe current case identifier is defined by the given string.
lesionA lesion with a UID that identifies the corresponding lesion instance.
Returns
A vector of data nodes representing segmentations that define the given lesion.

◆ GetAllSpecificImages() [1/2]

DataNodeVector mitk::SemanticRelationsDataStorageAccess::GetAllSpecificImages ( const SemanticTypes::CaseID caseID,
const SemanticTypes::ControlPoint controlPoint,
const SemanticTypes::InformationType informationType 
) const

Return a vector of all image nodes that are defined with the given control point and the given information type.

Precondition
The UID of the control point has to exist for a control point instance. The information type has to exist for the given case (and is therefore used by at least one data node).
Exceptions
SemanticRelationException,ifthe UID of the control point does not exist for a control point instance (this can be checked via 'InstanceExists') or if the information type is not used by any data node (this can be checked via 'InstanceExists').
Parameters
caseIDThe current case identifier is defined by the given string.
controlPointA control point with a UID that identifies the corresponding control point instance.
informationTypeAn information type that identifies the corresponding information type instance.
Returns
A vector of image nodes that are defined with the given control point and the given information type.

◆ GetAllSpecificImages() [2/2]

DataNodeVector mitk::SemanticRelationsDataStorageAccess::GetAllSpecificImages ( const SemanticTypes::CaseID caseID,
const SemanticTypes::InformationType informationType,
const SemanticTypes::ExaminationPeriod examinationPeriod 
) const

Return a vector of all image nodes that are defined with the given information type and the given examination period. The function uses the 'SemanticRelationsInference::GetAllImageIDsOfExaminationPeriod'-function to retrieve the imageIDs of the examination period and then compares the information type of all these images against the given information type.

Parameters
caseID
informationTypeAn information type that identifies the corresponding information type instance.
examinationPeriodAn examination period that identifies the corresponding examination period instance.
Returns
A vector of image nodes that are defined with the given information type with the given control point.

◆ GetAllSpecificSegmentations()

DataNodeVector mitk::SemanticRelationsDataStorageAccess::GetAllSpecificSegmentations ( const SemanticTypes::CaseID caseID,
const SemanticTypes::ControlPoint controlPoint,
const SemanticTypes::InformationType informationType 
) const

Return a vector of all segmentation nodes that are defined with the given control point and the given information type. The function uses the 'GetAllSpecificImages'-function to retrieve the specific images and then searches for the derived nodes (segmentation child nodes).

Precondition
The UID of the control point has to exist for a control point instance. The information type has to exist for the given case (and is therefore used by at least one data node).
Exceptions
SemanticRelationException,ifthe UID of the control point does not exist for a control point instance (this can be checked via 'InstanceExists') or if the information type is not used by any data node (this can be checked via 'InstanceExists').
Parameters
caseIDThe current case identifier is defined by the given string.
controlPointA control point with a UID that identifies the corresponding control point instance.
informationTypeAn information type that identifies the corresponding information type instance.
Returns
A vector of segmentation nodes that are defined with the given control point and the given information type.

◆ GetSpecificSegmentation()

DataNode::Pointer mitk::SemanticRelationsDataStorageAccess::GetSpecificSegmentation ( const SemanticTypes::CaseID caseID,
const SemanticTypes::ControlPoint controlPoint,
const SemanticTypes::InformationType informationType,
const SemanticTypes::Lesion lesion 
) const

Return the single segmentation node that is defined with the given information type, the given control point and is representing the given lesion. The function uses the 'GetAllSpecificSegmentations'-function to retrieve the specific segmentations and then checks for the represented lesion.

Precondition
The UID of the control point has to exist for a control point instance. The information type has to exist for the given case (and is therefore used by at least one data node). The lesion has to exist for the given case.
Exceptions
SemanticRelationException,ifthe UID of the control point does not exist for a control point instance (this can be checked via 'InstanceExists') or if the information type is not used by any data node (this can be checked via 'InstanceExists') or if the lesion does not exist for the given case (this can be checked via 'InstanceExists').
Parameters
caseIDThe current case identifier is defined by the given string.
controlPointA control point with a UID that identifies the corresponding control point instance.
informationTypeAn information type that identifies the corresponding information type instance.
lesionA lesion with a UID that identifies the corresponding lesion instance.
Returns
A single segmentation node that is defined with the given information type, the given control point and is representing the given lesion.

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