comparison Framework/Toolbox/Slice.cpp @ 119:ba83e38cf3ff wasm

rendering of rt-dose
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 02 Oct 2017 22:01:41 +0200
parents a4d0b6c82b29
children 063f7f3d9f14
comparison
equal deleted inserted replaced
118:a4d0b6c82b29 119:ba83e38cf3ff
105 unsigned int frame) 105 unsigned int frame)
106 { 106 {
107 orthancInstanceId_ = instanceId; 107 orthancInstanceId_ = instanceId;
108 frame_ = frame; 108 frame_ = frame;
109 type_ = Type_OrthancDecodableFrame; 109 type_ = Type_OrthancDecodableFrame;
110 imageInformation_.reset(new Orthanc::DicomImageInformation(dataset));
110 111
111 if (!dataset.CopyToString(sopClassUid_, Orthanc::DICOM_TAG_SOP_CLASS_UID, false) || 112 if (!dataset.CopyToString(sopClassUid_, Orthanc::DICOM_TAG_SOP_CLASS_UID, false) ||
112 sopClassUid_.empty()) 113 sopClassUid_.empty())
113 { 114 {
114 LOG(ERROR) << "Instance without a SOP class UID"; 115 LOG(ERROR) << "Instance without a SOP class UID";
312 points.push_back(GetGeometry().MapSliceToWorldCoordinates(-0.5 * sx, -0.5 * sy)); 313 points.push_back(GetGeometry().MapSliceToWorldCoordinates(-0.5 * sx, -0.5 * sy));
313 points.push_back(GetGeometry().MapSliceToWorldCoordinates((w - 0.5) * sx, -0.5 * sy)); 314 points.push_back(GetGeometry().MapSliceToWorldCoordinates((w - 0.5) * sx, -0.5 * sy));
314 points.push_back(GetGeometry().MapSliceToWorldCoordinates(-0.5 * sx, (h - 0.5) * sy)); 315 points.push_back(GetGeometry().MapSliceToWorldCoordinates(-0.5 * sx, (h - 0.5) * sy));
315 points.push_back(GetGeometry().MapSliceToWorldCoordinates((w - 0.5) * sx, (h - 0.5) * sy)); 316 points.push_back(GetGeometry().MapSliceToWorldCoordinates((w - 0.5) * sx, (h - 0.5) * sy));
316 } 317 }
318
319
320 const Orthanc::DicomImageInformation& Slice::GetImageInformation() const
321 {
322 if (imageInformation_.get() == NULL)
323 {
324 // Only available if constructing the "Slice" object with a DICOM map
325 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls);
326 }
327 else
328 {
329 return *imageInformation_;
330 }
331 }
317 } 332 }