|
jAER project on SourceForge | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.jaer.chip.TypedEventExtractor<T>
public abstract class TypedEventExtractor<T extends BasicEvent>
An abstract 2D event extractor for 16 bit raw addresses. It is called with addresses and timestamps and extracts these to {X, Y, type} arrays based on methods that you define by subclassing and overriding the abstract methods. xMask, yMask, typeMask mask for x, y address and cell type, and xShift, yShift, typeShift say how many bits to shift after masking, xFlip,yFlip,typeFlip use the chip size to flip the x,y, and type to invert the addresses.
| Field Summary | |
|---|---|
protected AEChip |
chip
|
protected boolean |
fliptype
|
protected boolean |
flipx
|
protected boolean |
flipy
|
protected boolean |
hexArrangement
|
protected EventPacket |
out
|
protected boolean |
rotate
|
protected int |
typemask
|
protected byte |
typeshift
|
protected int |
xmask
|
protected byte |
xshift
|
protected int |
ymask
|
protected byte |
yshift
|
| Constructor Summary | |
|---|---|
TypedEventExtractor(AEChip aechip)
Creates a new instance of RetinaEventExtractor |
|
| Method Summary | |
|---|---|
EventPacket |
extractPacket(AEPacketRaw in)
extracts the meaning of the raw events. |
void |
extractPacket(AEPacketRaw in,
EventPacket out)
Extracts the meaning of the raw events. |
int |
getAddressFromCell(int x,
int y,
int type)
computes the raw address from an x,y, and type. |
int |
getSubsampleThresholdEventCount()
|
byte |
getTypeFromAddress(int addr)
gets type from raw address. |
int |
getTypemask()
|
byte |
getTypeshift()
|
int |
getUsedBits()
|
short |
getXFromAddress(int addr)
Gets X from raw address. |
int |
getXmask()
|
byte |
getXshift()
|
short |
getYFromAddress(int addr)
gets Y from raw address. |
int |
getYmask()
|
byte |
getYshift()
|
boolean |
isFliptype()
|
boolean |
isFlipx()
|
boolean |
isFlipy()
|
boolean |
isSubsamplingEnabled()
|
boolean |
matchesAddress(int addr1,
int addr2)
|
AEPacketRaw |
reconstructRawPacket(EventPacket packet)
Reconstructs a raw packet suitable for logging to a data file, from an EventPacket that could be the result of filtering operations |
void |
setFliptype(boolean fliptype)
|
void |
setFlipx(boolean flipx)
|
void |
setFlipy(boolean flipy)
|
void |
setSubsampleThresholdEventCount(int subsampleThresholdEventCount)
|
void |
setSubsamplingEnabled(boolean subsamplingEnabled)
|
void |
setTypemask(int typemask)
|
void |
setTypeshift(byte typeshift)
|
void |
setXmask(int xmask)
bit mask for x address, before shift |
void |
setXshift(byte xshift)
|
void |
setYmask(int ymask)
|
void |
setYshift(byte yshift)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int xmask
protected int ymask
protected byte xshift
protected byte yshift
protected int typemask
protected byte typeshift
protected AEChip chip
protected boolean flipx
protected boolean flipy
protected boolean rotate
protected boolean fliptype
protected boolean hexArrangement
protected EventPacket out
| Constructor Detail |
|---|
public TypedEventExtractor(AEChip aechip)
aechip - the chip this extractor extracts| Method Detail |
|---|
public short getXFromAddress(int addr)
getXFromAddress in interface EventExtractor2Daddr - the raw address.
public short getYFromAddress(int addr)
getYFromAddress in interface EventExtractor2Daddr - the raw address.
public byte getTypeFromAddress(int addr)
getTypeFromAddress in interface EventExtractor2Daddr - the raw address.
public EventPacket extractPacket(AEPacketRaw in)
extractPacket in interface EventExtractor2Din - the raw events, can be null
public void extractPacket(AEPacketRaw in,
EventPacket out)
extractPacket in interface EventExtractor2Din - the raw events, can be nullout - the processed events. these are partially processed in-place. empty packet is returned if null is
supplied as input.public int getTypemask()
getTypemask in interface EventExtractor2Dpublic void setTypemask(int typemask)
setTypemask in interface EventExtractor2Dpublic byte getTypeshift()
getTypeshift in interface EventExtractor2Dpublic void setTypeshift(byte typeshift)
setTypeshift in interface EventExtractor2Dpublic int getXmask()
getXmask in interface EventExtractor2Dpublic void setXmask(int xmask)
setXmask in interface EventExtractor2Dpublic byte getXshift()
getXshift in interface EventExtractor2Dpublic void setXshift(byte xshift)
setXshift in interface EventExtractor2Dxshift - the number of bits to right shift raw address after masking with setXmask(int)public int getYmask()
getYmask in interface EventExtractor2Dpublic void setYmask(int ymask)
setYmask in interface EventExtractor2Dymask - the bit mask for y address, before shiftpublic byte getYshift()
getYshift in interface EventExtractor2Dpublic void setYshift(byte yshift)
setYshift in interface EventExtractor2Dyshift - the number of bits to right shift raw address after masking with setYmask(int)public boolean isFlipx()
isFlipx in interface EventExtractor2Dpublic void setFlipx(boolean flipx)
setFlipx in interface EventExtractor2Dpublic boolean isFlipy()
isFlipy in interface EventExtractor2Dpublic void setFlipy(boolean flipy)
setFlipy in interface EventExtractor2Dpublic boolean isFliptype()
isFliptype in interface EventExtractor2Dpublic void setFliptype(boolean fliptype)
setFliptype in interface EventExtractor2Dpublic int getUsedBits()
getUsedBits in interface EventExtractor2D
public boolean matchesAddress(int addr1,
int addr2)
matchesAddress in interface EventExtractor2D
public int getAddressFromCell(int x,
int y,
int type)
getAddressFromCell in interface EventExtractor2Dx - the x addressy - the y addresstype - the cell type
public boolean isSubsamplingEnabled()
isSubsamplingEnabled in interface EventExtractor2Dpublic void setSubsamplingEnabled(boolean subsamplingEnabled)
setSubsamplingEnabled in interface EventExtractor2Dpublic int getSubsampleThresholdEventCount()
getSubsampleThresholdEventCount in interface EventExtractor2Dpublic void setSubsampleThresholdEventCount(int subsampleThresholdEventCount)
setSubsampleThresholdEventCount in interface EventExtractor2Dpublic AEPacketRaw reconstructRawPacket(EventPacket packet)
reconstructRawPacket in interface EventExtractor2Dpacket - the EventPacket
|
jAER project on SourceForge | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||