Skip to content

AFNI/NIfTI Server

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

Doxygen Source Code Documentation


Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Search  

Amalloc.h File Reference

Go to the source code of this file.


Defines

#define AFMALL(typ, siz)   (typ*) calloc(1,siz)
#define AFREALL(v, typ, siz)   (typ*) realloc((void*)v,sizeof(typ)*(siz))
#define AFFREE(v)   free((void*)v)
#define AFNI_CALL_0D_function(func, nar, far)
#define AFNI_CALL_1D_function(func, nar, d1, d2, far)
#define AFNI_CALL_1D_funcstr(func, nar, d1, d2, far, str)
#define AFNI_CALL_1D_funcmrim(func, mage)
#define AFNI_CALL_1D_funcmrimstr(func, mage, str)
#define AFNI_CALL_2D_function(func, n1, n2, d1, d2, far)
#define AFNI_CALL_proj_function(func, n, far, val)
#define AFNI_CALL_fim_function(func, n, ts, ud, nb, vv)
#define AFNI_CALL_VOID_1ARG(func, typ1, arg1)
#define AFNI_CALL_VALU_1ARG(func, vtyp, vval, typ1, arg1)
#define AFNI_CALL_VOID_2ARG(func, typ1, arg1, typ2, arg2)
#define AFNI_CALL_VALU_2ARG(func, vtyp, vval, typ1, arg1, typ2, arg2)
#define AFNI_CALL_VOID_3ARG(func, typ1, arg1, typ2, arg2, typ3, arg3)
#define AFNI_CALL_VALU_3ARG(func, vtyp, vval, typ1, arg1, typ2, arg2, typ3, arg3)
#define AFNI_CALL_VOID_4ARG(func, typ1, arg1, typ2, arg2, typ3, arg3, typ4, arg4)
#define AFNI_CALL_VALU_4ARG(func, vtyp, vval, typ1, arg1, typ2, arg2, typ3, arg3, typ4, arg4)
#define AFNI_CALL_VOID_7ARG(func, typ1, arg1, typ2, arg2, typ3, arg3, typ4, arg4, typ5, arg5, typ6, arg6, typ7, arg7)

Define Documentation

#define AFFREE v       free((void*)v)
 

Replacement for free().

Definition at line 22 of file Amalloc.h.

#define AFMALL typ,
siz       (typ*) calloc(1,siz)
 

Replacement for malloc().

Definition at line 12 of file Amalloc.h.

Referenced by AFNI_find_jpegs(), AFNI_init_plugouts(), AFNI_logger(), AFNI_parse_args(), AFNI_receive_init(), AFNI_version_check(), COMPRESS_add_suffix(), COMPRESS_filecode(), COMPRESS_filename(), COMPRESS_fopen_read(), COMPRESS_fopen_write(), copySequence(), csfft_cox(), DCM_GetString(), extract_bytes_from_file(), F1D_init(), F2D_init(), get_options(), GRA_drawing_EV(), iochan_fork_relay(), ISQ_butsave_EV(), ISQ_saver_CB(), ISQ_setup_ppmto_filters(), main(), mpeg_setup(), mri_imcount_dicom(), mri_imcount_mpeg(), mri_read_ascii(), mri_read_ascii_ragged(), mri_read_dicom(), mri_read_mpeg(), mri_read_stuff(), mri_write_analyze(), my_fgets(), open_MCW_imseq(), PARSER_generate_code(), read_URL_ftp(), read_URL_http(), read_URL_tmpdir(), RWC_printf(), SER_new_vector(), setup_mri_write_angif(), T3D_check_outliers(), THD_alloc_datablock(), THD_dataset_info(), THD_fetch_dataset(), THD_get_dset_row(), THD_init_session(), THD_load_1D(), THD_load_3D(), THD_load_analyze(), THD_load_ctfmri(), THD_load_ctfsam(), THD_load_datablock(), THD_load_minc(), THD_load_mpeg(), THD_load_nifti(), THD_mask_clust(), THD_mask_fillin_once(), THD_open_analyze(), THD_open_minc(), THD_set_dataset_attributes(), THD_write_minc(), THD_zzprintf(), tross_Append_History(), tross_breakup_string(), tross_commandline(), tross_datetime(), tross_hostname(), tross_multi_Append_History(), tross_username(), TT_load_atlas(), TT_whereami(), UNIQ_idcode(), UTL_GetTimeStamp(), and xxx_name_to_inet().

#define AFNI_CALL_0D_function func,
nar,
far   
 

Value:

do{ void (*fp)(int,float *) = (void (*)(int,float *))(func) ;  \
     if( fp != NULL )                                           \
      fp( (nar) , (far) ) ;                                     \
 } while(0)
Cast a function pointer to the right prototype and call it, for 0D transformations.

Definition at line 28 of file Amalloc.h.

Referenced by AFNI_func_overlay(), F1D_chainfunc(), F2D_chainfunc(), ISQ_process_mri(), mri_rgb_transform_nD(), plot_graphs(), and text_graphs().

#define AFNI_CALL_1D_funcmrim func,
mage   
 

Value:

do{ void (*fp)(MRI_IMAGE *) = (void (*)(MRI_IMAGE *))(func) ;  \
     if( fp != NULL )                                           \
      fp(mage) ;                                                \
 } while(0)
Cast a function pointer to the right prototype and call it, for 1D transformations of images.

Definition at line 61 of file Amalloc.h.

Referenced by plot_graphs().

#define AFNI_CALL_1D_funcmrimstr func,
mage,
str   
 

Value:

do{ void (*fp)(MRI_IMAGE *,char **) =                          \
      (void (*)(MRI_IMAGE *,char **))(func) ;                   \
     if( fp != NULL )                                           \
      fp(mage,(char **)&(str)) ;                                \
 } while(0)
Cast a function pointer to the right prototype and call it, for 1D transformations of images that also return a pointer to a string.

Definition at line 72 of file Amalloc.h.

Referenced by plot_graphs().

#define AFNI_CALL_1D_funcstr func,
nar,
d1,
d2,
far,
str   
 

Value:

do{ void (*fp)(int,double,double,float *,char **) =            \
      (void (*)(int,double,double,float *,char**))(func) ;      \
     if( fp != NULL )                                           \
      fp(nar,(double)d1,(double)d2,far,(char **)&(str)) ;       \
 } while(0)
Cast a function pointer to the right prototype and call it, for 1D transformations that also return a pointer to a string.

Definition at line 50 of file Amalloc.h.

Referenced by plot_graphs().

#define AFNI_CALL_1D_function func,
nar,
d1,
d2,
far   
 

Value:

do{ void (*fp)(int,double,double,float *) =                    \
      (void (*)(int,double,double,float *))(func) ;             \
     if( fp != NULL )                                           \
      fp(nar,(double)d1,(double)d2,far) ;                       \
 } while(0)
Cast a function pointer to the right prototype and call it, for 1D transformations.

Definition at line 38 of file Amalloc.h.

Referenced by F1D_chainfunc(), and plot_graphs().

#define AFNI_CALL_2D_function func,
n1,
n2,
d1,
d2,
far   
 

Value:

do{ void (*fp)(int,int,double,double,float *) =                \
      (void (*)(int,int,double,double,float *))(func) ;         \
     if( fp != NULL )                                           \
      fp( (n1),(n2),(double)(d1),(double)(d2),far ) ;           \
 } while(0)
Cast a function pointer to the right prototype and call it, for 2D transformations.

Definition at line 83 of file Amalloc.h.

Referenced by AFNI_func_overlay(), F2D_chainfunc(), ISQ_process_mri(), and mri_rgb_transform_nD().

#define AFNI_CALL_fim_function func,
n,
ts,
ud,
nb,
vv   
 

Value:

do{ void (*fp)(int,float *,void *,int,void *) =               \
      (void (*)(int,float *,void *,int,void *))(func) ;        \
     if( fp != NULL )                                          \
       fp(n,ts,(void *)(ud),nb,(void *)(vv)) ;                 \
 } while(0)
Cast a function pointer to the right prototype and call it, for FIM functions.

Definition at line 104 of file Amalloc.h.

Referenced by AFNI_fimmer_compute().

#define AFNI_CALL_proj_function func,
n,
far,
val   
 

Value:

do{ float (*fp)(int,float *) = (float (*)(int,float *))(func); \
     if( fp != NULL ) (val) = fp(n,far) ;                       \
 } while(0)
Cast a function pointer to the right prototype and call it, for projections. The output value is assigned to "val".

Definition at line 95 of file Amalloc.h.

Referenced by ISQ_getimage().

#define AFNI_CALL_VALU_1ARG func,
vtyp,
vval,
typ1,
arg1   
 

Value:

do{ vtyp (*fp)(typ1) = (vtyp (*)(typ1))(func) ;              \
     if( fp != NULL )                                         \
      (vval) = fp((typ1)(arg1)) ;                             \
 } while(0)

Definition at line 125 of file Amalloc.h.

Referenced by PLUG_action_CB(), PLUG_read_plugin(), and PLUG_startup_plugin_CB().

#define AFNI_CALL_VALU_2ARG func,
vtyp,
vval,
typ1,
arg1,
typ2,
arg2   
 

Value:

do{ vtyp (*fp)(typ1,typ2) = (vtyp (*)(typ1,typ2))(func) ;      \
     if( fp != NULL )                                           \
      (vval) = fp((typ1)(arg1),(typ2)(arg2)) ;                  \
 } while(0)

Definition at line 139 of file Amalloc.h.

Referenced by AV_assign_fval(), AV_assign_ival(), COND_ExtractConditions(), LST_Sort(), PLUTO_popup_dset_chooser(), RT_process_image(), and RT_tell_afni_one().

#define AFNI_CALL_VALU_3ARG func,
vtyp,
vval,
typ1,
arg1,
typ2,
arg2,
typ3,
arg3   
 

Value:

