1%script Test_AFNI_Index2XYZcontinuous
2%
3%
4%
5%Purpose:
6%
7%
8%
9%Input:
10%
11%
12%
13%Output:
14%
15%
16%
17%
18%
19%Key Terms:
20%
21%More Info :
22%
23%
24%
25%
26%     Author : Ziad Saad
27%     Date : Tue Sep 5 21:48:26 PDT 2000
28%     LBC/NIMH/ National Institutes of Health, Bethesda Maryland
29
30
31%Debug Flag
32DBG = 1;
33
34%launch afni
35%unix('afni &');
36
37%Load a Brik Info
38[err, Info] = BrikInfo('ARzs_CW_avvr+orig.HEAD');
39
40%XYZ indices
41	Indx = [24 36 8; 31 12 0];
42
43%get coordinates in RAI
44	[err,XYZmm] = AFNI_Index2XYZcontinuous (Indx, Info);
45
46%goto these voxels in the AFNI window and check that
47fprintf (1,'Voxel indices :');
48	Indx
49fprintf (1,'Voxel Coords [RAI]:');
50	XYZmm
51fprintf (1,'Voxel Coords [ILA]:');
52	 [err, maplocation, mapsign, Mtrans] = AFNI_CoordChange ('RAI', 'ILA', XYZmm);
53Mtrans
54
55%or directly,
56	[err,XYZmm] = AFNI_Index2XYZcontinuous (Indx, Info, 'ILA');
57	fprintf (1,'Voxel Coords [ILA]:');
58	XYZmm
59