org.robokind.impl.vision
Class PortableImageEvent

java.lang.Object
  extended by org.robokind.impl.vision.PortableImageEvent
All Implemented Interfaces:
ImageEvent

public class PortableImageEvent
extends Object
implements ImageEvent

ImageEvent implementation wrapping an ImageEventRecord. Creates and caches a Java Image from the image data.

Author:
Matthew Stevenson

Nested Class Summary
static class PortableImageEvent.ImageRecordAdapter
          Adapts Avro ImageRecords to ImageEvents.
 
Constructor Summary
PortableImageEvent(ImageRecord record)
          Creates a new PortableImageEvent wrapping the given ImageRecord.
 
Method Summary
 int getChannelCount()
           
 int getHeight()
           
 Image getImage()
           
 long getImageId()
           
 ImageRecord getImageRecord()
          Returns the underlying ImageRecord.
 String getImageSourceId()
           
 long getImageTimestampUTC()
           
 int getWidth()
           
 int getWidthStep()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortableImageEvent

public PortableImageEvent(ImageRecord record)
Creates a new PortableImageEvent wrapping the given ImageRecord.

Parameters:
record - ImageRecord to wrap
Method Detail

getImage

public Image getImage()
Specified by:
getImage in interface ImageEvent

getImageRecord

public ImageRecord getImageRecord()
Returns the underlying ImageRecord.

Returns:
underlying ImageRecord

getImageSourceId

public String getImageSourceId()
Specified by:
getImageSourceId in interface ImageEvent

getImageTimestampUTC

public long getImageTimestampUTC()
Specified by:
getImageTimestampUTC in interface ImageEvent

getImageId

public long getImageId()
Specified by:
getImageId in interface ImageEvent

getWidth

public int getWidth()
Specified by:
getWidth in interface ImageEvent

getHeight

public int getHeight()
Specified by:
getHeight in interface ImageEvent

getChannelCount

public int getChannelCount()
Specified by:
getChannelCount in interface ImageEvent

getWidthStep

public int getWidthStep()
Specified by:
getWidthStep in interface ImageEvent


Copyright © 2011-2012. All Rights Reserved.