|
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
end elseif |
( |
Opt. |
method = = 2 |
) |
|
|
detrend fprintf |
( |
1 |
, |
|
|
'\nDetrending...' |
|
|
) |
|
|
end load data fprintf |
( |
1 |
, |
|
|
'\nLoading Brick...' |
|
|
) |
|
|
end check and read the input file fprintf |
( |
1 |
, |
|
|
'\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 |
|
) |
|
|
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) |
) |
|
|
end plot |
( |
V(1,:) |
, |
|
|
'r' |
|
|
) |
|
|
Variable Documentation
for mean for linear trend (default) % .Verbose Debug Flag DBG = 1 |
|
|
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. |
|
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(). |
|
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(). |
V = detrend(V','constant') |
|
|