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 ; /* 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 ; }
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( "Hilbert Delay98" , "Time delay between FMRI and reference time series" , helpstring , PLUGIN_CALL_VIA_MENU , DELAY_main ) ; global_plint = plint ; /* make global copy */ /*--------- 1st line: Input dataset ---------*/ PLUTO_add_option( plint , "Data" , /* label at left of input line */ "Data" , /* tag to return to plugin */ TRUE /* is this mandatory? */ ) ; PLUTO_add_dataset( plint , "3D+time" , /* label next to button */ ANAT_ALL_MASK , /* take only EPI datasets */ FUNC_ALL_MASK , /* No fim funcs */ DIMEN_4D_MASK | /* need 3D+time datasets */ BRICK_ALLREAL_MASK /* need real-valued datasets */ ) ; PLUTO_add_number( plint , "Nort" , /* label next to chooser */ 1 , /* smallest possible value */ 100 , /* largest possible value (inactivated for now)*/ 0 , /* decimal shift (none in this case) */ 2 , /* default value */ FALSE /* allow user to edit value? */ ) ; /*---------- 2nd line: Input time series ----------*/ PLUTO_add_option( plint , "Ref." , /* label at left of input line */ "Ref." , /* tag to return to plugin */ TRUE /* is this mandatory? */ ) ; PLUTO_add_timeseries(plint,"Ref. Vect."); PLUTO_add_number( plint , "Ignore" , /* label next to chooser */ 0 , /* smallest possible value */ 50 , /* largest possible value (inactivated for now)*/ 0 , /* decimal shift (none in this case) */ 0 , /* default value */ FALSE /* allow user to edit value? */ ) ; PLUTO_add_string( plint , "Dsamp" , /*label next to textfield */ 2,yn_strings, /* strings to choose among */ 1 /* Default option */ ) ; /*---------- 3rd line: sampling frequency ----------*/ PLUTO_add_option( plint , "Sig." , /* label at left of input line */ "Sig." , /* tag to return to plugin */ TRUE /* is this mandatory? */ ) ; PLUTO_add_number( plint , "fs in Hz" , /* label next to chooser */ 0 , /* smallest possible value */ 2000 , /* largest possible value */ 1 , /* decimal shift (none in this case) */ 5 , /* default value */ TRUE /* allow user to edit value? */ ) ; PLUTO_add_number( plint , "Tstim sec" , /* label next to chooser */ 0.0 , /* smallest possible value */ 500 , /* largest possible value */ 0 , /* decimal shift (none in this case) */ 40 , /* default value */ TRUE /* allow user to edit value? */ ) ; PLUTO_add_number( plint , "C-Off" , /* label next to chooser */ -10 , /* smallest possible value */ 10 , /* largest possible value */ 1 , /* decimal shift */ 5 , /* default value */ TRUE /* allow user to edit value? */ ) ; PLUTO_add_string( plint , "No-bias" , /*label next to textfield */ 2,yn_strings, /* strings to choose among */ 1 /* Default option */ ) ; /*---------- 4th line: Delay Units ----------*/ PLUTO_add_option( plint , "Alg." , /* label at left of input line */ "Alg." , /* tag to return to plugin */ TRUE /* is this mandatory? */ ) ; PLUTO_add_number( plint , "N seg." , /* label next to chooser */ 1 , /* smallest possible value */ 1 , /* largest possible value (turned Off for the moment, supporting code is present)*/ 0 , /* decimal shift (none in this case) */ 1 , /* default value */ FALSE /* allow user to edit value? */ ) ; PLUTO_add_number( plint , "% ovrlp" , /* label next to chooser */ 0 , /* smallest possible value */ 0 , /* largest possible value (not implemented)*/ 0 , /* decimal shift (none in this case) */ 0 , /* default value */ FALSE /* allow user to edit value? */ ) ; PLUTO_add_string( plint , "Units" , /* label next to textfield */ 3,method_strings, /* strings to choose among */ 0 /* Default option */ ) ; PLUTO_add_string( plint , "Phz Wrp" , /* label next to textfield */ 2,yn_strings, /* strings to choose among */ 0 /* Default option */ ) ; /*---------- 5th 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 , "AFNI Prfx" , /* label next to textfield */ 0,NULL , /* no fixed strings to choose among */ 19 /* 19 spaces for typing in value */ ) ; PLUTO_add_string( plint , "Write" , /* label next to textfield */ 2,yn_strings , 1 ) ; PLUTO_add_string( plint , "Filename" , 0 , NULL , 19 ) ; PLUTO_add_string( plint , "Write ts" , /* label next to textfield */ 2,yn_strings , 1 ) ; /*--------- done with interface setup ---------*/ return plint ; }