Mercurial > hg > orthanc-stone
comparison OrthancStone/Resources/Graveyard/RTStructTentativeReimplementation-BGO/DicomStructureSetUtils.h @ 1908:affde38b84de
moved tentative bgo reimplementation of rt-struct into graveyard
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 01 Feb 2022 08:38:32 +0100 |
parents | OrthancStone/Sources/Toolbox/DicomStructureSetUtils.h@b3c08e607d9f |
children | 07964689cb0b |
comparison
equal
deleted
inserted
replaced
1907:0208f99b8bde | 1908:affde38b84de |
---|---|
1 /** | |
2 * Stone of Orthanc | |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
4 * Department, University Hospital of Liege, Belgium | |
5 * Copyright (C) 2017-2022 Osimis S.A., Belgium | |
6 * Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium | |
7 * | |
8 * This program is free software: you can redistribute it and/or | |
9 * modify it under the terms of the GNU Lesser General Public License | |
10 * as published by the Free Software Foundation, either version 3 of | |
11 * the License, or (at your option) any later version. | |
12 * | |
13 * This program is distributed in the hope that it will be useful, but | |
14 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
16 * Lesser General Public License for more details. | |
17 * | |
18 * You should have received a copy of the GNU Lesser General Public | |
19 * License along with this program. If not, see | |
20 * <http://www.gnu.org/licenses/>. | |
21 **/ | |
22 | |
23 #pragma once | |
24 | |
25 #include <vector> | |
26 #include <utility> | |
27 | |
28 #include "../Scene2D/ScenePoint2D.h" | |
29 #include "../Toolbox/LinearAlgebra.h" | |
30 | |
31 namespace OrthancStone | |
32 { | |
33 /** Internal */ | |
34 struct RtStructRectangleInSlab | |
35 { | |
36 double xmin, xmax, ymin, ymax; | |
37 }; | |
38 typedef std::vector<RtStructRectangleInSlab> RtStructRectanglesInSlab; | |
39 | |
40 enum RectangleBoundaryKind | |
41 { | |
42 RectangleBoundaryKind_Start, | |
43 RectangleBoundaryKind_End | |
44 }; | |
45 | |
46 #if 0 | |
47 /** Internal */ | |
48 void PartitionRectangleList(std::vector< std::vector<size_t> > & sets, const std::vector<RtStructRectanglesInSlab>); | |
49 #endif | |
50 | |
51 /** Internal */ | |
52 void ConvertListOfSlabsToSegments(std::vector< std::pair<ScenePoint2D, ScenePoint2D> >& segments, | |
53 const std::vector<RtStructRectanglesInSlab>& slabCuts, | |
54 const size_t totalRectCount); | |
55 | |
56 /** Internal */ | |
57 void AddSlabBoundaries(std::vector<std::pair<double, RectangleBoundaryKind> >& boundaries, | |
58 const std::vector<RtStructRectanglesInSlab>& slabCuts, | |
59 size_t iSlab); | |
60 | |
61 /** Internal */ | |
62 void ProcessBoundaryList(std::vector< std::pair<ScenePoint2D, ScenePoint2D> >& segments, | |
63 const std::vector<std::pair<double, RectangleBoundaryKind> >& boundaries, | |
64 double y); | |
65 | |
66 } |