DEFINE_PLUGIN_PROTOTYPE PLUGIN_interface * PLUGIN_init( int ncall ) { PLUGIN_interface * plint ; if( ncall > 0 ) return NULL ; /* only one interface */ /*-- set titles and call point --*/ plint = PLUTO_new_interface( "Dataset Rename" , "Dataset Renaming" , helpstring , PLUGIN_CALL_VIA_MENU , RENAME_main ) ; PLUTO_add_hint( plint , "Rename a Dataset" ) ; PLUTO_set_sequence( plint , "A:afnicontrol:dset" ) ; PLUTO_set_runlabels( plint , "Rename+Keep" , "Rename+Close" ) ; /* 04 Nov 2003 */ /*-- first line of input: Dataset --*/ PLUTO_add_option( plint , "Input" , "Input" , TRUE ) ; PLUTO_add_dataset(plint , "Dataset" , ANAT_ALL_MASK , FUNC_ALL_MASK , WARP_ON_DEMAND_MASK | DIMEN_ALL_MASK | SESSION_ALL_MASK | BRICK_ALLTYPE_MASK ) ; /*-- second line of input: Prefix for output dataset --*/ PLUTO_add_option( plint , "Output" , "Output" , TRUE ) ; PLUTO_add_string( plint , "Prefix" , 0,NULL , 19 ) ; return plint ; }
DEFINE_PLUGIN_PROTOTYPE PLUGIN_interface * PLUGIN_init( int ncall ) { PLUGIN_interface * plint ; static char *yn[2] = {"No", "Yes"}; if( ncall > 0 ) return NULL ; /* only one interface */ /*-- set titles and call point --*/ /* Initialize variables so we can be a 1D transformer*/ low_fc=0; high_fc = 0; ignore=1; autocorr=FALSE; retrend=FALSE; output_prefix=NULL; idc=NULL; PLUTO_register_1D_function( "Fourier", fourier_1D ); plint = PLUTO_new_interface( "Fourier Stuff" , "Filtering, autocorrelation and other stuff done with FFTs" , helpstring , PLUGIN_CALL_VIA_MENU , Fourier_Main ) ; PLUTO_add_hint( plint , "Filtering, autocorrelation and other stuff done with FFTs" ) ; PLUTO_set_sequence( plint , "z:Ross" ) ; /*-- first line of input: Dataset --*/ PLUTO_add_option( plint , "Input" , "Input" , FALSE ) ; PLUTO_add_dataset(plint , "Dataset" , ANAT_ALL_MASK , FUNC_ALL_MASK , DIMEN_4D_MASK | BRICK_ALLREAL_MASK ) ; /*-- second line of input: Prefix for output dataset --*/ PLUTO_add_option( plint , "Output" , "Output" , FALSE ) ; PLUTO_add_string( plint , "Prefix" , 0, NULL , 19 ) ; /*-- third line of input: Preprocessing --*/ PLUTO_add_option( plint , "Preprocess" , "Preprocess" , TRUE ) ; PLUTO_add_number( plint , "Ignore" , 0, 10, 0, 1 , FALSE) ; PLUTO_add_string( plint, "Re-trend", 2, yn, 0); /*-- fourth line of input: Lowpass option --*/ PLUTO_add_option( plint , "Lowpass" , "Lowpass" , FALSE ) ; PLUTO_add_number( plint , "Fc" , 0, 5000, 3, 0 , TRUE) ; /*-- fifth line of input: Highass option --*/ PLUTO_add_option( plint , "Highpass" , "Highpass" , FALSE ) ; PLUTO_add_number( plint , "Fc" , 0, 5000, 3, 0 , TRUE) ; /*-- sixt line of input: Autocorrelation option --*/ /* PLUTO_add_option( plint , "Autocorrelate" , "Autocorrelate" , FALSE ) ; */ return plint ; }
DEFINE_PLUGIN_PROTOTYPE PLUGIN_interface * PLUGIN_init( int ncall ) { int ii ; PLUGIN_interface * plint ; /* will be the output of this routine */ if( ncall > 0 ) return NULL ; CHECK_IF_ALLOWED("L1FIT","L1_Fit & Dtr") ; /* 30 Sep 2016 */ /*---------------- set titles and call point ----------------*/ plint = PLUTO_new_interface( "L1_Fit & Dtr" , "Control L1_Fit and L1_Dtr Functions" , helpstring , PLUGIN_CALL_VIA_MENU , L1F_main ) ; global_plint = plint ; /* make global copy */ PLUTO_set_sequence( plint , "A:funcs:fitting" ) ; PLUTO_add_hint( plint , "Control L1_Fit and L1_Dtr Functions" ) ; PLUTO_set_runlabels( plint , "Set+Keep" , "Set+Close" ) ; /* 04 Nov 2003 */ /*----- Parameters -----*/ PLUTO_add_option( plint , "Parameters" , "Parameters" , TRUE ) ; PLUTO_add_string( plint , "Baseline" , NBASE , baseline_strings , 1 ) ; PLUTO_add_number( plint , "Ignore" , 0,20,0,3 , FALSE ) ; /*----- Sinusoid -----*/ for( ii=0 ; ii < NRMAX_SIN ; ii++ ){ PLUTO_add_option( plint , "Sinusoid" , "Sinusoid" , FALSE ) ; PLUTO_add_number( plint , "Period" , 0,99999,0,20, TRUE ) ; PLUTO_add_number( plint , "Harmonics" , 1,HARM_MAX,0,1 , FALSE ) ; } /*----- Timeseries -----*/ for( ii=0 ; ii < NRMAX_TS ; ii++ ){ PLUTO_add_option( plint , "Timeseries" , "Timeseries" , FALSE ) ; PLUTO_add_timeseries( plint , "File" ) ; } /*--------- done with interface setup ---------*/ PLUTO_register_1D_funcstr( "L1_Fit" , L1F_fitter ) ; PLUTO_register_1D_funcstr( "L1_Dtr" , L1F_detrend ) ; return plint ; }
DEFINE_PLUGIN_PROTOTYPE PLUGIN_interface * PLUGIN_init( int ncall ) { PLUGIN_interface * plint ; if( ncall > 0 ) return NULL ; /* only one interface */ CHECK_IF_ALLOWED("ROIAVERAGE","ROI Average") ; /* 30 Sep 2016 */ /*-- set titles and call point --*/ plint = PLUTO_new_interface( "ROI Average" , "Average Dataset over ROI" , helpstring , PLUGIN_CALL_VIA_MENU , MASKAVE_main ) ; PLUTO_add_hint( plint , "Average Dataset over ROI" ) ; PLUTO_set_sequence( plint , "A:afniinfo:dset" ) ; /*-- first line of input --*/ PLUTO_add_option( plint , "Source" , "Source" , TRUE ) ; PLUTO_add_dataset(plint , "Dataset" , ANAT_ALL_MASK , FUNC_ALL_MASK , DIMEN_ALL_MASK | BRICK_ALLREAL_MASK ) ; PLUTO_add_number( plint , "Sub-brick" , -1,9999,0 , 0,1 ) ; /*-- second line of input --*/ PLUTO_add_option( plint , "Mask" , "Mask" , TRUE ) ; PLUTO_add_dataset( plint , "Dataset" , ANAT_ALL_MASK , FUNC_ALL_MASK , DIMEN_ALL_MASK | BRICK_ALLREAL_MASK ) ; PLUTO_add_number( plint , "Sub-brick" , 0,9999,0 , 0,1 ) ; /* 06 Aug 1998 */ /*-- third line of input --*/ PLUTO_add_option( plint , "Range" , "Range" , FALSE ) ; PLUTO_add_number( plint , "Bottom" , -99999,99999, 1, 0,1 ) ; PLUTO_add_number( plint , "Top" , -99999,99999,-1, 0,1 ) ; /*-- 4th line of input (06 Aug 1998) --*/ PLUTO_add_option( plint , "1D Save" , "1D Save" , FALSE ) ; PLUTO_add_string( plint , "Name" , 0,NULL , 12 ) ; PLUTO_add_string( plint , "To Disk?" , NUM_yesno_list , yesno_list , 1 ) ; return plint ; }
DEFINE_PLUGIN_PROTOTYPE PLUGIN_interface * PLUGIN_init( int ncall ) { PLUGIN_interface * plint ; /* will be the output of this routine */ int meth ; if( ncall > 0 ) return NULL ; /* only one interface */ /*---------------- set titles and call point ----------------*/ plint = PLUTO_new_interface( "Coord Order" , "Coordinate Order Display" , helpstring , PLUGIN_CALL_VIA_MENU , CORD_main ) ; PLUTO_add_hint( plint , "Coordinate Order Display" ) ; PLUTO_set_sequence( plint , "A:afnicontrol:display" ) ; PLUTO_set_runlabels( plint , "Set+Keep" , "Set+Close" ) ; /* 04 Nov 2003 */ /*---------- 2nd line: other inputs ----------*/ PLUTO_add_option( plint , "Input" , /* label at left of input line */ "Input" , /* tag to return to plugin */ TRUE /* is this mandatory? */ ) ; meth = PLUTO_string_index( GLOBAL_library.cord.orcode , NUM_CORD_STRINGS , cord_strings ) ; if( meth < 0 || meth >= NUM_CORD_STRINGS ) meth = 0 ; PLUTO_add_string( plint , "Order" , /* label next to chooser button */ NUM_CORD_STRINGS , /* number of strings to choose among */ cord_strings , /* list of strings to choose among */ meth /* index of default string */ ) ; /*--------- done with interface setup ---------*/ return plint ; }
DEFINE_PLUGIN_PROTOTYPE PLUGIN_interface * PLUGIN_init( int ncall ) { PLUGIN_interface * plint ; /* will be the output of this routine */ if( ncall > 0 ) return NULL ; /* only one interface */ /*---------------- set titles and call point ----------------*/ plint = PLUTO_new_interface( "PlaceHolder" , "PlaceHolder" , NULL , PLUGIN_CALL_IMMEDIATELY , JUNK_main ) ; PLUTO_set_sequence( plint , "A:funcs:junk" ) ; AFNI_register_2D_function( "Lacy9" , lacy9_box_func ) ; AFNI_register_2D_function( "Outer9" , outer9_box_func ) ; return plint ; }
DEFINE_PLUGIN_PROTOTYPE PLUGIN_interface * PLUGIN_init( int ncall ) { PLUGIN_interface * plint ; if( ncall > 0 ) return NULL ; /* only one interface */ CHECK_IF_ALLOWED("HEMISUBTRACT","Hemi-subtract") ; /* 30 Sep 2016 */ /* create the new interface */ plint = PLUTO_new_interface( "Hemi-subtract", "hemisphere subtraction", helpstring, PLUGIN_CALL_VIA_MENU , HEMISUB_main ); PLUTO_add_hint( plint, "from each voxel's value, subtract that of the reflected voxel" ); PLUTO_set_sequence( plint , "z:Reynolds" ) ; /*-- first line of input: input dataset --*/ PLUTO_add_option( plint, "Input" , "Input" , TRUE ); PLUTO_add_hint( plint, "choose dataset for input" ); PLUTO_add_dataset(plint, "Dataset" , ANAT_ALL_MASK , FUNC_ALL_MASK, DIMEN_3D_MASK | BRICK_SHORT_MASK ); /*-- second line of input: prefix for output dataset --*/ PLUTO_add_option( plint, "Output" , "prefix" , TRUE ); PLUTO_add_hint( plint, "option: choose dataset prefix for output" ); PLUTO_add_string( plint, "Prefix", 0, NULL, 19 ); /*-- third line of input: threshold type option --*/ PLUTO_add_option( plint, "Thresh Type", "Thresh Type", FALSE ); PLUTO_add_string( plint, "Type", NUM_T_OPTS, thresh_opts, 0 ); return plint; }
DEFINE_PLUGIN_PROTOTYPE PLUGIN_interface * PLUGIN_init( int ncall ) { PLUGIN_interface * plint ; /* will be the output of this routine */ if( ncall > 0 ) return NULL ; /* one interfaces */ /*---------------- set titles and call point ----------------*/ plint = PLUTO_new_interface( "SingleTrial Avg" , "Averaging of epochs in Single Trial data" , helpstring , PLUGIN_CALL_VIA_MENU , STAVG_main ) ; PLUTO_add_hint( plint , "Averaging of epochs in Single Trial data" ) ; global_plint = plint ; /* make global copy */ PLUTO_set_sequence( plint , "z:Birn" ) ; /*--------- 1st line ---------*/ PLUTO_add_option( plint , "Datasets" , /* label at left of input line */ "Datasets" , /* tag to return to plugin */ TRUE /* is this mandatory? */ ) ; PLUTO_add_dataset( plint , "Input" , /* label next to button */ ANAT_ALL_MASK , /* take any anat datasets */ FUNC_FIM_MASK , /* only allow fim funcs */ DIMEN_4D_MASK | /* need 3D+time datasets */ BRICK_ALLREAL_MASK /* need real-valued datasets */ ) ; PLUTO_add_hint( plint , "Input 3d+t dataset" ) ; PLUTO_add_string( plint , "Output" , /* label next to textfield */ 0,NULL , /* no fixed strings to choose among */ 19 /* 19 spaces for typing in value */ ) ; PLUTO_add_hint( plint , "Name of output dataset" ) ; /*---------- 2nd line --------*/ PLUTO_add_option( plint , "Timing" , "Timing" , TRUE ) ; PLUTO_add_timeseries(plint, "Stim. Timing"); PLUTO_add_hint( plint , "Stimulus Timing (0 = no task, 1 = task)" ) ; PLUTO_add_number( plint , "delta" , -1000 , 1000 , 0 , 0 , TRUE ) ; PLUTO_add_hint( plint , "Shift data timecourse by delta before splitting and averaging" ) ; /*---------- 3rd line: computation ----------*/ PLUTO_add_option( plint , "Compute" , /* label at left of input line */ "Compute" , /* tag to return to plugin */ TRUE /* is this mandatory? */ ) ; PLUTO_add_string( plint , "Method" , /* label next to chooser button */ _STAVG_NUM_METHODS, /* number of strings in list */ method_strings , /* list of strings to choose among */ _STAVG_METH_MEAN /* index of default string */ ) ; PLUTO_add_hint( plint , "Choose statistic to compute" ) ; /*---------- 4th line --------*/ PLUTO_add_option( plint , "Parameters" , /* label at left of input line */ "Parameters" , /* tag to return to plugin */ FALSE /* is this mandatory? */ ) ; PLUTO_add_number( plint , "maxlength" , /* label next to chooser */ 0 , /* smallest possible value */ 1000 , /* largest possible value */ 0 , /* decimal shift (none in this case) */ 15 , /* default value */ TRUE /* allow user to edit value? */ ) ; PLUTO_add_hint( plint , "maximum # of timepoints of output dataset" ) ; PLUTO_add_string( plint , "no1?" , /* label next to chooser button */ 2 , /* number of strings to choose among */ yes_no_strings , /* list of strings to choose among */ 1 /* index of default string */ ) ; PLUTO_add_hint( plint , "ignore timepoints where only one image is in average" ) ; /*--------- done with interface setup ---------*/ return plint ; }
PLUGIN_interface * PLUGIN_init( int ncall ) { PLUGIN_interface * plint ; /* will be the output of this routine */ if( ncall > 1 ) return NULL ; /* two interfaces */ CHECK_IF_ALLOWED("ASL","ASL a3/d3") ; /* 30 Sep 2016 */ #ifdef ALLOW_TESTING if( ncall == 1 ) return TEST_init() ; #else if( ncall == 1 ) return NULL ; #endif /*---------------- set titles and call point ----------------*/ plint = PLUTO_new_interface( "ASL a3/d3" , "ASL a3/d3 of a 3D+time Dataset" , helpstring , PLUGIN_CALL_VIA_MENU , POWER_main ) ; PLUTO_add_hint( plint , "ASL a3/d3 of a 3D+time Dataset" ) ; PLUTO_set_sequence( plint , "A:newdset:statistics" ) ; /*--------- 1st line: Input dataset ---------*/ PLUTO_add_option( plint , "Input" , /* label at left of input line */ "Input" , /* tag to return to plugin */ TRUE /* is this mandatory? */ ) ; PLUTO_add_dataset( plint , "---->>" , /* label next to button */ ANAT_ALL_MASK , /* take any anat datasets */ FUNC_FIM_MASK , /* only allow fim funcs */ DIMEN_4D_MASK | /* need 3D+time datasets */ BRICK_ALLREAL_MASK /* need real-valued datasets */ ) ; /*---------- 2nd line: Output dataset ----------*/ PLUTO_add_option( plint , "Output" , /* label at left of input line */ "Output" , /* tag to return to plugin */ TRUE /* is this mandatory? */ ) ; PLUTO_add_string( plint , "Prefix" , /* label next to textfield */ 0,NULL , /* no fixed strings to choose among */ 19 /* 19 spaces for typing in value */ ) ; PLUTO_add_string( plint , "Datum" , /* label next to chooser button */ NUM_TYPE_STRINGS , /* number of strings to choose among */ type_strings , /* list of strings to choose among */ 0 /* index of default string */ ) ; /*--------- Other lines: Parameters ---------*/ PLUTO_add_option( plint , "Ignore" , "Ignore" , TRUE ) ; PLUTO_add_number( plint , "Count" , /* label next to chooser */ 0 , /* smallest possible value */ 999 , /* largest possible value */ 0 , /* decimal shift (none in this case) */ 4 , /* default value */ TRUE /* allow user to edit value? */ ) ; PLUTO_add_string( plint , "Image Output" , /* label next to chooser button */ NUM_TYPE_STRINGSX , /* number of strings to choose among */ type_stringsx , /* list of strings to choose among */ 0 /* index of default string */ ) ; PLUTO_add_option( plint , "Scale" , "Scale" , TRUE ) ; PLUTO_add_number( plint , "Scale Factor" , /* label next to chooser */ 0 , /* smallest possible value */ 999 , /* largest possible value */ 0 , /* decimal shift (none in this case) */ 1 , /* default value */ TRUE /* allow user to edit value? */ ) ; return plint ; }
DEFINE_PLUGIN_PROTOTYPE PLUGIN_interface * PLUGIN_init( int ncall ) { int ii ; PLUGIN_interface * plint ; /* will be the output of this routine */ int ok; NLFIT_MODEL_array * model_array = NULL; /* array of SO models */ int im; /* model index */ int ip; /* parameter index */ char message[MAX_NAME_LENGTH]; /* error message */ if( ncall > 0 ) return NULL ; /* generate interfaces for ncall 0 */ jump_on_NLfit_error = 1 ; /* 01 May 2003: */ if( setjmp(NLfit_error_jmpbuf) != 0 ) { /* NLfit_error() was invoked */ jump_on_NLfit_error = 0 ; /* somewhere below here */ fprintf(stderr,"\n*** Can't load NLfit plugin! ***\n"); return NULL ; } /***** otherwise, do interface # 0 *****/ /*---------------- set titles and call point ----------------*/ plint = PLUTO_new_interface( "NLfit & NLerr" , "Control NLfit and NLerr Functions" , helpstring , PLUGIN_CALL_VIA_MENU , NL_main ) ; { char *eee = getenv("AFNI_NLFIM_METHOD") , str[94] ; if( eee == NULL || strcasecmp(eee,"simplex") == 0 ) N_newuoa = 0 ; else if( strcasecmp(eee,"powell") == 0 ) N_newuoa = 1 ; else if( strcasecmp(eee,"both") == 0 ) N_newuoa = 2 ; else N_newuoa = 0 ; sprintf(str,"Optimizer (AFNI_NLFIM_METHOD) is %s" , (N_newuoa==0) ? "SIMPLEX" :(N_newuoa==1) ? "POWELL" : "BOTH (SIMPLEX+POWELL)" ) ; PLUTO_report(plint,str) ; } PLUTO_add_hint( plint , "Control NLfit and NLerr Functions" ) ; global_plint = plint ; /* make global copy */ PLUTO_set_sequence( plint , "A:funcs:fitting" ) ; PLUTO_set_runlabels( plint , "Set+Keep" , "Set+Close" ) ; /* 04 Nov 2003 */ /*----- initialize the model array -----*/ model_array = NLFIT_get_many_MODELs (); if ((model_array == NULL) || (model_array->num == 0)) #if 1 { PLUTO_report( plint , "Found no models!") ; jump_on_NLfit_error = 0 ; return NULL ; } #else NLfit_error ("Unable to locate any models"); #endif #if 1 else { char str[64] ;
DEFINE_PLUGIN_PROTOTYPE PLUGIN_interface * PLUGIN_init( int ncall ) { PLUGIN_interface * plint ; /*----- plugin option labels -----*/ /* 19 June 1998 */ char * boolean_types[2] = {"False", "True"}; char * cluster_types[7] = {"Keep", "Mean", "Max", "AMax", "SMax", "Size", "Order"}; if( ncall > 0 ) return NULL ; /* only one interface */ /*-- set titles and call point --*/ plint = PLUTO_new_interface( "3D Cluster" , "Dataset Clustering" , helpstring , PLUGIN_CALL_VIA_MENU , CLUST_main ) ; PLUTO_add_hint( plint , "Dataset Clustering" ) ; PLUTO_set_sequence( plint , "A:afniinfo:dsetcluster" ) ; /*-- first line of input: Dataset --*/ PLUTO_add_option( plint , "Dataset" , "Dataset" , TRUE ) ; PLUTO_add_dataset(plint , "Function" , ANAT_ALL_MASK , FUNC_ALL_MASK , DIMEN_3D_MASK | BRICK_ALLREAL_MASK ) ; PLUTO_add_hint( plint , "Choose input dataset" ) ; /*-- second line of input: Cluster Parameters --*/ PLUTO_add_option( plint , "Params" , "Params" , TRUE ) ; PLUTO_add_hint( plint , "Find and reject small clusters" ) ; PLUTO_add_string (plint, "Type", 7, cluster_types, 0); /* 19 June 1998 */ PLUTO_add_hint( plint , "How to process data inside clusters" ) ; PLUTO_add_number( plint , "Radius(mm)" , 0, 100,1 , 20,TRUE ) ; PLUTO_add_hint( plint , "Max distance between 'neighbors'" ) ; PLUTO_add_number( plint , "MinVol(ul)" , 0,1000,-1,100,TRUE ) ; PLUTO_add_hint( plint , "Min size for cluster to survive" ) ; /*---- 3rd line of input: Erosion/Dilation option ----*/ /* 19 June 1998 */ PLUTO_add_option (plint, "Erode/Dilate", "Erode/Dilate", FALSE); PLUTO_add_hint (plint , "Sever narrow connecting paths between clusters"); PLUTO_add_number (plint, "% Voxels", 0, 100, 0, 50, TRUE); PLUTO_add_hint (plint , "Min % of active 'neighbors' for a voxel to survive"); PLUTO_add_string (plint, "Dilate?", 2, boolean_types, 0); PLUTO_add_hint (plint , "Restore voxels near main body of cluster"); /*-- fourth line of input: Threshold (optional) --*/ PLUTO_add_option( plint , "Threshold" , "Threshold" , FALSE ) ; PLUTO_add_hint( plint , "Zero out if threshold brick too small" ) ; PLUTO_add_number( plint , "Cutoff" , 0,1000,2 , 50,TRUE ) ; PLUTO_add_hint( plint , "Threshold values < this => 0" ) ; /*-- fifth line of input: Prefix for output dataset --*/ PLUTO_add_option( plint , "Output" , "Output" , FALSE ) ; PLUTO_add_string( plint , "Prefix" , 0,NULL , 19 ) ; PLUTO_add_hint( plint , "Name output dataset" ) ; return plint ; }
DEFINE_PLUGIN_PROTOTYPE PLUGIN_interface * PLUGIN_init(int ncall) { PLUGIN_interface * plint ; if( ncall > 0 ) return NULL ; /* only one interface */ /*-- set titles and call point --*/ plint = PLUTO_new_interface( "Histogram: BFit" , "Betafit Histogram" , helpstring , PLUGIN_CALL_VIA_MENU , BFIT_main ) ; PLUTO_add_hint( plint , "Histogram: Betafit" ) ; PLUTO_set_sequence( plint , "A:afniinfo:dsethistog" ) ; /*-- first line of input --*/ PLUTO_add_option( plint , "Source" , "Source" , TRUE ) ; PLUTO_add_dataset( plint , "Dataset" , /* label next to button */ ANAT_ALL_MASK , /* take any anat datasets */ FUNC_ALL_MASK , /* only allow fim funcs */ DIMEN_3D_MASK | /* need 3D+time datasets */ BRICK_ALLREAL_MASK /* need real-valued datasets */ ) ; PLUTO_add_number( plint , "Brick" , 0,9999,0, 0,1 ) ; PLUTO_add_string( plint , "Square" , NYESNO , YESNO_strings , 1 ) ; /*-- second line of input --*/ PLUTO_add_option( plint , "a Params" , "Params" , TRUE ) ; PLUTO_add_number( plint , "a bot" , 2,50 ,1 , 5 , 1 ) ; PLUTO_add_number( plint , "a top" , 2,500,1 , 20 , 1 ) ; PLUTO_add_option( plint , "b Params" , "Params" , TRUE ) ; PLUTO_add_number( plint , "b bot" , 10,400 ,0 , 10 , 1 ) ; PLUTO_add_number( plint , "b top" , 10,9999,0 , 200 , 1 ) ; PLUTO_add_number( plint , "H last", 0,1000,-1 , 0,1 ) ; PLUTO_add_option( plint , "Misc" , "Params" , TRUE ) ; PLUTO_add_number( plint , "N ran" , 10,1000,-2 , 100 , 1 ) ; PLUTO_add_number( plint , "% cut" , 20,90,0 , 70,1 ) ; PLUTO_add_string( plint , "HSqrt" , NYESNO , YESNO_strings , 0 ) ; /*-- (optional) line of input --*/ PLUTO_add_option( plint , "Mask" , "Mask" , FALSE ) ; PLUTO_add_dataset( plint , "Dataset" , ANAT_ALL_MASK , FUNC_ALL_MASK , DIMEN_ALL_MASK | BRICK_ALLREAL_MASK ) ; PLUTO_add_number( plint , "Brick" , 0,9999,0 , 0,1 ) ; /*-- (optional) line of input --*/ PLUTO_add_option( plint , "Range" , "Range" , FALSE ) ; PLUTO_add_number( plint , "Bottom" , -99999,99999, 1, 0,1 ) ; PLUTO_add_number( plint , "Top" , -99999,99999,-1, 0,1 ) ; /*-- (optional) line of input --*/ PLUTO_add_option( plint , "Extra" , "Extra" , FALSE ) ; PLUTO_add_number( plint , "a" , 2,50,1 , 5 , 1 ) ; PLUTO_add_number( plint , "b" , 10,999,0 , 200 , 1 ) ; return plint ; }
DEFINE_PLUGIN_PROTOTYPE PLUGIN_interface * PLUGIN_init( int ncall ) { PLUGIN_interface * plint ; /* will be the output of this routine */ if( ncall > 0 ) return NULL ; /* only one interface */ CHECK_IF_ALLOWED("2DREGISTRATION","2D Registration") ; /* 30 Sep 2016 */ /*---------------- set titles and call point ----------------*/ plint = PLUTO_new_interface( "2D Registration" , "2D Registration of a 3D+time Dataset" , helpstring , PLUGIN_CALL_VIA_MENU , IMREG_main ) ; PLUTO_add_hint( plint , "2D Registration of a 3D+time Dataset" ) ; global_plint = plint ; /* make global copy */ PLUTO_set_sequence( plint , "A:newdset:reg" ) ; /*--------- 1st line ---------*/ PLUTO_add_option( plint , "Datasets" , /* label at left of input line */ "DAtasets" , /* tag to return to plugin */ TRUE /* is this mandatory? */ ) ; PLUTO_add_dataset( plint , "Input" , /* label next to button */ ANAT_ALL_MASK , /* take any anat datasets */ FUNC_FIM_MASK , /* only allow fim funcs */ DIMEN_4D_MASK | /* need 3D+time datasets */ BRICK_ALLREAL_MASK /* need real-valued datasets */ ) ; PLUTO_add_string( plint , "Output" , /* label next to textfield */ 0,NULL , /* no fixed strings to choose among */ 19 /* 19 spaces for typing in value */ ) ; /*---------- 2nd line --------*/ PLUTO_add_option( plint , "Parameters" , /* label at left of input line */ "Parameters" , /* tag to return to plugin */ TRUE /* is this mandatory? */ ) ; PLUTO_add_number( plint , "Base" , /* label next to chooser */ 0 , /* smallest possible value */ 98 , /* largest possible value */ 0 , /* decimal shift (none in this case) */ 3 , /* default value */ FALSE /* allow user to edit value? */ ) ; /*---------- 3rd line --------*/ PLUTO_add_option( plint , "Fine Fit" , "Fine Fit" , FALSE ) ; PLUTO_add_number( plint , "Blur" , 0 , 40 , 1 , 10 , FALSE ) ; PLUTO_add_number( plint , "Dxy" , 1 , 20 , 2 , 7 , FALSE ) ; PLUTO_add_number( plint , "Dphi" , 1 , 50 , 2 , 21 , FALSE ) ; /*--------- done with interface setup ---------*/ return plint ; }