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  

afni_plugin_CYGWIN.h

Go to the documentation of this file.
00001 /**************************************************/
00002 /*! Stuff to make DLLs work as plugins on CYGWIN. */
00003 /**************************************************/
00004 
00005 #ifdef CYGWIN   /**** only use this stuff in CYGWIN ****/
00006 
00007 #include "mri_render.h"
00008 #include "mcw_graf.h"
00009 #include "parser.h"
00010 
00011 #ifdef BG_INSIDE_AFNI  /*--- this stuff is actuated in AFNI itself ---*/
00012 
00013 #define NUM_BG_array (sizeof(BG_array)/sizeof(void *))
00014 
00015 static void *BG_array[] = {        /* Array of pointers to functions */
00016     (void *)AFNI_add_interruptable ,       /* and data inside AFNI that some */
00017     (void *)AFNI_can_transform_vector ,    /* plugin needs to do its job.    */
00018     (void *)AFNI_controller_index ,        /* If you add something here, be  */
00019     (void *)AFNI_controller_label ,        /* sure to add it in the stuff    */
00020     (void *)AFNI_force_adoption ,          /* below, as well.                */
00021     (void *)AFNI_hintize_pbar ,
00022     (void *)AFNI_initialize_view ,
00023     (void *)AFNI_jumpto_dicom ,
00024     (void *)AFNI_make_descendants ,
00025     (void *)AFNI_modify_viewing ,
00026     (void *)AFNI_needs_dset_ijk ,
00027     (void *)AFNI_palette_label_CB ,
00028     (void *)AFNI_process_drawnotice ,
00029     (void *)AFNI_process_interrupts ,
00030     (void *)AFNI_purge_unused_dsets ,
00031     (void *)AFNI_range_rotate_av_CB ,
00032     (void *)AFNI_receive_control ,
00033     (void *)AFNI_receive_init ,
00034     (void *)AFNI_register_nD_function ,
00035     (void *)AFNI_set_cursor ,
00036     (void *)AFNI_transform_vector ,
00037     (void *)AV_assign_fval ,
00038     (void *)AV_assign_ival ,
00039     (void *)AV_colsize ,
00040     (void *)AV_format_fval ,
00041     (void *)AV_fval_to_char ,
00042     (void *)DC_rgb_to_ovrgb ,
00043     (void *)DC_yokify ,
00044     (void *)ENV_add_numeric ,
00045     (void *)GRAF_get_setup ,
00046     (void *)GRAF_put_setup ,
00047     (void *)MCW_action_area ,
00048     (void *)MCW_alter_widget_cursor ,
00049     (void *)MCW_av_substring_CB ,
00050     (void *)MCW_choose_integer ,
00051     (void *)MCW_choose_ovcolor ,
00052     (void *)MCW_choose_string ,
00053     (void *)MCW_choose_strlist ,
00054     (void *)MCW_expose_widget ,
00055     (void *)MCW_histo_bytes ,
00056     (void *)MCW_invert_widget ,
00057     (void *)MCW_pbar_to_mri ,
00058     (void *)MCW_popdown_meter ,
00059     (void *)MCW_popup_message ,
00060     (void *)MCW_popup_meter ,
00061     (void *)MCW_reghelp_children ,
00062     (void *)MCW_reghint_children ,
00063     (void *)MCW_register_help ,
00064     (void *)MCW_register_hint ,
00065     (void *)MCW_set_bbox ,
00066     (void *)MCW_set_meter ,
00067     (void *)MCW_set_widget_label ,
00068     (void *)MCW_val_bbox ,
00069     (void *)MCW_widget_geom ,
00070     (void *)PARSER_evaluate_one ,
00071     (void *)PARSER_evaluate_vector ,
00072     (void *)PARSER_generate_code ,
00073     (void *)PCOR_get_coef ,
00074     (void *)PCOR_get_pcor ,
00075     (void *)PCOR_update_float ,
00076     (void *)PLUTO_4D_to_typed_fim ,
00077     (void *)PLUTO_add_dset ,
00078     (void *)PLUTO_add_hint ,
00079     (void *)PLUTO_beep ,
00080     (void *)PLUTO_commandstring ,
00081     (void *)PLUTO_copy_dset ,
00082     (void *)PLUTO_cpu_time ,
00083     (void *)PLUTO_dset_redisplay ,
00084     (void *)PLUTO_dset_redisplay_mode ,
00085     (void *)PLUTO_elapsed_time ,
00086     (void *)PLUTO_find_dset ,
00087     (void *)PLUTO_fixup_names ,
00088     (void *)PLUTO_force_redisplay ,
00089     (void *)PLUTO_histoplot ,
00090     (void *)PLUTO_imseq_addto ,
00091     (void *)PLUTO_imseq_popim ,
00092     (void *)PLUTO_imseq_rekill ,
00093     (void *)PLUTO_imseq_retitle ,
00094     (void *)PLUTO_popdown_meter ,
00095     (void *)PLUTO_popup_dset_chooser ,
00096     (void *)PLUTO_popup_meter ,
00097     (void *)PLUTO_popup_worker ,
00098     (void *)PLUTO_prefix_ok ,
00099     (void *)PLUTO_register_timeout ,
00100     (void *)PLUTO_register_timeseries ,
00101     (void *)PLUTO_register_workproc ,
00102     (void *)PLUTO_report ,
00103     (void *)PLUTO_scatterplot ,
00104     (void *)PLUTO_set_butcolor ,
00105     (void *)PLUTO_set_meter ,
00106     (void *)PLUTO_set_sequence ,
00107     (void *)PLUTO_set_topshell ,
00108     (void *)PLUTO_string_index ,
00109     (void *)PLUTO_turnoff_options ,
00110     (void *)RWC_visibilize_CB ,
00111     (void *)RWC_visibilize_widget ,
00112     (void *)TTRR_get_params ,
00113     (void *)add_dataset_to_PLUGIN_interface ,
00114     (void *)add_number_to_PLUGIN_interface ,
00115     (void *)add_option_to_PLUGIN_interface ,
00116     (void *)add_string_to_PLUGIN_interface ,
00117     (void *)add_timeseries_to_PLUGIN_interface ,
00118     (void *)alter_MCW_pbar ,
00119     (void *)alter_PLUGIN_strval_width ,
00120     (void *)drive_MCW_grapher ,
00121     (void *)drive_MCW_imseq ,
00122     (void *)free_PCOR_references ,
00123     (void *)free_PCOR_voxel_corr ,
00124     (void *)get_PLUGIN_strval ,
00125     (void *)get_idcode_from_PLUGIN_interface ,
00126     (void *)get_number_from_PLUGIN_interface ,
00127     (void *)get_optiontag_from_PLUGIN_interface ,
00128     (void *)get_string_from_PLUGIN_interface ,
00129     (void *)get_timeseries_from_PLUGIN_interface ,
00130     (void *)load_PBAR_palette_array ,
00131     (void *)make_PLUGIN_dataset_link ,
00132     (void *)new_MCW_arrowval ,
00133     (void *)new_MCW_bbox ,
00134     (void *)new_MCW_colormenu ,
00135     (void *)new_MCW_graf ,
00136     (void *)new_MCW_optmenu ,
00137     (void *)new_MCW_pasgraf ,
00138     (void *)new_MCW_pbar ,
00139     (void *)new_MCW_textwin ,
00140     (void *)new_PCOR_references ,
00141     (void *)new_PCOR_voxel_corr ,
00142     (void *)new_PLUGIN_interface_1999 ,
00143     (void *)new_PLUGIN_strval ,
00144     (void *)open_MCW_imseq ,
00145     (void *)peek_optiontag_from_PLUGIN_interface ,
00146     (void *)redraw_MCW_pasgraf ,
00147     (void *)refit_MCW_optmenu ,
00148     (void *)set_MCW_pasgraf ,
00149     (void *)update_MCW_pbar ,
00150     (void *)update_PCOR_references ,
00151     (void *)THD_coorder_fill ,
00152 
00153     (void *)&GLOBAL_library ,           /* AFNI global data */
00154     (void *)&GLOBAL_argopt ,
00155     (void *)&afni48_pixmap ,
00156     (void *)&afni48_good ,
00157     (void *) TTO_list ,                 /* note: no '&' */
00158 NULL } ;
00159 
00160 /** Send the array of pointers from AFNI to a plugin **/
00161 
00162 static int BG_array_send( DYNAMIC_handle handle )
00163 {
00164    void (*BG_array_receive)() ;
00165 
00166    DYNAMIC_SYMBOL( handle , "BG_array_receive" , BG_array_receive ) ;
00167    if( BG_array_receive == NULL ){
00168      fprintf(stderr,"CYGWIN-ize: can't find symbol BG_array_receive()\n") ;
00169      return -1 ;
00170    }
00171 
00172    BG_array_receive( NUM_BG_array , BG_array ) ;
00173    return 0 ;
00174 }
00175 
00176 #else                  /*--- this stuff is actuated in each plugin ---*/
00177 
00178 /**** Variables to mask the AFNI global functions called from plugins. ****/
00179 
00180 static Boolean (*BG_drive_MCW_grapher)( MCW_grapher * , int , XtPointer ) ;
00181 static Boolean (*BG_drive_MCW_imseq)( MCW_imseq * , int , XtPointer ) ;
00182 static MCW_arrowval * (*BG_new_MCW_arrowval)( Widget , char * , int,int,int,int,int,int , gen_func * , XtPointer , str_func * , XtPointer ) ;
00183 static MCW_arrowval * (*BG_new_MCW_colormenu)( Widget , char * label , MCW_DC * , int , int , int , gen_func * , XtPointer ) ;
00184 static MCW_arrowval * (*BG_new_MCW_optmenu)( Widget , char * , int,int,int,int, gen_func * , XtPointer , str_func * , XtPointer ) ;
00185 static MCW_bbox * (*BG_new_MCW_bbox)( Widget , int , char * lab[] , int , int , XtCallbackProc , XtPointer ) ;
00186 static MCW_graf * (*BG_new_MCW_graf)( Widget wpar , MCW_DC * , char * title , gen_func * cbfunc , void * cbdata ) ;
00187 static MCW_idcode * (*BG_get_idcode_from_PLUGIN_interface)( PLUGIN_interface * ) ;
00188 static MCW_imseq * (*BG_open_MCW_imseq)( MCW_DC * , get_ptr , XtPointer ) ;
00189 static MCW_pasgraf * (*BG_new_MCW_pasgraf)( Widget wpar , MCW_DC * dc , char * title ) ;
00190 static MCW_pbar * (*BG_new_MCW_pbar)( Widget , MCW_DC * , int,int , float,float , gen_func * , XtPointer ) ;
00191 static MCW_textwin * (*BG_new_MCW_textwin)( Widget, char *, int ) ;
00192 static MRI_IMAGE * (*BG_MCW_pbar_to_mri)( MCW_pbar *,int,int ) ;
00193 static MRI_IMAGE * (*BG_get_timeseries_from_PLUGIN_interface)( PLUGIN_interface * ) ;
00194 static PARSER_code * (*BG_PARSER_generate_code)( char * ) ;
00195 static PCOR_references * (*BG_new_PCOR_references)(int) ;
00196 static PCOR_voxel_corr * (*BG_new_PCOR_voxel_corr)(int,int) ;
00197 static PLUGIN_interface * (*BG_new_PLUGIN_interface_1999)( char *, char *, char *, int, cptr_func * , char * ) ;
00198 static PLUGIN_strval * (*BG_new_PLUGIN_strval)( Widget , char * ) ;
00199 static THD_3dim_dataset * (*BG_PLUTO_4D_to_typed_fim)( THD_3dim_dataset * old_dset , char * new_prefix , int new_datum , int ignore , int detrend , generic_func * user_func , void * user_data ) ;
00200 static THD_3dim_dataset * (*BG_PLUTO_copy_dset)( THD_3dim_dataset *, char * ) ;
00201 static THD_3dim_dataset * (*BG_PLUTO_find_dset)( MCW_idcode * ) ;
00202 static THD_fvec3 (*BG_AFNI_transform_vector)( THD_3dim_dataset * , THD_fvec3 , THD_3dim_dataset * ) ;
00203 static TTRR_params * (*BG_TTRR_get_params)(void) ;
00204 static Widget (*BG_MCW_action_area)( Widget , MCW_action_item * , int ) ;
00205 static Widget (*BG_MCW_popup_message)( Widget , char * , int ) ;
00206 static Widget (*BG_MCW_popup_meter)( Widget , int ) ;
00207 static char * (*BG_AFNI_controller_label)( Three_D_View * im3d );
00208 static char * (*BG_AFNI_palette_label_CB)( MCW_arrowval * , XtPointer ) ;
00209 static char * (*BG_AV_format_fval)( float ) ;
00210 static char * (*BG_MCW_av_substring_CB)( MCW_arrowval * , XtPointer ) ;
00211 static char * (*BG_PLUTO_commandstring)( PLUGIN_interface * plint ) ;
00212 static char * (*BG_get_PLUGIN_strval)( PLUGIN_strval * ) ;
00213 static char * (*BG_get_optiontag_from_PLUGIN_interface)( PLUGIN_interface * ) ;
00214 static char * (*BG_get_string_from_PLUGIN_interface)( PLUGIN_interface * ) ;
00215 static char * (*BG_peek_optiontag_from_PLUGIN_interface)( PLUGIN_interface * ) ;
00216 static double (*BG_PARSER_evaluate_one)( PARSER_code *, double atoz[] ) ;
00217 static double (*BG_PLUTO_cpu_time)(void) ;
00218 static double (*BG_PLUTO_elapsed_time)(void) ;
00219 static float  (*BG_get_number_from_PLUGIN_interface)( PLUGIN_interface * ) ;
00220 static int  (*BG_AFNI_jumpto_dicom)( Three_D_View * , float, float, float  ) ;
00221 static int  (*BG_AFNI_needs_dset_ijk)(void) ;
00222 static int  (*BG_MCW_val_bbox)( MCW_bbox * ) ;
00223 static int (*BG_AFNI_can_transform_vector)( THD_3dim_dataset *, THD_3dim_dataset * );
00224 static int (*BG_AFNI_controller_index)( Three_D_View * ) ;
00225 static int (*BG_AFNI_receive_control)( Three_D_View *, int,int, void * ) ;
00226 static int (*BG_AFNI_receive_init)( Three_D_View *, int, gen_func * , void * ) ;
00227 static int (*BG_AV_colsize)() ;
00228 static int (*BG_PLUTO_add_dset)( PLUGIN_interface *, THD_3dim_dataset *, int ) ;
00229 static int (*BG_PLUTO_prefix_ok)( char * ) ;
00230 static int (*BG_PLUTO_string_index)( char * , int , char ** ) ;
00231 static void   (*BG_MCW_choose_integer)( Widget , char * , int,int,int , gen_func *, XtPointer );
00232 static void   (*BG_MCW_choose_ovcolor)( Widget , MCW_DC * , int , gen_func * , XtPointer ) ;
00233 static void   (*BG_MCW_choose_string)( Widget, char *, char *, gen_func *, XtPointer );
00234 static void   (*BG_MCW_choose_strlist)( Widget, char *, int, int, char * strlist[], gen_func *, XtPointer );
00235 static void   (*BG_PLUTO_imseq_addto)( void * , MRI_IMAGE * ) ;
00236 static void   (*BG_PLUTO_imseq_rekill)( void *, generic_func *, void * ) ;
00237 static void   (*BG_PLUTO_imseq_retitle)( void * , char * ) ;
00238 static void * (*BG_PLUTO_imseq_popim)( MRI_IMAGE *, generic_func *, void * ) ;
00239 static void (*BG_AFNI_add_interruptable)( Widget ) ;
00240 static void (*BG_AFNI_force_adoption)( THD_session * , Boolean ) ;
00241 static void (*BG_AFNI_hintize_pbar)( MCW_pbar * ,  float ) ;
00242 static void (*BG_AFNI_initialize_view)( THD_3dim_dataset * , Three_D_View * ) ;
00243 static void (*BG_AFNI_make_descendants)( THD_sessionlist * ) ;
00244 static void (*BG_AFNI_modify_viewing)( Three_D_View * , Boolean ) ;
00245 static void (*BG_AFNI_process_drawnotice)( Three_D_View * ) ;
00246 static void (*BG_AFNI_process_interrupts)( Widget ) ;
00247 static void (*BG_AFNI_purge_unused_dsets)(void) ;
00248 static void (*BG_AFNI_range_rotate_av_CB)( MCW_arrowval *, XtPointer );
00249 static void (*BG_AFNI_register_nD_function)( int , char * , generic_func * , int ) ;
00250 static void (*BG_AFNI_set_cursor)( int ) ;
00251 static void (*BG_AV_assign_fval)( MCW_arrowval * , float ) ;
00252 static void (*BG_AV_assign_ival)( MCW_arrowval * , int ) ;
00253 static void (*BG_AV_fval_to_char)( float , char * ) ;
00254 static void (*BG_DC_rgb_to_ovrgb)( MCW_DC *, int,int *,int,byte *, byte *, byte *) ;
00255 static void (*BG_DC_yokify)( Widget , MCW_DC * ) ;
00256 static void (*BG_ENV_add_numeric)( char * , char * , int , int , int , int , generic_func * ) ;
00257 static void (*BG_GRAF_get_setup)( MCW_graf * , int * , int * , int * , int * ) ;
00258 static void (*BG_GRAF_put_setup)( MCW_graf * , int   , int * , int * , int   ) ;
00259 static void (*BG_MCW_alter_widget_cursor)( Widget,int , char * , char * ) ;
00260 static void (*BG_MCW_expose_widget)( Widget ) ;
00261 static void (*BG_MCW_histo_bytes)( int nb , byte * bar , int * har ) ;
00262 static void (*BG_MCW_invert_widget)( Widget ) ;
00263 static void (*BG_MCW_popdown_meter)( Widget ) ;
00264 static void (*BG_MCW_reghelp_children)( Widget , char * ) ;
00265 static void (*BG_MCW_reghint_children)( Widget , char * ) ;
00266 static void (*BG_MCW_register_help)( Widget , char * ) ;
00267 static void (*BG_MCW_register_hint)( Widget , char * ) ;
00268 static void (*BG_MCW_set_bbox)( MCW_bbox * , int ) ;
00269 static void (*BG_MCW_set_meter)( Widget , int ) ;
00270 static void (*BG_MCW_set_widget_label)( Widget , char * ) ;
00271 static void (*BG_MCW_widget_geom)( Widget , int * , int * , int * , int * ) ;
00272 static void (*BG_PARSER_evaluate_vector)( PARSER_code * pc, double  * atoz[], int nv, double vout[] ) ;
00273 static void (*BG_PCOR_get_coef)(PCOR_references *, PCOR_voxel_corr *, float *) ;
00274 static void (*BG_PCOR_get_pcor)(PCOR_references *, PCOR_voxel_corr *, float *) ;
00275 static void (*BG_PCOR_update_float)( float * , PCOR_references * , PCOR_voxel_corr * ) ;
00276 static void (*BG_PLUTO_add_hint)( PLUGIN_interface * , char * ) ;
00277 static void (*BG_PLUTO_beep)(void) ;
00278 static void (*BG_PLUTO_dset_redisplay)( THD_3dim_dataset * ) ;
00279 static void (*BG_PLUTO_dset_redisplay_mode)( THD_3dim_dataset * , int ) ;
00280 static void (*BG_PLUTO_fixup_names)(void) ;
00281 static void (*BG_PLUTO_force_redisplay)( void ) ;
00282 static void (*BG_PLUTO_histoplot)( int, float, float, int *, char *, char *, char * , int,int ** ) ;
00283 static void (*BG_PLUTO_popdown_meter)( PLUGIN_interface * ) ;
00284 static void (*BG_PLUTO_popup_dset_chooser)( Widget, int, int, int_func *, void_func *, void * ) ;
00285 static void (*BG_PLUTO_popup_meter)( PLUGIN_interface * ) ;
00286 static void (*BG_PLUTO_popup_worker)( PLUGIN_interface * , char * , int ) ;
00287 static void (*BG_PLUTO_register_timeout)( int, generic_func *, XtPointer ) ;
00288 static void (*BG_PLUTO_register_timeseries)( char * , MRI_IMAGE * ) ;
00289 static void (*BG_PLUTO_register_workproc)( XtWorkProc , XtPointer ) ;
00290 static void (*BG_PLUTO_report)( PLUGIN_interface * , char * ) ;
00291 static void (*BG_PLUTO_scatterplot)( int , float *, float *, char *, char *, char *,float,float ) ;
00292 static void (*BG_PLUTO_set_butcolor)( PLUGIN_interface *, char * ) ;
00293 static void (*BG_PLUTO_set_meter)( PLUGIN_interface * , int ) ;
00294 static void (*BG_PLUTO_set_sequence)( PLUGIN_interface *, char * ) ;
00295 static void (*BG_PLUTO_set_topshell)( PLUGIN_interface *, Widget ) ;
00296 static void (*BG_PLUTO_turnoff_options)( PLUGIN_interface * ) ;
00297 static void (*BG_RWC_visibilize_CB)( Widget , XtPointer , XtPointer ) ;
00298 static void (*BG_RWC_visibilize_widget)( Widget ) ;
00299 static void (*BG_add_dataset_to_PLUGIN_interface)( PLUGIN_interface *, char *, int,int,int ) ;
00300 static void (*BG_add_number_to_PLUGIN_interface)( PLUGIN_interface *, char *, int, int, int, int, int ) ;
00301 static void (*BG_add_option_to_PLUGIN_interface)( PLUGIN_interface *, char *, char *, int ) ;
00302 static void (*BG_add_string_to_PLUGIN_interface)( PLUGIN_interface *, char *, int, char **, int) ;
00303 static void (*BG_add_timeseries_to_PLUGIN_interface)( PLUGIN_interface *, char * ) ;
00304 static void (*BG_alter_MCW_pbar)( MCW_pbar * , int , float * ) ;
00305 static void (*BG_alter_PLUGIN_strval_width)( PLUGIN_strval * , int ) ;
00306 static void (*BG_free_PCOR_references)(PCOR_references *) ;
00307 static void (*BG_free_PCOR_voxel_corr)(PCOR_voxel_corr *) ;
00308 static void (*BG_load_PBAR_palette_array)( MCW_pbar * , PBAR_palette_array * , int ) ;
00309 static void (*BG_make_PLUGIN_dataset_link)( THD_3dim_dataset *, PLUGIN_dataset_link * ) ;
00310 static void (*BG_redraw_MCW_pasgraf)( MCW_pasgraf * gp ) ;
00311 static void (*BG_refit_MCW_optmenu)( MCW_arrowval * , int,int,int,int, str_func * , XtPointer ) ;
00312 static void (*BG_set_MCW_pasgraf)( MCW_pasgraf * gp , byte * func ) ;
00313 static void (*BG_update_MCW_pbar)( MCW_pbar * ) ;
00314 static void (*BG_update_PCOR_references)(float *,PCOR_references *) ;
00315 static void (*BG_THD_coorder_fill)( char * , THD_coorder * ) ;
00316 
00317 static AFNI_library_type *BG_GLOBAL_library ;    /* AFNI global data */
00318 static AF_options *BG_GLOBAL_argopt ;
00319 static Pixmap *BG_afni48_pixmap ;
00320 static int *BG_afni48_good ;
00321 static TTO_point *BG_TTO_list ;
00322 
00323 #define NUM_BG_array (sizeof(BG_array)/sizeof(void *))
00324 
00325 static void **BG_array[] = {
00326     (void **) &BG_AFNI_add_interruptable ,       /* AFNI global funcs */
00327     (void **) &BG_AFNI_can_transform_vector ,
00328     (void **) &BG_AFNI_controller_index ,
00329     (void **) &BG_AFNI_controller_label ,
00330     (void **) &BG_AFNI_force_adoption ,
00331     (void **) &BG_AFNI_hintize_pbar ,
00332     (void **) &BG_AFNI_initialize_view ,
00333     (void **) &BG_AFNI_jumpto_dicom ,
00334     (void **) &BG_AFNI_make_descendants ,
00335     (void **) &BG_AFNI_modify_viewing ,
00336     (void **) &BG_AFNI_needs_dset_ijk ,
00337     (void **) &BG_AFNI_palette_label_CB ,
00338     (void **) &BG_AFNI_process_drawnotice ,
00339     (void **) &BG_AFNI_process_interrupts ,
00340     (void **) &BG_AFNI_purge_unused_dsets ,
00341     (void **) &BG_AFNI_range_rotate_av_CB ,
00342     (void **) &BG_AFNI_receive_control ,
00343     (void **) &BG_AFNI_receive_init ,
00344     (void **) &BG_AFNI_register_nD_function ,
00345     (void **) &BG_AFNI_set_cursor ,
00346     (void **) &BG_AFNI_transform_vector ,
00347     (void **) &BG_AV_assign_fval ,
00348     (void **) &BG_AV_assign_ival ,
00349     (void **) &BG_AV_colsize ,
00350     (void **) &BG_AV_format_fval ,
00351     (void **) &BG_AV_fval_to_char ,
00352     (void **) &BG_DC_rgb_to_ovrgb ,
00353     (void **) &BG_DC_yokify ,
00354     (void **) &BG_ENV_add_numeric ,
00355     (void **) &BG_GRAF_get_setup ,
00356     (void **) &BG_GRAF_put_setup ,
00357     (void **) &BG_MCW_action_area ,
00358     (void **) &BG_MCW_alter_widget_cursor ,
00359     (void **) &BG_MCW_av_substring_CB ,
00360     (void **) &BG_MCW_choose_integer ,
00361     (void **) &BG_MCW_choose_ovcolor ,
00362     (void **) &BG_MCW_choose_string ,
00363     (void **) &BG_MCW_choose_strlist ,
00364     (void **) &BG_MCW_expose_widget ,
00365     (void **) &BG_MCW_histo_bytes ,
00366     (void **) &BG_MCW_invert_widget ,
00367     (void **) &BG_MCW_pbar_to_mri ,
00368     (void **) &BG_MCW_popdown_meter ,
00369     (void **) &BG_MCW_popup_message ,
00370     (void **) &BG_MCW_popup_meter ,
00371     (void **) &BG_MCW_reghelp_children ,
00372     (void **) &BG_MCW_reghint_children ,
00373     (void **) &BG_MCW_register_help ,
00374     (void **) &BG_MCW_register_hint ,
00375     (void **) &BG_MCW_set_bbox ,
00376     (void **) &BG_MCW_set_meter ,
00377     (void **) &BG_MCW_set_widget_label ,
00378     (void **) &BG_MCW_val_bbox ,
00379     (void **) &BG_MCW_widget_geom ,
00380     (void **) &BG_PARSER_evaluate_one ,
00381     (void **) &BG_PARSER_evaluate_vector ,
00382     (void **) &BG_PARSER_generate_code ,
00383     (void **) &BG_PCOR_get_coef ,
00384     (void **) &BG_PCOR_get_pcor ,
00385     (void **) &BG_PCOR_update_float ,
00386     (void **) &BG_PLUTO_4D_to_typed_fim ,
00387     (void **) &BG_PLUTO_add_dset ,
00388     (void **) &BG_PLUTO_add_hint ,
00389     (void **) &BG_PLUTO_beep ,
00390     (void **) &BG_PLUTO_commandstring ,
00391     (void **) &BG_PLUTO_copy_dset ,
00392     (void **) &BG_PLUTO_cpu_time ,
00393     (void **) &BG_PLUTO_dset_redisplay ,
00394     (void **) &BG_PLUTO_dset_redisplay_mode ,
00395     (void **) &BG_PLUTO_elapsed_time ,
00396     (void **) &BG_PLUTO_find_dset ,
00397     (void **) &BG_PLUTO_fixup_names ,
00398     (void **) &BG_PLUTO_force_redisplay ,
00399     (void **) &BG_PLUTO_histoplot ,
00400     (void **) &BG_PLUTO_imseq_addto ,
00401     (void **) &BG_PLUTO_imseq_popim ,
00402     (void **) &BG_PLUTO_imseq_rekill ,
00403     (void **) &BG_PLUTO_imseq_retitle ,
00404     (void **) &BG_PLUTO_popdown_meter ,
00405     (void **) &BG_PLUTO_popup_dset_chooser ,
00406     (void **) &BG_PLUTO_popup_meter ,
00407     (void **) &BG_PLUTO_popup_worker ,
00408     (void **) &BG_PLUTO_prefix_ok ,
00409     (void **) &BG_PLUTO_register_timeout ,
00410     (void **) &BG_PLUTO_register_timeseries ,
00411     (void **) &BG_PLUTO_register_workproc ,
00412     (void **) &BG_PLUTO_report ,
00413     (void **) &BG_PLUTO_scatterplot ,
00414     (void **) &BG_PLUTO_set_butcolor ,
00415     (void **) &BG_PLUTO_set_meter ,
00416     (void **) &BG_PLUTO_set_sequence ,
00417     (void **) &BG_PLUTO_set_topshell ,
00418     (void **) &BG_PLUTO_string_index ,
00419     (void **) &BG_PLUTO_turnoff_options ,
00420     (void **) &BG_RWC_visibilize_CB ,
00421     (void **) &BG_RWC_visibilize_widget ,
00422     (void **) &BG_TTRR_get_params ,
00423     (void **) &BG_add_dataset_to_PLUGIN_interface ,
00424     (void **) &BG_add_number_to_PLUGIN_interface ,
00425     (void **) &BG_add_option_to_PLUGIN_interface ,
00426     (void **) &BG_add_string_to_PLUGIN_interface ,
00427     (void **) &BG_add_timeseries_to_PLUGIN_interface ,
00428     (void **) &BG_alter_MCW_pbar ,
00429     (void **) &BG_alter_PLUGIN_strval_width ,
00430     (void **) &BG_drive_MCW_grapher ,
00431     (void **) &BG_drive_MCW_imseq ,
00432     (void **) &BG_free_PCOR_references ,
00433     (void **) &BG_free_PCOR_voxel_corr ,
00434     (void **) &BG_get_PLUGIN_strval ,
00435     (void **) &BG_get_idcode_from_PLUGIN_interface ,
00436     (void **) &BG_get_number_from_PLUGIN_interface ,
00437     (void **) &BG_get_optiontag_from_PLUGIN_interface ,
00438     (void **) &BG_get_string_from_PLUGIN_interface ,
00439     (void **) &BG_get_timeseries_from_PLUGIN_interface ,
00440     (void **) &BG_load_PBAR_palette_array ,
00441     (void **) &BG_make_PLUGIN_dataset_link ,
00442     (void **) &BG_new_MCW_arrowval ,
00443     (void **) &BG_new_MCW_bbox ,
00444     (void **) &BG_new_MCW_colormenu ,
00445     (void **) &BG_new_MCW_graf ,
00446     (void **) &BG_new_MCW_optmenu ,
00447     (void **) &BG_new_MCW_pasgraf ,
00448     (void **) &BG_new_MCW_pbar ,
00449     (void **) &BG_new_MCW_textwin ,
00450     (void **) &BG_new_PCOR_references ,
00451     (void **) &BG_new_PCOR_voxel_corr ,
00452     (void **) &BG_new_PLUGIN_interface_1999 ,
00453     (void **) &BG_new_PLUGIN_strval ,
00454     (void **) &BG_open_MCW_imseq ,
00455     (void **) &BG_peek_optiontag_from_PLUGIN_interface ,
00456     (void **) &BG_redraw_MCW_pasgraf ,
00457     (void **) &BG_refit_MCW_optmenu ,
00458     (void **) &BG_set_MCW_pasgraf ,
00459     (void **) &BG_update_MCW_pbar ,
00460     (void **) &BG_update_PCOR_references ,
00461     (void **) &BG_THD_coorder_fill ,
00462 
00463     (void **) &BG_GLOBAL_library ,    /* AFNI global data */
00464     (void **) &BG_GLOBAL_argopt ,
00465     (void **) &BG_afni48_pixmap ,
00466     (void **) &BG_afni48_good ,
00467     (void **) &BG_TTO_list ,
00468 NULL } ;
00469 
00470 /** Receive the array of global pointers from AFNI **/
00471 
00472 void BG_array_receive( int nar , void *ar[] )
00473 {
00474    int ii ;
00475    if( nar <= 0 || ar == NULL ) return ;
00476    if( nar > NUM_BG_array ) nar = NUM_BG_array ;
00477    for( ii=0 ; ii < NUM_BG_array ; ii++ )
00478       if( BG_array[ii] != NULL ) *(BG_array[ii]) = ar[ii] ;
00479    return ;
00480 }
00481 
00482 int MAIN__(){ return 0; }  /* for f2c */
00483 
00484 /**** Macros to make it possible to call the AFNI global functions
00485       via the pointers above using the same name as the original function ****/
00486 
00487 #define AFNI_add_interruptable BG_AFNI_add_interruptable
00488 #define AFNI_can_transform_vector BG_AFNI_can_transform_vector
00489 #define AFNI_controller_index BG_AFNI_controller_index
00490 #define AFNI_controller_label BG_AFNI_controller_label
00491 #define AFNI_force_adoption BG_AFNI_force_adoption
00492 #define AFNI_hintize_pbar BG_AFNI_hintize_pbar
00493 #define AFNI_initialize_view BG_AFNI_initialize_view
00494 #define AFNI_jumpto_dicom BG_AFNI_jumpto_dicom
00495 #define AFNI_make_descendants BG_AFNI_make_descendants
00496 #define AFNI_modify_viewing BG_AFNI_modify_viewing
00497 #define AFNI_needs_dset_ijk BG_AFNI_needs_dset_ijk
00498 #define AFNI_palette_label_CB BG_AFNI_palette_label_CB
00499 #define AFNI_process_drawnotice BG_AFNI_process_drawnotice
00500 #define AFNI_process_interrupts BG_AFNI_process_interrupts
00501 #define AFNI_purge_unused_dsets BG_AFNI_purge_unused_dsets
00502 #define AFNI_range_rotate_av_CB BG_AFNI_range_rotate_av_CB
00503 #define AFNI_receive_control BG_AFNI_receive_control
00504 #define AFNI_receive_init BG_AFNI_receive_init
00505 #define AFNI_register_nD_function BG_AFNI_register_nD_function
00506 #define AFNI_set_cursor BG_AFNI_set_cursor
00507 #define AFNI_transform_vector BG_AFNI_transform_vector
00508 #define AV_assign_fval BG_AV_assign_fval
00509 #define AV_assign_ival BG_AV_assign_ival
00510 #define AV_colsize BG_AV_colsize
00511 #define AV_format_fval BG_AV_format_fval
00512 #define AV_fval_to_char BG_AV_fval_to_char
00513 #define DC_rgb_to_ovrgb BG_DC_rgb_to_ovrgb
00514 #define DC_yokify BG_DC_yokify
00515 #define ENV_add_numeric BG_ENV_add_numeric
00516 #define GRAF_get_setup BG_GRAF_get_setup
00517 #define GRAF_put_setup BG_GRAF_put_setup
00518 #define MCW_action_area BG_MCW_action_area
00519 #define MCW_alter_widget_cursor BG_MCW_alter_widget_cursor
00520 #define MCW_av_substring_CB BG_MCW_av_substring_CB
00521 #define MCW_choose_integer BG_MCW_choose_integer
00522 #define MCW_choose_ovcolor BG_MCW_choose_ovcolor
00523 #define MCW_choose_string BG_MCW_choose_string
00524 #define MCW_choose_strlist BG_MCW_choose_strlist
00525 #define MCW_expose_widget BG_MCW_expose_widget
00526 #define MCW_histo_bytes BG_MCW_histo_bytes
00527 #define MCW_invert_widget BG_MCW_invert_widget
00528 #define MCW_pbar_to_mri BG_MCW_pbar_to_mri
00529 #define MCW_popdown_meter BG_MCW_popdown_meter
00530 #define MCW_popup_message BG_MCW_popup_message
00531 #define MCW_popup_meter BG_MCW_popup_meter
00532 #define MCW_reghelp_children BG_MCW_reghelp_children
00533 #define MCW_reghint_children BG_MCW_reghint_children
00534 #define MCW_register_help BG_MCW_register_help
00535 #define MCW_register_hint BG_MCW_register_hint
00536 #define MCW_set_bbox BG_MCW_set_bbox
00537 #define MCW_set_meter BG_MCW_set_meter
00538 #define MCW_set_widget_label BG_MCW_set_widget_label
00539 #define MCW_val_bbox BG_MCW_val_bbox
00540 #define MCW_widget_geom BG_MCW_widget_geom
00541 #define PARSER_evaluate_one BG_PARSER_evaluate_one
00542 #define PARSER_evaluate_vector BG_PARSER_evaluate_vector
00543 #define PARSER_generate_code BG_PARSER_generate_code
00544 #define PCOR_get_coef BG_PCOR_get_coef
00545 #define PCOR_get_pcor BG_PCOR_get_pcor
00546 #define PCOR_update_float BG_PCOR_update_float
00547 #define PLUTO_4D_to_typed_fim BG_PLUTO_4D_to_typed_fim
00548 #define PLUTO_add_dset BG_PLUTO_add_dset
00549 #define PLUTO_add_hint BG_PLUTO_add_hint
00550 #define PLUTO_beep BG_PLUTO_beep
00551 #define PLUTO_commandstring BG_PLUTO_commandstring
00552 #define PLUTO_copy_dset BG_PLUTO_copy_dset
00553 #define PLUTO_cpu_time BG_PLUTO_cpu_time
00554 #define PLUTO_dset_redisplay BG_PLUTO_dset_redisplay
00555 #define PLUTO_dset_redisplay_mode BG_PLUTO_dset_redisplay_mode
00556 #define PLUTO_elapsed_time BG_PLUTO_elapsed_time
00557 #define PLUTO_find_dset BG_PLUTO_find_dset
00558 #define PLUTO_fixup_names BG_PLUTO_fixup_names
00559 #define PLUTO_force_redisplay BG_PLUTO_force_redisplay
00560 #define PLUTO_histoplot BG_PLUTO_histoplot
00561 #define PLUTO_imseq_addto BG_PLUTO_imseq_addto
00562 #define PLUTO_imseq_popim BG_PLUTO_imseq_popim
00563 #define PLUTO_imseq_rekill BG_PLUTO_imseq_rekill
00564 #define PLUTO_imseq_retitle BG_PLUTO_imseq_retitle
00565 #define PLUTO_popdown_meter BG_PLUTO_popdown_meter
00566 #define PLUTO_popup_dset_chooser BG_PLUTO_popup_dset_chooser
00567 #define PLUTO_popup_meter BG_PLUTO_popup_meter
00568 #define PLUTO_popup_worker BG_PLUTO_popup_worker
00569 #define PLUTO_prefix_ok BG_PLUTO_prefix_ok
00570 #define PLUTO_register_timeout BG_PLUTO_register_timeout
00571 #define PLUTO_register_timeseries BG_PLUTO_register_timeseries
00572 #define PLUTO_register_workproc BG_PLUTO_register_workproc
00573 #define PLUTO_report BG_PLUTO_report
00574 #define PLUTO_scatterplot BG_PLUTO_scatterplot
00575 #define PLUTO_set_butcolor BG_PLUTO_set_butcolor
00576 #define PLUTO_set_meter BG_PLUTO_set_meter
00577 #define PLUTO_set_sequence BG_PLUTO_set_sequence
00578 #define PLUTO_set_topshell BG_PLUTO_set_topshell
00579 #define PLUTO_string_index BG_PLUTO_string_index
00580 #define PLUTO_turnoff_options BG_PLUTO_turnoff_options
00581 #define RWC_visibilize_CB BG_RWC_visibilize_CB
00582 #define RWC_visibilize_widget BG_RWC_visibilize_widget
00583 #define TTRR_get_params BG_TTRR_get_params
00584 #define add_dataset_to_PLUGIN_interface BG_add_dataset_to_PLUGIN_interface
00585 #define add_number_to_PLUGIN_interface BG_add_number_to_PLUGIN_interface
00586 #define add_option_to_PLUGIN_interface BG_add_option_to_PLUGIN_interface
00587 #define add_string_to_PLUGIN_interface BG_add_string_to_PLUGIN_interface
00588 #define add_timeseries_to_PLUGIN_interface BG_add_timeseries_to_PLUGIN_interface
00589 #define alter_MCW_pbar BG_alter_MCW_pbar
00590 #define alter_PLUGIN_strval_width BG_alter_PLUGIN_strval_width
00591 #define drive_MCW_grapher BG_drive_MCW_grapher
00592 #define drive_MCW_imseq BG_drive_MCW_imseq
00593 #define free_PCOR_references BG_free_PCOR_references
00594 #define free_PCOR_voxel_corr BG_free_PCOR_voxel_corr
00595 #define get_PLUGIN_strval BG_get_PLUGIN_strval
00596 #define get_idcode_from_PLUGIN_interface BG_get_idcode_from_PLUGIN_interface
00597 #define get_number_from_PLUGIN_interface BG_get_number_from_PLUGIN_interface
00598 #define get_optiontag_from_PLUGIN_interface BG_get_optiontag_from_PLUGIN_interface
00599 #define get_string_from_PLUGIN_interface BG_get_string_from_PLUGIN_interface
00600 #define get_timeseries_from_PLUGIN_interface BG_get_timeseries_from_PLUGIN_interface
00601 #define load_PBAR_palette_array BG_load_PBAR_palette_array
00602 #define make_PLUGIN_dataset_link BG_make_PLUGIN_dataset_link
00603 #define new_MCW_arrowval BG_new_MCW_arrowval
00604 #define new_MCW_bbox BG_new_MCW_bbox
00605 #define new_MCW_colormenu BG_new_MCW_colormenu
00606 #define new_MCW_graf BG_new_MCW_graf
00607 #define new_MCW_optmenu BG_new_MCW_optmenu
00608 #define new_MCW_pasgraf BG_new_MCW_pasgraf
00609 #define new_MCW_pbar BG_new_MCW_pbar
00610 #define new_MCW_textwin BG_new_MCW_textwin
00611 #define new_PCOR_references BG_new_PCOR_references
00612 #define new_PCOR_voxel_corr BG_new_PCOR_voxel_corr
00613 #define new_PLUGIN_interface_1999 BG_new_PLUGIN_interface_1999
00614 #define new_PLUGIN_strval BG_new_PLUGIN_strval
00615 #define open_MCW_imseq BG_open_MCW_imseq
00616 #define peek_optiontag_from_PLUGIN_interface BG_peek_optiontag_from_PLUGIN_interface
00617 #define redraw_MCW_pasgraf BG_redraw_MCW_pasgraf
00618 #define refit_MCW_optmenu BG_refit_MCW_optmenu
00619 #define set_MCW_pasgraf BG_set_MCW_pasgraf
00620 #define update_MCW_pbar BG_update_MCW_pbar
00621 #define update_PCOR_references BG_update_PCOR_references
00622 #define THD_coorder_fill BG_THD_coorder_fill
00623 
00624 /** Access global AFNI data this roundabout way.  The data is passed as
00625     pointers, so we need to dereference them (unless they are pointers anyhoo). **/
00626 
00627 #define GLOBAL_library   (*BG_GLOBAL_library)
00628 #define GLOBAL_argopt    (*BG_GLOBAL_argopt)
00629 #define afni48_pixmap    (*BG_afni48_pixmap)
00630 #define afni48_good      (*BG_afni48_good)
00631 #define TTO_list         (BG_TTO_list)           /* already a pointer */
00632 
00633 #endif /* BG_INSIDE_AFNI */
00634 #endif /* CYGWIN */
 

Powered by Plone

This site conforms to the following standards: