|
Doxygen Source Code Documentation
MatAFNI_Demo.m File Reference
Go to the source code of this file.
|
Functions |
| while (1) |
end end | if (exist('ARzs_CW_avvr.DEL+orig.HEAD')~=2|exist('ARzs_CW_avvr.DEL+orig.BRIK')~=2) |
end end | fprintf ('\nERROR:Missing ARzs_CW_avvr.DEL+orig data.\nCtrl+c to Abort.\n') |
end end | if (exist('ARzsspgrax+orig.HEAD')~=2|exist('ARzsspgrax+orig.BRIK')~=2) |
end end | fprintf ('\nERROR:Missing ARzsspgrax+orig data.\nCtrl+c to Abort.\n') |
end end Read time series and
access time series | fprintf (1,'\tpatience...\n') |
plot it | figure (1) |
| subplot (211) |
| plot (squeeze(Vm(Vox_Ind(1)+1, Vox_Ind(2)+1, Vox_Ind(3)+1,:))) |
| subplot (212) |
| plot (Vv(Indx+1,:)) |
| plotsign2 (1) |
drawnow | msgbox (sprintf('Showing Time Series From%s.\nFrom AFNI''s viewer, use jump to:%g%g%g to see the same time series',...BrikName, Vox_Ind(1), Vox_Ind(2), Vox_Ind(3))) |
| fprintf (1,'\nHit Enter to Proceed with Demo(ctrl+c to abort)...\n') |
| figure (2) |
| imagesc (slc.M(:,:, 1)) |
| title (sprintf('Ax#%g, As In Brick', OptDisp.iSlc(1))) |
| imagesc (slcDisp.M(:,:, 1)) |
| title (sprintf('Ax#%g, As Displayed', OptDisp.iSlc(1))) |
| imagesc (slc.M(:,:, 2)) |
| title (sprintf('Ax#%g, As In Brick', OptDisp.iSlc(2))) |
| imagesc (slcDisp.M(:,:, 2)) |
| title (sprintf('Ax#%g, As Displayed', OptDisp.iSlc(2))) |
| imagesc (slc.M(:,:, 3)) |
| title (sprintf('Ax#%g, As In Brick', OptDisp.iSlc(3))) |
| imagesc (slcDisp.M(:,:, 3)) |
| title (sprintf('Ax#%g, As Displayed', OptDisp.iSlc(3))) |
colormap gray you need to
use some scaling to get the
display to work best | plotsign2 (2) |
drawnow | msgbox (sprintf('Showing Anatomy Brick%s.\nFrom AFNI''s axial viewer, use slider to view slices%g,%g and%g that are displayed in the right column of the figure.',...BrikNameAnat, OptDisp.iSlc(1), OptDisp.iSlc(2), OptDisp.iSlc(3))) |
| figure (3) |
| imagesc (slc(1).M(:,:)) |
| title (sprintf('Ax#%g, As In Brick', OptDispFunc.iSlc(1))) |
| imagesc (slc(1).Mdisp(:,:)) |
| title (sprintf('Ax#%g, As Displayed', OptDispFunc.iSlc(1))) |
| imagesc (slc(2).M(:,:)) |
| title (sprintf('Sa#%g, As In Brick', OptDispFunc.iSlc(2))) |
| imagesc (slc(2).Mdisp(:,:)) |
| title (sprintf('Sa#%g, As Displayed', OptDispFunc.iSlc(2))) |
| imagesc (slc(3).M(:,:)) |
| title (sprintf('Co#%g, As In Brick', OptDispFunc.iSlc(3))) |
| imagesc (slc(3).Mdisp(:,:)) |
| title (sprintf('Co#%g, As Displayed', OptDispFunc.iSlc(3))) |
colormap gray you need to
use some scaling to get the
display to work best | plotsign2 (3) |
drawnow | msgbox (sprintf('Showing Slice Triplet from Functional Brick%s.\nFrom AFNI''s axial viewer, use slider to view slices%g,%g and%g that are displayed in the right column of the figure.\nSet Func underlay and set Func sub-brick to#%g',...BrikNameFunc, OptDispFunc.iSlc(1), OptDispFunc.iSlc(2), OptDispFunc.iSlc(3), OptDispFunc.index)) |
Vfunc(:,:,:, 1 | squeeze () |
Variables |
script MatAFNI_Demo | Purpose |
| pause |
read in a brick and display
voxel with AFNI i j | k |
read in a brick and display
voxel with AFNI i j | BrikName = 'ARzs_CW_avvr+orig' |
| Vox_Ind = [29 33 3] |
| clf |
figure out the AFNI D index
of the | voxel [err, Indx] = BrikLoad (BrikName, Opt) AfniXYZ2AfniIndex (Vox_Ind, Info.DATASET_DIMENSIONS(1), Info.DATASET_DIMENSIONS(2)) |
read in anatomy brick | BrikNameAnat = 'ARzsspgrax+orig' |
Grab a few slices in the same
plane OptDisp | plane = BrikLoad (BrikNameAnat) 'Ax' |
OptDisp | iSlc = [107 79 45] |
Those are AFNI | indices |
Those are AFNI see help GetAfniSlice
for more | info [err, slc, slcDisp] = GetAfniSlice (Vanat, InfoAnat, OptDisp) |
clf | subplot |
grab a triplet of slices from
DEL functional Brick | BrikNameFunc = 'ARzs_CW_avvr.DEL+orig' |
| DM = BrikLoad (BrikNameFunc) AFNI_SliceDispManip (Infofunc) |
OptDispFunc | index = 1 |
that s not necessary but it
makes annotation and referencing
clear | Vxcor = squeeze(Vfunc(:,:,:,3)) |
Function Documentation
fprintf |
( |
1 |
, |
|
|
'\nHit Enter to Proceed with Demo(ctrl+c to abort)...\n' |
|
|
) |
|
|
end end Read time series and access time series fprintf |
( |
1 |
, |
|
|
'\tpatience...\n' |
|
|
) |
|
|
end end fprintf |
( |
'\nERROR:Missing ARzsspgrax+orig data.\nCtrl+c to Abort.\n' |
|
) |
|
|
end end fprintf |
( |
'\nERROR:Missing ARzs_CW_avvr.DEL+orig data.\nCtrl+c to Abort.\n' |
|
) |
|
|
end end if |
( |
exist('ARzsspgrax+orig.HEAD')~ |
= 2 | exist('ARzsspgrax+orig.BRIK') ~= 2 |
) |
|
|
end end if |
( |
exist('ARzs_CW_avvr.DEL+orig.HEAD')~ |
= 2 | exist('ARzs_CW_avvr.DEL+orig.BRIK') ~= 2 |
) |
|
|
imagesc |
( |
slc(3).Mdisp(:,:) |
|
) |
|
|
imagesc |
( |
slc(3).M(:,:) |
|
) |
|
|
imagesc |
( |
slc(2).Mdisp(:,:) |
|
) |
|
|
imagesc |
( |
slc(2).M(:,:) |
|
) |
|
|
imagesc |
( |
slc(1).Mdisp(:,:) |
|
) |
|
|
imagesc |
( |
slc(1).M(:,:) |
|
) |
|
|
imagesc |
( |
slcDisp. |
M(:,:, 3) |
) |
|
|
imagesc |
( |
slc. |
M(:,:, 3) |
) |
|
|
imagesc |
( |
slcDisp. |
M(:,:, 2) |
) |
|
|
imagesc |
( |
slc. |
M(:,:, 2) |
) |
|
|
imagesc |
( |
slcDisp. |
M(:,:, 1) |
) |
|
|
imagesc |
( |
slc. |
M(:,:, 1) |
) |
|
|
Vfunc(:,:,:,1 squeeze |
( |
|
) |
[virtual] |
|
Variable Documentation
Those are AFNI see help GetAfniSlice for more info[err, slc, slcDisp] = GetAfniSlice (Vanat, InfoAnat, OptDisp) |
|
OptDisp iSlc = [107 79 45] |
|
that s not necessary but it makes annotation and referencing clear Vxcor = squeeze(Vfunc(:,:,:,3)) |
|
|