Mercurial > hg > orthanc-stone
annotate Framework/Deprecated/Toolbox/ParallelSlices.h @ 1008:4fda090b016b toa2019092002
Merge
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Fri, 20 Sep 2019 12:14:03 +0200 |
parents | ffec76a5f7eb |
children | 2d8ab34c8c91 |
rev | line source |
---|---|
0 | 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 |
0 | 6 * |
7 * This program is free software: you can redistribute it and/or | |
47 | 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. | |
0 | 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 | |
47 | 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 | |
0 | 18 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 **/ | |
20 | |
21 | |
22 #pragma once | |
23 | |
811
ffec76a5f7eb
deprecating ParallelSlices
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
742
diff
changeset
|
24 #include "../../Toolbox/CoordinateSystem3D.h" |
ffec76a5f7eb
deprecating ParallelSlices
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
742
diff
changeset
|
25 #include "../../Volumes/VolumeImageGeometry.h" |
0 | 26 |
811
ffec76a5f7eb
deprecating ParallelSlices
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
742
diff
changeset
|
27 namespace Deprecated |
0 | 28 { |
53
c2dc924f1a63
removing threading out of the framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
47
diff
changeset
|
29 class ParallelSlices : public boost::noncopyable |
0 | 30 { |
31 private: | |
811
ffec76a5f7eb
deprecating ParallelSlices
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
742
diff
changeset
|
32 OrthancStone::Vector normal_; |
ffec76a5f7eb
deprecating ParallelSlices
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
742
diff
changeset
|
33 std::vector<OrthancStone::CoordinateSystem3D*> slices_; |
0 | 34 |
35 ParallelSlices& operator= (const ParallelSlices& other); // Forbidden | |
36 | |
735
c3bbb130abc4
removing dependencies in ImageBuffer3D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
439
diff
changeset
|
37 void Clear(); |
c3bbb130abc4
removing dependencies in ImageBuffer3D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
439
diff
changeset
|
38 |
0 | 39 public: |
40 ParallelSlices(); | |
41 | |
42 ParallelSlices(const ParallelSlices& other); | |
43 | |
44 ~ParallelSlices(); | |
45 | |
811
ffec76a5f7eb
deprecating ParallelSlices
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
742
diff
changeset
|
46 const OrthancStone::Vector& GetNormal() const |
0 | 47 { |
48 return normal_; | |
49 } | |
50 | |
811
ffec76a5f7eb
deprecating ParallelSlices
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
742
diff
changeset
|
51 void AddSlice(const OrthancStone::CoordinateSystem3D& slice); |
0 | 52 |
811
ffec76a5f7eb
deprecating ParallelSlices
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
742
diff
changeset
|
53 void AddSlice(const OrthancStone::Vector& origin, |
ffec76a5f7eb
deprecating ParallelSlices
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
742
diff
changeset
|
54 const OrthancStone::Vector& axisX, |
ffec76a5f7eb
deprecating ParallelSlices
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
742
diff
changeset
|
55 const OrthancStone::Vector& axisY); |
0 | 56 |
57 size_t GetSliceCount() const | |
58 { | |
59 return slices_.size(); | |
60 } | |
61 | |
811
ffec76a5f7eb
deprecating ParallelSlices
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
742
diff
changeset
|
62 const OrthancStone::CoordinateSystem3D& GetSlice(size_t index) const; |
0 | 63 |
64 bool ComputeClosestSlice(size_t& closestSlice, | |
65 double& closestDistance, | |
811
ffec76a5f7eb
deprecating ParallelSlices
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
742
diff
changeset
|
66 const OrthancStone::Vector& origin) const; |
0 | 67 |
68 ParallelSlices* Reverse() const; | |
735
c3bbb130abc4
removing dependencies in ImageBuffer3D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
439
diff
changeset
|
69 |
811
ffec76a5f7eb
deprecating ParallelSlices
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
742
diff
changeset
|
70 static ParallelSlices* FromVolumeImage(const OrthancStone::VolumeImageGeometry& geometry, |
ffec76a5f7eb
deprecating ParallelSlices
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
742
diff
changeset
|
71 OrthancStone::VolumeProjection projection); |
0 | 72 }; |
73 } |