27 if (dateAsString.size() != 8)
72 if (
nullptr == dataNode)
78 if (
nullptr == baseData)
84 if (
nullptr == dicomTag)
90 return dicomTagAsString;
95 if (
nullptr == dataNode)
101 if (
nullptr == baseData)
107 if (
nullptr == dicomTag)
112 return dicomTagAsString;
117 if (
nullptr == dataNode)
123 if (
nullptr == baseData)
129 if (
nullptr == acquisitionDateProperty)
133 std::string acquisitionDateAsString = acquisitionDateProperty->
GetValueAsString();
142 mitkReThrow(e) <<
"Cannot retrieve a valid DICOM date.";
150 if (
nullptr == dataNode)
156 if (
nullptr == baseData)
162 if (
nullptr == dicomTag)
167 return dicomTagAsString;
172 if (identifier.empty())
178 std::size_t first = identifier.find_first_not_of(
' ');
179 if (std::string::npos == first)
184 std::size_t last = identifier.find_last_not_of(
' ');
185 return identifier.substr(first, last - first + 1);
Base of all data objects.
void SetDateFromString(const std::string &dateAsString)
std::string MITKCORE_EXPORT GeneratePropertyNameForDICOMTag(unsigned int group, unsigned int element)
MITKSEMANTICRELATIONS_EXPORT std::string GetCaseIDDICOMProperty()
Creates a property name for a DICOM tag. The tag is "0x0010, 0x0010" (PatientName) ...
#define mitkReThrow(mitkexception)
MITKSEMANTICRELATIONS_EXPORT std::string GetNodeIDDICOMProperty()
Creates a property name for a DICOM tag. The tag is "0x0020, 0x000e" (SeriesInstanceUID) ...
MITKSEMANTICRELATIONS_EXPORT SemanticTypes::CaseID GetCaseIDFromDataNode(const mitk::DataNode *dataNode)
BaseData * GetData() const
Get the data object (instance of BaseData, e.g., an Image) managed by this DataNode.
virtual std::string GetValueAsString() const
Abstract base class for properties.
MITKSEMANTICRELATIONS_EXPORT SemanticTypes::ID GetIDFromDataNode(const mitk::DataNode *dataNode)
mitk::BaseProperty::Pointer GetProperty(const char *propertyKey) const
Get the property (instance of BaseProperty) with key propertyKey from the PropertyList, and set it to this, respectively;.
#define mitkThrowException(classname)
std::string InformationType
MITKSEMANTICRELATIONS_EXPORT SemanticTypes::InformationType GetDICOMModalityFromDataNode(const mitk::DataNode *dataNode)
Extracts a specific DICOM tag from the node's base data and returns the tag as a information type (a ...
MITKSEMANTICRELATIONS_EXPORT std::string GetModalityDICOMProperty()
Creates a property name for a DICOM tag. The tag is "0x0008, 0x0060" (Modality)
MITKSEMANTICRELATIONS_EXPORT SemanticTypes::ControlPoint GetDICOMDateFromDataNode(const mitk::DataNode *dataNode)
MITKSEMANTICRELATIONS_EXPORT std::string GetDateDICOMProperty()
Creates a property name for a DICOM tag. The tag is "0x0008, 0x0022" (AcquisitionDate) ...
MITKSEMANTICRELATIONS_EXPORT std::string TrimDICOM(const std::string &identifier)
mitk::SemanticTypes::ControlPoint GetControlPointFromString(const std::string &dateAsString)
Class for nodes of the DataTree.