MIC-DKFZ / MITK-Diffusion

MITK Diffusion - Official part of the Medical Imaging Interaction Toolkit
http://mitk.org/wiki/MITK
Other
78 stars 15 forks source link

Run MITK from the command line to batch process DWI images #11

Closed yjh200319 closed 4 months ago

yjh200319 commented 1 year ago

Hello I want to add artifacts such as ”Spikes“, "N/2 Ghosts", "motion Artifacts", etc. to the original dwi (nii.gz format) images respectively.

Because there are hundreds of DWI data in total, it is too laborious to load and set parameters one by one in MITK's GUI interface and save them manually.

How to set various artifacts and corresponding parameters through the command line, process raw DWI data in batches, and save them in nii.gz format in different folders named after the artifact names?

Hope to get your help, thank you.

peterneher commented 1 year ago

Hi. There is a command line tool for Fiberfox, called MitkFiberfox.(bat/sh). If you are using the tarball/zip downloaded from the MITK Diffusion github page, you can find it in the same folder as the MitkDiffusion GUI application.

You can save the parameters to an xml file in the Fiberfox GUI (ending .ffp). The Fiberfox command line tool can consume this parameter file directly (option -p). image

If you want to change the parameters for each of your input dwi files, you can do this by adjusting the parameter file for example using python. If you need help with this, let me know what exactly you want to change.

I hope this helps! Let me know if you have any further questions or if anything is not working as expected.

peterneher commented 1 year ago

You have to call the command line tool for each of your inputs individually, e.g., using python or a bash script, but this is straight forward.

yjh200319 commented 12 months ago

OK, thank you very much for your kind reply! I'll try it next.