Hi again,
The strange mask resampling issue ended up on the back burner because the datasets did look like they were in the right place, but I just discovered a much more problematic variation of this discrepancy in an actual subject's data, and I'm still trying to make sure that my fix won't break anything else. This subject's dataset origin is way off in the wrong place, causing @auto_tlrc to fail. I want to use @Align_Centers to fix this, and I can, but it warns me not to use the -no_cp option unless I understand what I'm doing. Since this is the second time I've encountered this problem (and I'm suddenly suspicious that it's actually responsible for another alignment issue I ran across some time ago), I want to make sure I figure out what's going on.
In this latest case, as in the other case, IJK_TO_DICOM_REAL agrees with DELTA, ORIGIN and ORIENT_SPECIFIC while IJK_TO_DICOM does not. Is there any circumstance where it is correct for a plumb dataset to have
[[ dx 0 0 x0 ]
IJK_TO_DICOM != [ 0 dy 0 y0 ]
[ 0 0 dz z0 ]]
(where dx, dy and dz are interpreted with the appropriate signs)?
Additionally, I don't understand why @Align_Centers is dangerous to use repeatedly, since it seems like every invocation after the first will simply leave the datasets more or less unchanged (and in my testing the second invocation yielded a 1.0e-5 mm nudge). Does the warning just mean "don't use this unless you know how to fix any mistakes you might make"?
Isaac
EDIT: I tried poking around a bit and discovered that a) the difference between IJK_TO_DICOM and IJK_TO_DICOM_REAL is not what's causing my problem, since 3dcopy-ing the dataset overwrites the former with the latter, and the dataset doesn't look any different in AFNI (which means that AFNI is ignoring IJK_TO_DICOM, at least on this dataset). Also, except for one subject's anatomical that's been through 3dAllineate, all of the IJK_TO_DICOM fields in all of the subjects' T1 images are
[[ 0.9375 0 0 -120 ]
IJK_TO_DICOM == [ 0 0.9375 0 -120 ]
[ 0 0 0.9375 -120 ]]
while a representative IJK_TO_DICOM_REAL would be
[[ 0.9374902 0 0 -119.53 ]
IJK_TO_DICOM_REAL == [ 0 0.9374902 0 -119.53 ]
[ 0 0 1.2 -73.21 ]]
Huh.
Edited 1 time(s). Last edit at 07/26/2012 07:14PM by Isaac Schwabacher.