|
Doxygen Source Code Documentation
CheckBrikHEAD.m File Reference
Go to the source code of this file.
|
Functions |
check if the mandatory fields
are present | for (im=1:1:N_Mandatory) |
| if (~isfield(Info, CurName)) |
| warndlg (ErrMessage) |
| if (err) |
| errordlg (ErrMessage) |
auto checks and cleanup of
empty fields | for (ir=1:1:N_Rules) |
auto checks and cleanup of
empty fields | fprintf (1,'Checking%s...', Rules(ir).Name) |
Check that all the Remaining
Fields are OK | if (isfield(Info, Rules(ir).Name)) |
Check that all the Remaining
Fields are OK | if (isempty(getfield(Info, Rules(ir).Name))) |
Check that all the Remaining
Fields are OK | fprintf (1,'Empty.\n') |
else | fprintf (1,'Not Empty.\n') |
check for type coherence | if (ischar(getfield(Info, Rules(ir).Name))) |
check for type coherence | if (Rules(ir).isNum) |
end end check for length specs | if (~isempty(Rules(ir).Length)) |
end end check for length specs | if (length(getfield(Info, Rules(ir).Name))~=Rules(ir).Length) |
end end check for minimum
length specs | if (~isempty(Rules(ir).minLength)) |
end end check for minimum
length specs | if (length(getfield(Info, Rules(ir).Name))< Rules(ir).minLength) |
end end end end end Further
Field specfic checks For Mandatory
Fields | if (Info.DATASET_RANK(1)~=3) |
| v (1:length(Info.DATASET_RANK)) |
| v (1:length(Info.DATASET_DIMENSIONS)) |
| for (il=1:1:length(List)) |
end | if (s~=1) |
end | if (Info.SCENE_DATA(1)< 0|Info.SCENE_DATA(1) > 2) |
end | if (Info.SCENE_DATA(2)< 0|Info.SCENE_DATA(2) > 11) |
end | if (Info.SCENE_DATA(3)< 0|Info.SCENE_DATA(3) > 3) |
end | if (Info.ORIENT_SPECIFIC(1)< 0|Info.ORIENT_SPECIFIC(1) > 5) |
end For remaining fields | if (isfield(Info, 'BRICK_STATS')) |
end For remaining fields | if (length(Info.BRICK_STATS)~=2.*Info.DATASET_RANK(2)) |
end end | if (isfield(Info, 'BRICK_TYPES')) |
end end | if (length(Info.BRICK_TYPES)~=Info.DATASET_RANK(2)) |
end end | if (isfield(Info, 'BRICK_FLOAT_FACS')) |
end end | if (length(Info.BRICK_FLOAT_FACS)~=Info.DATASET_RANK(2)) |
end end | if (isfield(Info, 'TAXIS_NUMS')) |
end end | if (~isfield(Info, 'TAXIS_FLOATS')) |
end | if (Info.TAXIS_NUMS(1)~=Info.DATASET_RANK(2)) |
end | if (Info.TAXIS_NUMS(2)&(~isfield(Info,'TAXIS_OFFSETS')|isempty(Info.TAXIS_OFFSETS))) |
end end | if (isfield(Info, 'IDCODE_DATE')) |
end end | if (length(Info.IDCODE_DATE) > 46) |
end end | if (isfield(Info, 'BYTEORDER_STRING')) |
end end | if (~strcmp(Info.BYTEORDER_STRING, 'LSB_FIRST')&~strcmp(Info.BYTEORDER_STRING, 'MSB_FIRST')) |
end end | if (isfield('BRICK_LABS')&(WordCount(Info.BRICK_LABS, '~')~=Info.DATASET_RANK(2))) |
end | if (isfield(Info, 'NOTES_COUNT')&(Info.NOTES_COUNT< 0|Info.NOTES_COUNT > 999)) |
end | if (isfield(Info, 'WARP_TYPE')&(Info.WARP_TYPE(1)~=0 &Info.WARP_TYPE(1)~=1)) |
end | if (isfield(Info, 'WARP_DATA')) |
end | if (rem(length(Info.WARP_DATA), 30)) |
end end | if (isfield(Info, 'MARKS_FLAGS')) |
end end | if (Info.MARKS_FLAGS(1)~=1 &Info.MARKS_FLAGS(1)~=2) |
end | if (Info.MARKS_FLAGS(2)~=1) |
end end | if (isfield(Info, 'TAGSET_NUM')) |
end end | if (Info.TAGSET_NUM(1) > 100) |
end end | if (isfield(Info, 'TAGSET_NUM')&isfield(Info, 'TAGSET_FLOATS')) |
end end | if (length(Info.TAGSET_FLOATS)~=(Info.TAGSET_NUM(1).*Info.TAGSET_NUM(2))) |
end end | if (isfield(Info, 'TAGSET_NUM')&isfield(Info, 'TAGSET_LABELS')) |
end end | if (WordCount(Info.TAGSET_LABELS, '~')~=Info.TAGSET_NUM(1)) |
end end | if (~isempty(unique(setdiff(Info.BRICK_TYPES,[0 1 3 5])))) err |
end end checks on the rotate
fields | if (isfield(Info, 'VOLREG_ROTCOM_NUM')) |
| if (eval([spad])) |
end end end check on the NOT_NUMBER_
fields | if (~isfield(Info, 'NOTES_COUNT')&isfield(Info, 'NOTE_NUMBER_001')) |
end check on the HISTORY field | if (isfield(Info, 'HISTORY_NOTE')) |
| if (~isempty(intersect([13 10 34 9 7 11 8], vtmp))) |
Variables |
| function [err, ErrMessage, Info] |
Output | Parameters |
Output but with the empty
optional fields trimmed out
Key | Terms |
Output but with the empty
optional fields trimmed out
Key Bethesda Maryland Define
the function name for easy
referencing | FuncName = 'CheckBrikHEAD' |
Debug Flag | DBG = 1 |
initailize return variables | err = 1 |
| ErrMessage = '' |
Mandatory Fields Specs | MandatoryFieldNames = 'DATASET_RANK~DATASET_DIMENSIONS~TYPESTRING~SCENE_DATA~ORIENT_SPECIFIC~ORIGIN~DELTA' |
| N_Mandatory = WordCount(MandatoryFieldNames, '~') |
check if the mandatory fields
are present Check that all
the Mandatory Fields have
been | specified [err, CurName] = GetWord(MandatoryFieldNames, im, '~') |
| return |
end end Now Get all the | rules [err, ErrMessage, Rules] = HEAD_Rules |
end | N_Rules = length(Rules) |
remove this field if it is | empty |
remove this field if it is
this reduces the clutter of
the ascii HEAD file | Info = rmfield(Info, Rules(ir).Name) |
end else a | number |
end | v = zeros(1,8) |
Info | DATASET_RANK = v |
Info | DATASET_DIMENSIONS = v |
end | List = {'3DIM_HEAD_ANAT', '3DIM_HEAD_FUNC', '3DIM_GEN_ANAT', '3DIM_GEN_FUNC'} |
| s = 0 |
end end checks on the rotate
fields | sp = pad_strn(num2str(i-1), '0', 6, 1) |
| spad = sprintf('~isfield(Info, ''VOLREG_MATVEC_%s'') | isempty(Info.VOLREG_MATVEC_%s) | ischar(Info.VOLREG_MATVEC_%s) | length(Info.VOLREG_MATVEC_%s) ~= 12', sp, sp, sp, sp) |
end check on the HISTORY field | vtmp = unique(double(Info.HISTORY_NOTE)) |
Function Documentation
for |
( |
il |
= 1:1:length(List) |
) |
|
|
else fprintf |
( |
1 |
, |
|
|
'Not Empty.\n' |
|
|
) |
|
|
Check that all the Remaining Fields are OK fprintf |
( |
1 |
, |
|
|
'Empty.\n' |
|
|
) |
|
|
auto checks and cleanup of empty fields fprintf |
( |
1 |
, |
|
|
'Checking%s...' |
, |
|
|
Rules(ir). |
Name |
|
) |
|
|
if |
( |
~ |
isempty(intersect([13 10 34 9 7 11 8], vtmp)) |
) |
|
|
end end end check on the NOT_NUMBER_ fields if |
( |
~ |
isfield(Info, 'NOTES_COUNT')&isfield(Info, 'NOTE_NUMBER_001') |
) |
|
|
end end if |
( |
~ |
isempty(unique(setdiff(Info.BRICK_TYPES,[0 1 3 5]))) |
) |
|
|
end end if |
( |
Info. |
TAGSET_NUM(1), |
|
|
100 |
|
|
) |
|
|
end end if |
( |
~ |
strcmp(Info.BYTEORDER_STRING, 'LSB_FIRST')&~strcmp(Info.BYTEORDER_STRING, 'MSB_FIRST') |
) |
|
|
end if |
( |
Info. |
TAXIS_NUMS(2)&(~isfield(Info,'TAXIS_OFFSETS')|isempty(Info.TAXIS_OFFSETS)) |
) |
|
|
end if |
( |
Info.TAXIS_NUMS(1)~ |
= Info.DATASET_RANK(2) |
) |
|
|
end end if |
( |
~ |
isfield(Info, 'TAXIS_FLOATS') |
) |
|
|
end end if |
( |
length(Info.BRICK_FLOAT_FACS)~ |
= Info.DATASET_RANK(2) |
) |
|
|
end For remaining fields if |
( |
length(Info.BRICK_STATS)~ |
= 2.*Info.DATASET_RANK(2) |
) |
|
|
end if |
( |
Info.SCENE_DATA(3)< 0|Info.SCENE_DATA(3) > |
3 |
) |
|
|
end if |
( |
Info.SCENE_DATA(2)< 0|Info.SCENE_DATA(2) > |
11 |
) |
|
|
end if |
( |
Info.SCENE_DATA(1)< 0|Info.SCENE_DATA(1) > |
2 |
) |
|
|
end end end end end Further Field specfic checks For Mandatory Fields if |
( |
Info.DATASET_RANK(1)~ |
= 3 |
) |
|
|
end end check for minimum length specs if |
( |
~ |
isempty(Rules(ir).minLength) |
) |
|
|
end end check for length specs if |
( |
~ |
isempty(Rules(ir).Length) |
) |
|
|
end else a verify type if |
( |
Rules(ir). |
isNum = = 1 & ~isint(getfield(Info, Rules(ir).Name)) |
) |
|
|
check for type coherence if |
( |
ischar(getfield(Info, Rules(ir).Name)) |
|
) |
|
|
Check that all the Remaining Fields are OK if |
( |
isempty(getfield(Info, Rules(ir).Name)) |
|
) |
|
|
Check that all the Remaining Fields are OK if |
( |
isfield(Info, Rules(ir).Name) |
|
) |
|
|
if |
( |
~ |
isfield(Info, CurName) |
) |
|
|
v |
( |
1: |
length(Info.DATASET_DIMENSIONS) |
) |
|
|
v |
( |
1: |
length(Info.DATASET_RANK) |
) |
|
|
Variable Documentation
|
Definition at line 83 of file CheckBrikHEAD.m.
Referenced by add_frame(), check_for_valid_inputs(), do_fio(), do_lio(), do_ud(), do_uio(), do_us(), explode_filename(), l_read(), l_write(), printNumber(), SetSlicesPerFrame(), stop_number(), WaitForOutputFile(), and x_wsne(). |
|
Definition at line 102 of file ErrEval.m.
Referenced by addunder(), adjust_pointer_in_string(), ap_end(), append_build_string(), apply_3shear(), apply_xshear(), apply_yshear(), apply_zshear(), apser(), balanc_(), balbak_(), basym(), bfrac(), bgrat(), binomial_p2t(), binomial_t2p(), bisect_(), blast_data(), bqr_(), builtin(), c_name(), calc_covariance(), calc_QuadrantCC(), calc_SpearmanCC(), calc_stat(), calculate_results(), calculate_sum(), cbabk2_(), cbal_(), cdfbin(), cdfnbn(), cdfpoi(), cdiv_(), cds(), cfft(), check_for_valid_inputs(), check_SUMA_surface(), cinvit_(), cl1_fort(), cl1_solve(), cl1_solve_res(), Clp_VaOptionError(), cmp_surf_usage(), coarsen(), color_init(), comblock(), comlen(), consnegop(), conssgn(), convci(), convic(), copyn(), copys(), cpstring(), create_bucket(), create_gert_script(), csroot_(), cumbin(), cumnbn(), cumpoi(), dataname(), Daubechies_forward_FWT_1d(), Daubechies_forward_FWT_2d(), Daubechies_forward_pass_1d(), Daubechies_forward_pass_2d(), Daubechies_inverse_FWT_1d(), Daubechies_inverse_FWT_2d(), Daubechies_inverse_pass_1d(), Daubechies_inverse_pass_2d(), DC_init_im_col(), DC_spectrum_AJJ(), DC_spectrum_ZSS(), dclerr(), DCM_AddElementList(), DCM_GetString(), decode_mcu(), decode_mcu_AC_first(), decode_mcu_AC_refine(), decode_mcu_DC_first(), doequiv(), doinclude(), e_d(), erf1(), erfc1(), err(), err66(), err__fl(), errext(), erri(), errl(), errstr(), evaluate_span(), execerr(), explode_filename(), f__fatal(), f__isdev(), f_list(), f_open(), f_s(), fatalstr(), file_block_getter(), fileinit(), flush_comments(), fmt_init(), fmtname(), fold(), form_clusters(), fpser(), fwd_strcpy(), FWT_1d_filter(), gaminv(), ge4_validate_header(), get_options(), getAndMoveToFrontDecode(), getarg_(), getname(), Gif_CopyString(), gran1_(), gran2_(), gran_(), gratio(), gt_num(), gts_surface_suma(), h_indx(), Haar_forward_FWT_1d(), Haar_forward_FWT_2d(), Haar_forward_pass_1d(), Haar_forward_pass_2d(), Haar_inverse_FWT_1d(), Haar_inverse_FWT_2d(), Haar_inverse_pass_1d(), Haar_inverse_pass_2d(), Haar_ip_FFWT_1d(), Haar_ip_IFWT_1d(), handle_args(), hash(), hqr2_(), hqr_(), htrib3_(), htribk_(), I_args(), i_indx(), i_tem(), idisp_ge4_series_header(), Ims_rot(), imtql1_(), imtql2_(), imtqlv_(), incbeta_inverse(), init_fdct(), initkey(), intrcall(), intrfunct(), invit_(), ioset(), ioseta(), l_put(), l_R(), list_arg_types(), listargs(), main(), malloc(), many(), mapVRtoASCII(), matrix_sprint(), matrix_sqrt(), mem(), memname(), memset(), memversion(), min_different_chars(), minfit_(), mkbitcon(), mkext(), mkext1(), mklhs(), mkname(), mkplace(), mkstrcon(), mri_drawtext(), ne_d(), new_arg_length(), new_iob_data(), nl_init(), opconv_fudge(), open_URL_http(), out_addr(), out_init(), outbuf_adjust(), output_rbrace(), pad(), pars_f(), parse_hex_color_channel(), Pfile(), plotpak_srface(), poisson_p2t(), poisson_t2p(), ppmd_text(), print_all_clusters(), print_cluster(), printNumber(), process(), process_voxel(), ps_label(), ps_linemod(), Ptoken(), putcall(), puthead(), putio(), pythag_(), qh_checkflags(), qh_init_qhull_command(), qh_initflags(), qh_initthresholds(), qh_printhyperplaneintersection(), qh_printsummary(), qh_readfeasible(), qh_readpoints(), qh_setfeasible(), qh_strtod(), qh_strtol(), qzhes_(), qzit_(), qzval_(), qzvec_(), ratqr_(), rd_F(), rd_H(), rd_I(), rd_L(), rd_POS(), rd_Z(), read_Pfiles(), read_URL_ftp(), record_block_getter(), reference_fwd_dct(), refine(), Resample(), s_paus(), s_stop(), safe_puts(), ScaleColors(), set_tmp_names(), set_volume_stats(), setdata(), setfmt(), show_run_stats(), sig_die(), srface_(), SUMA_All_Programs(), SUMA_Build_Cluster_From_Node(), SUMA_BuildMessageLog(), SUMA_cb_moreSumaInfo(), SUMA_cb_moreSurfInfo(), SUMA_cb_moreViewerInfo(), SUMA_ClusterCenterofMass(), SUMA_ColorizePlane(), SUMA_ColorMapVec_Info(), SUMA_ColorOverlayPlane_Info(), SUMA_ColorVec_Info(), SUMA_CommonFieldsInfo(), SUMA_comp_str_2_NI_str_ar(), SUMA_CreateTextShell(), SUMA_DsetColLabelCopy(), SUMA_DsetInfo(), SUMA_Engine(), SUMA_FormatMessage(), SUMA_FormSOListToSendToAFNI(), SUMA_FS_ColorTable_Info(), SUMA_Get_Sub_String(), SUMA_Help_AllSurfCont(), SUMA_help_basics(), SUMA_help_Cmap_message_Info(), SUMA_help_message(), SUMA_help_message_Info(), SUMA_help_talk(), SUMA_HighlightBox(), SUMA_Householder(), SUMA_input(), SUMA_InsertDsetPointer(), SUMA_isNumString(), SUMA_IV_FaceSetsextract(), SUMA_IV_XYZextract(), SUMA_JumpFocusFace(), SUMA_JumpFocusNode(), SUMA_JumpIndex(), SUMA_JumpXYZ(), SUMA_LoadSegDO(), SUMA_LookAtCoordinates(), SUMA_M2M_node_Info(), SUMA_mattoquat(), SUMA_Mesh_Resample(), SUMA_New_Additions(), SUMA_New_Additions_perver(), SUMA_NI_str_ar_2_comp_str(), SUMA_ParseLHS_RHS(), SUMA_PlaneOrder_Info(), SUMA_Print_PlaneOrder(), SUMA_Print_Surface_Object(), SUMA_process_NIML_data(), SUMA_Read_SpecFile(), SUMA_Read_SureFit_Param(), SUMA_ReadNumStdin(), SUMA_ReadSegDO(), SUMA_ReportDrawnROIDatumLength(), SUMA_ScaleToMapOpt_Info(), SUMA_SetLight0(), SUMA_SetNumForeSmoothing(), SUMA_Show_ColorOverlayPlanes(), SUMA_Show_CommonFields(), SUMA_Show_FS_ColorTable(), SUMA_Show_NI_str_ar(), SUMA_Show_OpenDX_Struct(), SUMA_Show_SurfaceViewer_Struct(), SUMA_Show_SurfClust_list(), SUMA_Show_SurfClust_list_Info(), SUMA_Show_ViewState(), SUMA_Show_VolPar(), SUMA_ShowMeSome(), SUMA_ShowOffset_Info(), SUMA_ShowOffset_ll_Info(), SUMA_ShowScaleToMapOpt(), SUMA_ShowSpecStruct(), SUMA_sources_Info(), SUMA_SpecStructInfo(), SUMA_StretchToFitLeCerveau(), SUMA_StringToNum(), SUMA_SureFit_Read_Coord(), SUMA_SureFit_Read_Topo(), SUMA_Surface_Curvature(), SUMA_SurfaceObject_Info(), SUMA_SurfaceViewer_StructInfo(), SUMA_UpdateViewerTitle(), SUMA_Version(), SUMA_ViewStateInfo(), SUMA_VolPar_Info(), SumaToGts(), svd_(), svd_double(), system_(), teapot(), terminate(), tinvit_(), to_upper(), tostring(), tql1_(), tql2_(), tqli(), tqlrat_(), trbak1_(), trbak3_(), tridib_(), trimunder(), tsturm_(), unamstring(), unclassifiable(), usage_3dBRAIN_VOYAGERtoAFNI(), usage_3dCRUISEtoAFNI(), usage_3dSurfMask(), usage_PROGRAM_NAME(), usage_SUMA_coarsen(), usage_SUMA_SampBias(), usage_SurfToSurf(), UTL_SqueezeBlanks(), vector_sprint(), vprint(), vpScale(), warn(), warn1(), warni(), write_ioblocks(), write_typedefs(), wrt_AP(), wrt_E(), wrt_F(), wrt_H(), wrt_Z(), x_wsne(), Xgamm(), yyerror(), and yyparse(). |
spad = sprintf('~isfield(Info, ''VOLREG_MATVEC_%s'') | isempty(Info.VOLREG_MATVEC_%s) | ischar(Info.VOLREG_MATVEC_%s) | length(Info.VOLREG_MATVEC_%s) ~= 12', sp, sp, sp, sp) |
|
|