SpikeStream Nemo Plugin  0.2
RasterModel.h
Go to the documentation of this file.
00001 #ifndef RASTERMODEL_H
00002 #define RASTERMODEL_H
00003 
00004 //SpikeStream includes
00005 #include "NeuronGroup.h"
00006 
00007 //Qwt includes
00008 #include "qwt_raster_data.h"
00009 #include "qwt_double_interval.h"
00010 
00011 //Qt includes
00012 #include <QHash>
00013 
00014 //Other includes
00015 #include <vector>
00016 using namespace std;
00017 
00018 
00019 namespace spikestream {
00020 
00022         class RasterModel : public QwtRasterData {
00023                 public:
00024                         RasterModel(QList<NeuronGroup*>& neuronGroupList);
00025                         ~RasterModel();
00026                         void addData(const QList<unsigned>& firingNeuronIDs, unsigned timeStep);
00027                         QwtRasterData *copy() const;
00028                         int getMinX();
00029                         int getMaxX();
00030                         int getMinY();
00031                         int getMaxY();
00032                         QwtDoubleInterval range() const;
00033                         double value(double x, double y) const;
00034 
00035                 private:
00036                         //====================  VARIABLES  ====================
00038                         QList<NeuronGroup*> neuronGroupList;
00039 
00041                         QHash<unsigned, bool>* dataArray;
00042 
00044                         int numTimeSteps;
00045 
00047                         int dataCount;
00048 
00051                         int readIndex;
00052 
00055                         int writeIndex;
00056 
00058                         unsigned minTimeStep;
00059 
00061                         unsigned maxNeuronID;
00062         };
00063 
00064 }
00065 
00066 #endif//RASTERMODEL_H
 All Classes Files Functions Variables Typedefs Defines