Skip to content

AFNI/NIfTI Server

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

Doxygen Source Code Documentation


GE_convertADW.m File Reference

Go to the source code of this file.


Functions

function e g outStem is the
stem used for naming the Analyze
files starttime is the time
point number to start nvols
is the number of 
volumes (time points) to convert%%status
function e g outStem is the
stem used for naming the Analyze
files starttime is the time
point number to start nvols
is the number of error all
is well eg 
GE_convert ('DATA/00023/003','converted', 5, 27)%Will convert 27 time points starting at the 5th time point%named converted_i0001.img
function e g outStem is the
stem used for naming the Analyze
files starttime is the time
point number to start nvols
is the number of error all
is well eg converted_i0002
converted_i0027 img and their
associated header and mat
files Assumes the data is
stored as I through I and
then I through etc Remember
to skip the template images
ie time point for the first
run You don t need to do this
for subsequent runs Modified
to use spm write functions
Modified to use spm_write_plane
instead of spm_write_vol Souheil
J Inati Dartmouth College
September souheil inati dartmouth
edu 
if (nargin< 4) 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 Update to the screen fprintf ('Wrote%s\n', outName)
end Done fprintf ('\nConversion Finished.\n')

Variables

function status
function e g outStem is the
stem used for naming the Analyze
files starttime is the time
point number to start nvols
is the number of error all
is well eg converted_i0002 
img
function e g outStem is the
stem used for naming the Analyze
files starttime is the time
point number to start nvols
is the number of error all
is well eg converted_i0002
converted_i0027 img and their
associated header and mat
files Assumes the data is
stored as I through I and
then I through 
I
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]
else scandir = -1
end Compute the M matrix M = GE_createSPMmat(im_hdr,scandir)
Create the template SPM volume
structure V 
fname = ''
dim = [volSize spm_type('int16')]
short intsmat = M
pinfo = [1 0 0]'
Loop over the volumes until
there is no more looping to
be done for 
i
Read in the volume [imageVol, lastfile]
Create analyze file vol_str = sprintf('000%d',i)
 outName = [outStem sprintf('_i%s.img',vol_str)]
 V = spm_create_image(V)

Function Documentation

end Done fprintf '\nConversion Finished.\n  ) 
 

end Update to the screen fprintf 'Wrote%s\n ,
outName 
 

function e g outStem is the stem used for naming the Analyze files starttime is the time point number to start nvols is the number of error all is well eg GE_convert 'DATA/00023/003'  ,
'converted'  ,
,
27 
 

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

function e g outStem is the stem used for naming the Analyze files starttime is the time point number to start nvols is the number of error all is well eg converted_i0002 converted_i0027 img and their associated header and mat files Assumes the data is stored as I through I and then I through etc Remember to skip the template images ie time point for the first run You don t need to do this for subsequent runs Modified to use spm write functions Modified to use spm_write_plane instead of spm_write_vol Souheil J Inati Dartmouth College September souheil inati dartmouth edu if  ) 
 

function e g outStem is the stem used for naming the Analyze files starttime is the time point number to start nvols is the number of volumes time  points  ) 
 


Variable Documentation

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

Definition at line 68 of file GE_convertADW.m.

Referenced by array_to_vector(), column_to_vector(), main(), mri_3dalign_setup(), ncvardef(), ncvarinq(), NI_base64_to_val(), NI_binary_to_val(), NI_read_columns(), NI_swap_column(), NI_text_to_val(), NI_write_columns(), qh_crossproduct(), qh_determinant(), qh_detsimplex(), qh_detvnorm(), qh_distnorm(), qh_facetarea_simplex(), qh_facetintersect(), qh_gram_schmidt(), qh_init_B(), qh_initialvertices(), qh_initqhull_globals(), qh_matchnewfacets(), qh_maxabsval(), qh_maxsimplex(), qh_minabsval(), qh_mindiff(), qh_nearvertex(), qh_new_qhull(), qh_normalize(), qh_normalize2(), qh_pointdist(), qh_printpointid(), qh_projectpoints(), qh_randommatrix(), qh_readfeasible(), qh_rotatepoints(), qh_scalelast(), qh_scalepoints(), qh_setdelaunay(), qh_setfeasible(), qh_sethalfspace(), qh_sethalfspace_all(), qh_sethyperplane_det(), qh_sethyperplane_gauss(), qh_voronoi_center(), ResampleFloat(), ResampleUchar(), ResampleUshort(), SUMA_writeSpecFile(), vector_add(), vector_create(), vector_create_noinit(), vector_dot(), vector_dotself(), vector_equate(), and vector_subtract().