do{ vtyp (*fp)(typ1,typ2,typ3) = (vtyp (*)(typ1,typ2,typ3))(func) ;      \
     if( fp != NULL )                                                     \
      (vval) = fp((typ1)(arg1),(typ2)(arg2),(typ3)(arg3)) ;               \
 } while(0)

Definition at line 153 of file Amalloc.h.

Referenced by ISQ_getimage(), ISQ_getlabel(), ISQ_getmemplot(), ISQ_getoverlay(), ISQ_setup_new(), ISQ_statistics_WP(), and open_MCW_imseq().

#define AFNI_CALL_VALU_4ARG func,
vtyp,
vval,
typ1,
arg1,
typ2,
arg2,
typ3,
arg3,
typ4,
arg4   
 

Value:

do{ vtyp (*fp)(typ1,typ2,typ3,typ4) = (vtyp (*)(typ1,typ2,typ3,typ4))(func) ;      \
     if( fp != NULL )                                                               \
      (vval) = fp((typ1)(arg1),(typ2)(arg2),(typ3)(arg3),(typ4)(arg4)) ;            \
 } while(0)

Definition at line 167 of file Amalloc.h.

#define AFNI_CALL_VOID_1ARG func,
typ1,
arg1   
 

Value:

do{ void (*fp)(typ1) = (void (*)(typ1))(func) ;              \
     if( fp != NULL )                                         \
      fp((typ1)(arg1)) ;                                      \
 } while(0)

Definition at line 118 of file Amalloc.h.

Referenced by donebut_CB(), ENV_main(), MCW_textwin_CB(), MCW_textwinkill_CB(), PLUG_dotimeout_CB(), and PLUTO_imseq_send_CB().

#define AFNI_CALL_VOID_2ARG func,
typ1,
arg1,
typ2,
arg2   
 

Value:

do{ void (*fp)(typ1,typ2) = (void (*)(typ1,typ2))(func) ;   \
     if( fp != NULL )                                        \
      fp((typ1)(arg1),(typ2)(arg2)) ;                        \
 } while(0)

Definition at line 132 of file Amalloc.h.

Referenced by AP_timer_CB(), AV_textact_CB(), AV_timer_CB(), AVOPT_press_CB(), COND_PushCondition(), GRAF_curve_CB(), GRAF_drawing_EV(), GRAF_handle_CB(), GRAF_reset_CB(), and optmenu_finalize().

#define AFNI_CALL_VOID_3ARG func,
typ1,
arg1,
typ2,
arg2,
typ3,
arg3   
 

Value:

do{ void (*fp)(typ1,typ2,typ3) = (void (*)(typ1,typ2,typ3))(func) ; \
     if( fp != NULL )                                                \
      fp((typ1)(arg1),(typ2)(arg2),(typ3)(arg3)) ;                   \
 } while(0)

Definition at line 146 of file Amalloc.h.

Referenced by MCW_choose_CB(), and PLUG_finalize_user_dset_CB().

#define AFNI_CALL_VOID_4ARG func,
typ1,
arg1,
typ2,
arg2,
typ3,
arg3,
typ4,
arg4   
 

Value:

do{ void (*fp)(typ1,typ2,typ3,typ4) = (void (*)(typ1,typ2,typ3,typ4))(func); \
     if( fp != NULL )                                                         \
      fp((typ1)(arg1),(typ2)(arg2),(typ3)(arg3),(typ4)(arg4)) ;               \
 } while(0)

Definition at line 160 of file Amalloc.h.

Referenced by AFNI_process_alteration(), AFNI_process_drawing(), AFNI_process_drawnotice(), AFNI_process_dsetchange(), AFNI_process_funcdisplay(), AFNI_process_redisplay(), AFNI_process_timeindex(), AFNI_process_viewpoint(), AFNI_receive_destroy(), analyze_results(), full_model(), and RAN_setup().

#define AFNI_CALL_VOID_7ARG func,
typ1,
arg1,
typ2,
arg2,
typ3,
arg3,
typ4,
arg4,
typ5,
arg5,
typ6,
arg6,
typ7,
arg7   
 

Value:

do{ void (*fp)(typ1,typ2,typ3,typ4,typ5,typ6,typ7) = (void (*)(typ1,typ2,typ3,typ4,typ5,typ6,typ7))(func) ;      \
     if( fp != NULL )                                                               \
      fp((typ1)(arg1),(typ2)(arg2),(typ3)(arg3),(typ4)(arg4),(typ5)(arg5),(typ6)(arg6),(typ7)(arg7)) ;            \
 } while(0)

Definition at line 174 of file Amalloc.h.

#define AFREALL v,
typ,
siz       (typ*) realloc((void*)v,sizeof(typ)*(siz))
 

Replacement for realloc().

Definition at line 17 of file Amalloc.h.

Referenced by AFNI_receive_init(), read_mincdim(), read_URL_http(), RWC_printf(), THD_extract_array(), THD_get_all_filenames(), THD_zfillin_byte(), tross_Append_History(), tross_commandline(), and tross_multi_Append_History().

 

Powered by Plone

This site conforms to the following standards: