
#ifndef SQ_SPIKINGCHANNEL_H
#define SQ_SPIKINGCHANNEL_H

#include <basespikingchannel.h>
#include <radialscheme.h>

//And here comes class sqSpikingChannel : it is a layer of spiking cells that parse the visual field according to an homogenous square sampling pattern, with a uniform one-dimensional density.


class sqSpikingChannel: public BaseSpikingChannel

{
protected :
  double uniformDensity;                        //1D-sampling density (in units per 1D-pixel).

  //will define the number of cells in the square array
  int numberX, numberY;

  //Noise indicators :
  double noisePos;

public :

  XML_IZE_MACRO;

  //Indexing tool :
  int index(int nx, int ny)
  {
    return nx*numberX+ny;
  }

  //Cell density:
  double cellDensity(double r){return uniformDensity;}

  //Constructors/Destructor :

  sqSpikingChannel(double stepp=1.0);
  virtual ~sqSpikingChannel(void);

  //Channel parameter definition functions :

  void set_sizeX(int f);
  void set_sizeY(int f);
  void set_uniformDensity(double f);
  void set_channel(int sx, int sy, double dens);

  void set_noisePos(double f);

  void allocateValues();
};

#endif

