Mercurial > hg > orthanc-stone
annotate OrthancStone/Sources/Volumes/VolumeImageGeometry.h @ 1592:0d4b11ba86df
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 23 Oct 2020 15:15:32 +0200 |
parents | 244ad1e4e76a |
children | 8563ea5d8ae4 |
rev | line source |
---|---|
684
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 /** |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 * Stone of Orthanc |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
1270
2d8ab34c8c91
upgrade to year 2020
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
949
diff
changeset
|
5 * Copyright (C) 2017-2020 Osimis S.A., Belgium |
684
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
6 * |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
7 * This program is free software: you can redistribute it and/or |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
8 * modify it under the terms of the GNU Affero General Public License |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
9 * as published by the Free Software Foundation, either version 3 of |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
10 * the License, or (at your option) any later version. |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
11 * |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
12 * This program is distributed in the hope that it will be useful, but |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
13 * WITHOUT ANY WARRANTY; without even the implied warranty of |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
15 * Affero General Public License for more details. |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
16 * |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
17 * You should have received a copy of the GNU Affero General Public License |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
19 **/ |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
20 |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
21 |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
22 #pragma once |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
23 |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
24 #include "../StoneEnumerations.h" |
742
fa5febe0f0c2
moved OrientedBoundingBox in the Volumes folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
25 #include "../Toolbox/CoordinateSystem3D.h" |
684
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
26 |
949
32eaf4929b08
OrthancMultiframeVolumeLoader and OrthancSeriesVolumeProgressiveLoader now implement IGeometryProvider so that the geometry reference can be switched (CT or DOSE, for instance) + VolumeImageGeometry::SetSize renamed to VolumeImageGeometry::SetSizeInVoxels + prevent text layer update if text or properties do not change + a few stream operator<< for debug (Vector, Matrix,...) + fixed memory access aligment issues in ImageBuffer3D::ExtractSagittalSlice + fix for wrong screen Y offset of mpr slices in DicomVolumeImageMPRSlicer.
Benjamin Golinvaux <bgo@osimis.io>
parents:
811
diff
changeset
|
27 #include <iosfwd> |
32eaf4929b08
OrthancMultiframeVolumeLoader and OrthancSeriesVolumeProgressiveLoader now implement IGeometryProvider so that the geometry reference can be switched (CT or DOSE, for instance) + VolumeImageGeometry::SetSize renamed to VolumeImageGeometry::SetSizeInVoxels + prevent text layer update if text or properties do not change + a few stream operator<< for debug (Vector, Matrix,...) + fixed memory access aligment issues in ImageBuffer3D::ExtractSagittalSlice + fix for wrong screen Y offset of mpr slices in DicomVolumeImageMPRSlicer.
Benjamin Golinvaux <bgo@osimis.io>
parents:
811
diff
changeset
|
28 |
684
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
29 namespace OrthancStone |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
30 { |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
31 class VolumeImageGeometry |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
32 { |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
33 private: |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
34 unsigned int width_; |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
35 unsigned int height_; |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
36 unsigned int depth_; |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
37 CoordinateSystem3D axialGeometry_; |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
38 CoordinateSystem3D coronalGeometry_; |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
39 CoordinateSystem3D sagittalGeometry_; |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
40 Vector voxelDimensions_; |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
41 Matrix transform_; |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
42 Matrix transformInverse_; |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
43 |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
44 void Invalidate(); |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
45 |
949
32eaf4929b08
OrthancMultiframeVolumeLoader and OrthancSeriesVolumeProgressiveLoader now implement IGeometryProvider so that the geometry reference can be switched (CT or DOSE, for instance) + VolumeImageGeometry::SetSize renamed to VolumeImageGeometry::SetSizeInVoxels + prevent text layer update if text or properties do not change + a few stream operator<< for debug (Vector, Matrix,...) + fixed memory access aligment issues in ImageBuffer3D::ExtractSagittalSlice + fix for wrong screen Y offset of mpr slices in DicomVolumeImageMPRSlicer.
Benjamin Golinvaux <bgo@osimis.io>
parents:
811
diff
changeset
|
46 friend std::ostream& operator<<(std::ostream& s, const VolumeImageGeometry& v); |
32eaf4929b08
OrthancMultiframeVolumeLoader and OrthancSeriesVolumeProgressiveLoader now implement IGeometryProvider so that the geometry reference can be switched (CT or DOSE, for instance) + VolumeImageGeometry::SetSize renamed to VolumeImageGeometry::SetSizeInVoxels + prevent text layer update if text or properties do not change + a few stream operator<< for debug (Vector, Matrix,...) + fixed memory access aligment issues in ImageBuffer3D::ExtractSagittalSlice + fix for wrong screen Y offset of mpr slices in DicomVolumeImageMPRSlicer.
Benjamin Golinvaux <bgo@osimis.io>
parents:
811
diff
changeset
|
47 |
684
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
48 public: |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
49 VolumeImageGeometry(); |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
50 |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
51 unsigned int GetWidth() const |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
52 { |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
53 return width_; |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
54 } |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
55 |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
56 unsigned int GetHeight() const |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
57 { |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
58 return height_; |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
59 } |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
60 |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
61 unsigned int GetDepth() const |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
62 { |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
63 return depth_; |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
64 } |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
65 |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
66 const CoordinateSystem3D& GetAxialGeometry() const |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
67 { |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
68 return axialGeometry_; |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
69 } |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
70 |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
71 const CoordinateSystem3D& GetCoronalGeometry() const |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
72 { |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
73 return coronalGeometry_; |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
74 } |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
75 |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
76 const CoordinateSystem3D& GetSagittalGeometry() const |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
77 { |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
78 return sagittalGeometry_; |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
79 } |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
80 |
689
93a8949a1ef7
VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
684
diff
changeset
|
81 const CoordinateSystem3D& GetProjectionGeometry(VolumeProjection projection) const; |
93a8949a1ef7
VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
684
diff
changeset
|
82 |
93a8949a1ef7
VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
684
diff
changeset
|
83 const Matrix& GetTransform() const |
93a8949a1ef7
VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
684
diff
changeset
|
84 { |
93a8949a1ef7
VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
684
diff
changeset
|
85 return transform_; |
93a8949a1ef7
VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
684
diff
changeset
|
86 } |
93a8949a1ef7
VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
684
diff
changeset
|
87 |
93a8949a1ef7
VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
684
diff
changeset
|
88 const Matrix& GetTransformInverse() const |
93a8949a1ef7
VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
684
diff
changeset
|
89 { |
93a8949a1ef7
VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
684
diff
changeset
|
90 return transformInverse_; |
93a8949a1ef7
VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
684
diff
changeset
|
91 } |
93a8949a1ef7
VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
684
diff
changeset
|
92 |
949
32eaf4929b08
OrthancMultiframeVolumeLoader and OrthancSeriesVolumeProgressiveLoader now implement IGeometryProvider so that the geometry reference can be switched (CT or DOSE, for instance) + VolumeImageGeometry::SetSize renamed to VolumeImageGeometry::SetSizeInVoxels + prevent text layer update if text or properties do not change + a few stream operator<< for debug (Vector, Matrix,...) + fixed memory access aligment issues in ImageBuffer3D::ExtractSagittalSlice + fix for wrong screen Y offset of mpr slices in DicomVolumeImageMPRSlicer.
Benjamin Golinvaux <bgo@osimis.io>
parents:
811
diff
changeset
|
93 void SetSizeInVoxels(unsigned int width, |
684
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
94 unsigned int height, |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
95 unsigned int depth); |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
96 |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
97 // Set the geometry of the first axial slice (i.e. the one whose |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
98 // depth == 0) |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
99 void SetAxialGeometry(const CoordinateSystem3D& geometry); |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
100 |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
101 void SetVoxelDimensions(double x, |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
102 double y, |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
103 double z); |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
104 |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
105 Vector GetVoxelDimensions(VolumeProjection projection) const; |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
106 |
689
93a8949a1ef7
VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
684
diff
changeset
|
107 unsigned int GetProjectionWidth(VolumeProjection projection) const; |
93a8949a1ef7
VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
684
diff
changeset
|
108 |
93a8949a1ef7
VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
684
diff
changeset
|
109 unsigned int GetProjectionHeight(VolumeProjection projection) const; |
93a8949a1ef7
VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
684
diff
changeset
|
110 |
93a8949a1ef7
VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
684
diff
changeset
|
111 unsigned int GetProjectionDepth(VolumeProjection projection) const; |
93a8949a1ef7
VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
684
diff
changeset
|
112 |
684
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
113 // Get the 3D position of a point in the volume, where x, y and z |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
114 // lie in the [0;1] range |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
115 Vector GetCoordinates(float x, |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
116 float y, |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
117 float z) const; |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
118 |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
119 bool DetectProjection(VolumeProjection& projection, |
689
93a8949a1ef7
VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
684
diff
changeset
|
120 const Vector& planeNormal) const; |
93a8949a1ef7
VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
684
diff
changeset
|
121 |
799 | 122 /** |
123 Being given a cutting plane, this method will determine if it is an | |
124 axial, sagittal or coronal cut and returns | |
125 the slice number corresponding to this cut. | |
126 | |
949
32eaf4929b08
OrthancMultiframeVolumeLoader and OrthancSeriesVolumeProgressiveLoader now implement IGeometryProvider so that the geometry reference can be switched (CT or DOSE, for instance) + VolumeImageGeometry::SetSize renamed to VolumeImageGeometry::SetSizeInVoxels + prevent text layer update if text or properties do not change + a few stream operator<< for debug (Vector, Matrix,...) + fixed memory access aligment issues in ImageBuffer3D::ExtractSagittalSlice + fix for wrong screen Y offset of mpr slices in DicomVolumeImageMPRSlicer.
Benjamin Golinvaux <bgo@osimis.io>
parents:
811
diff
changeset
|
127 If the cutting plane is not parallel to the three x = 0, y = 0 or z = 0 |
799 | 128 planes, it is considered as arbitrary and the method returns false. |
129 Otherwise, it returns true. | |
130 */ | |
689
93a8949a1ef7
VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
684
diff
changeset
|
131 bool DetectSlice(VolumeProjection& projection, |
93a8949a1ef7
VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
684
diff
changeset
|
132 unsigned int& slice, |
93a8949a1ef7
VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
684
diff
changeset
|
133 const CoordinateSystem3D& plane) const; |
809
e8fdf29cd0ca
VolumeImageGeometry::GetProjectionSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
799
diff
changeset
|
134 |
e8fdf29cd0ca
VolumeImageGeometry::GetProjectionSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
799
diff
changeset
|
135 CoordinateSystem3D GetProjectionSlice(VolumeProjection projection, |
811
ffec76a5f7eb
deprecating ParallelSlices
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
809
diff
changeset
|
136 unsigned int z) const; |
684
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
137 }; |
7719eb852dd5
new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
138 } |