Skip to content

AFNI/NIfTI Server

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

Doxygen Source Code Documentation


GE_readVolume.m File Reference

Go to the source code of this file.


Functions

 if (fid==-1) fprintf('Cannot Open%s.\n'
passnum break end Skip to
the data 
fseek (fid, im_offset,-1)
append the slice to the imageSet imageVol (:,:, i)

Variables

 function [imageVol, lastfile]
 nY = volSize(2)
 nZ = volSize(3)
 sliceSize = nX*nY
 imageVol = zeros(nX, nY, nZ)
for i
file no filep = ceil(filenum/999) - 1
 filen = filenum - 999*filep
 path_num = str2num(path_start) + 20*filep
 path_now = sprintf('00%d',path_num)
 path = fullfile(path_stem, path_now)
 stub = sprintf('00%d',filen)
 imageFile = fullfile(path,['I.' stub])
Open the file [fid, message] = fopen(imageFile,'r','b')
Read the slice buffer = fread(fid,sliceSize,sprintf('int%d',depth))
Close the file status = fclose(fid)
Set the lastfile lastfile = imageFile

Function Documentation

passnum break end Skip to the data fseek fid  ,
im_offset  ,
1
 

if fid  = = -1  ) 
 

append the slice to the imageSet imageVol ,
,
 


Variable Documentation

Read the slice buffer = fread(fid,sliceSize,sprintf('int%d',depth))
 

Definition at line 48 of file GE_readVolume.m.

Referenced by Bitio_Flush(), Bitio_WriteToSocket(), compress_first_pass(), compress_output(), COND_PushCondition(), consume_data(), decompress_data(), decompress_smooth_data(), do_flip_h(), Dump(), es_loop(), exportEncapsulatedPixels(), exportPixels(), exportStream(), flip_image(), grabPixels(), iochan_recv(), iochan_recvall(), iochan_recvloop(), iochan_send(), iochan_sendall(), jinit_c_coef_controller(), jinit_d_coef_controller(), MD5_B64_file(), MD5_static_file(), mpeg2_header_picture(), mpeg2_header_sequence(), mpeg2_slice(), ncio_ffio_assign(), NI_stream_read(), NI_stream_readbuf(), NI_stream_readbuf64(), NI_stream_write(), NotifyMasterDone(), picture_coding_ext(), picture_display_ext(), printNumber(), ps_loop(), pva_loop(), qh_memfreeshort(), qh_randommatrix(), quant_matrix_ext(), read_application_extension(), read_image(), read_image_block(), read_image_data(), read_JPEG_file(), read_unknown_extension(), ReadSub4(), real_write_image_data(), sample1(), sample2(), sequence_display_ext(), sequence_ext(), SHM_recv(), SHM_send(), SHM_sendall(), StartDecodeServer(), StartIOServer(), StartMasterServer(), SUMA_BrainVoyager_Read(), SUMA_cmap_wid_input(), SUMA_Format(), SUMA_grabPixels(), SUMA_input(), transencode_coef_controller(), ts_loop(), verror(), WaitForOutputFile(), write_compressed_data(), and writeFile().

Open the file[fid, message] = fopen(imageFile,'r','b')
 

Definition at line 38 of file GE_readVolume.m.

filen = filenum - 999*filep
 

Definition at line 28 of file GE_readVolume.m.

file no filep = ceil(filenum/999) - 1
 

Definition at line 27 of file GE_readVolume.m.

Referenced by file_exists().

function[imageVol, lastfile]
 

Initial value:

 GE_readVolume(startDir, passnum, volSize, depth, im_offset)
%
%GE_readVolume
% 
% [imageVol, lastfile] = GE_readVolume(startDir, passnum, [nX nY nZ], depth, im_offset)
%
% reads the volume for passnum from the series which is stored
% starting in startDir and returns the name of the last file read
%
% Souheil J. Inati
% Dartmouth College
% May 2000
% souheil.inati@dartmouth.edu
%

% initialize some variables
nX = volSize(1)

Definition at line 1 of file GE_readVolume.m.

for i
 

Initial value:

 fileparts(startDir) 1:nZ
        % Make the filename
        filenum = (passnum-1)*nZ + i

Definition at line 24 of file GE_readVolume.m.

imageFile = fullfile(path,['I.' stub])
 

Definition at line 40 of file GE_readVolume.m.

imageVol = zeros(nX, nY, nZ)
 

Definition at line 21 of file GE_readVolume.m.

Set the lastfile lastfile = imageFile
 

Definition at line 56 of file GE_readVolume.m.

nY = volSize(2)
 

Definition at line 18 of file GE_readVolume.m.

nZ = volSize(3)
 

Definition at line 19 of file GE_readVolume.m.

path = fullfile(path_stem, path_now)
 

Definition at line 32 of file GE_readVolume.m.

Referenced by dlopen(), do_ncdump(), main(), name_path(), nc__create(), nc__create_mp(), nc__open(), nc__open_mp(), nc_create(), nc_delete(), nc_delete_mp(), nc_open(), nccreate(), ncio_create(), ncio_new(), ncio_open(), ncopen(), path_to_dir_n_suffix(), SUMA_2Prefix2SurfaceName(), SUMA_AfniPrefix(), SUMA_Prefix2SurfaceName(), UTL_IsDirectory(), and UTL_VerifyCreatePath().

path_now = sprintf('00%d',path_num)
 

Definition at line 31 of file GE_readVolume.m.

path_num = str2num(path_start) + 20*filep
 

Definition at line 29 of file GE_readVolume.m.

sliceSize = nX*nY
 

Definition at line 20 of file GE_readVolume.m.

Close the file status = fclose(fid)
 

Definition at line 53 of file GE_readVolume.m.

stub = sprintf('00%d',filen)
 

Definition at line 34 of file GE_readVolume.m.

 

Powered by Plone

This site conforms to the following standards: