i have preprocessed my resting state data using fmriprep. If I understand it rightly, bold images are co-rerigstered to MNI152NLin2009cAsym template. Now, I want to extract some ROIs. Are there any atlases avaliable in this space?
I have tried to use AAL2 atlas, but ROI-masks and bold images do not match.
Does anybody have any ideas how to solve this problem?
The voxel size or FOV do not match (because FMRIPREP uses the resolution of the input images), but the locations should overlap nicely when you open the data and the atlas in Mango or FSLeyes.
i have calculated tSNR values for specific ROIs using
Harvard-Oxford-Atlas. I have preprocessed my data with fmriprep first.
Then I have coregistered the scull-stripped T1w image to the space of
atlas, and then coregistered the functional data using the same
matrix. After this it is possible to calculate ROI specific tSNR
values with a simple function from nipype.
Calculate tSNR directly using _bold_space-MNI152NLin2009cAsym_preproc.nii.gz file created by FMRIPREP. It is already in the right space so there is no need to perform any coregistration.
Use the NiftiLabelsMasker class to extract average values per parcel from the tSNR map file created in step 1.
The shape of my _bold_space-MNI152NLin2009cAsym_preproc.nii.gz images from fmriprep output is: 97x115x75
The shape of Harvard-Oxford atlas images imported from nilearn datasets is: 91x109x91
(also avaliable at https://neurovault.org/images/1699/)
I have used nipype version 1.1.9 to run this script last time. I have had a similar error message caused by graphviz. Could you maybe try to disable the line âtsnr_wf.write_graph(graph2use=âcoloredâ, format=âsvgâ, simple_form=True)â (In [16]) and try it again?
I am using â1.2.2â nipype version. Following your recommendation I installed graphviz and then got this error ImportError: Could not import plugin module: nipype.pipeline.plugins while running the last code line tsnr_wf.run(). Did some research and found out it might have been due to Python 3, so I created a new Python 2.7 enviroment and installed everything again, and now, am able to run tsnr_wf.write_graph and generate the graph, but I still get the same error message regarding nipype.pipeline plugins on tsnr_wf.run(). Any ideas about what could it be? I ran all this on Anaconda, Windows 10 Enterprise.
Then I did the same workflow on a MacIOS, Anaconda Python 2.7 enviroment then got this following error: TypeError: canât pickle PyCapsule objects. And for Python3, the same nipype error as described above.
Ah ok, I see. Well you need to install FSL first and add it to the $PATH variable. FSL works only on Linux and MAC, so therefore you only can run the script on your MACâŚ
@Dmitriy_Desser youâre right! I managed to solve this problem by installing fsl on my Mac (sorry for the naive questions, itâs my first time using Nipype!). Now, I get the following error while trying to run the workflow:
TypeError: canât pickle _thread._local objects
As far as I could dig into this, it seems to be an error with deepcopy(). You may see a similar issue here https://github.com/neuropycon/ephypype/issues/5, any ideas on how I can manage to solve this? Maybe change the workflow dict? Thanks so much!
Due to the limitation of 3 replays to new users, I edited my previous post with my replay:
Hi @Dmitriy_Desser, yes my data is in a BIDS format and I am using the following FMRIPREP outputs (of course I changed their names according to BIDS):
I just wanted to mention two developments regarding this issue:
fMRIPrep now allows you to generate derivatives exactly matching templates other than MNI152NLin2009cAsym. That is using the new --output-spaces argument. For instance: --output-spaces MNI152NLin6Asym:res-2 will give you preprocessed fMRI with the grid of the FSL MNI template (i.e., 2mm isotropic resolution and 91x109x91 matrix size).
TemplateFlow now includes the harvard-oxford template resampled to the default template of fMRIPrep (MNI152NLin2009cAsym).