Class BranchChannels

Object
org.anchoranalysis.bean.AnchorBean<org.anchoranalysis.image.io.bean.stack.writer.StackWriter>
org.anchoranalysis.image.io.bean.stack.writer.StackWriter
org.anchoranalysis.plugin.io.bean.stack.writer.StackWriterDelegateBase
org.anchoranalysis.plugin.io.bean.stack.writer.BranchChannels

public class BranchChannels
extends StackWriterDelegateBase
Uses different raster-writers depending on the number/type of channels.

If any optional condition does not have a writer, then writer is used in this case. An exception is whenBinaryChannel, which instead falls back to whenSingleChannel if unspecified.

The order of precedence is:

  • whenNotEightBit
  • whenRGB
  • whenRGBAlpha
  • whenThreeChannels
  • whenBinaryChannel
  • whenSingleChannel
Author:
Owen Feehan
  • Constructor Summary

    Constructors 
    Constructor Description
    BranchChannels()  
  • Method Summary

    Modifier and Type Method Description
    org.anchoranalysis.image.io.bean.stack.writer.StackWriter getWhenBinaryChannel()
    Writer employed if a stack is a single-channeled binary image.
    org.anchoranalysis.image.io.bean.stack.writer.StackWriter getWhenNotEightBit()
    Writer employed if a stack contains channels that are not 8-bit.
    org.anchoranalysis.image.io.bean.stack.writer.StackWriter getWhenRGB()
    Writer employed if a stack is a three-channeled RGB image.
    org.anchoranalysis.image.io.bean.stack.writer.StackWriter getWhenRGBAlpha()
    Writer employed if a stack is a four-channeled RGBA image.
    org.anchoranalysis.image.io.bean.stack.writer.StackWriter getWhenSingleChannel()
    Writer employed if a stack is a single-channeled image, not guaranteed to be binary.
    org.anchoranalysis.image.io.bean.stack.writer.StackWriter getWhenThreeChannels()
    Writer employed if a stack is a three-channeled non-RGB image.
    org.anchoranalysis.image.io.bean.stack.writer.StackWriter getWriter()
    Default writer, if a more specific writer is not specified for a condition.
    protected org.anchoranalysis.image.io.bean.stack.writer.StackWriter selectDelegate​(org.anchoranalysis.image.io.stack.output.StackWriteOptions writeOptions)
    Selects a StackWriter to use as a delegate.
    void setWhenBinaryChannel​(org.anchoranalysis.image.io.bean.stack.writer.StackWriter whenBinaryChannel)
    Writer employed if a stack is a single-channeled binary image.
    void setWhenNotEightBit​(org.anchoranalysis.image.io.bean.stack.writer.StackWriter whenNotEightBit)
    Writer employed if a stack contains channels that are not 8-bit.
    void setWhenRGB​(org.anchoranalysis.image.io.bean.stack.writer.StackWriter whenRGB)
    Writer employed if a stack is a three-channeled RGB image.
    void setWhenRGBAlpha​(org.anchoranalysis.image.io.bean.stack.writer.StackWriter whenRGBAlpha)
    Writer employed if a stack is a four-channeled RGBA image.
    void setWhenSingleChannel​(org.anchoranalysis.image.io.bean.stack.writer.StackWriter whenSingleChannel)
    Writer employed if a stack is a single-channeled image, not guaranteed to be binary.
    void setWhenThreeChannels​(org.anchoranalysis.image.io.bean.stack.writer.StackWriter whenThreeChannels)
    Writer employed if a stack is a three-channeled non-RGB image.
    void setWriter​(org.anchoranalysis.image.io.bean.stack.writer.StackWriter writer)
    Default writer, if a more specific writer is not specified for a condition.

    Methods inherited from class org.anchoranalysis.plugin.io.bean.stack.writer.StackWriterDelegateBase

    fileFormat, writeStack

    Methods inherited from class org.anchoranalysis.image.io.bean.stack.writer.StackWriter

    fileFormatWarnUnexpected, writeStackWithExtension

    Methods inherited from class org.anchoranalysis.bean.AnchorBean

    checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • selectDelegate

      protected org.anchoranalysis.image.io.bean.stack.writer.StackWriter selectDelegate​(org.anchoranalysis.image.io.stack.output.StackWriteOptions writeOptions)
      Description copied from class: StackWriterDelegateBase
      Selects a StackWriter to use as a delegate.
      Specified by:
      selectDelegate in class StackWriterDelegateBase
      Parameters:
      writeOptions - options that specify what kind of rasters will be written.
      Returns:
      the selected StackWriter
    • getWriter

      public org.anchoranalysis.image.io.bean.stack.writer.StackWriter getWriter()
      Default writer, if a more specific writer is not specified for a condition.
    • setWriter

      public void setWriter​(org.anchoranalysis.image.io.bean.stack.writer.StackWriter writer)
      Default writer, if a more specific writer is not specified for a condition.
    • getWhenNotEightBit

      public org.anchoranalysis.image.io.bean.stack.writer.StackWriter getWhenNotEightBit()
      Writer employed if a stack contains channels that are not 8-bit.
    • setWhenNotEightBit

      public void setWhenNotEightBit​(org.anchoranalysis.image.io.bean.stack.writer.StackWriter whenNotEightBit)
      Writer employed if a stack contains channels that are not 8-bit.
    • getWhenRGB

      public org.anchoranalysis.image.io.bean.stack.writer.StackWriter getWhenRGB()
      Writer employed if a stack is a three-channeled RGB image.
    • setWhenRGB

      public void setWhenRGB​(org.anchoranalysis.image.io.bean.stack.writer.StackWriter whenRGB)
      Writer employed if a stack is a three-channeled RGB image.
    • getWhenRGBAlpha

      public org.anchoranalysis.image.io.bean.stack.writer.StackWriter getWhenRGBAlpha()
      Writer employed if a stack is a four-channeled RGBA image.
    • setWhenRGBAlpha

      public void setWhenRGBAlpha​(org.anchoranalysis.image.io.bean.stack.writer.StackWriter whenRGBAlpha)
      Writer employed if a stack is a four-channeled RGBA image.
    • getWhenSingleChannel

      public org.anchoranalysis.image.io.bean.stack.writer.StackWriter getWhenSingleChannel()
      Writer employed if a stack is a single-channeled image, not guaranteed to be binary.
    • setWhenSingleChannel

      public void setWhenSingleChannel​(org.anchoranalysis.image.io.bean.stack.writer.StackWriter whenSingleChannel)
      Writer employed if a stack is a single-channeled image, not guaranteed to be binary.
    • getWhenThreeChannels

      public org.anchoranalysis.image.io.bean.stack.writer.StackWriter getWhenThreeChannels()
      Writer employed if a stack is a three-channeled non-RGB image.
    • setWhenThreeChannels

      public void setWhenThreeChannels​(org.anchoranalysis.image.io.bean.stack.writer.StackWriter whenThreeChannels)
      Writer employed if a stack is a three-channeled non-RGB image.
    • getWhenBinaryChannel

      public org.anchoranalysis.image.io.bean.stack.writer.StackWriter getWhenBinaryChannel()
      Writer employed if a stack is a single-channeled binary image.
    • setWhenBinaryChannel

      public void setWhenBinaryChannel​(org.anchoranalysis.image.io.bean.stack.writer.StackWriter whenBinaryChannel)
      Writer employed if a stack is a single-channeled binary image.