Mercurial > hg > orthanc-stone
comparison Framework/Volumes/DicomStructureSetSlicer2.h @ 998:38b6bb0bdd72
added a new set of classes that correctly handle non-convex polygons (not
used yet because of limitations in coordinates computing): DicomStructure2,
DicomStructureSet2, DicomStructurePolygon2, DicomStructureSetSlicer2. Too
many shortcuts have been taken when computing the actual position.
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Fri, 20 Sep 2019 11:58:00 +0200 |
parents | |
children | 29f5f2031310 |
comparison
equal
deleted
inserted
replaced
995:9893fa8cd7a6 | 998:38b6bb0bdd72 |
---|---|
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-2019 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 | |
22 #pragma once | |
23 | |
24 #include "../Toolbox/DicomStructureSet2.h" | |
25 #include "../Volumes/IVolumeSlicer.h" | |
26 | |
27 #include <boost/shared_ptr.hpp> | |
28 #include <boost/weak_ptr.hpp> | |
29 | |
30 namespace OrthancStone | |
31 { | |
32 class DicomStructureSetSlice2 : public IVolumeSlicer::IExtractedSlice | |
33 { | |
34 public: | |
35 DicomStructureSetSlice2( | |
36 boost::weak_ptr<DicomStructureSet2> structureSet, | |
37 uint64_t revision, | |
38 const CoordinateSystem3D& cuttingPlane); | |
39 | |
40 virtual bool IsValid() ORTHANC_OVERRIDE | |
41 { | |
42 return isValid_; | |
43 } | |
44 | |
45 virtual uint64_t GetRevision() ORTHANC_OVERRIDE | |
46 { | |
47 return revision_; | |
48 } | |
49 | |
50 virtual ISceneLayer* CreateSceneLayer( | |
51 const ILayerStyleConfigurator* configurator, // possibly absent | |
52 const CoordinateSystem3D& cuttingPlane) ORTHANC_OVERRIDE; | |
53 | |
54 private: | |
55 boost::shared_ptr<DicomStructureSet2> structureSet_; | |
56 bool isValid_; | |
57 uint64_t revision_; | |
58 }; | |
59 | |
60 class DicomStructureSetSlicer2 : public IVolumeSlicer | |
61 { | |
62 public: | |
63 DicomStructureSetSlicer2(boost::shared_ptr<DicomStructureSet2> structureSet); | |
64 | |
65 /** IVolumeSlicer impl */ | |
66 virtual IExtractedSlice* ExtractSlice(const CoordinateSystem3D& cuttingPlane) ORTHANC_OVERRIDE; | |
67 private: | |
68 boost::weak_ptr<DicomStructureSet2> structureSet_; | |
69 }; | |
70 } |