CARLsim  6.1.0
CARLsim: a GPU-accelerated SNN simulator
visual_stimulus.h
Go to the documentation of this file.
1 #ifndef _VISUAL_STIMULUS_H_
2 #define _VISUAL_STIMULUS_H_
3 
5 
6 #include <string>
7 class PoissonRate;
8 
13  enum stimType_t {
22  };
23 
24 
59 public:
60  // +++++ PUBLIC METHODS: CONSTRUCTOR / DESTRUCTOR / MEMBERS +++++++++++++++++++++++++++++++++++++++++++++++++++++ //
61 
71  VisualStimulus(std::string fileName, bool wrapAroundEOF=true);
72 
74  ~VisualStimulus();
75 
76 
77  // +++++ PUBLIC METHODS: READING FRAMES +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //
78 
91  unsigned char* readFrameChar();
92 
116  PoissonRate* readFramePoisson(float maxPoisson, float minPoisson=0.0f);
117 
124  void rewind();
125 
126  void print();
127 
128 
129  // +++++ PUBLIC METHODS: GETTERS / SETTERS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //
130 
131  int getWidth();
132  int getHeight();
133  int getLength();
134  int getChannels();
135  stimType_t getType();
136 
137  unsigned char* getCurrentFrameChar();
138  PoissonRate* getCurrentFramePoisson();
139  int getCurrentFrameNumber();
140 
141 
142 private:
143  // This class provides a pImpl for the CARLsim User API.
144  // \see https://marcmutz.wordpress.com/translated-articles/pimp-my-pimpl/
145  class Impl;
146  Impl* _impl;
147 };
148 
149 #endif
Class for generating Poisson spike trains.
Definition: poisson_rate.h:88
#define CARLSIM_VISUAL_STIMULUS_API
stimType_t
List of stimulus file types.
Class to integrate CARLsim with a stimulus created using VisualStimulus.m Version: 4/11/14 Author: Mi...