jAER project on SourceForge

ch.unizh.ini.jaer.projects.stereo3D
Class AE3DOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by java.io.DataOutputStream
              extended by ch.unizh.ini.jaer.projects.stereo3D.AE3DOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.DataOutput, java.io.Flushable

public class AE3DOutputStream
extends java.io.DataOutputStream

Class to stream out packets of 3D reconstructed events in binary. The file format is
int32 x
int32 y
int32 disparity
int32 method
int32 lead_side
float value
int32 timestamp
repeated for the number of events in the file.

Author:
tobi

Field Summary
 
Fields inherited from class java.io.DataOutputStream
written
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
AE3DOutputStream(java.io.OutputStream os, int type)
          Creates a new instance of AEOutputStream.
 
Method Summary
 void writeHeaderLine(java.lang.String s)
          Writes a comment header line.
 void writePacket(AEPacket3D ae)
          Writes the packet out as sequence of address/timestamp's, just as they came as input from the device.
 
Methods inherited from class java.io.DataOutputStream
flush, size, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
 
Methods inherited from class java.io.FilterOutputStream
close, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.io.DataOutput
write
 

Constructor Detail

AE3DOutputStream

public AE3DOutputStream(java.io.OutputStream os,
                        int type)
Creates a new instance of AEOutputStream.

Parameters:
os - an output stream, e.g. from new BufferedOutputStream(new FileOutputStream(File f).
Method Detail

writePacket

public void writePacket(AEPacket3D ae)
                 throws java.io.IOException
Writes the packet out as sequence of address/timestamp's, just as they came as input from the device. The notion of a packet is discarded to simplify later reading an input stream from the output stream result.

Parameters:
ae - a raw addresse-event packet
Throws:
java.io.IOException

writeHeaderLine

public void writeHeaderLine(java.lang.String s)
                     throws java.io.IOException
Writes a comment header line. Writes the string with prepended '#' and appended '\r\n'

Parameters:
s - the string
Throws:
java.io.IOException

jAER project on SourceForge