Thanks Nick, I totally understand that. I've actually run these commands and I think I get reasonable results. But, one thing I'm concerned about is using "-d 3 -e 3" with antsApplyTransforms. The way I've done this is to aling mean EPIs to a 3D template and then using "antsApplyTransforms -d 3 -e 3" to resample the entire 4D time-series to the 3D template. But the example you provided seems to be genrating the 4D template from a 3D one and then uses "antsApplyTransforms -d 4" . So I wanted to make...
Thanks a lot Nick! It looks somehow differnt from what I've done. Would you mind having a look at the command I have above (for registration of mean EPI to EPI-template) and for applying the trasnfomration to the whole time-series (below)? Really appreciate your help. antsApplyTransforms -d 3 -e 3 -i $f -o ${f%.nii}2ET-norm.nii.gz -r $FIXEDIMG -t ${f%.nii}meanET-tform1Warp.nii.gz -t [${f%.nii}meanET-tform0GenericAffine.mat,0] -v --default-value 0 --interpolation HammingWindowedSinc
These are the parameters I have used , but I just wanted to know if they make sense. Thanks! FIXED_IMG="skull_stripped_EPI_template" antsRegistration --verbose 1 --dimensionality 3 --float 1 --output [${f%.nii.gz}_ET-tform, ${f%.nii.gz}_2_ET-norm.nii.gz, ${f%.nii.gz}_2_ET-normInv.nii.gz] --use-histogram-matching 1 --winsorize-image-intensities [0.01,0.99] --transform Rigid[0.1] --metric MI[$FIXED_IMG,$MOVING_IMG,1,32,Regular,0.25] --convergence [1000x500x250x0,1e-6,10] --shrink-factors 6x4x2x1 --smoothing-sigmas...
Hi all, I have an EPI-template (created using antsMultivariateTemplateConstruction2.sh) and I now want to use "antsRegistration" to align each individual fMRI time-series to the template. Do you have an example of this? Thanks a lot, -Mojdeh
Thanks for getting to the bottom of this Nick. I'll make sure to use the flag before each transformation from now on. And thanks for the "command + --help" advice , very useful.
ok that's weird. I re-did this on a subset of my scans and they are identical (I subtracted the results from 1 and 2 and min and max difference is zero for all the scans I've re-ran so far) ... I also looked at the affine trasnformations and they are close to identity but not exactly (I've attached an example affine transform here). Could this be a bug in the code? or is it possible that when you have a -t flag it treats everything afte (before encountring another flad) as transformations?
Hi Nick, Do you mean only the nonlinear part was applied? I actually tested this on a few of my scans using two command line syntaxes (1. -t nonlin_wrap.nii.gz [affine.mat , 0] , and 2. -t nonlin_wrap.nii.gz -t [affine.mat , 0]), I have previously used 1 , but to be sure before I re-do a lot of scans tested 2 on a few of the scans and the results are identical!! The other weird thing is that ants never complained when I use the first option. Could please clarify? Thanks again!
Hi all, I have a question regarding antsApplyTransform. What happens if I use the "-t" flag only with the first transformation, ie. I had a nonlinear wrap and an affine transform but I just checked the commands I ran while ago and noticed I have used "-t" with the nonlinear wrap and then entered the affine transformation without using a "-t" . The reason I'm asking this is because ANTs never threw an error and I was assuming everything was fine until I went back and checked the command again. Does...