Skip to content

AFNI/NIfTI Server

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

Doxygen Source Code Documentation


m3dReorder.m File Reference

Go to the source code of this file.


Functions

check for options if (nargin< 4)
end if (~isfield(Opt,'Dup')|isempty(Opt.Dup))
end if (~isfield(Opt,'Detrend')|isempty(Opt.Detrend))
end if (~isfield(Opt,'Verbose')|isempty(Opt.Verbose))
end check for valid parameters if (~eq_str(Opt.Dup,'Col')&~eq_str(Opt.Dup,'Ave'))
 if (status==0)
end check and read the input
file 
if (Opt.Verbose)
end check and read the input
file 
fprintf (1,'\nLoading &Sorting Mapfile...')
 fclose (fid)
 for (i=1:1:N_inl)
 if (sall(ipos)~= '#'&~isempty(sword))
vsall_sort(1:20,:)%ikeep(1 if (err)
end if (Info.SCENE_DATA(2)~=2)
end make sure length of time
series is OK 
if (Info.DATASET_RANK(2)~=size(vsall, 1))
end load data fprintf (1,'\nLoading Brick...')
end figure (1)
 subplot (211)
 plot (V(1,:), 'b')
detrend fprintf (1,'\nDetrending...')
 elseif (Opt.Detrend==2)
 elseif (Opt.Detrend~=0)
end plot (V(1,:), 'r')
 subplot (212)
 plot (Vo(1,:))
Info_o DATASET_RANK (2)
Info_o TAXIS_NUMS (1:2)
remove time offset because
it s meaningless when you
scramble the data Write out
results 
fprintf (1,'\nWriting Brick...')

Variables

 function [err]
for mean only
for mean for linear trend(default)%.Verbose Debug Flag DBG = 1
initailize return variables err = 1
check for options Opt Dup = 'Col'
Opt Detrend = 2
Opt Verbose = 0
 return
end check the prefix [status, Prefix] = PrefixStatus(Prefix)
end fid = fopen (Mapfile,'ro')
 sall = fscanf(fid,'%c')
load the file into a cell
string search for Newlines 
inl = find (sall == 10)
 N_inl = length(inl)
fill in sall to call
fill in sall to ignoring icell = 1
 ipos = 1
 vsall = ''
 iend = inl(i) -1
 sword = sall(ipos:iend)
end sort the results [vsall_sort, i_sort] = sortrows (vsall)
find the ignore points ikeep = find (vsall_sort(:,1) ~= '-')
 imap = i_sort(ikeep)
end OK
end OptR Format = 'vector'
 clf
end V = detrend(V','constant')
hold on
drawnow pause Now the output
brick 
is
drawnow pause update the header Info_o = Info
Info_o RootName = ''
Info_o IDCODE_STRING = ''
Info_o IDCODE_DATE = ''
Info_o TAXIS_OFFSETS = []
Info_o BRICK_FLOAT_FACS = []
Info_o BRICK_STATS = []
Info_o BRICK_TYPES = Info.BRICK_TYPES(imap)
end OptW Scale = 1
OptW Prefix = Prefix
OptW AppendHistory = 1
OptW NoCheck = 1

Function Documentation

Info_o DATASET_RANK  ) 
 

elseif Opt.Detrend = 0  ) 
 

end elseif Opt.  method = = 2  ) 
 

fclose fid   ) 
 

end figure  ) 
 

for = 1:1:N_inl  ) 
 

remove time offset because it s meaningless when you scramble the data Write out results fprintf ,
'\nWriting Brick...' 
 

detrend fprintf ,
'\nDetrending...' 
 

end load data fprintf ,
'\nLoading Brick...' 
 

end check and read the input file fprintf ,
'\nLoading &Sorting Mapfile...' 
 

end make sure length of time series is OK if Info.DATASET_RANK(2)~  = size(vsall,1)  ) 
 

