Skip to content

Commit

Permalink
Bug fix in NIfTI transposition - WIP DICOM
Browse files Browse the repository at this point in the history
  • Loading branch information
mcencini authored and mcencini committed Jan 23, 2024
1 parent a44ef9d commit 0abbc74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/deepmr/io/image/nifti.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def _nifti_write(filename, filepath, image, affine, resolution, TR, windowRange)
dz, dy, dx = np.round(resolution, 2)

# write nifti
out = nib.Nifti1Image(image, affine)
out = nib.Nifti1Image(image.transpose(), affine)
out.header['pixdim'][1:5] = np.asarray([dx, dy, dz, TR])
out.header['sform_code'] = 0
out.header['qform_code'] = 2
Expand Down

0 comments on commit 0abbc74

Please sign in to comment.