annotate Framework/Deprecated/Toolbox/ParallelSlices.h @ 884:aad5ccf1be10 am-dev

cleanup
author Alain Mazy <alain@mazy.be>
date Tue, 09 Jul 2019 14:43:00 +0200
parents ffec76a5f7eb
children 2d8ab34c8c91
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Stone of Orthanc
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
439
b70e9be013e4 preparing for 2019
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 196
diff changeset
5 * Copyright (C) 2017-2019 Osimis S.A., Belgium
0
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 *
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
47
28956ed68280 agpl license
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 40
diff changeset
8 * modify it under the terms of the GNU Affero General Public License
28956ed68280 agpl license
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 40
diff changeset
9 * as published by the Free Software Foundation, either version 3 of
28956ed68280 agpl license
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 40
diff changeset
10 * the License, or (at your option) any later version.
0
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 *
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful, but
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
47
28956ed68280 agpl license
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 40
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28956ed68280 agpl license
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 40
diff changeset
15 * Affero General Public License for more details.
28956ed68280 agpl license
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 40
diff changeset
16 *
28956ed68280 agpl license
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 40
diff changeset
17 * You should have received a copy of the GNU Affero General Public License
0
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 **/
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 #pragma once
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26
811
ffec76a5f7eb deprecating ParallelSlices
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 742
diff changeset
27 namespace Deprecated
0
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 {
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 ParallelSlices& operator= (const ParallelSlices& other); // Forbidden
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 public:
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 ParallelSlices();
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 ParallelSlices(const ParallelSlices& other);
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 ~ParallelSlices();
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45
811
ffec76a5f7eb deprecating ParallelSlices
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 742
diff changeset
46 const OrthancStone::Vector& GetNormal() const
0
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 {
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 return normal_;
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 }
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50
811
ffec76a5f7eb deprecating ParallelSlices
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 742
diff changeset
51 void AddSlice(const OrthancStone::CoordinateSystem3D& slice);
0
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 size_t GetSliceCount() const
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 {
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 return slices_.size();
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 }
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 bool ComputeClosestSlice(size_t& closestSlice,
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 double& closestDistance,
811
ffec76a5f7eb deprecating ParallelSlices
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 742
diff changeset
66 const OrthancStone::Vector& origin) const;
0
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 };
351ab0da0150 initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 }