end if Info.SCENE_DATA(2)~  = 2  ) 
 

vsall_sort (1:20,:) %ikeep(1 if err   ) 
 

if sall(ipos)~  = '#' & ~isempty(sword)  ) 
 

end check and read the input file if Opt.  Verbose  ) 
 

if status  = = 0  ) 
 

end check for valid parameters if eq_str(Opt.Dup,'Col')&~eq_str(Opt.Dup,'Ave')  ) 
 

end if isfield(Opt,'Verbose')|isempty(Opt.Verbose)  ) 
 

end if isfield(Opt,'Detrend')|isempty(Opt.Detrend)  ) 
 

end if isfield(Opt,'Dup')|isempty(Opt.Dup)  ) 
 

check for options if  ) 
 

plot Vo(1,:)   ) 
 

end plot V(1,:)  ,
'r
 

plot V(1,:)  ,
'b
 

subplot 212   ) 
 

subplot 211   ) 
 

Info_o TAXIS_NUMS 1:2   ) 
 


Variable Documentation

OptW AppendHistory = 1
 

Definition at line 156 of file m3dReorder.m.

Info_o BRICK_FLOAT_FACS = []
 

Definition at line 146 of file m3dReorder.m.

Info_o BRICK_STATS = []
 

Definition at line 147 of file m3dReorder.m.

Info_o BRICK_TYPES = Info.BRICK_TYPES(imap)
 

Definition at line 148 of file m3dReorder.m.

fill in sall to call
 

Definition at line 74 of file m3dReorder.m.

Referenced by ISQ_handle_keypress(), MCW_choose_CB(), mkfunct(), SUMA_cb_set_threshold(), SUMA_cb_set_threshold_label(), SUMA_cb_SwitchCmap(), and SUMA_resize().

clf
 

Definition at line 121 of file m3dReorder.m.

Referenced by done(), dsort(), and popinclude().

for mean for linear trend (default) % .Verbose Debug Flag DBG = 1
 

Definition at line 42 of file m3dReorder.m.

end Opt Detrend = 2
 

Definition at line 51 of file m3dReorder.m.

end Opt Dup = 'Col'
 

Definition at line 50 of file m3dReorder.m.

end err = 1
 

Definition at line 161 of file m3dReorder.m.

end fid = fopen (Mapfile,'ro')
 

Definition at line 66 of file m3dReorder.m.

end OptR Format = 'vector'
 

Definition at line 117 of file m3dReorder.m.

function[err]
 

Initial value:

 m3dReorder (Input, Prefix, Mapfile, Opt)
%
%   [err] = m3dReorder (Input, Prefix, Mapfile, Opt)
%
%Purpose:
%   Reorders a time series data set (3D+time) a la AFNI plugin Reorder   
%   
%   
%Input Parameters:
%
%   Input: Input of 3d+time brick
%   Prefix: prefix of output data set
%   Mapfile: Name of map file
%   Opt is the options structure with the following fields
%       .Dup : [Col]/Ave Collate(default) or Average the multiple
%             instances in the map file. 
%     .Detrend : 0/1/[2] Linear trend removal. 0 for none

Definition at line 1 of file m3dReorder.m.

fill in sall to ignoring icell = 1
 

Definition at line 75 of file m3dReorder.m.

Info_o IDCODE_DATE = ''
 

Definition at line 144 of file m3dReorder.m.

Info_o IDCODE_STRING = ''
 

Definition at line 143 of file m3dReorder.m.

iend = inl(i) -1
 

Definition at line 79 of file m3dReorder.m.

Referenced by comlr2_(), comqr2_(), and MAIN__().

find the ignore points ikeep = find (vsall_sort(:,1) ~= '-')
 

Definition at line 92 of file m3dReorder.m.

drawnow pause Now the output brick imap = i_sort(ikeep)
 

Definition at line 137 of file m3dReorder.m.

