Doxygen Source Code Documentation
Norm.m File Reference
Go to the source code of this file.
Functions | |
Originally dClipLevel was used to generate a cliplevel for each then a step function chops off those voxel outside of the brain But due to the concern of losing the sensitive amygdala and orbitofrontal it might be better to run which is roughly equivalent to dClipLevel but would protect amygdala and orbitofrontal cortex regions from being masked create command for executing dAutomask | if (run_mask.do==1) |
fprintf (2, '\nRunning:%s\n', automask) | |
fprintf (foutid_log, '%s\n', automask) | |
if (s) | |
fprintf (2,'Error during 3dAutomask:\n\n%s\n\n', w) | |
while (1) | |
fprintf (2,'Halted:Ctrl+c to exit') | |
If no do masking | if (run_norm==0) |
fprintf (2, '\nRunning:%s\n', mask_signal) | |
fprintf (foutid_log, '%s\n', mask_signal) | |
fprintf (2,'Error during 3dcalc:\n\n%s\n\n', w) | |
for (i=1:1:N_runs) | |
fprintf (2, '\nRunning:%s\n', get_mean) | |
fprintf (foutid_log, '%s\n', get_mean) | |
fprintf (2,'Error at running 3dTstat:\n\n\n%s\n', w) | |
fprintf (2, '\nRunning:%s\n', norm_signal) | |
fprintf (foutid_log, '%s\n', norm_signal) | |
end Concatenate all runs back together | fprintf (2, '\nRunning:%s\n', concat) |
fprintf (foutid_log, '%s\n', concat) | |
fprintf (2,'Error during running 3dTcat:\n\n%s\n\n', w) | |
end end end Don t forget to remove those temporary files above | fprintf (2, '\nRemoving:%s\n', rm_cmmd) |
fprintf (foutid_log, '%s\n', rm_cmmd) | |
fprintf (2,'Error during rm:\n\n%s\n\n', w) | |
Variables | |
function [err, out_fn] | |
Bethesda Maryland Define the function name for easy referencing | FuncName = 'Norm' |
Debug Flag | DBG = 1 |
initailize return variables | err = 1 |
rm_cmmd = AfniPrefix (InBrik) 'rm -f ' | |
Originally dClipLevel was used to generate a cliplevel for each | run |
Originally dClipLevel was used to generate a cliplevel for each then a step function chops off those voxel outside of the brain But due to the concern of losing the sensitive amygdala and orbitofrontal | cortex |
Originally dClipLevel was used to generate a cliplevel for each then a step function chops off those voxel outside of the brain But due to the concern of losing the sensitive amygdala and orbitofrontal it might be better to run | dAutomask |
Originally dClipLevel was used to generate a cliplevel for each then a step function chops off those voxel outside of the brain But due to the concern of losing the sensitive amygdala and orbitofrontal it might be better to run which is roughly equivalent to dClipLevel but would protect amygdala and orbitofrontal cortex regions from being masked create command for executing dAutomask | automask_fn = sprintf('%s_msk', InBrikPrefix) |
automask = sprintf('3dAutomask -dilate %i -prefix %s %s%s', run_mask.N_dilate, automask_fn, InBrikPrefix, InBrikView) | |
pause | |
If no | normalization |
If no do masking | out_fn = sprintf('%s_mask', InBrikPrefix) |
mask_signal = sprintf('3dcalc -fscale -a %s%s \\\n', InBrikPrefix, InBrikView) | |
concat = sprintf('3dTcat -prefix %s ', out_fn) | |
store each mean dataset in a temporary | file |
store each mean dataset in a temporary and delete it before leaving this function | mean_fn = sprintf('%s_mean%i', InBrikPrefix, i) |
get_mean = sprintf('3dTstat -mean -prefix %s %s%s''[%i..%i]''', mean_fn, InBrikPrefix, InBrikView, run(i).first, run(i).last) | |
end end normalizing | norm_signal = sprintf('3dcalc -datum float -a %s%s''[%i..%i]'' \\\n', InBrikPrefix, InBrikView, run(i).first, run(i).last) |
end | norm_out_fn = sprintf('%s_norm%i', InBrikPrefix, i) |
return |
Function Documentation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Variable Documentation
|
Definition at line 53 of file Norm.m. Referenced by main(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Initial value: Norm (InBrik, N_runs, run, run_norm, run_mask, foutid_log) % % [err, norm_fn] = Norm(InBrik, N_runs, run) % %Purpose: % % Normalize the original dataset so that the beta values in 3dDeconvolve would be automatically percent signal change. % %Input Parameters: % % % %Output Parameters: % err : 0 No Problem % : 1 Problems % % % %Key Terms: % %More Info : % % % % % Author : Gang Chen % Date : Mon Oct 20 11:26:38 EDT 2003 % SSCC/NIMH/ National Institutes of Health |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|