Skip to content

AFNI/NIfTI Server

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

Doxygen Source Code Documentation


GE_convertVolume.m File Reference

Go to the source code of this file.


Functions

 if (nargin< 3) error('Not enough input arguments.') return end%Create the name of the first file in inDir firstfile
Is the first image the first
or the last 
if (se_hdr.end_loc-se_hdr.start_loc) > 0 scandir
end Done with vol fprintf ('Wrote%s.img.\n', outName)
Done fprintf ('\nConversion Finished.\n')

Variables

function status
Read the Header from the first file [su_hdr, ex_hdr, se_hdr, im_hdr, pix_hdr, im_offset] = GE_readHeader(firstfile)
The image Dimensions Nx = im_hdr.imatrix_X
X Voxels Ny = im_hdr.imatrix_Y
Y Voxels Nz = im_hdr.slquant
Z Voxels volSize = [Nx Ny Nz]
Read in the volume [imageVol, lastfile] = GE_readVolume(inDir, runnum, volSize, pix_hdr.img_depth, im_offset)
else scandir = -1
end Compute the M matrix M = GE_createSPMmat(im_hdr,scandir)
Create the SPM volumefname = outName
dim = [volSize spm_type('int16')]
short intsmat = M
pinfo = [1 0 0]'
 V = spm_create_image(V)
Write out the SPM Volume Don
t use spm_write_vol because
that sets a scale factor for 
i

Function Documentation

Done fprintf '\nConversion Finished.\n  ) 
 

end Done with vol fprintf 'Wrote%s.img.\n ,
outName 
 

Is the first image the first or the last if se_hdr.end_loc-se_hdr.  start_loc  ) 
 

if  ) 
 


Variable Documentation

V dim = [volSize spm_type('int16')]
 

Definition at line 58 of file GE_convertVolume.m.

Read the Header from the first file[su_hdr, ex_hdr, se_hdr, im_hdr, pix_hdr, im_offset] = GE_readHeader(firstfile)
 

Definition at line 35 of file GE_convertVolume.m.

Create the SPM volume V fname = outName
 

Definition at line 57 of file GE_convertVolume.m.

Write out the SPM Volume Don t use spm_write_vol because that sets a scale factor for i
 

Initial value:

 1:Nz
  V = spm_write_plane(V,squeeze(imageVol(:,:,i)),i)

Definition at line 65 of file GE_convertVolume.m.

end Compute the M matrix M = GE_createSPMmat(im_hdr,scandir)
 

Definition at line 54 of file GE_convertVolume.m.

short ints V mat = M
 

Definition at line 59 of file GE_convertVolume.m.

The image Dimensions Nx = im_hdr.imatrix_X
 

Definition at line 38 of file GE_convertVolume.m.

X Voxels Ny = im_hdr.imatrix_Y
 

Definition at line 39 of file GE_convertVolume.m.

Y Voxels Nz = im_hdr.slquant
 

Definition at line 40 of file GE_convertVolume.m.

V pinfo = [1 0 0]'
 

Definition at line 60 of file GE_convertVolume.m.

else scandir = -1
 

Definition at line 50 of file GE_convertVolume.m.

status
 

Initial value:

 GE_convertVolume(inDir,runnum,outName)
%
% status = GE_convertVolume(inDir,runnum,outName)
%
%GE_convertVolume
%
% Version 3.1
%
% Converts a series of GE slices into Analyze format for SPM.
% inDir is the name of the directory containing the first file of
% the series

Definition at line 75 of file GE_convertVolume.m.

V = spm_create_image(V)
 

Definition at line 61 of file GE_convertVolume.m.

Z Voxels volSize = [Nx Ny Nz]
 

Definition at line 41 of file GE_convertVolume.m.

Read in the volume[imageVol, lastfile] = GE_readVolume(inDir, runnum, volSize, pix_hdr.img_depth, im_offset)
 

Definition at line 44 of file GE_convertVolume.m.

 

Powered by Plone

This site conforms to the following standards: