annotate OrthancStone/Sources/Toolbox/DicomStructureSetUtils.h @ 1895:14c8f339d480

removed redundant definitions Point2D, Point3D and Vector3D from DicomStructureSetUtils.h
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 19 Jan 2022 14:51:55 +0100
parents 7053b8a0aaec
children b3c08e607d9f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
998
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
1 /**
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
2 * Stone of Orthanc
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
1871
7053b8a0aaec upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1870
diff changeset
5 * Copyright (C) 2017-2022 Osimis S.A., Belgium
7053b8a0aaec upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1870
diff changeset
6 * Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
998
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
7 *
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
8 * This program is free software: you can redistribute it and/or
1598
8563ea5d8ae4 relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1512
diff changeset
9 * modify it under the terms of the GNU Lesser General Public License
998
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
10 * as published by the Free Software Foundation, either version 3 of
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
11 * the License, or (at your option) any later version.
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
12 *
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful, but
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
1598
8563ea5d8ae4 relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1512
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8563ea5d8ae4 relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1512
diff changeset
16 * Lesser General Public License for more details.
998
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
17 *
1598
8563ea5d8ae4 relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1512
diff changeset
18 * You should have received a copy of the GNU Lesser General Public
8563ea5d8ae4 relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1512
diff changeset
19 * License along with this program. If not, see
8563ea5d8ae4 relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1512
diff changeset
20 * <http://www.gnu.org/licenses/>.
998
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
21 **/
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
22
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
23 #pragma once
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
24
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
25 #include <vector>
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
26 #include <utility>
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
27
1895
14c8f339d480 removed redundant definitions Point2D, Point3D and Vector3D from DicomStructureSetUtils.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1871
diff changeset
28 #include "../Scene2D/ScenePoint2D.h"
998
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
29 #include "../Toolbox/LinearAlgebra.h"
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
30
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
31 namespace OrthancStone
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
32 {
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
33 /** Internal */
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
34 struct RtStructRectangleInSlab
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
35 {
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
36 double xmin, xmax, ymin, ymax;
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
37 };
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
38 typedef std::vector<RtStructRectangleInSlab> RtStructRectanglesInSlab;
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
39
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
40 enum RectangleBoundaryKind
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
41 {
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
42 RectangleBoundaryKind_Start,
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
43 RectangleBoundaryKind_End
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
44 };
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
45
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
46 #if 0
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
47 /** Internal */
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
48 void PartitionRectangleList(std::vector< std::vector<size_t> > & sets, const std::vector<RtStructRectanglesInSlab>);
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
49 #endif
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
50
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
51 /** Internal */
1895
14c8f339d480 removed redundant definitions Point2D, Point3D and Vector3D from DicomStructureSetUtils.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1871
diff changeset
52 void ConvertListOfSlabsToSegments(std::vector< std::pair<ScenePoint2D, ScenePoint2D> >& segments, const std::vector<RtStructRectanglesInSlab>& slabCuts, const size_t totalRectCount);
998
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
53
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
54 /** Internal */
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
55 void AddSlabBoundaries(std::vector<std::pair<double, RectangleBoundaryKind> >& boundaries, const std::vector<RtStructRectanglesInSlab>& slabCuts, size_t iSlab);
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
56
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
57 /** Internal */
1895
14c8f339d480 removed redundant definitions Point2D, Point3D and Vector3D from DicomStructureSetUtils.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1871
diff changeset
58 void ProcessBoundaryList(std::vector< std::pair<ScenePoint2D, ScenePoint2D> >& segments, const std::vector<std::pair<double, RectangleBoundaryKind> >& boundaries, double y);
998
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
59
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
60 }