Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
Class is used to identify (nested) attributes in a DICOM dataset. In contrast to the class DICOMTag, which only specifies one specific tag, the tag path can identify nested attributes (like items in a DICOM sequence). In addition you may also specify wildcards for the selection index or complete elements of the path. More...
#include <mitkDICOMTagPath.h>
Classes | |
struct | NodeInfo |
Public Types | |
typedef int | ItemSelectionIndex |
typedef std::vector< NodeInfo > | NodeInfoVectorType |
typedef NodeInfoVectorType::size_type | PathIndexType |
Public Member Functions | |
bool | IsEmpty () const |
bool | IsExplicit () const |
bool | HasItemSelectionWildcardsOnly () const |
PathIndexType | Size () const |
PathIndexType | AddNode (const NodeInfo &newNode) |
const NodeInfo & | GetNode (const PathIndexType &index) const |
NodeInfo & | GetNode (const PathIndexType &index) |
NodeInfo & | GetFirstNode () |
const NodeInfo & | GetFirstNode () const |
NodeInfo & | GetLastNode () |
const NodeInfo & | GetLastNode () const |
const NodeInfoVectorType & | GetNodes () const |
std::string | ToStr () const |
DICOMTagPath & | FromStr (const std::string &pathStr) |
bool | operator== (const DICOMTagPath &path) const |
bool | operator< (const DICOMTagPath &right) const |
bool | Equals (const DICOMTagPath &path) const |
DICOMTagPath & | operator= (const DICOMTagPath &path) |
DICOMTagPath & | AddAnyElement () |
DICOMTagPath & | AddElement (unsigned int group, unsigned int element) |
DICOMTagPath & | AddAnySelection (unsigned int group, unsigned int element) |
DICOMTagPath & | AddSelection (unsigned int group, unsigned int element, ItemSelectionIndex index) |
DICOMTagPath () | |
DICOMTagPath (const DICOMTagPath &path) | |
DICOMTagPath (const DICOMTag &tag) | |
DICOMTagPath (unsigned int group, unsigned int element) | |
virtual | ~DICOMTagPath () |
virtual void | Reset () |
Static Protected Member Functions | |
static bool | DICOMTagPathesMatch (const DICOMTagPath &left, const DICOMTagPath &right) |
Protected Attributes | |
NodeInfoVectorType | m_NodeInfos |
Class is used to identify (nested) attributes in a DICOM dataset. In contrast to the class DICOMTag, which only specifies one specific tag, the tag path can identify nested attributes (like items in a DICOM sequence). In addition you may also specify wildcards for the selection index or complete elements of the path.
Definition at line 34 of file mitkDICOMTagPath.h.
typedef int mitk::DICOMTagPath::ItemSelectionIndex |
Definition at line 37 of file mitkDICOMTagPath.h.
typedef std::vector<NodeInfo> mitk::DICOMTagPath::NodeInfoVectorType |
Definition at line 61 of file mitkDICOMTagPath.h.
typedef NodeInfoVectorType::size_type mitk::DICOMTagPath::PathIndexType |
Definition at line 62 of file mitkDICOMTagPath.h.
mitk::DICOMTagPath::DICOMTagPath | ( | ) |
Definition at line 361 of file mitkDICOMTagPath.cpp.
References Reset().
Referenced by DICOMTagPath(), and mitk::PropertyNameToDICOMTagPath().
mitk::DICOMTagPath::DICOMTagPath | ( | const DICOMTagPath & | path | ) |
Definition at line 367 of file mitkDICOMTagPath.cpp.
References DICOMTagPath().
mitk::DICOMTagPath::DICOMTagPath | ( | const DICOMTag & | tag | ) |
Definition at line 373 of file mitkDICOMTagPath.cpp.
References mitk::DICOMTagPath::NodeInfo::Element, and m_NodeInfos.
|
explicit |
Definition at line 378 of file mitkDICOMTagPath.cpp.
References m_NodeInfos, and ~DICOMTagPath().
|
virtual |
Definition at line 384 of file mitkDICOMTagPath.cpp.
References Reset().
Referenced by DICOMTagPath().
DICOMTagPath & mitk::DICOMTagPath::AddAnyElement | ( | ) |
Definition at line 288 of file mitkDICOMTagPath.cpp.
References mitk::DICOMTagPath::NodeInfo::AnyElement, and m_NodeInfos.
Referenced by mitk::PropertyNameToDICOMTagPath().
DICOMTagPath & mitk::DICOMTagPath::AddAnySelection | ( | unsigned int | group, |
unsigned int | element | ||
) |
Definition at line 302 of file mitkDICOMTagPath.cpp.
References mitk::DICOMTagPath::NodeInfo::AnySelection, and m_NodeInfos.
Referenced by mitk::GetDefaultDICOMTagsOfInterest(), and mitk::PropertyNameToDICOMTagPath().
DICOMTagPath & mitk::DICOMTagPath::AddElement | ( | unsigned int | group, |
unsigned int | element | ||
) |
Definition at line 295 of file mitkDICOMTagPath.cpp.
References mitk::DICOMTagPath::NodeInfo::Element, and m_NodeInfos.
Referenced by mitk::DICOMSegmentationConstants::ANATOMIC_REGION_CODE_MEANING_PATH(), mitk::DICOMSegmentationConstants::ANATOMIC_REGION_CODE_SCHEME_PATH(), mitk::DICOMSegmentationConstants::ANATOMIC_REGION_CODE_VALUE_PATH(), mitk::DICOMSegmentationConstants::ANATOMIC_REGION_SEQUENCE_PATH(), DcmPathToTagPath(), mitk::PropertyNameToDICOMTagPath(), mitk::DICOMSegmentationConstants::SEGMENT_ALGORITHM_TYPE_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_CATEGORY_CODE_MEANING_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_CATEGORY_CODE_SCHEME_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_CATEGORY_CODE_VALUE_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_LABEL_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_MODIFIER_CODE_MEANING_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_MODIFIER_CODE_SCHEME_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_MODIFIER_CODE_VALUE_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_NUMBER_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_SEQUENCE_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_TYPE_CODE_MEANING_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_TYPE_CODE_SCHEME_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_TYPE_CODE_VALUE_PATH(), mitk::DICOMSegmentationConstants::SEGMENTED_PROPERTY_CATEGORY_SEQUENCE_PATH(), mitk::DICOMSegmentationConstants::SEGMENTED_PROPERTY_MODIFIER_SEQUENCE_PATH(), and mitk::DICOMSegmentationConstants::SEGMENTED_PROPERTY_TYPE_SEQUENCE_PATH().
DICOMTagPath::PathIndexType mitk::DICOMTagPath::AddNode | ( | const NodeInfo & | newNode | ) |
Adds a new node to the end of the path.
[in] | newNode | Reference to the node that should be added. |
Definition at line 131 of file mitkDICOMTagPath.cpp.
References GetNode(), and m_NodeInfos.
Referenced by DcmPathToTagPath(), and Size().
DICOMTagPath & mitk::DICOMTagPath::AddSelection | ( | unsigned int | group, |
unsigned int | element, | ||
ItemSelectionIndex | index | ||
) |
Definition at line 309 of file mitkDICOMTagPath.cpp.
References FromStr(), m_NodeInfos, and mitk::DICOMTagPath::NodeInfo::SequenceSelection.
Referenced by mitk::PropertyNameToDICOMTagPath().
|
staticprotected |
Definition at line 395 of file mitkDICOMTagPath.cpp.
References GetNodes().
bool mitk::DICOMTagPath::Equals | ( | const DICOMTagPath & | path | ) | const |
Checks if to DICOMTagPathes are specify the same node. Hence all wildcards will be processed.
E.G.: "item1/child1/grandChild2" == ".//item1//grandChild2" is true.
Definition at line 271 of file mitkDICOMTagPath.cpp.
References DICOMTagPathesMatch(), and operator=().
Referenced by mitk::GetPropertyByDICOMTagPath(), mitk::DICOMGenericImageFrameInfo::GetTagValueAsString(), and operator<().
DICOMTagPath & mitk::DICOMTagPath::FromStr | ( | const std::string & | pathStr | ) |
Definition at line 317 of file mitkDICOMTagPath.cpp.
References mitk::DICOMTagPath::NodeInfo::AnyElement, mitk::DICOMTagPath::NodeInfo::AnySelection, mitk::DICOMTagPath::NodeInfo::Element, info(), m_NodeInfos, mitk::DICOMTagPath::NodeInfo::selection, mitk::DICOMTagPath::NodeInfo::SequenceSelection, mitk::DICOMTagPath::NodeInfo::tag, and mitk::DICOMTagPath::NodeInfo::type.
Referenced by AddSelection().
NodeInfo& mitk::DICOMTagPath::GetFirstNode | ( | ) |
Function returns the node info of the first path node within the DICOMTagPath.
Referenced by mitk::DICOMGDCMTagScanner::AddTagPath(), GetNode(), mitk::DICOMGDCMTagCache::GetTagValue(), and mitk::DICOMGDCMImageFrameInfo::GetTagValueAsString().
const DICOMTagPath::NodeInfo & mitk::DICOMTagPath::GetFirstNode | ( | ) | const |
Function returns the node info of the first path node within the DICOMTagPath.
Definition at line 163 of file mitkDICOMTagPath.cpp.
References GetLastNode(), and GetNode().
DICOMTagPath::NodeInfo & mitk::DICOMTagPath::GetLastNode | ( | ) |
Function returns the node info of the last path node within the DICOMTagPath.
Definition at line 177 of file mitkDICOMTagPath.cpp.
References GetNode(), GetNodes(), and Size().
Referenced by mitk::DICOMTagsOfInterestService::AddTagOfInterest(), DcmPathToTagPath(), GetFirstNode(), and GetLastNode().
const DICOMTagPath::NodeInfo & mitk::DICOMTagPath::GetLastNode | ( | ) | const |
Function returns the node info of the last path node within the DICOMTagPath.
Definition at line 170 of file mitkDICOMTagPath.cpp.
References GetLastNode(), GetNode(), and Size().
const DICOMTagPath::NodeInfo & mitk::DICOMTagPath::GetNode | ( | const PathIndexType & | index | ) | const |
Function returns the node info of a path node specified by the index within the DICOMTagPath.
[in] | index | Index of the node whose info should be retrieved. |
Definition at line 139 of file mitkDICOMTagPath.cpp.
References m_NodeInfos, mitkThrow, Size(), and ToStr().
Referenced by AddNode(), GetFirstNode(), and GetLastNode().
DICOMTagPath::NodeInfo & mitk::DICOMTagPath::GetNode | ( | const PathIndexType & | index | ) |
Function returns the node info of a path node specified by the index within the DICOMTagPath.
[in] | index | Index of the node whose info should be retrieved. |
Definition at line 151 of file mitkDICOMTagPath.cpp.
References GetFirstNode(), m_NodeInfos, mitkThrow, Size(), and ToStr().
const DICOMTagPath::NodeInfoVectorType & mitk::DICOMTagPath::GetNodes | ( | ) | const |
Definition at line 184 of file mitkDICOMTagPath.cpp.
References m_NodeInfos, and ToStr().
Referenced by DICOMTagPathesMatch(), mitk::DICOMTagPathToPersistenceKeyRegEx(), mitk::DICOMTagPathToPersistenceKeyTemplate(), mitk::DICOMTagPathToPersistenceNameTemplate(), mitk::DICOMTagPathToPropertyName(), mitk::DICOMTagPathToPropertyRegEx(), and GetLastNode().
bool mitk::DICOMTagPath::HasItemSelectionWildcardsOnly | ( | ) | const |
Returns if the path has any nodes with item selection wild cards ([*]).
Definition at line 112 of file mitkDICOMTagPath.cpp.
References mitk::DICOMTagPath::NodeInfo::AnyElement, mitk::DICOMTagPath::NodeInfo::AnySelection, and m_NodeInfos.
Referenced by mitk::DICOMTagPathToDCMTKSearchPath(), and IsExplicit().
bool mitk::DICOMTagPath::IsEmpty | ( | ) | const |
Returns if the DICOMTagPath is empty.
Definition at line 93 of file mitkDICOMTagPath.cpp.
References IsExplicit(), and m_NodeInfos.
Referenced by mitk::GetPropertyByDICOMTagPath().
bool mitk::DICOMTagPath::IsExplicit | ( | ) | const |
Returns if the path is explicit (has no wildcards).
Definition at line 100 of file mitkDICOMTagPath.cpp.
References mitk::DICOMTagPath::NodeInfo::AnyElement, mitk::DICOMTagPath::NodeInfo::AnySelection, HasItemSelectionWildcardsOnly(), and m_NodeInfos.
Referenced by mitk::DICOMTagsOfInterestService::AddTagOfInterest(), mitk::DICOMGDCMTagScanner::AddTagPath(), mitk::DICOMTagPathToDCMTKSearchPath(), mitk::DICOMGDCMTagCache::GetTagValue(), mitk::DICOMGDCMImageFrameInfo::GetTagValueAsString(), IsEmpty(), and mitk::DICOMGenericImageFrameInfo::SetTagValue().
bool mitk::DICOMTagPath::operator< | ( | const DICOMTagPath & | right | ) | const |
Operation equals like comparing the ToStr() results with operator <.
Definition at line 245 of file mitkDICOMTagPath.cpp.
References Equals(), and m_NodeInfos.
Referenced by operator==().
DICOMTagPath & mitk::DICOMTagPath::operator= | ( | const DICOMTagPath & | path | ) |
Definition at line 278 of file mitkDICOMTagPath.cpp.
References m_NodeInfos.
Referenced by Equals().
bool mitk::DICOMTagPath::operator== | ( | const DICOMTagPath & | path | ) | const |
Compares two DICOMTagPaths for real equality. So its a string compare of their string conversion
Definition at line 238 of file mitkDICOMTagPath.cpp.
References m_NodeInfos, and operator<().
Referenced by ToStr().
|
virtual |
Definition at line 388 of file mitkDICOMTagPath.cpp.
References DICOMTagPathesMatch(), and m_NodeInfos.
Referenced by DICOMTagPath(), and ~DICOMTagPath().
DICOMTagPath::PathIndexType mitk::DICOMTagPath::Size | ( | ) | const |
Number of path nodes the DICOMTagPath contains.
Definition at line 124 of file mitkDICOMTagPath.cpp.
References AddNode(), and m_NodeInfos.
Referenced by mitk::DICOMTagsOfInterestService::AddTagOfInterest(), mitk::DICOMGDCMTagScanner::AddTagPath(), DcmPathToTagPath(), GetLastNode(), GetNode(), mitk::DICOMGDCMTagCache::GetTagValue(), mitk::DICOMGDCMImageFrameInfo::GetTagValueAsString(), and ToStr().
std::string mitk::DICOMTagPath::ToStr | ( | ) | const |
Definition at line 191 of file mitkDICOMTagPath.cpp.
References mitk::DICOMTagPath::NodeInfo::AnyElement, mitk::DICOMTagPath::NodeInfo::AnySelection, mitk::DICOMTagPath::NodeInfo::Invalid, m_NodeInfos, operator==(), mitk::DICOMTagPath::NodeInfo::SequenceSelection, and Size().
Referenced by mitk::DICOMGDCMTagScanner::AddTagPath(), mitk::DICOMTagPathToDCMTKSearchPath(), GetNode(), GetNodes(), mitk::operator<<(), and mitk::DICOMGenericImageFrameInfo::SetTagValue().
|
protected |
Definition at line 150 of file mitkDICOMTagPath.h.
Referenced by AddAnyElement(), AddAnySelection(), AddElement(), AddNode(), AddSelection(), DICOMTagPath(), FromStr(), GetNode(), GetNodes(), HasItemSelectionWildcardsOnly(), IsEmpty(), IsExplicit(), operator<(), operator=(), operator==(), Reset(), Size(), and ToStr().