comparison OrthancStone/Sources/Toolbox/DicomStructureSet.cpp @ 1571:85e117739eca

cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 21 Sep 2020 17:46:39 +0200
parents 244ad1e4e76a
children 4fb8fdf03314
comparison
equal deleted inserted replaced
1570:9a04f42098a3 1571:85e117739eca
257 projectionAlongNormal_ = GeometryToolbox::ProjectAlongNormal(geometry.GetOrigin(), geometry.GetNormal()); 257 projectionAlongNormal_ = GeometryToolbox::ProjectAlongNormal(geometry.GetOrigin(), geometry.GetNormal());
258 sliceThickness_ = it->second.thickness_; 258 sliceThickness_ = it->second.thickness_;
259 259
260 extent_.Reset(); 260 extent_.Reset();
261 261
262 for (Points::const_iterator it = points_.begin(); it != points_.end(); ++it) 262 for (Points::const_iterator it2 = points_.begin(); it2 != points_.end(); ++it2)
263 { 263 {
264 if (IsPointOnSliceIfAny(*it)) 264 if (IsPointOnSliceIfAny(*it2))
265 { 265 {
266 double x, y; 266 double x, y;
267 geometry.ProjectPoint2(x, y, *it); 267 geometry.ProjectPoint2(x, y, *it2);
268 extent_.AddPoint(x, y); 268 extent_.AddPoint(x, y);
269 } 269 }
270 } 270 }
271 return true; 271 return true;
272 } 272 }
468 void DicomStructureSet::Setup(const IDicomDataset& tags) 468 void DicomStructureSet::Setup(const IDicomDataset& tags)
469 { 469 {
470 DicomDatasetReader reader(tags); 470 DicomDatasetReader reader(tags);
471 471
472 size_t count, tmp; 472 size_t count, tmp;
473 if (!tags.GetSequenceSize(count, DICOM_TAG_RT_ROI_OBSERVATIONS_SEQUENCE) || 473 if (!tags.GetSequenceSize(count, DicomPath(DICOM_TAG_RT_ROI_OBSERVATIONS_SEQUENCE)) ||
474 !tags.GetSequenceSize(tmp, DICOM_TAG_ROI_CONTOUR_SEQUENCE) || 474 !tags.GetSequenceSize(tmp, DicomPath(DICOM_TAG_ROI_CONTOUR_SEQUENCE)) ||
475 tmp != count || 475 tmp != count ||
476 !tags.GetSequenceSize(tmp, DICOM_TAG_STRUCTURE_SET_ROI_SEQUENCE) || 476 !tags.GetSequenceSize(tmp, DicomPath(DICOM_TAG_STRUCTURE_SET_ROI_SEQUENCE)) ||
477 tmp != count) 477 tmp != count)
478 { 478 {
479 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat); 479 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat);
480 } 480 }
481 481