jAER project on SourceForge

net.sf.jaer.chip
Class AEChip

java.lang.Object
  extended by java.util.Observable
      extended by net.sf.jaer.chip.Chip
          extended by net.sf.jaer.chip.Chip2D
              extended by net.sf.jaer.chip.AEChip
Direct Known Subclasses:
AERetina, CochleaChip, ColorContrastRetinaTestChip, Conv32, Conv64, Conv64InOut, Dollbrain1, Learning, Tmpdiff128AndCochleaAERb, Tmpdiff64AndCochleaAERb, Tnc3, UioStaticBioVis

public class AEChip
extends Chip2D

Describes a generic address-event chip, and includes fields for associated classes like its renderer, its rendering paint surface, file input and output event streams, and the event filters that can operate on its output. A subclass can add it's own default EventFilters so that users need not customize the FilterChain.

Author:
tobi

Field Summary
protected  AEFileInputStream aeInputStream
           
protected  AEFileOutputStream aeOutputStream
           
protected  AEViewer aeViewer
           
protected  java.util.ArrayList<java.lang.Class> defaultEventFilters
          List of default EventFilter2D filters
protected  EventExtractor2D eventExtractor
           
protected  FilterChain filterChain
           
protected  AEChipRenderer renderer
           
 
Fields inherited from class net.sf.jaer.chip.Chip2D
canvas, filterFrame, numCellTypes, sizeX, sizeY
 
Fields inherited from class net.sf.jaer.chip.Chip
biasgen, hardwareInterface, log, name
 
Constructor Summary
AEChip()
          Creates a new instance of AEChip
 
Method Summary
 void addDefaultEventFilter(java.lang.Class f)
          add a filter that is available by default
 AEFileInputStream getAeInputStream()
           
 AEFileOutputStream getAeOutputStream()
           
 AEViewer getAeViewer()
           
 java.util.ArrayList<java.lang.Class> getDefaultEventFilterClasses()
           
 java.util.ArrayList<java.lang.String> getDefaultEventFilterClassNames()
          return list of default filter class names (strings)
static java.lang.String getDescription()
           
 java.lang.Class<? extends BasicEvent> getEventClass()
          A chip has this intrinsic class of output events.
 EventExtractor2D getEventExtractor()
           
 FilterChain getFilterChain()
          This chain of filters for this AEChip
 FilterFrame getFilterFrame()
           
 int getNumCellTypes()
           
 int getRawAddressNumBits()
          The number of bits on an AE bus used for the raw device address.
 AEChipRenderer getRenderer()
           
 boolean isSubSamplingEnabled()
           
 void setAeInputStream(AEFileInputStream aeInputStream)
          Sets the file input stream and notifies Observers with the new AEFileInputStream.
 void setAeOutputStream(AEFileOutputStream aeOutputStream)
          Sets the file output stream and notifies Observers with the new AEFileOutputStream.
 void setAeViewer(AEViewer aeViewer)
          Sets the AEViewer that will display this chip.
 void setEventClass(java.lang.Class<? extends BasicEvent> eventClass)
          The AEChip produces this type of event.
 void setEventExtractor(EventExtractor2D eventExtractor)
          Sets the EventExtractor2D and notifies Observers with the new extractor.
 void setFilterChain(FilterChain filterChain)
           
 void setFilterFrame(FilterFrame filterFrame)
          Sets the FilterFrame and notifies Observers with the new FilterFrame.
 void setNumCellTypes(int numCellTypes)
          Sets the number of cell types from each x,y location that this AEChip has.
 void setRawAddressNumBits(int rawAddressNumBits)
          The number of bits on an AE bus used for the raw device address.
 void setRenderer(AEChipRenderer renderer)
          sets the class that renders the event histograms and notifies Observers with the new Renderer.
 void setSubSamplingEnabled(boolean subSamplingEnabled)
          Enables subsampling of the events in event extraction, rendering, etc.
 java.lang.String toString()
           
 
Methods inherited from class net.sf.jaer.chip.Chip2D
getCanvas, getMaxSize, getMinSize, getNumCells, getNumPixels, getPixelHeightUm, getPixelWidthUm, getSizeX, getSizeY, setCanvas, setName, setPixelHeightUm, setPixelWidthUm, setRenderer, setSizeX, setSizeY
 
Methods inherited from class net.sf.jaer.chip.Chip
getBiasgen, getHardwareInterface, getLastData, getName, getPreferredHardwareInterface, getPrefs, getRemoteControl, setBiasgen, setHardwareInterface, setLastData, setPreferredHardwareInterface, setPrefs, setRemoteControl
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

eventExtractor

