Dear SCT Experts,
Thank you very much for your continues help and support. I have Human Ex-vivo DWI dataset. I would like to use SCT toolbox to analyze them. I tried to run sct_get_centerline to start but unfortunately ended with the following error (please have a look at the data details, command, output).
fslinfo 3890_dwi_res.nii.gz
data_type FLOAT32
dim1 250
dim2 1000
dim3 250
dim4 38
datatype 16
pixdim1 0.080000
pixdim2 0.080000
pixdim3 0.080000
pixdim4 nan
cal_max 0.0000
cal_min 0.0000
file_type NIFTI-1+
I then swapped dim using sct_image -i 3890_dwi_res.nii.gz -setorient RPI -o dwi_3890_RPI.nii.gz as the orientation of the dwi data was set in ASL.
data_type FLOAT32
dim1 250
dim2 250
dim3 1000
dim4 38
datatype 16
pixdim1 0.080000
pixdim2 0.080000
pixdim3 0.080000
pixdim4 nan
cal_max 0.0000
cal_min 0.0000
file_type NIFTI-1+
s4333238@cai-wks6:/30days/s4333238$ sct_get_centerline -i dwi_3890_RPI.nii.gz -method viewer
–
Spinal Cord Toolbox (4.2.0)
Traceback (most recent call last):
File “/data/home/s4333238/sct_4.2.0/scripts/sct_get_centerline.py”, line 147, in
run_main()
File “/data/home/s4333238/sct_4.2.0/scripts/sct_get_centerline.py”, line 127, in run_main
im_labels = _call_viewer_centerline(Image(fname_data), interslice_gap=interslice_gap)
File “/data/home/s4333238/sct_4.2.0/spinalcordtoolbox/centerline/core.py”, line 286, in call_viewer_centerline
launch_centerline_dialog(im_data, im_mask_viewer, params)
File “/data/home/s4333238/sct_4.2.0/spinalcordtoolbox/gui/centerline.py”, line 260, in launch_centerline_dialog
dialog = Centerline(controller)
File “/data/home/s4333238/sct_4.2.0/spinalcordtoolbox/gui/centerline.py”, line 138, in init
super(Centerline, self).init(*args, **kwargs)
File “/data/home/s4333238/sct_4.2.0/spinalcordtoolbox/gui/base.py”, line 122, in init
self._init_ui()
File “/data/home/s4333238/sct_4.2.0/spinalcordtoolbox/gui/base.py”, line 130, in _init_ui
self._init_canvas(layout)
File “/data/home/s4333238/sct_4.2.0/spinalcordtoolbox/gui/centerline.py”, line 144, in _init_canvas
self.sagittal_canvas = widgets.SagittalCanvas(self, plot_points=True, horizontal_nav=True)
File “/data/home/s4333238/sct_4.2.0/spinalcordtoolbox/gui/widgets.py”, line 289, in init
self._init_ui(self._image.data[:, :, self._z], dx / dy)
File “/data/home/s4333238/sct_4.2.0/spinalcordtoolbox/gui/widgets.py”, line 154, in _init_ui
alpha=self._params.alpha)
File “/data/home/s4333238/sct_4.2.0/python/envs/venv_sct/lib/python3.6/site-packages/matplotlib/init.py”, line 1599, in inner
return func(ax, *map(sanitize_sequence, args), **kwargs)
File “/data/home/s4333238/sct_4.2.0/python/envs/venv_sct/lib/python3.6/site-packages/matplotlib/cbook/deprecation.py”, line 369, in wrapper
return func(*args, **kwargs)
File “/data/home/s4333238/sct_4.2.0/python/envs/venv_sct/lib/python3.6/site-packages/matplotlib/cbook/deprecation.py”, line 369, in wrapper
return func(*args, **kwargs)
File “/data/home/s4333238/sct_4.2.0/python/envs/venv_sct/lib/python3.6/site-packages/matplotlib/axes/_axes.py”, line 5679, in imshow
im.set_data(X)
File “/data/home/s4333238/sct_4.2.0/python/envs/venv_sct/lib/python3.6/site-packages/matplotlib/image.py”, line 690, in set_data
.format(self._A.shape))
TypeError: Invalid shape (1000, 250, 38) for image data
Any suggestion to address this issue please?
Thanks a lot!
Regards,
Hattan