00001 /**************************************************************************** 00002 ** Form interface generated from reading ui file 'Qt/BiasImageForm.ui' 00003 ** 00004 ** 00005 ** WARNING! All changes made in this file will be lost! 00006 ****************************************************************************/ 00007 00008 #ifndef BIASIMAGEFORM_H 00009 #define BIASIMAGEFORM_H 00010 00011 #include <qvariant.h> 00012 #include <qpixmap.h> 00013 #include <qmainwindow.h> 00014 #include "Image/Image.H" 00015 #include "Image/Pixels.H" 00016 #include "Image/DrawOps.H" 00017 #include "Image/CutPaste.H" 00018 #include "BiasSettingsDialog.h" 00019 #include "Component/ModelManager.H" 00020 #include "Neuro/Brain.H" 00021 #include "Neuro/SimulationViewerStd.H" 00022 #include "Neuro/VisualCortex.H" 00023 #include "Qt/ImageCanvas.h" 00024 #include "Neuro/SaliencyMap.H" 00025 #include "Image/ColorOps.H" 00026 #include "Media/TestImages.H" 00027 #include "Channels/DescriptorVec.H" 00028 #include "Learn/Bayes.H" 00029 #include "DescriptorVecDialog.h" 00030 #include "BayesNetworkDialog.h" 00031 #include "SceneSettingsDialog.h" 00032 00033 class QVBoxLayout; 00034 class QHBoxLayout; 00035 class QGridLayout; 00036 class QSpacerItem; 00037 class QAction; 00038 class QActionGroup; 00039 class QToolBar; 00040 class QPopupMenu; 00041 class ImageCanvas; 00042 class QTabWidget; 00043 class QWidget; 00044 class QLabel; 00045 class QSpinBox; 00046 class QComboBox; 00047 class QPushButton; 00048 class QLineEdit; 00049 00050 class BiasImageForm : public QMainWindow 00051 { 00052 Q_OBJECT 00053 00054 public: 00055 BiasImageForm( QWidget* parent = 0, const char* name = 0, WFlags fl = WType_TopLevel ); 00056 ~BiasImageForm(); 00057 00058 QTabWidget* tabDisp; 00059 QWidget* tab; 00060 ImageCanvas* imgDisp; 00061 QLabel* textLabel1_2; 00062 QSpinBox* itsSceneNumber; 00063 QComboBox* itsSelectObject; 00064 QPushButton* EvolveBrainButton; 00065 QPushButton* runButton; 00066 QLabel* textLabel1; 00067 QSpinBox* timesSpinBox; 00068 QLabel* textLabel2; 00069 QLabel* msgLabel; 00070 QLineEdit* itsObjectName; 00071 QMenuBar *MenuBar; 00072 QPopupMenu *fileMenu; 00073 QPopupMenu *Edit; 00074 QPopupMenu *popupMenu_6; 00075 QPopupMenu *popupMenu_12; 00076 QPopupMenu *View; 00077 QAction* fileOpenAction; 00078 QAction* fileSaveAsAction; 00079 QAction* fileExitAction; 00080 QAction* editConfigureAction; 00081 QAction* editBias_SettingsAction; 00082 QActionGroup* viewActionGroup; 00083 QAction* viewTrajAction; 00084 QAction* viewSMapAction; 00085 QAction* viewChannelsAction; 00086 QAction* editDescriptor_VecAction; 00087 QAction* editBayes_NetworkAction; 00088 QAction* editBayes_NetworkViewAction; 00089 QAction* editBayes_NetworkLoad_NetworkAction; 00090 QAction* editBayes_NetworkSave_NetworkAction; 00091 QAction* editConfigureBias_ImageAction; 00092 QAction* editConfigureScene_SettingsAction; 00093 QAction* editConfigureTrainAction; 00094 QAction* editConfigureTestAction; 00095 QAction* viewShow_LabelsAction; 00096 QAction* viewShow_Object_LabelAction; 00097 00098 virtual void init( ModelManager & manager, nub::ref<Brain> brain, nub::ref<SimEventQueue> seq ); 00099 virtual void showTraj(); 00100 virtual void showSMap(); 00101 virtual void showChannels(); 00102 virtual void classifyFovea( int x, int y, int button ); 00103 virtual void logFixation(const char *name, const int x,const int y,const std::vector<double> & FV); 00104 00105 public slots: 00106 virtual void fileOpen(); 00107 virtual void fileSave(); 00108 virtual void fileExit(); 00109 virtual void showBiasSettings(); 00110 virtual void evolveBrain(); 00111 virtual void configureView( QAction * action ); 00112 virtual void getDescriptor( int x, int y, int button ); 00113 virtual void showDescriptorVec(); 00114 virtual void run(); 00115 virtual void loadBayesNetwork(); 00116 virtual void saveBayesNetwork(); 00117 virtual void viewBayesNetwork(); 00118 virtual void setBiasImage( bool biasVal ); 00119 virtual void showSceneSettings(); 00120 virtual void getScene( int scene ); 00121 virtual void showLabels( bool show ); 00122 virtual void biasForObject( int obj ); 00123 virtual void showObjectLabel( bool show ); 00124 00125 protected: 00126 int clickClass; 00127 TestImages *itsTestScenes; 00128 TestImages *itsTrainScenes; 00129 Bayes *itsBayesNetwork; 00130 DescriptorVecDialog itsDescriptorVecDialog; 00131 nub::soft_ref<SimEventQueue> itsSEQ; 00132 nub::soft_ref<Brain> itsBrain; 00133 ModelManager *itsMgr; 00134 Image< PixRGB<byte> > itsImg; 00135 BiasSettingsDialog itsBiasSettingsDialog; 00136 Image< PixRGB<byte> > itsOutputImg; 00137 DescriptorVec* itsDescriptorVec; 00138 std::vector<Point2D<int> > itsTargetsLoc; 00139 SceneSettingsDialog itsSceneSettingsDialog; 00140 BayesNetworkDialog itsBayesNetworkDialog; 00141 int itsCurrentScene; 00142 Point2D<int> itsCurrentWinner; 00143 bool itsNewImage; 00144 00145 QVBoxLayout* BiasImageFormLayout; 00146 QHBoxLayout* tabLayout; 00147 QHBoxLayout* layout4; 00148 QSpacerItem* spacer3_2; 00149 QHBoxLayout* layout3; 00150 00151 protected slots: 00152 virtual void languageChange(); 00153 00154 private: 00155 bool itsViewChannels; 00156 bool itsViewSMap; 00157 bool itsViewTraj; 00158 00159 QPixmap image0; 00160 QPixmap image1; 00161 00162 }; 00163 00164 #endif // BIASIMAGEFORM_H