Medical Imaging Interaction Toolkit
2023.12.00
Medical Imaging Interaction Toolkit
|
The API provides functions to 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 <mitkSemanticRelationsIntegration.h>
Public Member Functions | |
void | AddObserver (ISemanticRelationsObserver *observer) override |
Adds the given concrete observer to the vector that holds all currently registered observer. If the observer is already registered, it will not be added to the observer vector. More... | |
void | RemoveObserver (ISemanticRelationsObserver *observer) override |
Removes the given concrete observer from the vector that holds all currently registered observer. More... | |
virtual | ~SemanticRelationsIntegration () |
void | AddImage (const DataNode *imageNode) |
Add the given image to the set of already existing images. The date is extracted from the DICOM data of the image node and is compared to already existing control points in the semantic relations model. The function tries to find a fitting control point or to extend an already existing control point, if the extracted control point is close to any other, already existing control point. Finally, the image is linked to the correct control point. More... | |
void | RemoveImage (const DataNode *imageNode) |
Remove the given image from the set of already existing images. More... | |
void | AddLesion (const SemanticTypes::CaseID &caseID, const SemanticTypes::Lesion &lesion) |
Add a newly created lesion to the set of already existing lesions - with no connection to a specific image / segmentation of the case data. More... | |
void | OverwriteLesion (const SemanticTypes::CaseID &caseID, const SemanticTypes::Lesion &lesion) |
Overwrite an already existing lesion instance (this may be useful to overwrite the lesion with a different lesion class). More... | |
void | AddLesionAndLinkSegmentation (const DataNode *segmentationNode, const SemanticTypes::Lesion &lesion) |
Add a newly created lesion to the set of already existing lesions. The lesion is added and a reference to the lesion is added to the segmentation. If the segmentation is already linked to a lesion, the old linkage is overwritten (this can be checked via 'IsRepresentingALesion'). More... | |
void | RemoveLesion (const SemanticTypes::CaseID &caseID, const SemanticTypes::Lesion &lesion) |
Remove the given lesion from the set of already existing lesions. More... | |
void | AddSegmentation (const DataNode *segmentationNode, const DataNode *parentNode) |
Add a segmentation instance to the set of already existing segmentations - with no connection to a specific lesion. More... | |
void | LinkSegmentationToLesion (const DataNode *segmentationNode, const SemanticTypes::Lesion &lesion) |
Link the given segmentation instance to an an already existing lesion instance. If the segmentation is already linked to a lesion instance, the old linkage is overwritten (this can be checked via 'IsRepresentingALesion'). More... | |
void | UnlinkSegmentationFromLesion (const DataNode *segmentationNode) |
Unlink the given segmentation instance from the linked lesion instance. The lesion may stay unlinked to any segmentation. More... | |
void | RemoveSegmentation (const DataNode *segmentationNode) |
Remove the given segmentation from the set of already existing segmentations. More... | |
void | SetControlPointOfImage (const DataNode *imageNode, const SemanticTypes::ControlPoint &controlPoint) |
Set the control point for the given image. More... | |
void | AddControlPointAndLinkImage (const DataNode *imageNode, const SemanticTypes::ControlPoint &controlPoint, bool checkConsistence=true) |
Add a newly created control point to the set of already existing control points. A reference to the control point is added to the given image. This function combines adding a control point and linking it, since a control point with no associated data is not allowed. More... | |
void | LinkImageToControlPoint (const DataNode *imageNode, const SemanticTypes::ControlPoint &controlPoint, bool checkConsistence=true) |
Link the given image to an already existing control point. More... | |
void | UnlinkImageFromControlPoint (const DataNode *imageNode) |
Unlink the given image from the linked control point. If an image is unlinked from a control point, the function needs to check whether the control point is still linked to any other image: More... | |
void | AddExaminationPeriod (const SemanticTypes::CaseID &caseID, const SemanticTypes::ExaminationPeriod &examinationPeriod) |
Add an examination period instance to the set of already existing examination periods - with no connection to a specific control point. More... | |
void | RenameExaminationPeriod (const SemanticTypes::CaseID &caseID, const SemanticTypes::ExaminationPeriod &examinationPeriod) |
Rename an already existing examination period instance. More... | |
void | AddControlPointToExaminationPeriod (const SemanticTypes::CaseID &caseID, const SemanticTypes::ControlPoint &controlPoint, const SemanticTypes::ExaminationPeriod &examinationPeriod) |
Add a control point to the vector of control point UIDs of an existing examination period. More... | |
void | SetInformationType (const DataNode *imageNode, const SemanticTypes::InformationType &informationType) |
Set (and possibly overwrite) the information type of the given image. An already associated information type might be removed if is not referenced by any other image: More... | |
void | AddInformationTypeToImage (const DataNode *imageNode, const SemanticTypes::InformationType &informationType) |
Set the information type of the given image. More... | |
void | RemoveInformationTypeFromImage (const DataNode *imageNode) |
Remove the information type of the given image. If the information type is removed, the function needs to check whether the information type is referenced by any other image: More... | |
The API provides functions to 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.
The class implements the ISemanticRelationsObservable interface to allow observers to be informed about changes in the semantic relation storage.
Definition at line 43 of file mitkSemanticRelationsIntegration.h.
|
inlinevirtual |
Definition at line 64 of file mitkSemanticRelationsIntegration.h.
void mitk::SemanticRelationsIntegration::AddControlPointAndLinkImage | ( | const DataNode * | imageNode, |
const SemanticTypes::ControlPoint & | controlPoint, | ||
bool | checkConsistence = true |
||
) |
Add a newly created control point to the set of already existing control points. A reference to the control point is added to the given image. This function combines adding a control point and linking it, since a control point with no associated data is not allowed.
SemanticRelationException,if | the given image data node is invalid (==nullptr). |
SemanticRelationException,if | the UID of the control point already exists for a control point instance (this can be checked via 'InstanceExists'). |
SemanticRelationException,if | the given control point is already contained in an existing control point interval (this can be checked via 'CheckContainingControlPoint'). |
SemanticRelationException,if | the given control point does not contain the date of the given image data node and 'checkConsistence = true' (this can be checked via 'ControlPointManager::InsideControlPoint'). |
imageNode | The current case identifier and node identifier is extracted from the given image data node, which contains DICOM information about the case and the node. |
controlPoint | The control point instance to add. For a newly added control point always has "startDate = endDate". |
checkConsistence | If true, the function checks, whether the date of the image data node actually lies inside the control point to link. |
void mitk::SemanticRelationsIntegration::AddControlPointToExaminationPeriod | ( | const SemanticTypes::CaseID & | caseID, |
const SemanticTypes::ControlPoint & | controlPoint, | ||
const SemanticTypes::ExaminationPeriod & | examinationPeriod | ||
) |
Add a control point to the vector of control point UIDs of an existing examination period.
SemanticRelationException,if | the UID of the control point does not exists for a control point instance (this can be checked via 'InstanceExists'). |
SemanticRelationException,if | the UID of the examination period already exists for a examination period instance (this can be checked via 'InstanceExists'). |
caseID | The current case identifier is defined by the given string. |
controlPoint | The control point instance to add to the examination period. |
examinationPeriod | The examination period to which the control point should be added. |
void mitk::SemanticRelationsIntegration::AddExaminationPeriod | ( | const SemanticTypes::CaseID & | caseID, |
const SemanticTypes::ExaminationPeriod & | examinationPeriod | ||
) |
Add an examination period instance to the set of already existing examination periods - with no connection to a specific control point.
SemanticRelationException,if | the UID of the examination period already exists for a examination period instance (this can be checked via 'InstanceExists'). |
caseID | The current case identifier is defined by the given string. |
examinationPeriod | The examination period to add. |
void mitk::SemanticRelationsIntegration::AddImage | ( | const DataNode * | imageNode | ) |
Add the given image to the set of already existing images. The date is extracted from the DICOM data of the image node and is compared to already existing control points in the semantic relations model. The function tries to find a fitting control point or to extend an already existing control point, if the extracted control point is close to any other, already existing control point. Finally, the image is linked to the correct control point.
SemanticRelationException,if | the given image data node is invalid (==nullptr). |
imageNode | The current case identifier and node identifier is extracted from the given image data node, which contains DICOM information about the case and the node. |
void mitk::SemanticRelationsIntegration::AddInformationTypeToImage | ( | const DataNode * | imageNode, |
const SemanticTypes::InformationType & | informationType | ||
) |
Set the information type of the given image.
SemanticRelationException,if | the given image data node is invalid (==nullptr). |
imageNode | The current case identifier is extracted from the given image data node, which contains DICOM information about the case. |
informationType | An information type that identifies the corresponding information type instance. |
void mitk::SemanticRelationsIntegration::AddLesion | ( | const SemanticTypes::CaseID & | caseID, |
const SemanticTypes::Lesion & | lesion | ||
) |
Add a newly created lesion to the set of already existing lesions - with no connection to a specific image / segmentation of the case data.
SemanticRelationException,it | the UID of the lesion already exists for a lesion instance (this can be checked via 'InstanceExists'). |
caseID | The current case identifier is defined by the given string. |
lesion | The lesion instance to add. |
void mitk::SemanticRelationsIntegration::AddLesionAndLinkSegmentation | ( | const DataNode * | segmentationNode, |
const SemanticTypes::Lesion & | lesion | ||
) |
Add a newly created lesion to the set of already existing lesions. The lesion is added and a reference to the lesion is added to the segmentation. If the segmentation is already linked to a lesion, the old linkage is overwritten (this can be checked via 'IsRepresentingALesion').
SemanticRelationException,if | the given segmentation data node is invalid (==nullptr). |
SemanticRelationException,if | the UID of the lesion already exists for a lesion instance (this can be checked via 'InstanceExists'). |
segmentationNode | The segmentation identifier is extracted from the given segmentation data node. The segmentation node has DICOM information from its parent node. |
lesion | The lesion instance to add and link. |
|
overridevirtual |
Adds the given concrete observer to the vector that holds all currently registered observer. If the observer is already registered, it will not be added to the observer vector.
observer | The concrete observer to register. |
Implements mitk::ISemanticRelationsObservable.
void mitk::SemanticRelationsIntegration::AddSegmentation | ( | const DataNode * | segmentationNode, |
const DataNode * | parentNode | ||
) |
Add a segmentation instance to the set of already existing segmentations - with no connection to a specific lesion.
segmentationNode | The segmentation identifier is extracted from the given segmentation data node. The segmentation node has DICOM information from its parent node. |
parentNode | The node identifier of the parent node is extracted from the given parent data node. |
void mitk::SemanticRelationsIntegration::LinkImageToControlPoint | ( | const DataNode * | imageNode, |
const SemanticTypes::ControlPoint & | controlPoint, | ||
bool | checkConsistence = true |
||
) |
Link the given image to an already existing control point.
SemanticRelationException,if | the given image data node is invalid (==nullptr). |
SemanticRelationException,if | the UID of the control point does not exists for a control point instance (this can be checked via 'InstanceExists'). |
SemanticRelationException,if | the given control point does not contain the date of the given image data node and 'checkConsistence = true' (this can be checked via 'ControlPointManager::InsideControlPoint'). |
imageNode | The current case identifier and node identifier is extracted from the given image data node, which contains DICOM information about the case and the node. |
controlPoint | The control point instance to link. |
checkConsistence | If true, the function checks, whether the date of the image data node actually lies inside the control point to link. |
void mitk::SemanticRelationsIntegration::LinkSegmentationToLesion | ( | const DataNode * | segmentationNode, |
const SemanticTypes::Lesion & | lesion | ||
) |
Link the given segmentation instance to an an already existing lesion instance. If the segmentation is already linked to a lesion instance, the old linkage is overwritten (this can be checked via 'IsRepresentingALesion').
SemanticRelationException,if | the given segmentation data node is invalid (==nullptr). |
SemanticRelationException,if | the UID of the lesion does not exist for a lesion instance (this can be checked via 'InstanceExists'). |
segmentationNode | The segmentation identifier is extracted from the given segmentation data node. The segmentation node has DICOM information from its parent node. |
lesion | The lesion instance to link. |
void mitk::SemanticRelationsIntegration::OverwriteLesion | ( | const SemanticTypes::CaseID & | caseID, |
const SemanticTypes::Lesion & | lesion | ||
) |
Overwrite an already existing lesion instance (this may be useful to overwrite the lesion with a different lesion class).
SemanticRelationException,if | the 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 | The lesion instance that overwrites an existing lesion. |
void mitk::SemanticRelationsIntegration::RemoveImage | ( | const DataNode * | imageNode | ) |
Remove the given image from the set of already existing images.
SemanticRelationException,if | the given image data node is invalid (==nullptr). |
imageNode | The current case identifier and node identifier is extracted from the given image data node, which contains DICOM information about the case and the node. |
void mitk::SemanticRelationsIntegration::RemoveInformationTypeFromImage | ( | const DataNode * | imageNode | ) |
Remove the information type of the given image. If the information type is removed, the function needs to check whether the information type is referenced by any other image:
SemanticRelationException,if | the given image data node is invalid (==nullptr). |
imageNode | The current case identifier is extracted from the given image data node, which contains DICOM information about the case. |
void mitk::SemanticRelationsIntegration::RemoveLesion | ( | const SemanticTypes::CaseID & | caseID, |
const SemanticTypes::Lesion & | lesion | ||
) |
Remove the given lesion from the set of already existing lesions.
SemanticRelationException,if | the UID of the lesion does not exist for a lesion instance (this can be checked via 'InstanceExists'). |
SemanticRelationException,if | the lesion instance to remove is still linked to by any segmentation (this can be checked via 'GetAllSegmentationsOfLesion'). |
caseID | The current case identifier is defined by the given string. |
lesion | The lesion instance to remove. |
|
overridevirtual |
Removes the given concrete observer from the vector that holds all currently registered observer.
observer | The concrete observer to unregister. |
Implements mitk::ISemanticRelationsObservable.
void mitk::SemanticRelationsIntegration::RemoveSegmentation | ( | const DataNode * | segmentationNode | ) |
Remove the given segmentation from the set of already existing segmentations.
SemanticRelationException,if | the given segmentation data node is invalid (==nullptr). |
segmentationNode | The segmentation identifier is extracted from the given segmentation data node. The segmentation node has DICOM information from its parent node. |
void mitk::SemanticRelationsIntegration::RenameExaminationPeriod | ( | const SemanticTypes::CaseID & | caseID, |
const SemanticTypes::ExaminationPeriod & | examinationPeriod | ||
) |
Rename an already existing examination period instance.
SemanticRelationException,if | the UID of the examination period does not exist for an examination period instance (this can be checked via 'InstanceExists'). |
caseID | The current case identifier is defined by the given string. |
examinationPeriod | The examination period instance that renames an existing examination period. |
void mitk::SemanticRelationsIntegration::SetControlPointOfImage | ( | const DataNode * | imageNode, |
const SemanticTypes::ControlPoint & | controlPoint | ||
) |
Set the control point for the given image.
SemanticRelationException,if | the given image data node is invalid (==nullptr). |
imageNode | The current case identifier and node identifier is extracted from the given image data node, which contains DICOM information about the case and the node. |
controlPoint | The control point instance which is used for the given image. |
void mitk::SemanticRelationsIntegration::SetInformationType | ( | const DataNode * | imageNode, |
const SemanticTypes::InformationType & | informationType | ||
) |
Set (and possibly overwrite) the information type of the given image. An already associated information type might be removed if is not referenced by any other image:
SemanticRelationException,if | the given image data node is invalid (==nullptr). |
imageNode | The current case identifier is extracted from the given image data node, which contains DICOM information about the case. |
informationType | An information type that identifies the corresponding information type instance. |
void mitk::SemanticRelationsIntegration::UnlinkImageFromControlPoint | ( | const DataNode * | imageNode | ) |
Unlink the given image from the linked control point. If an image is unlinked from a control point, the function needs to check whether the control point is still linked to any other image:
imageNode | The current case identifier and node identifier is extracted from the given image data node, which contains DICOM information about the case and the node. |
void mitk::SemanticRelationsIntegration::UnlinkSegmentationFromLesion | ( | const DataNode * | segmentationNode | ) |
Unlink the given segmentation instance from the linked lesion instance. The lesion may stay unlinked to any segmentation.
SemanticRelationException,if | the given segmentation data node is invalid (==nullptr). |
segmentationNode | The segmentation identifier is extracted from the given segmentation data node. The segmentation node has DICOM information from its parent node. |