This repository provides a tool to automatically generate an slspec
file, which is required for body motion correction in MRI data using FSL's eddy --mporder
option. The slspec
file defines how slices or multiband (MB) groups were acquired during the scan. For detailed information, please refer to the FSL documentation.
This Jupyter Notebook creates the slspec
text file from a JSON file generated by dcm2niix
during DICOM-to-NIfTI conversion.
- Supports multiband acquisitions from MB1 (no multiband) to MB8 (multiband 8).
- Tested with GE and Siemens datasets for MB1, MB2, MB4, and MB8.
- Feedback is welcome for any issues or unsupported configurations.
Python library: pandas
- Clone this repository or download the notebook "slspec-multiband.ipynb". Alternatively, you can open it in Google Colab by clicking the "Open in Colab" button.
- Replace
DWI.json
in the second cell with the name of your JSON file. - Ensure the JSON file is in the same directory as the notebook or specify its path..
- Now run all the cells and the slspec file will be created in the folder where the notebook is located.
Note: The JSON file must include a SliceTiming
field.