comparison OrthancStone/Sources/Toolbox/SlicesSorter.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
313 "Please call the Sort() method before"); 313 "Please call the Sort() method before");
314 } 314 }
315 315
316 for (size_t i = 1; i < GetSlicesCount(); i++) 316 for (size_t i = 1; i < GetSlicesCount(); i++)
317 { 317 {
318 OrthancStone::Vector p = reference.GetOrigin() + spacing * static_cast<double>(i) * reference.GetNormal(); 318 OrthancStone::Vector q = reference.GetOrigin() + spacing * static_cast<double>(i) * reference.GetNormal();
319 double d = boost::numeric::ublas::norm_2(p - GetSliceGeometry(i).GetOrigin()); 319 double d = boost::numeric::ublas::norm_2(q - GetSliceGeometry(i).GetOrigin());
320 320
321 if (!OrthancStone::LinearAlgebra::IsNear(d, 0, 0.001 /* tolerance expressed in mm */)) 321 if (!OrthancStone::LinearAlgebra::IsNear(d, 0, 0.001 /* tolerance expressed in mm */))
322 { 322 {
323 return false; 323 return false;
324 } 324 }