Referenced by INTERP_destroy(), INTERP_evaluate(), INTERP_setup_linear(), main(), SUMA_readFSannot(), and SUMA_ShowOffset_Info().

drawnow pause update the header Info_o = Info
 

Definition at line 141 of file m3dReorder.m.

load the file into a cell string search for Newlines inl = find (sall == 10)
 

Definition at line 72 of file m3dReorder.m.

end ipos = 1
 

Definition at line 85 of file m3dReorder.m.

Referenced by B2F_get_subv(), BUCK_get_subv(), get_token__(), grow_build_string(), MCW_get_intlist(), mri_read_stuff(), parser_(), TCAT_get_subv(), THD_datablock_apply_atr(), THD_datablock_from_atr(), and THD_set_dataset_attributes().

drawnow pause Now the output brick is
 

Definition at line 137 of file m3dReorder.m.

N_inl = length(inl)
 

Definition at line 73 of file m3dReorder.m.

OptW NoCheck = 1
 

Definition at line 157 of file m3dReorder.m.

end OK
 

Definition at line 115 of file m3dReorder.m.

hold on
 

Definition at line 133 of file m3dReorder.m.

Referenced by f__canseek(), f__isdev(), and TAG_onoff().

for mean only
 

Definition at line 1 of file m3dReorder.m.

OptW Prefix = Prefix
 

Definition at line 155 of file m3dReorder.m.

end check the prefix[status, Prefix] = PrefixStatus(Prefix)
 

Definition at line 61 of file m3dReorder.m.

Referenced by AFNI_find_jpegs(), ambiguity_error(), applyMask(), colormap_info(), comment_info(), create_bucket(), DCM_FormatElements(), EDIT_dset_items(), get_options(), imsized_fname(), init_MCW_sizes(), ISQ_snapfile(), main(), match(), MCW_file_expand(), NI_read_file_nohead(), PBAR_labelize(), PERMTEST_main(), print_options(), put_one_arg(), save_ppm(), saveMask(), SUMA_AfniExists(), SUMA_BrainVoyager_Read_vmr(), SUMA_OpenDX_Read_CruiseVolHead(), SUMA_Prefix2SurfaceName(), temp_name(), THD_datablock_apply_atr(), THD_datablock_from_atr(), THD_deplus_prefix(), THD_init_alldir_datablocks(), THD_init_one_datablock(), THD_open_1D(), THD_open_3D(), THD_open_3dcalc(), THD_open_analyze(), THD_open_ctfmri(), THD_open_ctfsam(), THD_open_minc(), THD_open_mpeg(), THD_open_nifti(), THD_warp3D(), THD_warp3D_affine(), THD_warp3D_mni2tta(), THD_warp3D_tta2mni(), THD_zeropad(), THRESH_main(), WINsorize(), write_one_ts(), write_results(), write_table(), and XSAVE_output().

end sort the results[vsall_sort, i_sort] = sortrows (vsall)
 

Definition at line 89 of file m3dReorder.m.

Referenced by AFNI_vol2surf_func_overlay().

return
 

Definition at line 162 of file m3dReorder.m.

Info_o RootName = ''
 

Definition at line 142 of file m3dReorder.m.

sall = fscanf(fid,'%c')
 

Definition at line 67 of file m3dReorder.m.

end OptW Scale = 1
 

Definition at line 154 of file m3dReorder.m.

sword = sall(ipos:iend)
 

Definition at line 80 of file m3dReorder.m.

Info_o TAXIS_OFFSETS = []
 

Definition at line 145 of file m3dReorder.m.

V = detrend(V','constant')
 

Definition at line 129 of file m3dReorder.m.

end Opt Verbose = 0
 

Definition at line 52 of file m3dReorder.m.

Not a comment vertically concatenate the strings vsall = ''
 

Definition at line 83 of file m3dReorder.m.

 

Powered by Plone

This site conforms to the following standards: