Closed valosekj closed 2 months ago
Changing the cropping from SC seg to centerline (https://github.com/valosekj/dcm-brno/issues/13) did not help.
Increasing the param -g
("group nvols successive dMRI volumes for more robustness") to 5 (from default 3) did not help.
sct_dmri_moco -i ${file_dwi}.nii.gz -bvec ${file_bvec} -x spline -g 5
But maybe I should have tried also decrease to -g 2
...
Finding this forum post --> increasing the mask size
sct_crop_image -i "${file_dwi}".nii.gz -m "${file_dwi}"_dwi_mean_centerline.nii.gz -dilate 15x15x0 -o "${file_dwi}"_crop.nii.gz
--> crashing
--> crashing
--> working 🎉
sct_dmri_moco
is crashing on the following error:itk::ERROR: MattesMutualInformationImageToImageMetricv4
https://github.com/valosekj/dcm-brno/blob/f8fedacbb7998eda66f63f6ad67e48ae45d42dce/scripts/01_process_data.sh#L340
detailed output
```console -- Spinal Cord Toolbox (git-master-65e44b5068fe5d8a094e3e0571566c01d2d460ab) sct_dmri_moco -i sub-2320B6468B_ses-6468B_acq-ZOOMit_dir-AP_dwi_crop.nii.gz -bvec sub-2320B6468B_ses-6468B_acq-ZOOMit_dir-AP_dwi.bvec -x spline -- Input parameters: Input file ............ sub-2320B6468B_ses-6468B_acq-ZOOMit_dir-AP_dwi_crop.nii.gz Group size ............ 3 Creating temporary folder (/tmp/sct_2024-07-05_03-20-12_moco-wrapper_uyw9_l8n) Copying input data to tmp folder and convert to nii... Get dimensions of data... 50 x 57 x 30 Data orientation: RPI Treated as axial Set suffix of transformation file name, which depends on the orientation: Orientation is axial, suffix is 'Warp.nii.gz'. The estimated transformation is a 3D warping field, which is composed of a stack of 2D Tx-Ty transformations Identify b=0 and DWI images... WARNING: bvecs file is 3xn instead of nx3. Consider using sct_dmri_transpose_bvecs. Transpose bvecs... Number of b=0: 7 [0, 1, 13, 25, 37, 49, 61] Number of DWI: 63 [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 68, 69] Split along T dimension... Merge and average b=0 data... Image header specifies datatype 'int16', but array is of type 'float64'. Header metadata will be overwritten to use 'float64'. Image header specifies datatype 'int16', but array is of type 'float64'. Header metadata will be overwritten to use 'float64'. Image header specifies datatype 'int16', but array is of type 'float64'. Header metadata will be overwritten to use 'float64'. Image header specifies datatype 'int16', but array is of type 'float64'. Header metadata will be overwritten to use 'float64'. Image header specifies datatype 'int16', but array is of type 'float64'. Header metadata will be overwritten to use 'float64'. Image header specifies datatype 'int16', but array is of type 'float64'. Header metadata will be overwritten to use 'float64'. Image header specifies datatype 'int16', but array is of type 'float64'. Header metadata will be overwritten to use 'float64'. Image header specifies datatype 'int16', but array is of type 'float64'. Header metadata will be overwritten to use 'float64'. Image header specifies datatype 'int16', but array is of type 'float64'. Header metadata will be overwritten to use 'float64'. Image header specifies datatype 'int16', but array is of type 'float64'. Header metadata will be overwritten to use 'float64'. Image header specifies datatype 'int16', but array is of type 'float64'. Header metadata will be overwritten to use 'float64'. Image header specifies datatype 'int16', but array is of type 'float64'. Header metadata will be overwritten to use 'float64'. Image header specifies datatype 'int16', but array is of type 'float64'. Header metadata will be overwritten to use 'float64'. Image header specifies datatype 'int16', but array is of type 'float64'. Header metadata will be overwritten to use 'float64'. Image header specifies datatype 'int16', but array is of type 'float64'. Header metadata will be overwritten to use 'float64'. Image header specifies datatype 'int16', but array is of type 'float64'. Header metadata will be overwritten to use 'float64'. Image header specifies datatype 'int16', but array is of type 'float64'. Header metadata will be overwritten to use 'float64'. Image header specifies datatype 'int16', but array is of type 'float64'. Header metadata will be overwritten to use 'float64'. Image header specifies datatype 'int16', but array is of type 'float64'. Header metadata will be overwritten to use 'float64'. Image header specifies datatype 'int16', but array is of type 'float64'. Header metadata will be overwritten to use 'float64'. Image header specifies datatype 'int16', but array is of type 'float64'. Header metadata will be overwritten to use 'float64'. Image header specifies datatype 'int16', but array is of type 'float64'. Header metadata will be overwritten to use 'float64'. Merge across groups... ------------------------------------------------------------------------------- Estimating motion on b=0 images... ------------------------------------------------------------------------------- Input parameters: Input file ............ b0.nii Reference file ........ data_T0001.nii.gz Polynomial degree ..... 2 Smoothing kernel ...... 1 Gradient step ......... 1 Metric ................ MI Sampling .............. None Todo .................. estimate_and_apply Mask ................. Output mat folder ..... mat_b0groups Data dimensions: 50 x 57 x 30 x 7 Copy file_target to a temporary file... Register. Loop across Z (note: there is only one Z if orientation is axial) Image header specifies datatype 'int16', but array is of type 'float32'. Header metadata will be overwritten to use 'float32'. ------------------------------------------------------------------------------- Estimating motion across groups... ------------------------------------------------------------------------------- Input parameters: Input file ............ datasub-groups.nii Reference file ........ datasub_0_mean.nii.gz Polynomial degree ..... 2 Smoothing kernel ...... 1 Gradient step ......... 1 Metric ................ MI Sampling .............. None Todo .................. estimate_and_apply Mask ................. Output mat folder ..... mat_groups Data dimensions: 50 x 57 x 30 x 21 Copy file_target to a temporary file... Register. Loop across Z (note: there is only one Z if orientation is axial) Traceback (most recent call last): File "/home/valosek/code/sct_v6.3/spinalcordtoolbox/scripts/sct_dmri_moco.py", line 232, in