# HG changeset patch # User Alain Mazy # Date 1571137036 -7200 # Node ID f25e84cc5f87dab5cdf46e0a49d8f4d048f5f0a4 # Parent 23219b9da4d157eeefd4dcbad6ab781c45b617c1 fix ordered-slices diff -r 23219b9da4d1 -r f25e84cc5f87 OrthancServer/SliceOrdering.cpp --- a/OrthancServer/SliceOrdering.cpp Tue Oct 15 09:53:33 2019 +0200 +++ b/OrthancServer/SliceOrdering.cpp Tue Oct 15 12:57:16 2019 +0200 @@ -331,12 +331,11 @@ sortedInstances_.clear(); - // consider only the instances with a position + // consider only the instances with a position and correctly oriented (if they have a normal) for (size_t i = 0; i < instances_.size(); i++) { assert(instances_[i] != NULL); - - if (instances_[i]->HasPosition()) + if (instances_[i]->HasPosition() && (!instances_[i]->HasNormal() || IsParallelOrOpposite(instances_[i]->GetNormal(), normal_))) { sortedInstances_.push_back(instances_[i]); }