Frmiprep: registration issues with small FOV

Dear all,

In the present I’ve used my own nipype scripts to do some preprocessing of (rs)fMRI data.
However, fmriprep has taken the preprocessing to a higher level with the scripts in combination
with BIDS compatible data-sets. The problem I’m currently facing is that the registration
of EPI to T1w data fails (fmriprep.workflows.epi.init_epi_reg_wf). The FOV of the EPIs is rather small (32 slices) and previously I used FLIRT with 3 DOF or with the simple3D.sch schedule to get a proper (initial) registration.

More recently I’ve done the same with ANTs with the following code:

# coregistration step based on rigid transformation using ANTs
# see e.g., # see https://github.com/binarybottle/mindboggle/issues/15
coreg = pe.Node(Registration(), name='CoregAnts')
coreg.inputs.output_warped_image = 'func2highres_.nii.gz'
coreg.inputs.output_transform_prefix = "func2highres_"
coreg.inputs.transforms = ['Rigid']
coreg.inputs.transform_parameters = [(0.1,), (0.1,)]
coreg.inputs.number_of_iterations = [[1000,500,250,100]]
coreg.inputs.dimension = 3
coreg.inputs.write_composite_transform = True
coreg.inputs.collapse_output_transforms = True
coreg.inputs.metric = ['MI']
coreg.inputs.metric_weight = [1]
coreg.inputs.radius_or_number_of_bins = [32]
coreg.inputs.sampling_strategy = ['Regular']
coreg.inputs.sampling_percentage = [0.25]
coreg.inputs.convergence_threshold = [1.e-8]
coreg.inputs.convergence_window_size = [10]
coreg.inputs.smoothing_sigmas = [[3,2,1,0]]
coreg.inputs.sigma_units = ['mm']
coreg.inputs.shrink_factors = [[8,4,2,1]]
coreg.inputs.use_estimate_learning_rate_once = [True]
coreg.inputs.use_histogram_matching = [False]
coreg.inputs.initial_moving_transform_com = True
coreg.inputs.output_warped_image = True
coreg.inputs.winsorize_lower_quantile = 0.01
coreg.inputs.winsorize_upper_quantile = 0.99

Would it be possible (i.e. feasible) to include either the pure FLIRT or ANTs solution in fmriprep as well? I’ve noticed that FLIRT is actually used to initialize the registration, but with 6 DOF (https://github.com/poldracklab/fmriprep/blob/master/fmriprep/workflows/util.py, line 169)
I’d like to have the option to use less than 6, or to limit the variation in the 6 DOF (esp. rotation, the data seems rotated over more than 90 degrees). This would be something to add to the [--bold2t1w-dof {6,9,12}] option. Any pointers, ideas, takers?

Cheers,
Cris

Hi Cris,

We love contributions to FMRIPREP and we understand that, for it to be useful, it needs be flexible to the user’s needs. So please do send a PR with your ideas :).

Regarding this particular idea. I think it would be worth looking at the latest affine initializer that ANTs includes in its latest release. It seems to perform fairly well without much tunning. I think the name is just antsAI. An example of how to use it is in their antsBrainExtraction.sh script: https://github.com/stnava/ANTs/blob/master/Scripts/antsBrainExtraction.sh#L453-L459

Cheers,
Oscar

I wonder if it would make sense to do a two step initialization - first with 3 DOF then with 9 DOF. @Cris_Lanting - is there any public data we could test this on?

I’ll look into it time permitting and perhaps send a PR.

Cheers, Cris

Any suggestions how to make the data available? T1w + EPI or as a BIDS (single-subject) dataset?

Cheers,
Cris

The fastest way would be putting them on figshare or OSF.io

See https://osf.io/bwe7q/ for the data-set; When opening the EPI-data, the orientation information also looks a bit off - as if the header information (qform/sqform) has been lost; the three slices seem to suggest a different orientation for the T1w and the EPI images. When overlaying the two, however, the information seems to be preserved, see the screenshot in the same repository…

Cheers,
Cris

2 Likes