Mercurial > hg > orthanc-stone
annotate OrthancStone/Sources/Toolbox/DicomStructureSet2.h @ 1862:63587fdeec69
added 'SkipSeriesFromModalities' to ignore series from modality types
author | Alain Mazy <am@osimis.io> |
---|---|
date | Thu, 23 Sep 2021 14:38:42 +0200 |
parents | 126522623e20 |
children | 3889ae96d2e9 |
rev | line source |
---|---|
987
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
1 /** |
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
2 * Stone of Orthanc |
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
1739
9ac2a65d4172
upgrade to year 2021
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1598
diff
changeset
|
5 * Copyright (C) 2017-2021 Osimis S.A., Belgium |
987
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
6 * |
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
7 * 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:
1596
diff
changeset
|
8 * modify it under the terms of the GNU Lesser General Public License |
987
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
9 * as published by the Free Software Foundation, either version 3 of |
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
10 * the License, or (at your option) any later version. |
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
11 * |
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
12 * This program is distributed in the hope that it will be useful, but |
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
13 * 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:
1596
diff
changeset
|
14 * 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:
1596
diff
changeset
|
15 * Lesser General Public License for more details. |
1596
4fb8fdf03314
removed annoying whitespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
16 * |
1598
8563ea5d8ae4
relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
17 * 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:
1596
diff
changeset
|
18 * 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:
1596
diff
changeset
|
19 * <http://www.gnu.org/licenses/>. |
987
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
20 **/ |
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
21 |
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
22 #pragma once |
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
23 |
1019
29f5f2031310
Added a way to specificy which structures are to be initially displayed (the
Benjamin Golinvaux <bgo@osimis.io>
parents:
998
diff
changeset
|
24 #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
|
25 |
1834
126522623e20
replaced OrthancStone::DicomPath by new class Orthanc::DicomPath from orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
26 #include "../Scene2D/Color.h" |
126522623e20
replaced OrthancStone::DicomPath by new class Orthanc::DicomPath from orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
27 #include "CoordinateSystem3D.h" |
998
38b6bb0bdd72
added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
988
diff
changeset
|
28 #include "DicomStructure2.h" |
987
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
29 #include "Extent2D.h" |
1834
126522623e20
replaced OrthancStone::DicomPath by new class Orthanc::DicomPath from orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
30 #include "OrthancDatasets/FullOrthancDataset.h" |
987
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
31 |
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
32 #include <list> |
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
33 |
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
34 namespace OrthancStone |
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
35 { |
998
38b6bb0bdd72
added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
988
diff
changeset
|
36 class DicomStructureSet2 : public boost::noncopyable |
987
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
37 { |
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
38 public: |
998
38b6bb0bdd72
added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
988
diff
changeset
|
39 DicomStructureSet2(); |
38b6bb0bdd72
added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
988
diff
changeset
|
40 ~DicomStructureSet2(); |
38b6bb0bdd72
added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
988
diff
changeset
|
41 |
1834
126522623e20
replaced OrthancStone::DicomPath by new class Orthanc::DicomPath from orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
42 void SetContents(const FullOrthancDataset& tags); |
987
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
43 |
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
44 size_t GetStructuresCount() const |
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
45 { |
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
46 return structures_.size(); |
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
47 } |
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
48 |
998
38b6bb0bdd72
added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
988
diff
changeset
|
49 void Clear(); |
987
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
50 |
998
38b6bb0bdd72
added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
988
diff
changeset
|
51 const DicomStructure2& GetStructure(size_t i) const |
38b6bb0bdd72
added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
988
diff
changeset
|
52 { |
38b6bb0bdd72
added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
988
diff
changeset
|
53 // at() is like []() but with range check |
38b6bb0bdd72
added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
988
diff
changeset
|
54 return structures_.at(i); |
38b6bb0bdd72
added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
988
diff
changeset
|
55 } |
987
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
56 |
998
38b6bb0bdd72
added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
988
diff
changeset
|
57 /** Internal use only */ |
1834
126522623e20
replaced OrthancStone::DicomPath by new class Orthanc::DicomPath from orthanc framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1739
diff
changeset
|
58 void FillStructuresFromDataset(const FullOrthancDataset& tags); |
987
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
59 |
998
38b6bb0bdd72
added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
988
diff
changeset
|
60 /** Internal use only */ |
38b6bb0bdd72
added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
988
diff
changeset
|
61 void ComputeDependentProperties(); |
987
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
62 |
998
38b6bb0bdd72
added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
988
diff
changeset
|
63 /** Internal use only */ |
38b6bb0bdd72
added a new set of classes that correctly handle non-convex polygons (not
Benjamin Golinvaux <bgo@osimis.io>
parents:
988
diff
changeset
|
64 std::vector<DicomStructure2> structures_; |
987
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
65 }; |
d225bccd4d4a
Scaffolding for A/B tests with DicomStructureSet[Loader] (A/B testing)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
66 } |
1019
29f5f2031310
Added a way to specificy which structures are to be initially displayed (the
Benjamin Golinvaux <bgo@osimis.io>
parents:
998
diff
changeset
|
67 |
29f5f2031310
Added a way to specificy which structures are to be initially displayed (the
Benjamin Golinvaux <bgo@osimis.io>
parents:
998
diff
changeset
|
68 #endif |
29f5f2031310
Added a way to specificy which structures are to be initially displayed (the
Benjamin Golinvaux <bgo@osimis.io>
parents:
998
diff
changeset
|
69 // 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
|
70 |
29f5f2031310
Added a way to specificy which structures are to be initially displayed (the
Benjamin Golinvaux <bgo@osimis.io>
parents:
998
diff
changeset
|
71 |