After a quick test, I found a small problem of the second
WarpMultiTransform in reproduce3.sh. Here is the output:
Step 1 mni->anat:
/home/songgang/local/ANTS/gccrel_itk320/WarpImageMultiTransform 3
mni.nii.gz mni2anat-multi.nii.gz -R brain_avg.nii.gz
anat2mni_InverseWarp.nii.gz -i anat2mni_Affine.txt --use-NN
FIELD: anat2mni_InverseWarp.nii.gz
AFFINE-INV: anat2mni_Affine.txt
moving_image_filename: mni.nii.gz
output_image_filename: mni2anat-multi.nii.gz
reference_image_filename: brain_avg.nii.gz
[0/2]: FIELD: anat2mni_InverseWarp.nii.gz
[1/2]: AFFINE-INV: anat2mni_Affine.txt
User nearest neighbor interpolation (was Haha)
We check the syntax of your call ....
Your 1st parameter should be a Warp (not Inverse) when your 2nd
parameter is an affine map --- exiting without applying warp.
Basically it did NOT perform the warping. We did this on purpose as a
sanity check. Typically the transform sequence like
"XXXInverseWarp.nii.gz -i XXXAffine.txt" is not a legit one; the more
reasonable one would be "-i XXXAffine.txt XXXInverseWarp.nii.gz"
instead.
Could you try to switch the inverse warp and the inverse affine here?
If you are sure that you want to put the inverse of affine at last, we
probably would add some option like a "-force" to bypass the sanity
check.
-Gang
Quoting Yaroslav Halchenko <[email protected]>:
Hi Gang,
On Fri, 16 Jul 2010, [email protected] wrote:
If two images have different image headers, they are supposed to align
in the physical space, not in the image voxel space, for warping in
ANTS.
good. that is what we thought/assumed... and that (alignment in physical
space) means that having intermediate matrix of voxels to project to
should not have an effect (besides possible quantization/dequantization
into/from voxels), that is why we were surprised with the results
I noticed you used two different images as references. Could you try
both use "-R epi_template.nii.gz" and verify if this issue still
exists?
tested... script called reproduce2.sh from the same
http://www.onerussian.com/Linux/bugs/ants.2steps/
produced result mni2bold-2-epi.nii.gz looks the same as previous
"incorrect" mni2bold-2.nii.gz, so issue does still exist.
if you run reproduce.sh, do you experience the same issue with your
version of ants?
Also, are these image real 4D image or just 3D? If they are 3D, you
can try use WarpImageMultiTransform instead with the same syntax.
I indeed could... script reproduce3.sh at the same location -- the same
effect!
-Gang
--
.-.
=------------------------------ /v\ ----------------------------=
Keep in touch // \\ (yoh@|www.)onerussian.com
Yaroslav Halchenko /( )\ ICQ#: 60653192
Linux User ^^-^^ [175555]
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]