13 #ifndef mitkDICOMProperty_h
14 #define mitkDICOMProperty_h
101 template<
typename TNumericReturnType>
104 std::istringstream iss(dcmValueString);
105 iss.imbue(std::locale(
"C"));
106 TNumericReturnType d;
107 if (!(iss >> d) || !(iss.eof()))
109 mitkThrow() <<
"Cannot convert string to value type. Type: " <<
typeid(TNumericReturnType).name() <<
"; String: " << dcmValueString;
127 template<
typename TNumericType>
130 std::ostringstream oss;
131 oss.imbue(std::locale(
"C"));
134 mitkThrow() <<
"Cannot convert value type to dicom string. Type: " <<
typeid(TNumericType).name() <<
"; value: " << value;
Lookup table mapping slice indices to cached DICOM tag value information.
Class used to identify (nested) attributes in a DICOM dataset.
Interface implemented by classes that provide access to property information.
Property for storing string values resolved by time step and slice index.
TemporoSpatialStringProperty DICOMProperty
Type alias for DICOM property values, stored as TemporoSpatialStringProperty.
#define mitkThrow()
Throw a generic mitk::Exception with source location information.
Find image slices visible on a given plane.
TNumericReturnType ConvertDICOMStrToValue(const std::string &dcmValueString)
Convert a DICOM property string to a numeric value.
std::string ConvertValueToDICOMStr(const TNumericType value)
Convert a numeric value to a DICOM property string.
MITKDICOM_EXPORT std::map< std::string, BaseProperty::ConstPointer > GetPropertyByDICOMTagPath(const IPropertyProvider *provider, const DICOMTagPath &path)
Search a property provider for properties matching a DICOM tag path.
MITKDICOM_EXPORT mitk::BaseProperty::Pointer GetDICOMPropertyForDICOMValuesFunctor(const DICOMCachedValueLookupTable &cacheLookupTable)
Functor to convert collected DICOM tag values into DICOMProperty instances.
MITKDICOM_EXPORT std::string GetFirstDICOMValueAsString(const IPropertyProvider *provider, const DICOMTagPath &path)
Read the first matching DICOM property's string value.