Doxygen Source Code Documentation
WriteBrikHEAD.m File Reference
Go to the source code of this file.
Functions | |
cleanup fields generated by BrikInfo that are irrelevant to AFNI | if (isfield(Info, 'RootName')) |
end | if (isfield(Info, 'TypeName')) |
end | if (isfield(Info, 'TypeBytes')) |
end | if (isfield(Info, 'ByteOrder')) |
end | if (isfield(Info, 'Orientation')) |
end | if (isfield(Info, '')) |
end reset the you ll create one here | if (isfield(Info, 'IDCODE_STRING')) |
if (fidout< 0) | |
errordlg (ErrMessage) | |
for (i=1:1:Fld_num) | |
switch (RulesType) | |
ischar(Fld_Val | Fld_isstrn () |
elseif (isstruct(Fld_Val)) | |
elseif (isint(Fld_Val)) | |
end write them out | fprintf (fidout,'\ntype=%s\n', Fld_Type) |
fprintf (fidout,'name=%s\n', Fld_Name) | |
fprintf (fidout,'count=%g\n', Fld_Count) | |
if (Fld_isstrn) | |
fprintf (fidout,'%s\n', stmp) | |
print out values per line | fprintf (fidout, '\t%g\t%g\t%g\t%g\t%g\n', Fld_Val) |
if (rem(npts, 5)) | |
fprintf (fidout,'\n') | |
end end end | fclose (fidout) |
Variables | |
function [err, ErrMessage] | |
a structure detailed in function BrikInfo Output | Parameters |
a structure detailed in function BrikInfo Output or | warning |
a structure detailed in function BrikInfo Output or but be neat it won t hurt The fields generated by BrikInfo are removed here see the files | BrikInfo |
a structure detailed in function BrikInfo Output or but be neat it won t hurt The fields generated by BrikInfo are removed here see the files | CheckBrikHEAD |
a structure detailed in function BrikInfo Output or but be neat it won t hurt The fields generated by BrikInfo are removed here see the files WriteBrik | NOTE |
a structure detailed in function BrikInfo Output or but be neat it won t hurt The fields generated by BrikInfo are removed here see the files WriteBrik there is no option to replace a certain field The entire HEAD is rewritten each time version | Author |
a structure detailed in function BrikInfo Output or but be neat it won t hurt The fields generated by BrikInfo are removed here see the files WriteBrik there is no option to replace a certain field The entire HEAD is rewritten each time version Bethesda Maryland | FUNCTION_VERSION = 'V2.0' |
Define the function name for easy referencing | FuncName = 'WriteBrikHEAD' |
Debug Flag | DBG = 1 |
Csep = filesep | |
initailize return variables | err = 1 |
ErrMessage = '' | |
cleanup fields generated by BrikInfo that are irrelevant to AFNI | Info = rmfield(Info,'RootName') |
end reset the | IDcode |
end reset the | eventually |
end setup a new date Info | IDCODE_DATE = datestr(now,0) |
add the generating code version Info | GEN_SOURCE = sprintf('WriteBrik matlab library functions %s (please report bugs to ziad@nih.gov)', FUNCTION_VERSION) |
fidout = fopen(FileName, 'w') | |
return | |
end | Fld_Allnames = fieldnames(Info) |
Fld_num = size(Fld_Allnames,1) | |
Fld_Name = char(Fld_Allnames(i)) | |
Fld_Val = getfield(Info, Fld_Name) | |
Fld_isstrn = 0 | |
RulesType = HEAD_Rules(Fld_Name) Rules.isNum | |
Fld_Type = 'string-attribute' | |
Fld_Count = length(Fld_Val)+1 | |
end | case |
otherwise | |
string to write | out |
string to write do what Bob seems to do | stmp = sprintf('''%s~',Fld_Val) |
else write out five values per | line |
else write out five values per if field is a | matrix |
else write out five values per if field is a reshape it to a Nx1 vector | nsz = size(Fld_Val) |
npts = nsz(1).*nsz(2) |
Function Documentation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Variable Documentation
|
Definition at line 1 of file WriteBrikHEAD.m. |
|
Definition at line 1 of file WriteBrikHEAD.m. |
|
Definition at line 133 of file WriteBrikHEAD.m. |
|
Definition at line 1 of file WriteBrikHEAD.m. |
|
Definition at line 60 of file WriteBrikHEAD.m. |
|
Definition at line 59 of file WriteBrikHEAD.m. |
|
Definition at line 161 of file WriteBrikHEAD.m. |
|
Definition at line 138 of file WriteBrikHEAD.m. |
|
Definition at line 75 of file WriteBrikHEAD.m. |
|
Definition at line 87 of file WriteBrikHEAD.m. |
|
Definition at line 92 of file WriteBrikHEAD.m. |
|
Definition at line 136 of file WriteBrikHEAD.m. |
|
Definition at line 125 of file WriteBrikHEAD.m. |
|
Definition at line 96 of file WriteBrikHEAD.m. |
|
Definition at line 93 of file WriteBrikHEAD.m. |
|
Definition at line 135 of file WriteBrikHEAD.m. |
|
Definition at line 152 of file WriteBrikHEAD.m. |
|
Definition at line 56 of file WriteBrikHEAD.m. |
|
Initial value: WriteBrikHEAD (FileName, Info) % % [err, ErrMessage] = WriteBrikHEAD (FnameHEAD, Info) % %Purpose: % Create the header file for an AFNI Brik % % %Input Parameters: % FnameHEAD the name of the header file % Info Definition at line 1 of file WriteBrikHEAD.m. |
|
Definition at line 53 of file WriteBrikHEAD.m. |
|
Definition at line 84 of file WriteBrikHEAD.m. |
|
Definition at line 75 of file WriteBrikHEAD.m. |
|
Definition at line 81 of file WriteBrikHEAD.m. |
|
Definition at line 77 of file WriteBrikHEAD.m. |
|
Definition at line 149 of file WriteBrikHEAD.m. |
|
Definition at line 149 of file WriteBrikHEAD.m. |
|
Definition at line 1 of file WriteBrikHEAD.m. |
|
|
Definition at line 151 of file WriteBrikHEAD.m. Referenced by THD_mask_fillin_once(). |
|
Definition at line 137 of file WriteBrikHEAD.m. |
|
|
Definition at line 1 of file WriteBrikHEAD.m. |
|
Definition at line 163 of file WriteBrikHEAD.m. |
|
Definition at line 100 of file WriteBrikHEAD.m. |
|
Definition at line 146 of file WriteBrikHEAD.m. |
|
Definition at line 1 of file WriteBrikHEAD.m. Referenced by colormap_diversity(), colormap_median_cut(), find_background(), input_stream(), merge_colormap_if_possible(), new_viewer(), parse_geometry(), pipe_color_transformer(), print_useless_options(), read_colormap_file(), and redundant_option_warning(). |