Skip to content

Commit 1c441a0

Browse files
committed
Fix slice_sthickness to slice_spacing
1 parent dd0bcde commit 1c441a0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/source/dicom/derivations/spm_dicom_orient.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def numbered_vector(nrows, symbol_prefix):
4040
pos_pat_N = numbered_vector(3, 'T^N')
4141
pixel_spacing = symbols(('\Delta{r}', '\Delta{c}'))
4242
NZ = Symbol('N')
43-
slice_thickness = Symbol('\Delta{s}')
43+
slice_spacing = Symbol('\Delta{s}')
4444

4545
R3 = orient_pat * np.diag(pixel_spacing)
4646
R = zeros((4,2))
@@ -74,7 +74,7 @@ def spm_full_matrix(x2, y2):
7474
orient[:,2] = orient_cross
7575
x2_ss = Matrix((0,0,1,0))
7676
y2_ss = zeros((4,1))
77-
y2_ss[:3,:] = orient * Matrix((0,0,slice_thickness))
77+
y2_ss[:3,:] = orient * Matrix((0,0,slice_spacing))
7878
A_ss = spm_full_matrix(x2_ss, y2_ss)
7979

8080
# many slice case
@@ -91,7 +91,7 @@ def spm_full_matrix(x2, y2):
9191
# single slice case
9292
single_aff = eye(4)
9393
rot = orient
94-
rot_scale = rot * np.diag(pixel_spacing[:] + [slice_thickness])
94+
rot_scale = rot * np.diag(pixel_spacing[:] + [slice_spacing])
9595
single_aff[:3,:3] = rot_scale
9696
single_aff[:3,3] = pos_pat_0
9797

0 commit comments

Comments
 (0)