comparison OrthancStone/Sources/Volumes/ImageBuffer3D.h @ 1783:75d3e2ab1fe1

BREAKING: SubvoxelReader using the same Z-axis ordering as ImageBuffer3D
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 14 May 2021 18:30:24 +0200
parents f053c80ea411
children 58bebc904191
comparison
equal deleted inserted replaced
1782:f053c80ea411 1783:75d3e2ab1fe1
30 30
31 namespace OrthancStone 31 namespace OrthancStone
32 { 32 {
33 /* 33 /*
34 34
35 This classes stores volume images sliced across the Z axis, vertically, in the decreasing Z order : 35 This classes stores volume images sliced across the Z axis,
36 vertically, in the DECREASING Z-order along the normal (this is the
37 REVERSE of the intuitive order):
36 38
37 +---------------+ 39 +---------------+
38 | | 40 | |
39 | SLICE N-1 | 41 | SLICE N-1 |
40 | | 42 | |
63 +---------------+ 65 +---------------+
64 66
65 As you can see, if the 3d image has size width, height, depth, the 2d image has : 67 As you can see, if the 3d image has size width, height, depth, the 2d image has :
66 - 2d width = 3d width 68 - 2d width = 3d width
67 - 2d height = 3d height * 3d depth 69 - 2d height = 3d height * 3d depth
70
71 This explains the "depth_ - 1 - z" that are used throughout this class.
72
73 EXPLANATION: This allows to have the "SliceReader" and "SliceWriter"
74 accessors for axial and coronal projections to directly access the
75 same memory buffer (no memcpy is required), while being consistent
76 with the Z-axis in coronal projection. The sagittal projection
77 nevertheless needs a memcpy.
68 78
69 */ 79 */
70 80
71 class ImageBuffer3D : public boost::noncopyable 81 class ImageBuffer3D : public boost::noncopyable
72 { 82 {