annotate OrthancStone/Resources/Graveyard/RTStructTentativeReimplementation-BGO/DicomStructureSetSlicer2.h @ 2077:07964689cb0b

upgrade to year 2023
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 12 Jul 2023 21:20:22 +0200
parents affde38b84de
children c23eef785569
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
2077
07964689cb0b upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1908
diff changeset
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium
07964689cb0b upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1908
diff changeset
6 * Copyright (C) 2021-2023 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
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
24 #pragma once
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
25
1019
29f5f2031310 Added a way to specificy which structures are to be initially displayed (the
Benjamin Golinvaux <bgo@osimis.io>
parents: 998
diff changeset
26 #ifdef BGO_ENABLE_DICOMSTRUCTURESETLOADER2
29f5f2031310 Added a way to specificy which structures are to be initially displayed (the
Benjamin Golinvaux <bgo@osimis.io>
parents: 998
diff changeset
27
998
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
28 #include "../Toolbox/DicomStructureSet2.h"
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
29 #include "../Volumes/IVolumeSlicer.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 #include <boost/shared_ptr.hpp>
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
32 #include <boost/weak_ptr.hpp>
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
33
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
34 namespace OrthancStone
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 class DicomStructureSetSlice2 : public IVolumeSlicer::IExtractedSlice
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 public:
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
39 DicomStructureSetSlice2(
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
40 boost::weak_ptr<DicomStructureSet2> structureSet,
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
41 uint64_t revision,
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
42 const CoordinateSystem3D& cuttingPlane);
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
43
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
44 virtual bool IsValid() ORTHANC_OVERRIDE
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 return isValid_;
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
47 }
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
48
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
49 virtual uint64_t GetRevision() ORTHANC_OVERRIDE
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 return revision_;
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
52 }
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 virtual ISceneLayer* CreateSceneLayer(
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
55 const ILayerStyleConfigurator* configurator, // possibly absent
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
56 const CoordinateSystem3D& cuttingPlane) ORTHANC_OVERRIDE;
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
57
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
58 private:
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
59 boost::shared_ptr<DicomStructureSet2> structureSet_;
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
60 bool isValid_;
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
61 uint64_t revision_;
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
62 };
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
63
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
64 class DicomStructureSetSlicer2 : public IVolumeSlicer
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
65 {
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
66 public:
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
67 DicomStructureSetSlicer2(boost::shared_ptr<DicomStructureSet2> structureSet);
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
68
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
69 /** IVolumeSlicer impl */
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
70 virtual IExtractedSlice* ExtractSlice(const CoordinateSystem3D& cuttingPlane) ORTHANC_OVERRIDE;
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
71 private:
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
72 boost::weak_ptr<DicomStructureSet2> structureSet_;
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
73 };
38b6bb0bdd72 added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
74 }
1019
29f5f2031310 Added a way to specificy which structures are to be initially displayed (the
Benjamin Golinvaux <bgo@osimis.io>
parents: 998
diff changeset
75
29f5f2031310 Added a way to specificy which structures are to be initially displayed (the
Benjamin Golinvaux <bgo@osimis.io>
parents: 998
diff changeset
76 #endif
29f5f2031310 Added a way to specificy which structures are to be initially displayed (the
Benjamin Golinvaux <bgo@osimis.io>
parents: 998
diff changeset
77 // BGO_ENABLE_DICOMSTRUCTURESETLOADER2
29f5f2031310 Added a way to specificy which structures are to be initially displayed (the
Benjamin Golinvaux <bgo@osimis.io>
parents: 998
diff changeset
78