public class FeatureTrack extends java.lang.Object implements java.io.Serializable, java.lang.Iterable<FeatureFrame>, SegmentListener
| Constructor and Description |
|---|
FeatureTrack()
Instantiates a new FeatureTrack.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(FeatureFrame ff)
Adds the specified FeatureFrame.
|
void |
addFeatureExtractor(FeatureExtractor<?,?> e)
Adds a new
FeatureExtractor. |
void |
clear()
Clears all memory of feature frames.
|
FeatureFrame |
get(int index)
Gets the FeatureFrame at the given index.
|
FeatureFrame |
getFrameAt(double timeMS)
Gets the frame for the given offset, in milliseconds, into the FeatureLayer.
|
FeatureFrame |
getFrameBefore(double timeMS)
Gets the frame for the given offset, in milliseconds, into the FeatureLayer, or the last frame before then.
|
int |
getFrameMemory() |
FeatureFrame |
getLastFrame()
Gets the last FeatureFrame in this FeatureTrack.
|
int |
getNumberOfFrames()
Returns the number of
FeatureFrames stored in this FeatureTrack. |
java.util.Iterator<FeatureFrame> |
iterator()
Returns an iterator over the
FeatureFrames. |
void |
newSegment(TimeStamp startTime,
TimeStamp endTime)
Tells this FeatureTrack to log a new
FeatureFrame, with the given startTime and endTime. |
void |
remove(FeatureFrame ff)
Removes the specified FeatureFrame.
|
void |
removeFeatureExtractor(FeatureExtractor<?,?> e)
Removes the specified FeatureExtractor.
|
void |
removeRange(double startRangeMS,
double endRangeMS)
Remove all feature frames in the given range.
|
void |
setFrameMemory(int frameMemory) |
public void add(FeatureFrame ff)
ff - the FeatureFrame.public void remove(FeatureFrame ff)
ff - the FeatureFrame to remove.public void removeRange(double startRangeMS,
double endRangeMS)
startRangeMS - the beginning of the range.endRangeMS - the end of the range.public FeatureFrame get(int index)
index - the index.public FeatureFrame getFrameAt(double timeMS)
timeMS - the millisecond offset.public FeatureFrame getFrameBefore(double timeMS)
timeMS - the millisecond offset.public FeatureFrame getLastFrame()
public void addFeatureExtractor(FeatureExtractor<?,?> e)
FeatureExtractor. When newSegment() is called, the FeatureTrack creates a new FeatureFrame
with the given start and end times and adds the data from all of its FeatureExtractors to the FeatureFrame.e - the FeatureExtractor.public void removeFeatureExtractor(FeatureExtractor<?,?> e)
e - the FeatureExtractor.public void newSegment(TimeStamp startTime, TimeStamp endTime)
FeatureFrame, with the given startTime and endTime. The FeatureTrack
will gather features from its various FeatureExtractors at this point.newSegment in interface SegmentListenerstartTime - the start time.endTime - the end time.java.lang.CloneNotSupportedExceptionpublic java.util.Iterator<FeatureFrame> iterator()
FeatureFrames.iterator in interface java.lang.Iterable<FeatureFrame>public int getFrameMemory()
public void setFrameMemory(int frameMemory)
public int getNumberOfFrames()
FeatureFrames stored in this FeatureTrack.public void clear()