Class TimeSeries

Object
TimeSeries
All Implemented Interfaces:
Iterable<Stack>

public class TimeSeries extends Object implements Iterable<Stack>
An ordered collection of Stacks, each representing a frame in a time-series.
Author:
Owen Feehan
  • Constructor Details

    • TimeSeries

      public TimeSeries(Stack frame)
      Creates a TimeSeries containing a single frame only.
      Parameters:
      frame - the single frame.
    • TimeSeries

      public TimeSeries(Stream<Stack> frames)
      Creates a TimeSeries from a stream of frames.
      Parameters:
      frames - the frames.
  • Method Details

    • getFrame

      public Stack getFrame(int index)
      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 at index.
    • 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

      public boolean allChannelsHaveType(VoxelDataType voxelDataType)
      Whether all Channels 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

      public Iterator<Stack> iterator()
      Specified by:
      iterator in interface Iterable<Stack>