Skip to content

AFNI/NIfTI Server

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

Doxygen Source Code Documentation


GE_get_volsperrun.m File Reference

Go to the source code of this file.


Functions

 disp (sprintf('Found%d image files in directory%s', nfiles, curdir)) flist
 fseek (fid, 4936,'bof')
 runnum (nimg)
 fclose (fid)
 fprintf ('There are%d functionals runs.\n', numrun)%for i
 im_datetime (nimg)
 im_actual_dt (nimg)
 im_lastmod (nimg)
 im_checksum (nimg)
 im_scanactno (nimg)

Variables

 function [volsperrun]
 ser_idnum = str2num(ser_idstr)
Strip tailing directory GE_data_root = inDir(1:max(findstr('/',inDir))-1)
List directories and extract
those corresponding to the
desired series 
d = dir(GE_data_root)
 dir_idx = find(cat(d.isdir))
 ndir = length(dir_idx)
 dirmat = char(d.name)
 good_idx = find((dirmat(:,3) == ser_idstr) & isspace(dirmat(:,4)))
 ser_dirnames = char(d(good_idx).name)
 byte_align = 0
Open the first file and get
the number of slices 
firstfile = fullfile(GE_data_root, ser_dirnames(1,:), 'I.001')
 nslices = GE_readHeader(firstfile) im_hdr.slquant
 nimg = 0
for idir
 subd = dir(curdir)
 nfiles = length(good_idx)
Loop through and read the
run number from the header
of each file for 
ifile
 fid = fopen(imageFile,'r','b')
end end Output the results
to the 
screen [B, I, J] = unique(runnum)
 imperrun = [I(1) diff(I)]
 volsperrun = imperrun/nslices
 numrun = length(B)

Function Documentation

disp sprintf('Found%d image files in directory%s', nfiles, curdir)   ) 
 

Referenced by surf_ave_radius().

fclose fid   ) 
 

fprintf 'There are%d functionals runs.\n ,
numrun 
 

fseek fid  ,
4936  ,
'bof' 
 

im_actual_dt nimg   ) 
 

im_checksum nimg   ) 
 

im_datetime nimg   ) 
 

im_lastmod nimg   ) 
 

im_scanactno nimg   ) 
 

runnum nimg   ) 
 


Variable Documentation

id byte_align = 0
 

List directories and extract those corresponding to the desired series d = dir(GE_data_root)
 

Definition at line 22 of file GE_get_volsperrun.m.

dir_idx = find(cat(d.isdir))
 

Definition at line 24 of file GE_get_volsperrun.m.

dirmat = char(d.name)
 

Definition at line 48 of file GE_get_volsperrun.m.

fid = fopen(imageFile,'r','b')
 

Definition at line 60 of file GE_get_volsperrun.m.

Open the first file and get the number of slices firstfile = fullfile(GE_data_root, ser_dirnames(1,:), 'I.001')
 

Definition at line 38 of file GE_get_volsperrun.m.

function[volsperrun]
 

Initial value:

 GE_get_volsperrun(inDir)
%
% [ volsperrun ] = GE_get_volsperrun(inDir)
%
% A utility to find the number of volumes per run in an ADW scan.
% inDir is the starting directory for the I.* files.
%
% Souheil J. Inati  
% Dartmouth College
% July 2001
% souheil.inati@dartmouth.edu
%

% Get series ID number
ser_idstr = inDir(end)

Definition at line 1 of file GE_get_volsperrun.m.

Strip tailing directory GE_data_root = inDir(1:max(findstr('/',inDir))-1)
 

Definition at line 19 of file GE_get_volsperrun.m.

good_idx = find((dirmat(:,3) == ser_idstr) & isspace(dirmat(:,4)))
 

Definition at line 49 of file GE_get_volsperrun.m.

for idir
 

Initial value:

 1:ndir
  curdir = fullfile(GE_data_root, ser_dirnames(idir,:))

Definition at line 44 of file GE_get_volsperrun.m.

Loop through and read the run number from the header of each file for ifile
 

Initial value:

 1:nfiles
    imageFile = fullfile(curdir, flist{ifile})

Definition at line 57 of file GE_get_volsperrun.m.

Referenced by SUMA_Extension(), and THD_init_alldir_datablocks().

imperrun = [I(1) diff(I)]
 

Definition at line 71 of file GE_get_volsperrun.m.

ndir = length(dir_idx)
 

Definition at line 33 of file GE_get_volsperrun.m.

Referenced by THD_get_many_timeseries(), and THD_getpathprogs().

nfiles = length(good_idx)
 

Definition at line 50 of file GE_get_volsperrun.m.

Referenced by find_fl_file_index(), main(), read_ge_files(), scan_ge_files(), THD_get_all_filenames(), and THD_get_wildcard_filenames().

nimg = 0
 

Definition at line 59 of file GE_get_volsperrun.m.

Referenced by write_image_data().

nslices = GE_readHeader(firstfile) im_hdr.slquant
 

Definition at line 40 of file GE_get_volsperrun.m.

Referenced by output_results(), RIC_CalcCoeffAB(), and RIC_CorrectDataset().

numrun = length(B)
 

Definition at line 75 of file GE_get_volsperrun.m.

end end Output the results to the screen[B, I, J] = unique(runnum)
 

Definition at line 69 of file GE_get_volsperrun.m.

Referenced by __glutGetTransparentPixel(), __glutXGetLayerVisualInfo(), create_image_data(), Gif_Unoptimize(), main(), put_background_in_screen(), put_image_in_screen(), and unoptimize_image().

ser_dirnames = char(d(good_idx).name)
 

Definition at line 31 of file GE_get_volsperrun.m.

ser_idnum = str2num(ser_idstr)
 

Definition at line 16 of file GE_get_volsperrun.m.

subd = dir(curdir)
 

Definition at line 46 of file GE_get_volsperrun.m.

volsperrun = imperrun/nslices
 

Definition at line 73 of file GE_get_volsperrun.m.

 

Powered by Plone

This site conforms to the following standards: