comparison Framework/Deprecated/Toolbox/Slice.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 c35e98d22764
children 2d8ab34c8c91
comparison
equal deleted inserted replaced
993:f270852d3180 994:1f74bc3459ba
74 // http://dicom.nema.org/medical/Dicom/2016a/output/chtml/part03/sect_C.8.8.3.2.html 74 // http://dicom.nema.org/medical/Dicom/2016a/output/chtml/part03/sect_C.8.8.3.2.html
75 75
76 { 76 {
77 std::string increment; 77 std::string increment;
78 78
79 if (dataset.CopyToString(increment, Orthanc::DICOM_TAG_FRAME_INCREMENT_POINTER, false)) 79 if (dataset.LookupStringValue(increment, Orthanc::DICOM_TAG_FRAME_INCREMENT_POINTER, false))
80 { 80 {
81 Orthanc::Toolbox::ToUpperCase(increment); 81 Orthanc::Toolbox::ToUpperCase(increment);
82 if (increment != "3004,000C") // This is the "Grid Frame Offset Vector" tag 82 if (increment != "3004,000C") // This is the "Grid Frame Offset Vector" tag
83 { 83 {
84 LOG(ERROR) << "Bad value for the \"FrameIncrementPointer\" tag"; 84 LOG(ERROR) << "Bad value for the \"FrameIncrementPointer\" tag";
87 } 87 }
88 } 88 }
89 89
90 std::string offsetTag; 90 std::string offsetTag;
91 91
92 if (!dataset.CopyToString(offsetTag, Orthanc::DICOM_TAG_GRID_FRAME_OFFSET_VECTOR, false) || 92 if (!dataset.LookupStringValue(offsetTag, Orthanc::DICOM_TAG_GRID_FRAME_OFFSET_VECTOR, false) ||
93 offsetTag.empty()) 93 offsetTag.empty())
94 { 94 {
95 LOG(ERROR) << "Cannot read the \"GridFrameOffsetVector\" tag, check you are using Orthanc >= 1.3.1"; 95 LOG(ERROR) << "Cannot read the \"GridFrameOffsetVector\" tag, check you are using Orthanc >= 1.3.1";
96 return false; 96 return false;
97 } 97 }
146 orthancInstanceId_ = instanceId; 146 orthancInstanceId_ = instanceId;
147 frame_ = frame; 147 frame_ = frame;
148 type_ = Type_OrthancDecodableFrame; 148 type_ = Type_OrthancDecodableFrame;
149 imageInformation_.reset(new Orthanc::DicomImageInformation(dataset)); 149 imageInformation_.reset(new Orthanc::DicomImageInformation(dataset));
150 150
151 if (!dataset.CopyToString(sopClassUid_, Orthanc::DICOM_TAG_SOP_CLASS_UID, false) || 151 if (!dataset.LookupStringValue(sopClassUid_, Orthanc::DICOM_TAG_SOP_CLASS_UID, false) ||
152 sopClassUid_.empty()) 152 sopClassUid_.empty())
153 { 153 {
154 LOG(ERROR) << "Instance without a SOP class UID"; 154 LOG(ERROR) << "Instance without a SOP class UID";
155 return false; 155 return false;
156 } 156 }
172 } 172 }
173 173
174 thickness_ = 100.0 * std::numeric_limits<double>::epsilon(); 174 thickness_ = 100.0 * std::numeric_limits<double>::epsilon();
175 175
176 std::string tmp; 176 std::string tmp;
177 if (dataset.CopyToString(tmp, Orthanc::DICOM_TAG_SLICE_THICKNESS, false)) 177 if (dataset.LookupStringValue(tmp, Orthanc::DICOM_TAG_SLICE_THICKNESS, false))
178 { 178 {
179 if (!tmp.empty() && 179 if (!tmp.empty() &&
180 !ParseDouble(thickness_, tmp)) 180 !ParseDouble(thickness_, tmp))
181 { 181 {
182 return false; // Syntax error 182 return false; // Syntax error
186 converter_.ReadParameters(dataset); 186 converter_.ReadParameters(dataset);
187 187
188 OrthancStone::GeometryToolbox::GetPixelSpacing(pixelSpacingX_, pixelSpacingY_, dataset); 188 OrthancStone::GeometryToolbox::GetPixelSpacing(pixelSpacingX_, pixelSpacingY_, dataset);
189 189
190 std::string position, orientation; 190 std::string position, orientation;
191 if (dataset.CopyToString(position, Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, false) && 191 if (dataset.LookupStringValue(position, Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, false) &&
192 dataset.CopyToString(orientation, Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, false)) 192 dataset.LookupStringValue(orientation, Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, false))
193 { 193 {
194 geometry_ = OrthancStone::CoordinateSystem3D(position, orientation); 194 geometry_ = OrthancStone::CoordinateSystem3D(position, orientation);
195 195
196 bool ok = true; 196 bool ok = true;
197 197