TarzaNN
TarzaNN neural network simulator
|
00001 /**************************************************************************** 00002 ** 00003 ** Copyright C 2002-2012 Laboratory for Active and Attentive Vision (LAAV), Department of Computer Science and Engineering, York University, Toronto, ON, Canada. 00004 ** All rights reserved. 00005 ** 00006 ** This file is part of the TarzaNN Neural Network Simulator. 00007 ** 00008 ** This file may be distributed and/or modified under the terms of the 00009 ** GNU General Public License version 2 as published by the Free Software 00010 ** Foundation and appearing in the file LICENSE.GPL included in the 00011 ** packaging of this file. 00012 ** 00013 ** See http://www.tarzann.org/gpl/ for GPL licensing information. 00014 ** 00015 ** Contact info@tarzann.org if any conditions of this licensing are 00016 ** not clear to you. 00017 ** 00018 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00019 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00020 ** 00021 ****************************************************************************/ 00022 00023 #ifndef INPUTFEATUREPLANEABSTRACT_H_INCLUDED 00024 #define INPUTFEATUREPLANEABSTRACT_H_INCLUDED 00025 00026 #include "OutputImage.h" 00027 #include "Network.h" 00028 #include "FeaturePlaneAbstract.h" 00029 #include "UI_ImageViewer.h" 00030 00031 //how many steps should fixation be maintained 00032 #define STEPS_TO_IOR 2 00033 00035 class InputFeaturePlaneAbstract : public FeaturePlaneAbstract { 00036 public: 00038 InputFeaturePlaneAbstract( Network* net, int l, QString* name, bool isWTA, bool visible, NotifyStrategyAbstract* notify); 00040 InputFeaturePlaneAbstract( Network* net, int l, QString* name, int w, int h, bool isWTA, bool visible, NotifyStrategyAbstract* notify); 00042 InputFeaturePlaneAbstract(); 00044 ~InputFeaturePlaneAbstract(); 00045 00047 void initFixationViewer(); 00048 00050 FeaturePlaneInput* addFilter(Filter* f, FeaturePlaneAbstract*fp, int type, int fpOutputIndex, bool wta); 00051 00052 virtual void inhibitReturn(){}; 00053 virtual void applyGatingControl(Matrix* theGatingControl){}; 00054 virtual void applyIOR(Matrix* iorMap){}; 00056 bool isInputFP() {return true;} 00057 00059 QImage* getBackupInput(){return backupInput;} 00060 00062 UI_ImageViewer* imageViewer; 00064 void setFixationViewer( UI_ImageViewer* theImageViewer); 00065 00066 protected: 00067 QMutex localAccess; 00069 virtual void step(); 00071 virtual void run(); 00072 00073 bool runStepMultipletimes; 00075 QImage* backupInput; 00076 00077 int eyeMovementsCounter; 00078 // QPixmap* saccadeHistoryImage; 00079 QImage* saccadeHistoryImage; 00080 00081 // QPixmap* worldImage; 00082 QImage* saccadeBackgroundImage; 00083 QMutex saccadeBackgroundImageMutex; 00084 00086 bool updateFixationViewer(); 00087 00089 int iorCounter; 00090 00091 private: 00093 void initialize( bool isWTA); 00094 00096 void _updateFixationViewer(int dx, int dy); 00098 int abs_saccade_x, abs_saccade_y; 00100 int abs_saccade_prev_x, abs_saccade_prev_y; 00101 }; 00102 #endif //INPUTFEATUREPLANEABSTRACT_H_INCLUDED