Nipype ants.applyTransform node consistently crashing (nipype version 1.0.3)

Hello,

I’m trying to run a pipeline that has worked for me in the past (nipype versions 1.0.0.dev0 and 0.12.1) but is now crashing (version 1.0.3). I’ve tracked down why it is crashing and wanted to see what I am missing.

My script is crashing on an ants.applyTransform node. It appears that the /nipype/interfaces/ants/base.py script in the newest version of nipype has a line that checks the version of antsRegistration:

version_cmd = os.path.join(os.getenv('ANTSPATH', ''), 'antsRegistration') + ' --version'

This flag however results in the following output:

Image dimensionality not specified. See command line option --dimensionality

and the node fails to run. I am using ANTs version 2.1.0.

Any insight would be greatly appreciated.

Thanks,
Aaron

Have you tried running FMRIPREP via Docker or Singularity? This should resolve the issue you are having.

Hi Chris,

The pipeline is not for fMRI preprocessing but rather is a dwi analysis where I’m creating masks in each participant in dwi native space, based on outputs from probtrackx, and then I want to move the resulting masks to project template space using the combination of the bbreg and ants transformations. We’ve just got singularity and FMRIPREP up and running on our cluster for our preprocessing but looking at the documentation I don’t think it would be applicable in this case, but I haven’t looked at all of the documentation yet so I’ll keep poking around.

In the meantime, is there a way to get the newer ants interface to work outside of the docker/singularity framework? Alternatively, do I need to work on getting my pipelines into a framework that is docker/singularity compatible?

Thanks,
Aaron

1 Like

Sorry I totally misread your question! This looks like a bug in nipype. It might be worth reporting on GitHub. I’ll also try to have a closer look at it later today.

Quick question: have you tried updating ANTs to 2.2.0. You can try this precompiled version https://github.com/poldracklab/fmriprep/blob/master/Dockerfile#L79 to quickly check if antsRegistration supports --version.

I will update ANTs to 2.2.0. I’ll also bring this up as an issue on GitHub (providing relevant info with respect to what happens if you update ANTs).

Thanks!

1 Like