[ERROR] No image files match for atlas to DWI registration


I’m using the glasser360 atlas, which is registered in the MNI space, and want to register it to my DWI space. To do this, I’m starting with this command (as in the BATMAN tutorial), which works fine for registering my T1 to DWI:

flirt -in {dwi} ref {atlas} -interp nearestneighbour -dof 6 -omat {transform_mat}.mat

For some reason, when I try this, I get the following error:

Image Exception : #22 :: Failed to read volume /rds/general/user/hsa22/ephemeral/camcan/atlas/glasser360mni.nii.gz
Error : No image files match: /rds/general/user/hsa22/ephemeral/camcan/atlas/glasser360mni
Failed to read volume /rds/general/user/hsa22/ephemeral/camcan/atlas/glasser360mni.nii.gz
Error : No image files match: /rds/general/user/hsa22/ephemeral/camcan/atlas/glasser360mni
transformconvert: [ERROR] Unable to open numerical data text file "/rds/general/user/hsa22/ephemeral/CAMCAN/dMRI_outputs/mrtrix/CC710858/reconstruction/atlas_reg/CC710858_atlas2dwi_fsl.mat": No such file or directory

Not sure what a no image file match error is, considering it’s a normal .nii.gz file. I checked it on mri cro and it opens fine, not sure how to fix. Help is really appreciated!


Hi @Hana-Ali,

This is a flirt-specific error message, which is part of FSL, so I don’t know how to trace back their error messages to interpret them accurately. But I expect the file matching relates to their file handling via the FSLOUTPUTTYPE environment variable. What it seems to be saying is that it can’t find a file that matches the specification:


(which is presumably what your {atlas} expands to?) having tried:


(which presumably implies that FSLOUTPUTTYPE is set to NIFTI_GZ?). If that file does indeed exist, then I don’t know what the problem is… You may have better luck on the FSL mailing list?

By the way, I note your -ref option is missing the initial dash – I assume that’s just a typo in your post, right?

All the best,

1 Like