NIRALUser / DTIPlayground

An integrated framework for DWI Image QC and processing
MIT License
12 stars 2 forks source link

Issue Creating Image of Excluded Gradients #50

Closed ajdneuro closed 1 year ago

ajdneuro commented 1 year ago

Hello, I am getting the follow error at the end of running dMRIprep when writing the excluded gradient file. Do you have any suggestions for avoid the error:

CreateImagesOfExcludedGradients [2023-08-01-14-01-46] axial_image = self.AxialView(iter_gradients, input_size, input_image) [2023-08-01-14-01-46] File "/hpc/software/DTIplayground/0.4.1/lib/python3.9/site-packages/dtiplayground/dmri/preprocessing/modules/QC_Report/QC_Report.py", line 282, in AxialView [2023-08-01-14-01-46] extracted_slice = slice_extractor.Execute(input_image) [2023-08-01-14-01-46] File "/software/DTIplayground/0.4.1/lib/python3.9/site-packages/SimpleITK/SimpleITK.py", line 9508, in Execute [2023-08-01-14-01-46] return _SimpleITK.ExtractImageFilter_Execute(self, image1) [2023-08-01-14-01-46] RuntimeError: Exception thrown in SimpleITK ExtractImageFilter_Execute: /tmp/SimpleITK/Code/Common/include/sitkTemplateFunctions.h:96: [2023-08-01-14-01-46] sitk::ERROR: Unable to convert vector to ITK type [2023-08-01-14-01-46] Expected vector of length 4 but only got 3 elements. [2023-08-01-14-01-46]  [2023-08-01-14-01-46] [Pipeline.runPipeline] Processed time : 11861.58s

scalphunters commented 1 year ago

It happens usually when the input is nifti, which I suspect simple ITK's IO issue (failed to read 4d image and reads 3d image only, it's not happening for nrrd). To clarify, was your input NIFTI? And what version of dtiplayground did you use?

ajdneuro commented 1 year ago

Hello, thanks for your quick response! Yes the inputs are .nii.gz? Would converting to .nii fix it or should I convert to .nrrd?

Best, Alex

scalphunters commented 1 year ago

I've tried converted NRRD, and it worked ok for me. Pls kindly report when it doesn't work. You can convert nifti to nrrd with dmriprep (IDENTITY_Process with different output format (nrrd))

scalphunters commented 1 year ago

closing this issue, pls reopen if anything like this happen again.