NeuroScript.C
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #ifndef SCRIPT_NEUROSCRIPT_C_DEFINED
00039 #define SCRIPT_NEUROSCRIPT_C_DEFINED
00040
00041 #include "Script/NeuroScript.H"
00042
00043 #include "Media/FrameSeries.H"
00044 #include "Neuro/AttentionGuidanceMap.H"
00045 #include "Neuro/Brain.H"
00046 #include "Neuro/GistEstimator.H"
00047 #include "Neuro/InferoTemporal.H"
00048 #include "Neuro/Retina.H"
00049 #include "Neuro/EyeHeadController.H"
00050 #include "Neuro/NeuroSimEvents.H"
00051 #include "Neuro/SaliencyMap.H"
00052 #include "Neuro/ShapeEstimator.H"
00053 #include "Neuro/SimulationViewer.H"
00054 #include "Neuro/StdBrain.H"
00055 #include "Neuro/TaskRelevanceMap.H"
00056 #include "Neuro/VisualCortex.H"
00057 #include "Neuro/WinnerTakeAll.H"
00058 #include "Script/ImageScript.H"
00059 #include "Script/MediaScript.H"
00060 #include "Script/ModelScript.H"
00061 #include "tcl/objpkg.h"
00062 #include "tcl/list.h"
00063 #include "tcl/pkg.h"
00064
00065 namespace
00066 {
00067 tcl::list brainEvolve(nub::soft_ref<Brain> brain,
00068 nub::soft_ref<SimEventQueue> q)
00069 {
00070 const SimStatus status = q->evolve();
00071 bool covertshift = false;
00072 if (SeC<SimEventWTAwinner> e = q->check<SimEventWTAwinner>(0))
00073 covertshift = true;
00074
00075 tcl::list result;
00076 result.append(q->now());
00077 result.append(covertshift);
00078 result.append(SIM_BREAK == status);
00079
00080 return result;
00081 }
00082 }
00083
00084 extern "C"
00085 int Brain_Init(Tcl_Interp* interp)
00086 {
00087 GVX_PKG_CREATE(pkg, interp, "Brain", "4.$Revision: 1$");
00088 pkg->inherit_pkg("Modelcomponent");
00089 tcl::def_basic_type_cmds<Brain>(pkg, SRC_POS);
00090
00091 registerComponentCreator<Brain>();
00092
00093 pkg->def("evolve", "objref seq", &brainEvolve, SRC_POS);
00094
00095
00096
00097 GVX_PKG_RETURN(pkg);
00098 }
00099
00100
00101 extern "C"
00102 int Stdbrain_Init(Tcl_Interp* interp)
00103 {
00104 GVX_PKG_CREATE(pkg, interp, "StdBrain", "4.$Revision: 1$");
00105 pkg->inherit_pkg("Brain");
00106 tcl::def_basic_type_cmds<StdBrain>(pkg, SRC_POS);
00107
00108 registerComponentCreator<StdBrain>();
00109
00110 GVX_PKG_RETURN(pkg);
00111 }
00112
00113 extern "C"
00114 int Winnertakeall_Init(Tcl_Interp* interp)
00115 {
00116 GVX_PKG_CREATE(pkg, interp, "WinnerTakeAll", "4.$Revision: 1$");
00117 pkg->inherit_pkg("Modelcomponent");
00118 tcl::def_basic_type_cmds<WinnerTakeAll>(pkg, SRC_POS);
00119
00120 GVX_PKG_RETURN(pkg);
00121 }
00122
00123 extern "C"
00124 int Winnertakeallstd_Init(Tcl_Interp* interp)
00125 {
00126 GVX_PKG_CREATE(pkg, interp, "WinnerTakeAllStd", "4.$Revision: 1$");
00127 pkg->inherit_pkg("Winnertakeall");
00128 tcl::def_basic_type_cmds<WinnerTakeAllStd>(pkg, SRC_POS);
00129
00130 GVX_PKG_RETURN(pkg);
00131 }
00132
00133
00134
00135
00136
00137
00138
00139 #endif // SCRIPT_NEUROSCRIPT_C_DEFINED