comparison Framework/Toolbox/DicomInstanceParameters.cpp @ 994:1f74bc3459ba

fix build due to rename in Orthanc::DicomMap
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 12 Sep 2019 08:27:12 +0200
parents 8e497a4e3d96
children a416ce923b60
comparison
equal deleted inserted replaced
993:f270852d3180 994:1f74bc3459ba
39 // http://dicom.nema.org/medical/Dicom/2016a/output/chtml/part03/sect_C.8.8.3.2.html 39 // http://dicom.nema.org/medical/Dicom/2016a/output/chtml/part03/sect_C.8.8.3.2.html
40 40
41 { 41 {
42 std::string increment; 42 std::string increment;
43 43
44 if (dicom.CopyToString(increment, Orthanc::DICOM_TAG_FRAME_INCREMENT_POINTER, false)) 44 if (dicom.LookupStringValue(increment, Orthanc::DICOM_TAG_FRAME_INCREMENT_POINTER, false))
45 { 45 {
46 Orthanc::Toolbox::ToUpperCase(increment); 46 Orthanc::Toolbox::ToUpperCase(increment);
47 if (increment != "3004,000C") // This is the "Grid Frame Offset Vector" tag (DICOM_TAG_GRID_FRAME_OFFSET_VECTOR) 47 if (increment != "3004,000C") // This is the "Grid Frame Offset Vector" tag (DICOM_TAG_GRID_FRAME_OFFSET_VECTOR)
48 { 48 {
49 LOG(ERROR) << "RT-DOSE: Bad value for the \"FrameIncrementPointer\" tag"; 49 LOG(ERROR) << "RT-DOSE: Bad value for the \"FrameIncrementPointer\" tag";
74 if (imageInformation_.GetNumberOfFrames() <= 0) 74 if (imageInformation_.GetNumberOfFrames() <= 0)
75 { 75 {
76 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat); 76 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat);
77 } 77 }
78 78
79 if (!dicom.CopyToString(studyInstanceUid_, Orthanc::DICOM_TAG_STUDY_INSTANCE_UID, false) || 79 if (!dicom.LookupStringValue(studyInstanceUid_, Orthanc::DICOM_TAG_STUDY_INSTANCE_UID, false) ||
80 !dicom.CopyToString(seriesInstanceUid_, Orthanc::DICOM_TAG_SERIES_INSTANCE_UID, false) || 80 !dicom.LookupStringValue(seriesInstanceUid_, Orthanc::DICOM_TAG_SERIES_INSTANCE_UID, false) ||
81 !dicom.CopyToString(sopInstanceUid_, Orthanc::DICOM_TAG_SOP_INSTANCE_UID, false)) 81 !dicom.LookupStringValue(sopInstanceUid_, Orthanc::DICOM_TAG_SOP_INSTANCE_UID, false))
82 { 82 {
83 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat); 83 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat);
84 } 84 }
85 85
86 std::string s; 86 std::string s;
87 if (!dicom.CopyToString(s, Orthanc::DICOM_TAG_SOP_CLASS_UID, false)) 87 if (!dicom.LookupStringValue(s, Orthanc::DICOM_TAG_SOP_CLASS_UID, false))
88 { 88 {
89 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat); 89 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat);
90 } 90 }
91 else 91 else
92 { 92 {
99 } 99 }
100 100
101 GeometryToolbox::GetPixelSpacing(pixelSpacingX_, pixelSpacingY_, dicom); 101 GeometryToolbox::GetPixelSpacing(pixelSpacingX_, pixelSpacingY_, dicom);
102 102
103 std::string position, orientation; 103 std::string position, orientation;
104 if (dicom.CopyToString(position, Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, false) && 104 if (dicom.LookupStringValue(position, Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, false) &&
105 dicom.CopyToString(orientation, Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, false)) 105 dicom.LookupStringValue(orientation, Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, false))
106 { 106 {
107 geometry_ = CoordinateSystem3D(position, orientation); 107 geometry_ = CoordinateSystem3D(position, orientation);
108 } 108 }
109 109
110 if (sopClassUid_ == SopClassUid_RTDose) 110 if (sopClassUid_ == SopClassUid_RTDose)