comparison Framework/Volumes/VolumeImageGeometry.cpp @ 811:ffec76a5f7eb

deprecating ParallelSlices
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 28 May 2019 18:21:00 +0200
parents e8fdf29cd0ca
children 32eaf4929b08
comparison
equal deleted inserted replaced
810:7608e8107aa1 811:ffec76a5f7eb
307 } 307 }
308 } 308 }
309 309
310 310
311 CoordinateSystem3D VolumeImageGeometry::GetProjectionSlice(VolumeProjection projection, 311 CoordinateSystem3D VolumeImageGeometry::GetProjectionSlice(VolumeProjection projection,
312 unsigned int depth) const 312 unsigned int z) const
313 { 313 {
314 if (depth >= GetProjectionDepth(projection)) 314 if (z >= GetProjectionDepth(projection))
315 { 315 {
316 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); 316 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange);
317 } 317 }
318 318
319 Vector dim = GetVoxelDimensions(projection); 319 Vector dim = GetVoxelDimensions(projection);
320 CoordinateSystem3D plane = GetProjectionGeometry(projection); 320 CoordinateSystem3D plane = GetProjectionGeometry(projection);
321 321
322 plane.SetOrigin(plane.GetOrigin() + static_cast<double>(depth) * plane.GetNormal() * dim[2]); 322 plane.SetOrigin(plane.GetOrigin() + static_cast<double>(z) * plane.GetNormal() * dim[2]);
323 323
324 return plane; 324 return plane;
325 } 325 }
326 } 326 }