protected EventExtractor2D eventExtractor

renderer

protected AEChipRenderer renderer

aeInputStream

protected AEFileInputStream aeInputStream

aeOutputStream

protected AEFileOutputStream aeOutputStream

filterChain

protected FilterChain filterChain

aeViewer

protected AEViewer aeViewer

defaultEventFilters

protected java.util.ArrayList<java.lang.Class> defaultEventFilters
List of default EventFilter2D filters

Constructor Detail

AEChip

public AEChip()
Creates a new instance of AEChip

Method Detail

getDescription

public static java.lang.String getDescription()

getDefaultEventFilterClasses

public java.util.ArrayList<java.lang.Class> getDefaultEventFilterClasses()
Returns:
list of default filter classes

getDefaultEventFilterClassNames

public java.util.ArrayList<java.lang.String> getDefaultEventFilterClassNames()
return list of default filter class names (strings)

Returns:
list of String fully qualified class names

addDefaultEventFilter

public void addDefaultEventFilter(java.lang.Class f)
add a filter that is available by default


getEventExtractor

public EventExtractor2D getEventExtractor()

setEventExtractor

public void setEventExtractor(EventExtractor2D eventExtractor)
Sets the EventExtractor2D and notifies Observers with the new extractor.

Parameters:
eventExtractor - the extractor; notifies Observers.

getNumCellTypes

public int getNumCellTypes()

setNumCellTypes

public void setNumCellTypes(int numCellTypes)
Sets the number of cell types from each x,y location that this AEChip has. Observers are called with the string "numCellTypes".

Parameters:
numCellTypes - the number of types, e.g. 2 for the temporal contrast retina with on/off types

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getRenderer

public AEChipRenderer getRenderer()
Overrides:
getRenderer in class Chip2D

setRenderer

public void setRenderer(AEChipRenderer renderer)
sets the class that renders the event histograms and notifies Observers with the new Renderer.


getAeInputStream

public AEFileInputStream getAeInputStream()

setAeInputStream

public void setAeInputStream(AEFileInputStream aeInputStream)
Sets the file input stream and notifies Observers with the new AEFileInputStream.

Parameters:
aeInputStream -

getAeOutputStream

public AEFileOutputStream getAeOutputStream()

setAeOutputStream

public void setAeOutputStream(AEFileOutputStream aeOutputStream)
Sets the file output stream and notifies Observers with the new AEFileOutputStream.

Parameters:
aeOutputStream -

getAeViewer

public AEViewer getAeViewer()

setAeViewer

public void setAeViewer(AEViewer aeViewer)
Sets the AEViewer that will display this chip. Notifies Observers of this chip with the aeViewer instance.

Parameters:
aeViewer - the viewer

getFilterFrame

public FilterFrame getFilterFrame()

setFilterFrame

public void setFilterFrame(FilterFrame filterFrame)
Sets the FilterFrame and notifies Observers with the new FilterFrame.

Parameters:
filterFrame -

isSubSamplingEnabled

public boolean isSubSamplingEnabled()

setSubSamplingEnabled

public void setSubSamplingEnabled(boolean subSamplingEnabled)
Enables subsampling of the events in event extraction, rendering, etc. Observers are notified with the string "subSamplingEnabled".

Parameters:
subSamplingEnabled - true to enable sub sampling

getFilterChain

public FilterChain getFilterChain()
This chain of filters for this AEChip

Returns:
the chain

setFilterChain

public void setFilterChain(FilterChain filterChain)

getEventClass

public java.lang.Class<? extends BasicEvent> getEventClass()
A chip has this intrinsic class of output events.

Returns:
Class of event type that extends BasicEvent

setEventClass

public void setEventClass(java.lang.Class<? extends BasicEvent> eventClass)
The AEChip produces this type of event.

Parameters:
eventClass - the class of event, extending BasicEvent

getRawAddressNumBits

public int getRawAddressNumBits()
The number of bits on an AE bus used for the raw device address. rawAddressNumBits/16 should set the number of bytes used to read and log captured data. E.g. 16 bits reads and writes short, and 32 bits reads and writes int. At present all chips write and read the same address data width, int (32 bits) as of data file format 2.0. Old data files will still be read correctly.


setRawAddressNumBits

public void setRawAddressNumBits(int rawAddressNumBits)
The number of bits on an AE bus used for the raw device address. rawAddressNumBits/16 should set the number of bytes used to read and log captured data. E.g. 16 bits reads and writes short, and 32 bits reads and writes int. At present all chips write and read the same address data width, int (32 bits) as of data file format 2.0. Old data files will still be read correctly.


jAER project on SourceForge