Mercurial > hg > orthanc-stone
diff Framework/Toolbox/DicomStructureSetUtils.cpp @ 1463:182bf3106ee2
dos2unix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 12 Jun 2020 07:19:31 +0200 |
parents | 2d8ab34c8c91 |
children |
line wrap: on
line diff
--- a/Framework/Toolbox/DicomStructureSetUtils.cpp Fri Jun 12 07:18:07 2020 +0200 +++ b/Framework/Toolbox/DicomStructureSetUtils.cpp Fri Jun 12 07:19:31 2020 +0200 @@ -76,19 +76,19 @@ /* - compute list of segments : - - numberOfRectsFromHereOn = 0 - possibleNext = {in_k,in_kplus1} - - for all boundaries: - - we create a vertical segment and we push it - - if boundary is a start, numberOfRectsFromHereOn += 1. - - if we switch from 0 to 1, we start a segment - - if we switch from 1 to 2, we end the current segment and we record it - - if boundary is an end, numberOfRectsFromHereOn -= 1. - - if we switch from 1 to 0, we end the current segment and we record it - - if we switch from 2 to 1, we start a segment + compute list of segments : + + numberOfRectsFromHereOn = 0 + possibleNext = {in_k,in_kplus1} + + for all boundaries: + - we create a vertical segment and we push it + - if boundary is a start, numberOfRectsFromHereOn += 1. + - if we switch from 0 to 1, we start a segment + - if we switch from 1 to 2, we end the current segment and we record it + - if boundary is an end, numberOfRectsFromHereOn -= 1. + - if we switch from 1 to 0, we end the current segment and we record it + - if we switch from 2 to 1, we start a segment */ // static @@ -104,11 +104,11 @@ const RtStructRectangleInSlab& rect = slab[iRect]; { std::pair<double, RectangleBoundaryKind> boundary(rect.xmin, RectangleBoundaryKind_Start); - boundaries.insert(std::lower_bound(boundaries.begin(), boundaries.end(), boundary), boundary); + boundaries.insert(std::lower_bound(boundaries.begin(), boundaries.end(), boundary), boundary); } { std::pair<double, RectangleBoundaryKind> boundary(rect.xmax, RectangleBoundaryKind_End); - boundaries.insert(std::lower_bound(boundaries.begin(), boundaries.end(), boundary), boundary); + boundaries.insert(std::lower_bound(boundaries.begin(), boundaries.end(), boundary), boundary); } } }