Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
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... | |
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.
using mitk::SemanticRelationsDataStorageAccess::DataNodeVector = std::vector<DataNode::Pointer> |
Definition at line 43 of file mitkSemanticRelationsDataStorageAccess.h.
mitk::SemanticRelationsDataStorageAccess::SemanticRelationsDataStorageAccess | ( | DataStorage * | dataStorage | ) |
Definition at line 27 of file mitkSemanticRelationsDataStorageAccess.cpp.
mitk::SemanticRelationsDataStorageAccess::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.
SemanticRelationException,if | the data storage member is invalid (==nullptr). |
imageIDs | A vector of image IDs that represent the images in the data storage. |
Definition at line 151 of file mitkSemanticRelationsDataStorageAccess.cpp.
References mitk::GetIDFromDataNode(), mitk::NodePredicates::GetImagePredicate(), and mitkThrowException.
Referenced by GetAllSpecificImages().
mitk::SemanticRelationsDataStorageAccess::DataNodeVector mitk::SemanticRelationsDataStorageAccess::GetAllImagesOfCase | ( | const SemanticTypes::CaseID & | caseID | ) | const |
Return a vector of all images that are currently available for the given case.
SemanticRelationException,if | the data storage member is invalid (==nullptr). |
caseID | The current case identifier is defined by the given string. |
Definition at line 109 of file mitkSemanticRelationsDataStorageAccess.cpp.
References mitk::RelationStorage::GetAllImageIDsOfCase(), mitk::GetCaseIDFromDataNode(), mitk::GetIDFromDataNode(), mitk::NodePredicates::GetImagePredicate(), and mitkThrowException.
Referenced by GetAllSpecificImages().
mitk::SemanticRelationsDataStorageAccess::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.
SemanticRelationException,if | UID of the lesion does not exist for a lesion instance (this can be checked via 'InstanceExists'). |
caseID | The current case identifier is defined by the given string. |
lesion | A lesion with a UID that identifies the corresponding lesion instance. |
Definition at line 191 of file mitkSemanticRelationsDataStorageAccess.cpp.
References GetAllSegmentationsOfLesion(), mitk::NodePredicates::GetImagePredicate(), and mitkThrowException.
mitk::SemanticRelationsDataStorageAccess::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.
SemanticRelationException,if | the data storage member is invalid (==nullptr). |
caseID | The current case identifier is defined by the given string. |
Definition at line 37 of file mitkSemanticRelationsDataStorageAccess.cpp.
References mitk::RelationStorage::GetAllSegmentationIDsOfCase(), mitk::GetCaseIDFromDataNode(), mitk::GetIDFromDataNode(), mitk::NodePredicates::GetSegmentationPredicate(), and mitkThrowException.
Referenced by GetAllSegmentationsOfLesion().
mitk::SemanticRelationsDataStorageAccess::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.
SemanticRelationException,if | the data storage member is invalid (==nullptr). |
SemanticRelationException,if | UID of the lesion does not exist for a lesion instance (this can be checked via 'InstanceExists'). |
caseID | The current case identifier is defined by the given string. |
lesion | A lesion with a UID that identifies the corresponding lesion instance. |
Definition at line 79 of file mitkSemanticRelationsDataStorageAccess.cpp.
References GetAllSegmentationsOfCase(), mitk::SemanticRelationsInference::GetLesionOfSegmentation(), mitk::SemanticRelationsInference::InstanceExists(), mitkThrowException, and mitk::SemanticTypes::Lesion::UID.
Referenced by GetAllImagesOfLesion().
mitk::SemanticRelationsDataStorageAccess::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.
SemanticRelationException,if | the 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'). |
caseID | The current case identifier is defined by the given string. |
controlPoint | A control point with a UID that identifies the corresponding control point instance. |
informationType | An information type that identifies the corresponding information type instance. |
Definition at line 218 of file mitkSemanticRelationsDataStorageAccess.cpp.
References mitk::SemanticTypes::ControlPoint::date, GetAllImagesOfCase(), mitk::SemanticRelationsInference::GetControlPointOfImage(), mitk::SemanticRelationsInference::GetInformationTypeOfImage(), mitk::SemanticRelationsInference::InstanceExists(), mitkThrowException, and mitk::SemanticTypes::ControlPoint::UID.
Referenced by GetAllSpecificSegmentations().
mitk::SemanticRelationsDataStorageAccess::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.
informationType | An information type that identifies the corresponding information type instance. |
examinationPeriod | An examination period that identifies the corresponding examination period instance. |
Definition at line 248 of file mitkSemanticRelationsDataStorageAccess.cpp.
References mitk::SemanticRelationsInference::GetAllImageIDsOfExaminationPeriod(), GetAllImagesByID(), mitk::RelationStorage::GetInformationTypeOfImage(), mitk::SemanticRelationsInference::InstanceExists(), mitkThrowException, and mitk::SemanticTypes::ExaminationPeriod::name.
mitk::SemanticRelationsDataStorageAccess::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).
SemanticRelationException,if | the 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'). |
caseID | The current case identifier is defined by the given string. |
controlPoint | A control point with a UID that identifies the corresponding control point instance. |
informationType | An information type that identifies the corresponding information type instance. |
Definition at line 278 of file mitkSemanticRelationsDataStorageAccess.cpp.
References GetAllSpecificImages(), mitk::NodePredicates::GetSegmentationPredicate(), mitkReThrow, and mitkThrow.
Referenced by GetSpecificSegmentation().
mitk::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.
SemanticRelationException,if | the 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'). |
caseID | The current case identifier is defined by the given string. |
controlPoint | A control point with a UID that identifies the corresponding control point instance. |
informationType | An information type that identifies the corresponding information type instance. |
lesion | A lesion with a UID that identifies the corresponding lesion instance. |
Definition at line 309 of file mitkSemanticRelationsDataStorageAccess.cpp.
References GetAllSpecificSegmentations(), mitk::SemanticRelationsInference::GetLesionOfSegmentation(), mitkReThrow, mitkThrow, and mitk::SemanticTypes::Lesion::UID.
Referenced by QmitkStatisticsCalculator::ComputeLesionVolume().