Class TimeSeries
Object
TimeSeries
An ordered collection of
Stack
s, each representing a frame in a time-series.- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionTimeSeries
(Stream<Stack> frames) Creates aTimeSeries
from a stream of frames.TimeSeries
(Stack frame) Creates aTimeSeries
containing a single frame only. -
Method Summary
Modifier and TypeMethodDescriptionboolean
allChannelsHaveType
(VoxelDataType voxelDataType) Whether allChannel
s in all frames in the times-series have a particular voxel-data type?getFrame
(int index) Gets a frame in the time-series.boolean
isEmpty()
Whether the series contains no frames?iterator()
int
size()
The number of frames in the time-series.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
TimeSeries
Creates aTimeSeries
containing a single frame only.- Parameters:
frame
- the single frame.
-
TimeSeries
Creates aTimeSeries
from a stream of frames.- Parameters:
frames
- the frames.
-
-
Method Details
-
getFrame
Gets a frame in the time-series.- Parameters:
index
- the index of the frame, beginning at 0.- Returns:
- the corresponding frame.
- Throws:
IndexOutOfBoundsException
- if no frame exists atindex
.
-
isEmpty
public boolean isEmpty()Whether the series contains no frames?- Returns:
- true if no frames exist in the series. false if at least one frame exists.
-
size
public int size()The number of frames in the time-series.- Returns:
- the number of frames.
-
allChannelsHaveType
Whether allChannel
s in all frames in the times-series have a particular voxel-data type?- Parameters:
voxelDataType
- the voxel data-type to match.- Returns:
- true iff all frames have this data-type.
-
iterator
-