Isaac Schwabacher Wrote:
-------------------------------------------------------
> No, I mean that if you go to the voxel that MATLAB
> says is (68, 33, 52), then MATLAB will say that
> that voxel's global index in the dataset is
> 372560. If you navigate to the same voxel (i.e.,
> the same location in the dataset) in AFNI, the
> global index will be 372559 and the
> ijk-coordinates will be (67, 32, 51). The voxel
> at AFNI global index 372560 is actually the
> neighbor of the original voxel, and it does have
> coordinates (68, 32, 51).
I tried it out and I can't replicate this behaviour.
I took an arbitrary dataset and in the AFNI GUI jumped to (xyz)=28 50 100. AFNI reports index 116671, voxel x=39, y=64, z=22.
In Matlab:
i=BrikInfo('myfile+orig');
[~,idx]=AFNI_XYZcontinuous2Index([28 50 100],i); % idx=[ 39 64 22]
[[~,lin_idx]=AFNI_XYZcontinuous2Index([28 50 100],i,[],1); % lin_idx=116671
[~,xyz]=AFNI_Index2XYZcontinuous(idx,i); % xyz= [28.7500 50.4739 100.5457]
so from what I see there is a direct match between the indices in Matlab and the AFNI GUI. Do you see other behaviour?