annotate OrthancStone/Sources/Volumes/VolumeImageGeometry.h @ 1603:595c0952ef7e

focusing on osirix annotations in Stone Web viewer
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 28 Oct 2020 18:49:01 +0100
parents 8563ea5d8ae4
children 9ac2a65d4172
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
1598
8563ea5d8ae4 relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1512
diff changeset
8 * modify it under the terms of the GNU Lesser General Public License
684
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
1598
8563ea5d8ae4 relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1512
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: 1512
diff changeset
15 * Lesser General Public License for more details.
684
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
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: 1512
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: 1512
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: 1512
diff changeset
19 * <http://www.gnu.org/licenses/>.
684
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
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 #pragma once
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 #include "../StoneEnumerations.h"
742
fa5febe0f0c2 moved OrientedBoundingBox in the Volumes folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 689
diff changeset
26 #include "../Toolbox/CoordinateSystem3D.h"
684
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27
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
28 #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
29
684
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 namespace OrthancStone
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 {
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 class VolumeImageGeometry
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 {
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 private:
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 unsigned int width_;
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 unsigned int height_;
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 unsigned int depth_;
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 CoordinateSystem3D axialGeometry_;
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 CoordinateSystem3D coronalGeometry_;
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 CoordinateSystem3D sagittalGeometry_;
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 Vector voxelDimensions_;
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 Matrix transform_;
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43 Matrix transformInverse_;
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 void Invalidate();
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46
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
47 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
48
684
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 public:
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 VolumeImageGeometry();
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 unsigned int GetWidth() const
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 {
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 return width_;
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
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 unsigned int GetHeight() const
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 {
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 return height_;
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
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 unsigned int GetDepth() const
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 {
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 return depth_;
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
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 const CoordinateSystem3D& GetAxialGeometry() const
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 {
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 return axialGeometry_;
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
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 const CoordinateSystem3D& GetCoronalGeometry() const
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 {
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 return coronalGeometry_;
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
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 const CoordinateSystem3D& GetSagittalGeometry() const
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78 {
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 return sagittalGeometry_;
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 }
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81
689
93a8949a1ef7 VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 684
diff changeset
82 const CoordinateSystem3D& GetProjectionGeometry(VolumeProjection projection) const;
93a8949a1ef7 VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 684
diff changeset
83
93a8949a1ef7 VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 684
diff changeset
84 const Matrix& GetTransform() const
93a8949a1ef7 VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 684
diff changeset
85 {
93a8949a1ef7 VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 684
diff changeset
86 return transform_;
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
93a8949a1ef7 VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 684
diff changeset
89 const Matrix& GetTransformInverse() const
93a8949a1ef7 VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 684
diff changeset
90 {
93a8949a1ef7 VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 684
diff changeset
91 return transformInverse_;
93a8949a1ef7 VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 684
diff changeset
92 }
93a8949a1ef7 VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 684
diff changeset
93
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
94 void SetSizeInVoxels(unsigned int width,
684
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 unsigned int height,
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 unsigned int depth);
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98 // 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
99 // depth == 0)
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100 void SetAxialGeometry(const CoordinateSystem3D& geometry);
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 void SetVoxelDimensions(double x,
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103 double y,
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104 double z);
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106 Vector GetVoxelDimensions(VolumeProjection projection) const;
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107
689
93a8949a1ef7 VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 684
diff changeset
108 unsigned int GetProjectionWidth(VolumeProjection projection) const;
93a8949a1ef7 VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 684
diff changeset
109
93a8949a1ef7 VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 684
diff changeset
110 unsigned int GetProjectionHeight(VolumeProjection projection) const;
93a8949a1ef7 VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 684
diff changeset
111
93a8949a1ef7 VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 684
diff changeset
112 unsigned int GetProjectionDepth(VolumeProjection projection) const;
93a8949a1ef7 VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 684
diff changeset
113
684
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 // 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
115 // lie in the [0;1] range
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 Vector GetCoordinates(float x,
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117 float y,
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118 float z) const;
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120 bool DetectProjection(VolumeProjection& projection,
689
93a8949a1ef7 VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 684
diff changeset
121 const Vector& planeNormal) const;
93a8949a1ef7 VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 684
diff changeset
122
799
a6ba676a93e2 Added doc
Benjamin Golinvaux <bgo@osimis.io>
parents: 742
diff changeset
123 /**
a6ba676a93e2 Added doc
Benjamin Golinvaux <bgo@osimis.io>
parents: 742
diff changeset
124 Being given a cutting plane, this method will determine if it is an
a6ba676a93e2 Added doc
Benjamin Golinvaux <bgo@osimis.io>
parents: 742
diff changeset
125 axial, sagittal or coronal cut and returns
a6ba676a93e2 Added doc
Benjamin Golinvaux <bgo@osimis.io>
parents: 742
diff changeset
126 the slice number corresponding to this cut.
a6ba676a93e2 Added doc
Benjamin Golinvaux <bgo@osimis.io>
parents: 742
diff changeset
127
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
128 If the cutting plane is not parallel to the three x = 0, y = 0 or z = 0
799
a6ba676a93e2 Added doc
Benjamin Golinvaux <bgo@osimis.io>
parents: 742
diff changeset
129 planes, it is considered as arbitrary and the method returns false.
a6ba676a93e2 Added doc
Benjamin Golinvaux <bgo@osimis.io>
parents: 742
diff changeset
130 Otherwise, it returns true.
a6ba676a93e2 Added doc
Benjamin Golinvaux <bgo@osimis.io>
parents: 742
diff changeset
131 */
689
93a8949a1ef7 VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 684
diff changeset
132 bool DetectSlice(VolumeProjection& projection,
93a8949a1ef7 VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 684
diff changeset
133 unsigned int& slice,
93a8949a1ef7 VolumeImageGeometry::DetectSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 684
diff changeset
134 const CoordinateSystem3D& plane) const;
809
e8fdf29cd0ca VolumeImageGeometry::GetProjectionSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 799
diff changeset
135
e8fdf29cd0ca VolumeImageGeometry::GetProjectionSlice()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 799
diff changeset
136 CoordinateSystem3D GetProjectionSlice(VolumeProjection projection,
811
ffec76a5f7eb deprecating ParallelSlices
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 809
diff changeset
137 unsigned int z) const;
684
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 };
7719eb852dd5 new class: VolumeImageGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139 }