Hello all,
I am new to the DKI preprocessing using MRtrix/fsl and I am encountering a challenge with my dataset.
Specifically, my collected data consists only of three files: *.nii, *.bvec, and *.bval.
PS: I do not have PA or AP phase-encoded image files included.
In my preprocessing workflow, I have employed the following commands:
mrconvert -fslgrad HC001_preop.bvec HC001_preop.bval HC001_preop.nii HC001_dwi.mif
dwidenoise HC001_dwi.mif HC001_den.mif -noise noise.mif
dwiextract HC001_den.mif - -bzero | mrmath - mean mean_bzero.mif -axis 3
mrcalc HC001_dwi.mif HC001_den.mif -subtract residual.mif
mrdegibbs HC001_den.mif HC001_den_unr.mif
However, I am encountering difficulty with the "dwifslpreproc" command.
I would greatly appreciate your guidance on how to proceed with the preprocessing in the absence of the phase-encoded files? Could someone please assist me in navigating this issue?
Hi there,
We have a program called PyDesigner (https://pydesigner.readthedocs.io/en/lat...) that performs all the same pre-processing and also provides tensor calculations for diffusion and kurtosis along with their associated rotationally invariants (MD, FA, MK, etc). It is written entirely in Python and easily installed in a 'conda' environment. It could be a good solution as it automatically checks and runs the correct commands for the given data. It also can take in the DICOM folder as input. There is a tutorial video at the URL I posted above. There is also a GitHub forum for issues if you run into trouble (https://github.com/muscbridge/PyDesigner). The outputs are also compatible with MRTrix (orientation-wise) and FSL commands.
Hope this helps, let us know.
Best regards,
-Hunter Moss
Thank you for your reply. I think the video tutorial is very
helpful.
I tried running the tool on my data. The dataset does not have
encoding direction. I have 4 files:
1. Image file .nii, 2. .bval file, 3. bvec file and 4. *.json
file.
I installed Pydesigner but I ran in the following error:
pydesigner --standard -o /mnt/hgfs/try/DKI/HC1/
/mnt/hgfs/try/DKI/HC1/T20160603170653_NTang^jia-yu_S19.nii
mrconvert -quiet /mnt/hgfs/try/DKI/HC1/dwi0.mif
/mnt/hgfs/try/DKI/HC1/working.mif
[WARNING] Given DWI is partial fourier, overriding --degibbs; no
unringing correction will be done to avoid artifacts.Use the
"--adv" flag to run forced corrections.
Traceback (most recent call last):
File "/home/abhishek/mrtrix3/bin/dwifslpreproc", line 1327,
in
import mrtrix3
File "/home/abhishek/mrtrix3/bin/mrtrix3.py", line 84,
in
if not imported (os.path.join (os.path.dirname
(build_path), 'lib')):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/abhishek/mrtrix3/bin/mrtrix3.py", line 33, in
imported
spec.loader.exec_module (module)
File "", line 936, in exec_module
File "", line 1073, in get_code
File "", line 1130, in get_data
FileNotFoundError: [Errno 2] No such file or directory:
'/mnt/hgfs/try/DKI/HC1/lib/mrtrix3/__init__.py'
Traceback (most recent call last):
File "/home/abhishek/anaconda3/envs/mri/bin/pydesigner",
line 8, in
sys.exit(main())
^^^^^^
File
"/home/abhishek/anaconda3/envs/mri/lib/python3.11/site-packages/designer/pydesigner.py",
line 646, in main
mrpreproc.undistort(input=working_path,
File
"/home/abhishek/anaconda3/envs/mri/lib/python3.11/site-packages/designer/preprocessing/mrpreproc.py",
line 469, in undistort
raise Exception('dwifslpreproc failed, please look
above for '
Exception: dwifslpreproc failed, please look above for error
sources.
Does anyone know what this error represents ?
Thank you in advance.
Regards,
Abhishek