Hi Mark, thank you for sharing that script. I just used it and worked fine but there's something I don't understand. The image I want to aligne to ac-pc is in proton density space and has dimensions 512x512x96. When I want to apply the transformation that your script generated it works fine if I concatenate empty slides and use an image of 512x512x512 but it doesnt work if I use the original image and Number of voxels 512x512x96. You know why this can be? As well if I want to register this image to any other space selecting the option Base on Voxel Dimensions in the Output Size in the APPLYXFM GUI, it only works when I use the dimensions 512x512x512.