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 volume V | fname = outName | 
| V | dim = [volSize spm_type('int16')] | 
| short ints V | mat = M | 
| V | 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 | ) |  |  | 
Variable Documentation
  
    | 
        
          | Write out the SPM Volume Don t use spm_write_vol because that sets a scale factor for i |  | 
  
    | 
        
          | The image Dimensions Nx = im_hdr.imatrix_X |  | 
  
    | 
        
          | X Voxels Ny = im_hdr.imatrix_Y |  | 
  
    | 
        
          | Y Voxels Nz = im_hdr.slquant |  | 
  
    |  | 
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.     |