Mercurial > hg > orthanc
comparison OrthancServer/SliceOrdering.cpp @ 3539:f25e84cc5f87
fix ordered-slices
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Tue, 15 Oct 2019 12:57:16 +0200 |
parents | 23219b9da4d1 |
children | 096c827cbf9e |
comparison
equal
deleted
inserted
replaced
3538:23219b9da4d1 | 3539:f25e84cc5f87 |
---|---|
329 return false; | 329 return false; |
330 } | 330 } |
331 | 331 |
332 sortedInstances_.clear(); | 332 sortedInstances_.clear(); |
333 | 333 |
334 // consider only the instances with a position | 334 // consider only the instances with a position and correctly oriented (if they have a normal) |
335 for (size_t i = 0; i < instances_.size(); i++) | 335 for (size_t i = 0; i < instances_.size(); i++) |
336 { | 336 { |
337 assert(instances_[i] != NULL); | 337 assert(instances_[i] != NULL); |
338 | 338 if (instances_[i]->HasPosition() && (!instances_[i]->HasNormal() || IsParallelOrOpposite(instances_[i]->GetNormal(), normal_))) |
339 if (instances_[i]->HasPosition()) | |
340 { | 339 { |
341 sortedInstances_.push_back(instances_[i]); | 340 sortedInstances_.push_back(instances_[i]); |
342 } | 341 } |
343 } | 342 } |
344 | 343 |