Class StackWriteAttributesFactory

Object
StackWriteAttributesFactory

public class StackWriteAttributesFactory extends Object
Creates StackWriteAttributes to describe certain attributes.
Author:
Owen Feehan
  • Method Details

    • maybeAlways2D

      public static StackWriteAttributes maybeAlways2D(boolean always2D)
      A StackWriteAttributes which, depending on a flag, may be guaranteed to be 2D.
      Parameters:
      always2D - when true, this indicates that the stack is guaranteed to be always 2D.
      Returns:
      a newly created StackWriteAttributes.
    • rgbMaybe3D

      public static StackWriteAttributes rgbMaybe3D(boolean plusAlpha)
      A StackWriteAttributes which is always RGB/RGBA, and is not guaranteed to be 2D.
      Parameters:
      plusAlpha - when true, this indicates RGBA. when false, RGB.
      Returns:
      a newly created StackWriteAttributes.
    • binaryChannel

      public static StackWriteAttributes binaryChannel(boolean always2D)
      A StackWriteAttributes which is always a binary-channel, and depending on a flag, may be guaranteed to be 2D.
      Parameters:
      always2D - when true, this indicates that the stack is guaranteed to be always 2D.
      Returns:
      a newly created StackWriteAttributes.
    • singleChannelMaybe3D

      public static StackWriteAttributes singleChannelMaybe3D(boolean always2D)
      A StackWriteAttributes which is always a single-channel, and depending on a flag, may be guaranteed to be 2D.
      Parameters:
      always2D - when true, this indicates that the stack is guaranteed to be always 2D.
      Returns:
      a newly created StackWriteAttributes.
    • maybeRGB

      public static StackWriteAttributes maybeRGB(boolean rgb, boolean always2D, boolean plusAlpha)
      A StackWriteAttributes which depending on a flags, may be RGB/RGBA or not, may be guaranteed to be 2D or not.
      Parameters:
      rgb - when true, this indicates RGB or RGBA image.
      always2D - when true, this indicates that the stack is guaranteed to be always 2D.
      plusAlpha - when true, this indicates RGBA. when false, RGB. Only relevant when rgb==true.
      Returns:
      a newly created StackWriteAttributes.
    • maybeRGBWithoutAlpha

      public static StackWriteAttributes maybeRGBWithoutAlpha(boolean rgb)
      A StackWriteAttributes which depending on a flags, may be RGB or not.
      Parameters:
      rgb - when true, this indicates an RGB image (but never RGBA).
      Returns:
      a newly created StackWriteAttributes.
    • rgb

      public static StackWriteAttributes rgb(boolean always2D, boolean plusAlpha)
      A StackWriteAttributes which is always RGB, and depending on a flag, may be guaranteed to be 2D.
      Parameters:
      always2D - when true, this indicates that the stack is guaranteed to be always 2D.
      plusAlpha - when true, this indicates RGBA. when false, RGB.
      Returns:
      a newly created StackWriteAttributes.
    • from

      public static StackWriteAttributes from(Stack stack)
      The options that narrowly describe a stack as possible.
      Parameters:
      stack - the stack to derive options from.
      Returns:
      options that narrowly describe stack.