An app to remove the first N volumes of a 4D fMRI image.
This app uses nilearn to remove the first N volumes of a 4D fMRI image, which is a common practice in fMRI preprocessing. The input is a fMRI image (.nii.gz) and the number of volumes to be removed, and the output is another fMRI image (.nii.gz) with the first volumes removed. Notice that this app (for now) should only be used with rs-fMRI images and be run before fmriprep, as it will disrupt the correspondence of regressors timeseries and events with the 4D image.
brainlife.io is publicly funded and for the sustainability of the project it is helpful to Acknowledge the use of the platform. We kindly ask that you acknowledge the funding below in your code and publications. Copy and past the following lines into your repository when using this code.
We ask that you the following articles when publishing papers that used data, code or other resources created by the brainlife.io community.
- Avesani, P., McPherson, B., Hayashi, S. et al. The open diffusion data derivatives, brain data upcycling via integrated publishing of derivatives and reproducible open cloud services. Sci Data 6, 69 (2019). https://doi.org/10.1038/s41597-019-0073-y
You can submit this App online at https://doi.org/10.25663/brainlife.app.495 via the "Execute" tab.
- git clone this repo.
- Inside the cloned directory, create
config.json
with something like the following content with paths to your input files.
{
"fmri": "test_bold.nii.gz",
"n_vols": "5"
}
- Launch the App by executing
main
./main
Output file (a 4D .nii.gz file with the first volumes removed) will be generated inside the current working directory (pwd), inside a specifc directory called:
out_dir
This App only requires nilearn to run.