file = GE_readHeader(firstfile)
 

Referenced by create_bucket(), DCM_WriteFile(), debug_free_id(), debug_malloc_id(), debug_realloc_id(), fail_die_malloc(), fail_die_malloc_die(), fail_die_realloc(), file_exists(), find_fl_file_index(), internal_draw_frame(), main(), MD5_B64_file(), MD5_static_file(), open_file(), open_URL_hpf(), open_URL_http(), pbm_getbit(), pbm_getc(), pbm_getint(), pbm_getrawbyte(), pbm_readmagicnumber(), pbm_readpbminitrest(), pbm_readpbmrow(), pbm_writepbminit(), pbm_writepbmrow(), pbm_writepbmrowplain(), pbm_writepbmrowraw(), pgm_draw_frame(), pgm_readpgminitrest(), pgm_readpgmrow(), pgm_writepgminit(), pgm_writepgmrow(), pgm_writepgmrowplain(), pgm_writepgmrowraw(), pnm_readpnm(), pnm_readpnminit(), pnm_readpnmrow(), pnm_writepnm(), pnm_writepnminit(), pnm_writepnmrow(), ppm_readppminitrest(), ppm_readppmrow(), ppm_writeppminit(), ppm_writeppmrow(), ppm_writeppmrowplain(), ppm_writeppmrowraw(), putus(), read_scan_integer(), read_text_integer(), read_URL_ftp(), sample1(), sample2(), SUMA_read1D(), terminate(), and text_getc().

V fname = ''
 

Definition at line 84 of file GE_convertADW.m.

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

Initial value:

 1:nvols
  passnum = starttime + i - 1

Definition at line 89 of file GE_convertADW.m.

function e g outStem is the stem used for naming the Analyze files starttime is the time point number to start nvols is the number of error all is well eg converted_i0002 converted_i0027 img and their associated header and mat files Assumes the data is stored as I through I and then I through I
 

Definition at line 22 of file GE_convertADW.m.

function e g outStem is the stem used for naming the Analyze files starttime is the time point number to start nvols is the number of error all is well eg converted_i0002 img
 

Definition at line 22 of file GE_convertADW.m.

Referenced by copy_data_area_subimage(), crop_image(), fill_data_area_subimage(), flip_image(), Gif_SetUncompressedImage(), real_write_image_data(), rotate_image(), THRESH_compute(), THRESH_mask_brain(), THRESH_region_grow(), write_compressed_data(), and write_image_data().

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

Definition at line 64 of file GE_convertADW.m.

short ints V mat = M
 

Definition at line 69 of file GE_convertADW.m.

The image Dimensions Nx = im_hdr.imatrix_X
 

Definition at line 51 of file GE_convertADW.m.

X Voxels Ny = im_hdr.imatrix_Y
 

Definition at line 52 of file GE_convertADW.m.

Y Voxels Nz = im_hdr.slquant
 

Definition at line 53 of file GE_convertADW.m.

outName = [outStem sprintf('_i%s.img',vol_str)]
 

Definition at line 83 of file GE_convertADW.m.

V pinfo = [1 0 0]'
 

Definition at line 70 of file GE_convertADW.m.

else scandir = -1
 

Definition at line 60 of file GE_convertADW.m.

Referenced by THD_get_all_filenames().

function e g runnum is the run number of the set you want to convert outName is used for naming the Analyze files status
 

Initial value:

 GE_convertADW(inDir,outStem,starttime,nvols)
