comparison OrthancStone/Sources/Toolbox/GeometryToolbox.cpp @ 1821:36430d73e36c

introducing measure units in AnnotationsSceneLayer
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 26 May 2021 14:02:12 +0200
parents 9ac2a65d4172
children 3889ae96d2e9
comparison
equal deleted inserted replaced
1820:5baaad557d58 1821:36430d73e36c
302 return true; 302 return true;
303 } 303 }
304 } 304 }
305 305
306 306
307 void GetPixelSpacing(double& spacingX, 307 bool GetPixelSpacing(double& spacingX,
308 double& spacingY, 308 double& spacingY,
309 const Orthanc::DicomMap& dicom) 309 const Orthanc::DicomMap& dicom)
310 { 310 {
311 Vector v; 311 Vector v;
312 312
322 else 322 else
323 { 323 {
324 // WARNING: X/Y are swapped (Y comes first) 324 // WARNING: X/Y are swapped (Y comes first)
325 spacingX = v[1]; 325 spacingX = v[1];
326 spacingY = v[0]; 326 spacingY = v[0];
327 return true;
327 } 328 }
328 } 329 }
329 else 330 else
330 { 331 {
331 // The "PixelSpacing" is of type 1C: It could be absent, use 332 // The "PixelSpacing" is of type 1C: It could be absent, use
332 // default value in such a case 333 // default value in such a case
333 spacingX = 1; 334 spacingX = 1;
334 spacingY = 1; 335 spacingY = 1;
336 return false;
335 } 337 }
336 } 338 }
337 339
338 340
339 Matrix CreateRotationMatrixAlongX(double a) 341 Matrix CreateRotationMatrixAlongX(double a)