Mercurial > hg > orthanc-stone
comparison OrthancStone/Sources/Toolbox/DicomStructureSetUtils.h @ 1512:244ad1e4e76a
reorganization of folders
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 07 Jul 2020 16:21:02 +0200 |
parents | Framework/Toolbox/DicomStructureSetUtils.h@2d8ab34c8c91 |
children | 8563ea5d8ae4 |
comparison
equal
deleted
inserted
replaced
1511:9dfeee74c1e6 | 1512:244ad1e4e76a |
---|---|
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-2020 Osimis S.A., Belgium | |
6 * | |
7 * This program is free software: you can redistribute it and/or | |
8 * modify it under the terms of the GNU Affero General Public License | |
9 * as published by the Free Software Foundation, either version 3 of | |
10 * the License, or (at your option) any later version. | |
11 * | |
12 * This program is distributed in the hope that it will be useful, but | |
13 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 * Affero General Public License for more details. | |
16 * | |
17 * You should have received a copy of the GNU Affero General Public License | |
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
19 **/ | |
20 | |
21 #pragma once | |
22 | |
23 #include <vector> | |
24 #include <utility> | |
25 | |
26 #include "../Toolbox/LinearAlgebra.h" | |
27 | |
28 namespace OrthancStone | |
29 { | |
30 #if 0 | |
31 struct Point3D | |
32 { | |
33 Point3D(double x, double y, double z) : x(x), y(y), z(z) {} | |
34 Point3D() : x(0), y(0), z(0) {} | |
35 double x, y, z; | |
36 }; | |
37 | |
38 struct Vector3D | |
39 { | |
40 Vector3D(double x, double y, double z) : x(x), y(y), z(z) {} | |
41 Vector3D() : x(0), y(0), z(0) {} | |
42 double x, y, z; | |
43 }; | |
44 #else | |
45 typedef Vector Vector3D; | |
46 typedef Vector Point3D; | |
47 #endif | |
48 | |
49 struct Point2D | |
50 { | |
51 Point2D(double x, double y) : x(x), y(y) {} | |
52 Point2D() : x(0), y(0) {} | |
53 double x, y; | |
54 }; | |
55 | |
56 | |
57 /** Internal */ | |
58 struct RtStructRectangleInSlab | |
59 { | |
60 double xmin, xmax, ymin, ymax; | |
61 }; | |
62 typedef std::vector<RtStructRectangleInSlab> RtStructRectanglesInSlab; | |
63 | |
64 enum RectangleBoundaryKind | |
65 { | |
66 RectangleBoundaryKind_Start, | |
67 RectangleBoundaryKind_End | |
68 }; | |
69 | |
70 #if 0 | |
71 /** Internal */ | |
72 void PartitionRectangleList(std::vector< std::vector<size_t> > & sets, const std::vector<RtStructRectanglesInSlab>); | |
73 #endif | |
74 | |
75 /** Internal */ | |
76 void ConvertListOfSlabsToSegments(std::vector< std::pair<Point2D, Point2D> >& segments, const std::vector<RtStructRectanglesInSlab>& slabCuts, const size_t totalRectCount); | |
77 | |
78 /** Internal */ | |
79 void AddSlabBoundaries(std::vector<std::pair<double, RectangleBoundaryKind> >& boundaries, const std::vector<RtStructRectanglesInSlab>& slabCuts, size_t iSlab); | |
80 | |
81 /** Internal */ | |
82 void ProcessBoundaryList(std::vector< std::pair<Point2D, Point2D> >& segments, const std::vector<std::pair<double, RectangleBoundaryKind> >& boundaries, double y); | |
83 | |
84 } |