%
% status = GE_convertADW(inDir,outStem,starttime,nvols)
%
%GE_convertADW
%
% Version 3.1
%
% Converts a series of GE slices acquired on the Advanced
% Development Workstation into Analyze format for SPM.
% inDir is the name of the first directory containing the
%      series

Definition at line 14 of file GE_convertVolume.m.

Referenced by __glutEstablishColormapsProperty(), __glutSetupColormap(), beta_p2t(), beta_t2p(), binomial_p2t(), binomial_t2p(), cdfbet(), cdfbin(), cdfchi(), cdfchn(), cdff(), cdffnc(), cdfgam(), cdfnbn(), cdfnor(), cdfpoi(), cdft(), chisq_p2t(), chisq_t2p(), ClassifyOctree1(), ClassifyOctree2(), cmp_chars(), cmp_doubles(), cmp_floats(), cmp_ints(), cmp_longs(), cmp_schars(), cmp_shorts(), ComputeOctreeMask(), DELAY_tsfuncV2(), dinvr(), do_p1_addr(), do_p1_charp(), do_p1_const(), do_p1_expr(), do_p1_extern(), do_p1_goto(), do_p1_head(), do_p1_ident(), do_p1_label(), do_p1_list(), do_p1_literal(), do_p1_name_pointer(), do_p1_set_line(), dofork(), dup_NC_attrarrayV(), dup_NC_dimarrayV(), dup_NC_vararrayV(), dzror(), E0000(), E0001(), EXTRACT_tsfunc(), fault_v1hs(), ffio_pgin(), fileSize(), fill_added(), fill_added_recs(), fill_NC_var(), fillerup(), findServerOverlayVisualsInfo(), fstat_p2t(), fstat_t2p(), fstat_t2pp(), gamma_p2t(), gamma_t2p(), getNCvx_char_char(), getNCvx_double_double(), getNCvx_double_float(), getNCvx_double_int(), getNCvx_double_long(), getNCvx_double_schar(), getNCvx_double_short(), getNCvx_double_uchar(), getNCvx_float_double(), getNCvx_float_float(), getNCvx_float_int(), getNCvx_float_long(), getNCvx_float_schar(), getNCvx_float_short(), getNCvx_float_uchar(), getNCvx_int_double(), getNCvx_int_float(), getNCvx_int_int(), getNCvx_int_long(), getNCvx_int_schar(), getNCvx_int_short(), getNCvx_int_uchar(), getNCvx_schar_double(), getNCvx_schar_float(), getNCvx_schar_int(), getNCvx_schar_long(), getNCvx_schar_schar(), getNCvx_schar_short(), getNCvx_schar_uchar(), getNCvx_short_double(), getNCvx_short_float(), getNCvx_short_int(), getNCvx_short_long(), getNCvx_short_schar(), getNCvx_short_short(), getNCvx_short_uchar(), getShareableColormap(), GRA_drawing_EV(), HandleEvent(), identify_repeats(), initialize(), list_init_data(), main(), menuVisualSetup(), move_recs_r(), move_vars_r(), nc__create_mp(), nc__enddef(), nc__open_mp(), nc_abort(), nc_close(), NC_computeshapes(), nc_copy_att(), nc_copy_var(), nc_def_dim(), nc_def_var(), nc_del_att(), nc_delete_mp(), nc_enddef(), NC_endef(), nc_get_att(), nc_get_att_double(), nc_get_att_float(), nc_get_att_int(), nc_get_att_long(), nc_get_att_schar(), nc_get_att_short(), nc_get_att_text(), nc_get_att_uchar(), nc_get_NC(), nc_get_rec(), nc_get_var1(), nc_get_var1_double(), nc_get_var1_float(), nc_get_var1_int(), nc_get_var1_long(), nc_get_var1_schar(), nc_get_var1_short(), nc_get_var1_text(), nc_get_var1_uchar(), nc_get_var_double(), nc_get_var_float(), nc_get_var_int(), nc_get_var_long(), nc_get_var_schar(), nc_get_var_short(), nc_get_var_text(), nc_get_var_uchar(), nc_get_vara(), nc_get_vara_double(), nc_get_vara_float(), nc_get_vara_int(), nc_get_vara_long(), nc_get_vara_schar(), nc_get_vara_short(), nc_get_vara_text(), nc_get_vara_uchar(), nc_get_varm(), nc_get_varm_double(), nc_get_varm_float(), nc_get_varm_int(), nc_get_varm_long(), nc_get_varm_schar(), nc_get_varm_short(), nc_get_varm_text(), nc_get_varm_uchar(), nc_inq(), nc_inq_att(), nc_inq_attid(), nc_inq_attlen(), nc_inq_attname(), nc_inq_atttype(), nc_inq_base_pe(), nc_inq_dim(), nc_inq_dimid(), nc_inq_dimlen(), nc_inq_dimname(), nc_inq_natts(), nc_inq_ndims(), nc_inq_nvars(), nc_inq_rec(), nc_inq_unlimdim(), nc_inq_var(), nc_inq_vardimid(), nc_inq_varid(), nc_inq_varname(), nc_inq_varnatts(), nc_inq_varndims(), nc_inq_vartype(), NC_lookupattr(), nc_put_att_double(), nc_put_att_float(), nc_put_att_int(), nc_put_att_long(), nc_put_att_schar(), nc_put_att_short(), nc_put_att_text(), nc_put_att_uchar(), nc_put_rec(), nc_put_var1(), nc_put_var1_double(), nc_put_var1_float(), nc_put_var1_int(), nc_put_var1_long(), nc_put_var1_schar(), nc_put_var1_short(), nc_put_var1_text(), nc_put_var1_uchar(), nc_put_var_double(), nc_put_var_float(), nc_put_var_int(), nc_put_var_long(), nc_put_var_schar(), nc_put_var_short(), nc_put_var_text(), nc_put_var_uchar(), nc_put_vara(), nc_put_vara_double(), nc_put_vara_float(), nc_put_vara_int(), nc_put_vara_long(), nc_put_vara_schar(), nc_put_vara_short(), nc_put_vara_text(), nc_put_vara_uchar(), nc_put_varm(), nc_put_varm_double(), nc_put_varm_float(), nc_put_varm_int(), nc_put_varm_long(), nc_put_varm_schar(), nc_put_varm_short(), nc_put_varm_text(), nc_put_varm_uchar(), nc_redef(), nc_rename_att(), nc_rename_dim(), nc_rename_var(), nc_set_base_pe(), nc_set_fill(), nc_sync(), ncabort(), ncattcopy(), ncattdel(), ncattget(), ncattinq(), ncattname(), ncattput(), ncattrename(), ncclose(), NCcoordck(), nccreate(), ncdimdef(), ncdimid(), ncdiminq(), ncdimrename(), ncendef(), NCfillrecord(), ncinquire(), ncio_close(), ncio_create(), ncio_ffio_get(), ncio_ffio_move(), ncio_ffio_rel(), ncio_open(), ncio_px_move(), ncio_px_sync(), ncio_spx_get(), ncio_spx_move(), ncio_spx_rel(), ncopen(), ncrecget(), NCrecget(), ncrecinq(), ncrecput(), NCrecput(), ncredef(), ncsetfill(), ncsync(), ncvardef(), ncvarget(), ncvarget1(), ncvargetg(), ncvargets(), ncvarid(), ncvarinq(), ncvarput(), ncvarput1(), ncvarputg(), ncvarputs(), ncvarrename(), NCvnrecs(), ncx_check(), ncx_encode(), ncx_getn_double_float(), ncx_getn_double_int(), ncx_getn_double_long(), ncx_getn_double_schar(), ncx_getn_double_short(), ncx_getn_double_uchar(), ncx_getn_float_double(), ncx_getn_float_int(), ncx_getn_float_long(), ncx_getn_float_schar(), ncx_getn_float_short(), ncx_getn_float_uchar(), ncx_getn_int_double(), ncx_getn_int_float(), ncx_getn_int_schar(), ncx_getn_int_short(), ncx_getn_int_uchar(), ncx_getn_short_double(), ncx_getn_short_float(), ncx_getn_short_int(), ncx_getn_short_long(), ncx_getn_short_schar(), ncx_getn_short_uchar(), ncx_pad_getn_short_double(), ncx_pad_getn_short_float(), ncx_pad_getn_short_int(), ncx_pad_getn_short_long(), ncx_pad_getn_short_schar(), ncx_pad_getn_short_short(), ncx_pad_getn_short_uchar(), ncx_pad_putn_schar_double(), ncx_pad_putn_schar_float(), ncx_pad_putn_schar_int(), ncx_pad_putn_schar_long(), ncx_pad_putn_schar_short(), ncx_pad_putn_short_double(), ncx_pad_putn_short_float(), ncx_pad_putn_short_int(), ncx_pad_putn_short_long(), ncx_pad_putn_short_schar(), ncx_pad_putn_short_short(), ncx_pad_putn_short_uchar(), ncx_put_float_double(), ncx_put_int_double(), ncx_put_int_float(), ncx_put_NC(), ncx_put_short_double(), ncx_put_short_float(), ncx_putn_double_float(), ncx_putn_double_int(), ncx_putn_double_long(), ncx_putn_double_schar(), ncx_putn_double_short(), ncx_putn_double_uchar(), ncx_putn_float_double(), ncx_putn_float_float(), ncx_putn_float_int(), ncx_putn_float_long(), ncx_putn_float_schar(), ncx_putn_float_short(), ncx_putn_float_uchar(), ncx_putn_int_double(), ncx_putn_int_float(), ncx_putn_int_int(), ncx_putn_int_long(), ncx_putn_int_schar(), ncx_putn_int_short(), ncx_putn_int_uchar(), ncx_putn_schar_double(), ncx_putn_schar_float(), ncx_putn_schar_int(), ncx_putn_schar_long(), ncx_putn_schar_short(), ncx_putn_short_double(), ncx_putn_short_float(), ncx_putn_short_int(), ncx_putn_short_long(), ncx_putn_short_schar(), ncx_putn_short_short(), ncx_putn_short_uchar(), NCxvarcpy(), normal_p2t(), normal_t2p(), p1get_const(), pipe_color_transformer(), poisson_p2t(), poisson_t2p(), putNCvx_char_char(), putNCvx_double_double(), putNCvx_double_float(), putNCvx_double_int(), putNCvx_double_long(), putNCvx_double_schar(), putNCvx_double_short(), putNCvx_double_uchar(), putNCvx_float_double(), putNCvx_float_float(), putNCvx_float_int(), putNCvx_float_long(), putNCvx_float_schar(), putNCvx_float_short(), putNCvx_float_uchar(), putNCvx_int_double(), putNCvx_int_float(), putNCvx_int_int(), putNCvx_int_long(), putNCvx_int_schar(), putNCvx_int_short(), putNCvx_int_uchar(), putNCvx_schar_double(), putNCvx_schar_float(), putNCvx_schar_int(), putNCvx_schar_long(), putNCvx_schar_schar(), putNCvx_schar_short(), putNCvx_schar_uchar(), putNCvx_short_double(), putNCvx_short_float(), putNCvx_short_int(), putNCvx_short_long(), putNCvx_short_schar(), putNCvx_short_short(), putNCvx_short_uchar(), px_double_buffer(), px_get(), px_pgin(), r_HL_cb_fill(), read_NC(), read_numrecs(), rel_v1hs(), SUMA_getShareableColormap_Eng(), t_getn_double_double(), t_getn_double_float(), t_getn_double_int(), t_getn_double_long(), t_getn_double_schar(), t_getn_double_short(), t_getn_double_uchar(), t_getn_float_double(), t_getn_float_float(), t_getn_float_int(), t_getn_float_long(), t_getn_float_schar(), t_getn_float_short(), t_getn_float_uchar(), t_getn_int_double(), t_getn_int_float(), t_getn_int_int(), t_getn_int_long(), t_getn_int_schar(), t_getn_int_short(), t_getn_int_uchar(), t_getn_schar_double(), t_getn_schar_float(), t_getn_schar_int(), t_getn_schar_long(), t_getn_schar_schar(), t_getn_schar_short(), t_getn_schar_uchar(), t_getn_short_double(), t_getn_short_float(), t_getn_short_int(), t_getn_short_long(), t_getn_short_schar(), t_getn_short_short(), t_getn_short_uchar(), t_pad_getn_schar_double(), t_pad_getn_schar_float(), t_pad_getn_schar_int(), t_pad_getn_schar_long(), t_pad_getn_schar_schar(), t_pad_getn_schar_short(), t_pad_getn_schar_uchar(), t_pad_getn_short_double(), t_pad_getn_short_float(), t_pad_getn_short_int(), t_pad_getn_short_long(), t_pad_getn_short_schar(), t_pad_getn_short_short(), t_pad_getn_short_uchar(), t_pad_putn_schar_double(), t_pad_putn_schar_float(), t_pad_putn_schar_int(), t_pad_putn_schar_long(), t_pad_putn_schar_schar(), t_pad_putn_schar_short(), t_pad_putn_schar_uchar(), t_pad_putn_short_double(), t_pad_putn_short_float(), t_pad_putn_short_int(), t_pad_putn_short_long(), t_pad_putn_short_schar(), t_pad_putn_short_short(), t_pad_putn_short_uchar(), t_putn_double_double(), t_putn_double_float(), t_putn_double_int(), t_putn_double_long(), t_putn_double_schar(), t_putn_double_short(), t_putn_double_uchar(), t_putn_float_double(), t_putn_float_float(), t_putn_float_int(), t_putn_float_long(), t_putn_float_schar(), t_putn_float_short(), t_putn_float_uchar(), t_putn_int_double(), t_putn_int_float(), t_putn_int_int(), t_putn_int_long(), t_putn_int_schar(), t_putn_int_short(), t_putn_int_uchar(), t_putn_schar_double(), t_putn_schar_float(), t_putn_schar_int(), t_putn_schar_long(), t_putn_schar_schar(), t_putn_schar_short(), t_putn_schar_uchar(), t_putn_short_double(), t_putn_short_float(), t_putn_short_int(), t_putn_short_long(), t_putn_short_schar(), t_putn_short_short(), t_putn_short_uchar(), take_file_name(), threshold_data(), v1h_get_NC_attr(), v1h_get_NC_attrarray(), v1h_get_NC_attrV(), v1h_get_NC_dim(), v1h_get_NC_dimarray(), v1h_get_NC_string(), v1h_get_nc_type(), v1h_get_NC_var(), v1h_get_NC_vararray(), v1h_get_NCtype(), v1h_get_size_t(), v1h_put_NC_attr(), v1h_put_NC_attrarray(), v1h_put_NC_attrV(), v1h_put_NC_dim(), v1h_put_NC_dimarray(), v1h_put_NC_string(), v1h_put_nc_type(), v1h_put_NC_var(), v1h_put_NC_vararray(), v1h_put_NCtype(), v1h_put_size_t(), VPBug(), VPComputeScanRuns(), write_NC(), and write_numrecs().

V = spm_create_image(V)
 

Definition at line 85 of file GE_convertADW.m.

vol_str = sprintf('000%d',i)
 

Definition at line 82 of file GE_convertADW.m.

Z Voxels volSize = [Nx Ny Nz]
 

Definition at line 54 of file GE_convertADW.m.

Read in the volume[imageVol, lastfile]
 

Initial value:

 GE_readVolume(inDir, passnum, volSize, ...
                                       pix_hdr.img_depth, im_offset)

Definition at line 77 of file GE_convertADW.m.

Referenced by attach_sub_brick(), do_xrestore_stuff(), read_volume(), thd_mask_from_brick(), write_3dtime(), write_bucket_data(), and write_ts_array().

 

Powered by Plone

This site conforms to the following standards: