Class ReadOptionsDelegate

Direct Known Subclasses:
ForceBitsPerPixel, ForceNumberChannels, ForceNumberFrames, ForceTimeSeriesToStack, SwitchChannelTime

public abstract class ReadOptionsDelegate extends ReadOptions
Forces a particular settings, but otherwise uses settings from a delegate

Sub-classes of this deliberately break the Liskov substitution principle by replacing existing behaviour

Author:
Owen Feehan
  • Constructor Details

    • ReadOptionsDelegate

      public ReadOptionsDelegate()
  • Method Details

    • determineChannelNames

      public Optional<List<String>> determineChannelNames(loci.formats.IFormatReader reader)
      Description copied from class: ReadOptions
      A list of channel-names, if available.

      The order matches the channel indexing e.g. the first name in the list corresponds to the channel with index=0.

      Specified by:
      determineChannelNames in class ReadOptions
      Parameters:
      reader - the bioformats reader
      Returns:
      the channel-names, if available.
    • sizeT

      public int sizeT(loci.formats.IFormatReader reader)
      Description copied from class: ReadOptions
      Number of time-points (frames in a time series).
      Specified by:
      sizeT in class ReadOptions
      Parameters:
      reader - the bioformats reader
      Returns:
      the number of channels
    • sizeZ

      public int sizeZ(loci.formats.IFormatReader reader)
      Description copied from class: ReadOptions
      Number of z-slices (slices in a 3D image).
      Specified by:
      sizeZ in class ReadOptions
      Parameters:
      reader - the bioformats reader
      Returns:
      the number of slices
    • sizeC

      public int sizeC(loci.formats.IFormatReader reader)
      Description copied from class: ReadOptions
      Number of channels.
      Specified by:
      sizeC in class ReadOptions
      Parameters:
      reader - the bioformats reader
      Returns:
      the number of channels
    • isRGB

      public boolean isRGB(loci.formats.IFormatReader reader)
      Description copied from class: ReadOptions
      Is it an image with three channels (red, green and blue)?
      Specified by:
      isRGB in class ReadOptions
      Parameters:
      reader - the bioformats reader
      Returns:
      true iff its a RGB image
    • effectiveBitsPerPixel

      public int effectiveBitsPerPixel(loci.formats.IFormatReader reader)
      Description copied from class: ReadOptions
      The number of bits used per pixel.

      This may be a smaller number than the size of the voxel's data-type e.g. a 16-bit format may be used to store only 12-bits of image data.

      Specified by:
      effectiveBitsPerPixel in class ReadOptions
      Parameters:
      reader - the bioformats reader
      Returns:
      the number of bits used per pixel.
    • channelsPerByteArray

      public int channelsPerByteArray(loci.formats.IFormatReader reader)
      Description copied from class: ReadOptions
      The number of channels returned with each call to IFormatReader.openBytes(int).
      Specified by:
      channelsPerByteArray in class ReadOptions
      Parameters:
      reader - the bioformats reader
      Returns:
      the number of channels returned with each call to openBytes.
    • delegate

      protected ReadOptions delegate()
      The ReadOptions that is used as a delegate by sub-classes.
      Returns:
      the delegate.
    • getOptions

      public ReadOptions getOptions()
      Options can be specified to alter how an image file is read.
    • setOptions

      public void setOptions(ReadOptions options)
      Options can be specified to alter how an image file is read.