Ok!
Case 1: I want the AAL parcellation in the subject’s space
-
Register the subject’s T1 image into AAL template.
flirt -in T1_bet.nii -ref aal_template.nii -out T12AAL_nn.nii -omat T12AAL_nn.mat -interp nearestneighbour -dof 12
-
Invert the matrix
convert_xfm -inverse T12AAL_nn.mat -omat AAL2T1_nn.mat
-
Apply the inverted matrix:
flirt -in aal_template.nii -ref T1_betnii -applyxfm -init AAL2T1_nn.mat -out AAL2T1_nn.nii
So here I have the AAL parcellation in the subject’s space, it hasn’t discontinuous areas yet.
-
labelconvert
labelconvert AAL2T1_nn.nii aal_mapping.txt aal.txt nodos_AAL_nn.nii
In the next screenshot I show the AAL2T1_nn.nii with the nodos_AAL_nn.nii overlayed, with the interpolation option off and pointing a specific discontinuity in the node image.
On the other hand, I tried this just to see what happens:
Case 2: Run the labelconvert
command directly on the AAL template, without moving it to the subject’s space.
labelconvert aal_template.nii aal_mapping.txt aal.txt nodos_aal_template.nii
No discontinuities at all.
Thanks for your time.