Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Documentation

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

figure  ) 
 

figure  ) 
 

plot it figure  ) 
 

fprintf ,
'\nHit Enter to Proceed with Demo(ctrl+c to abort)...\n
 

end end Read time series and access time series fprintf ,
'\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)  ) 
 

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  ) 
 

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))   ) 
 

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))   ) 
 

plot Vv(Indx+1,:)   ) 
 

plot squeeze(Vm(Vox_Ind(1)+1, Vox_Ind(2)+1, Vox_Ind(3)+1,:))   ) 
 

colormap gray you need to use some scaling to get the display to work best plotsign2  ) 
 

colormap gray you need to use some scaling to get the display to work best plotsign2  ) 
 

plotsign2  ) 
 

Vfunc(:,:,:,1 squeeze  )  [virtual]
 

subplot 212   ) 
 

subplot 211   ) 
 

title sprintf('Co#%g, As Displayed', OptDispFunc.iSlc(3))   ) 
 

title sprintf('Co#%g, As In Brick', OptDispFunc.iSlc(3))   ) 
 

title sprintf('Sa#%g, As Displayed', OptDispFunc.iSlc(2))   ) 
 

title sprintf('Sa#%g, As In Brick', OptDispFunc.iSlc(2))   ) 
 

title sprintf('Ax#%g, As Displayed', OptDispFunc.iSlc(1))   ) 
 

title sprintf('Ax#%g, As In Brick', OptDispFunc.iSlc(1))   ) 
 

title sprintf('Ax#%g, As Displayed', OptDisp.iSlc(3))   ) 
 

title sprintf('Ax#%g, As In Brick', OptDisp.iSlc(3))   ) 
 

title sprintf('Ax#%g, As Displayed', OptDisp.iSlc(2))   ) 
 

title sprintf('Ax#%g, As In Brick', OptDisp.iSlc(2))   ) 
 

title sprintf('Ax#%g, As Displayed', OptDisp.iSlc(1))   ) 
 

title sprintf('Ax#%g, As In Brick', OptDisp.iSlc(1))   ) 
 

while  ) 
 


Variable Documentation

read in a brick and display voxel with AFNI i j BrikName = 'ARzs_CW_avvr+orig'
 

Definition at line 61 of file MatAFNI_Demo.m.

read in anatomy brick BrikNameAnat = 'ARzsspgrax+orig'
 

Definition at line 91 of file MatAFNI_Demo.m.

grab a triplet of slices from DEL functional Brick BrikNameFunc = 'ARzs_CW_avvr.DEL+orig'
 

Definition at line 116 of file MatAFNI_Demo.m.

clf
 

Definition at line 68 of file MatAFNI_Demo.m.

DM = BrikLoad (BrikNameFunc) AFNI_SliceDispManip (Infofunc)
 

Definition at line 119 of file MatAFNI_Demo.m.

OptDispFunc index = 1
 

Definition at line 121 of file MatAFNI_Demo.m.

Those are AFNI indices
 

Definition at line 96 of file MatAFNI_Demo.m.

Referenced by main().

Those are AFNI see help GetAfniSlice for more info[err, slc, slcDisp] = GetAfniSlice (Vanat, InfoAnat, OptDisp)
 

Definition at line 97 of file MatAFNI_Demo.m.

OptDisp iSlc = [107 79 45]
 

Definition at line 53 of file Test_AFNI_IndexChange.m.

read in a brick and display voxel with AFNI i j k
 

Definition at line 60 of file MatAFNI_Demo.m.

pause
 

Definition at line 54 of file MatAFNI_Demo.m.

Grab a few slices in the same plane OptDisp plane = BrikLoad (BrikNameAnat) 'Ax'
 

Definition at line 95 of file MatAFNI_Demo.m.

script MatAFNI_Demo Purpose
 

Definition at line 13 of file MatAFNI_Demo.m.

subplot
 

Definition at line 129 of file MatAFNI_Demo.m.

Vox_Ind = [29 33 3]
 

Definition at line 62 of file MatAFNI_Demo.m.

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))
 

Definition at line 77 of file MatAFNI_Demo.m.

that s not necessary but it makes annotation and referencing clear Vxcor = squeeze(Vfunc(:,:,:,3))
 

Definition at line 144 of file MatAFNI_Demo.m.

 

Powered by Plone

This site conforms to the following standards: