Mercurial > hg > orthanc-stone
annotate Framework/Toolbox/SlicesSorter.h @ 448:cc47e6eaefb0 bgo-commands-codegen
Fixed dummy change
author | bgo-osimis |
---|---|
date | Wed, 16 Jan 2019 21:08:38 +0100 |
parents | b70e9be013e4 |
children | 6af3099ed8da |
rev | line source |
---|---|
73 | 1 /** |
2 * Stone of Orthanc | |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
4 * Department, University Hospital of Liege, Belgium | |
439 | 5 * Copyright (C) 2017-2019 Osimis S.A., Belgium |
73 | 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 "Slice.h" | |
25 | |
26 namespace OrthancStone | |
27 { | |
28 class SlicesSorter : public boost::noncopyable | |
29 { | |
30 private: | |
31 class SliceWithDepth; | |
32 struct Comparator; | |
33 | |
34 typedef std::vector<SliceWithDepth*> Slices; | |
35 | |
36 Slices slices_; | |
37 bool hasNormal_; | |
38 | |
39 public: | |
40 SlicesSorter() : hasNormal_(false) | |
41 { | |
42 } | |
43 | |
44 ~SlicesSorter(); | |
45 | |
46 void Reserve(size_t count) | |
47 { | |
48 slices_.reserve(count); | |
49 } | |
50 | |
119
ba83e38cf3ff
rendering of rt-dose
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
110
diff
changeset
|
51 void AddSlice(Slice* slice); // Takes ownership |
73 | 52 |
53 size_t GetSliceCount() const | |
54 { | |
55 return slices_.size(); | |
56 } | |
57 | |
58 const Slice& GetSlice(size_t i) const; | |
59 | |
60 void SetNormal(const Vector& normal); | |
61 | |
62 void Sort(); | |
63 | |
64 void FilterNormal(const Vector& normal); | |
65 | |
66 bool SelectNormal(Vector& normal) const; | |
77 | 67 |
68 bool LookupSlice(size_t& index, | |
110
53025eecbc95
renamed SliceGeometry as CoordinateSystem3D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
77
diff
changeset
|
69 const CoordinateSystem3D& slice) const; |
73 | 70 }; |
71 } |