# HG changeset patch # User Benjamin Golinvaux # Date 1571837679 -7200 # Node ID 5a18e6a395bc3fcc2915bb169f145027da0702a5 # Parent b8521df3944adc1ac09618f43a0c4ffeef2adaff Added DoseUnit tag retrieval to DicomInstanceParameters diff -r b8521df3944a -r 5a18e6a395bc Framework/Toolbox/DicomInstanceParameters.cpp --- a/Framework/Toolbox/DicomInstanceParameters.cpp Tue Oct 22 17:51:25 2019 +0200 +++ b/Framework/Toolbox/DicomInstanceParameters.cpp Wed Oct 23 15:34:39 2019 +0200 @@ -110,6 +110,15 @@ if (sopClassUid_ == SopClassUid_RTDose) { ComputeDoseOffsets(dicom); + + static const Orthanc::DicomTag DICOM_TAG_DOSE_UNITS(0x3004, 0x0002); + + if (!dicom.LookupStringValue(doseUnits_, DICOM_TAG_DOSE_UNITS, false)) + { + LOG(WARNING) << "Tag DoseUnits (0x3004, 0x0002) is missing in " << sopInstanceUid_; + doseUnits_ = ""; + } + } isColor_ = (imageInformation_.GetPhotometricInterpretation() != Orthanc::PhotometricInterpretation_Monochrome1 && diff -r b8521df3944a -r 5a18e6a395bc Framework/Toolbox/DicomInstanceParameters.h --- a/Framework/Toolbox/DicomInstanceParameters.h Tue Oct 22 17:51:25 2019 +0200 +++ b/Framework/Toolbox/DicomInstanceParameters.h Wed Oct 23 15:34:39 2019 +0200 @@ -59,6 +59,7 @@ Orthanc::PixelFormat expectedPixelFormat_; bool hasIndexInSeries_; unsigned int indexInSeries_; + std::string doseUnits_; void ComputeDoseOffsets(const Orthanc::DicomMap& dicom); @@ -199,5 +200,10 @@ } unsigned int GetIndexInSeries() const; + + const std::string& GetDoseUnits() const + { + return data_.doseUnits_; + } }; }