Class ConvertStackToRGB

Object
ConvertStackToRGB

public class ConvertStackToRGB extends Object
Converts a Stack or DisplayStack to a RGBStack.
Author:
Owen Feehan
  • Method Details

    • convert

      public static RGBStack convert(Stack stack, StackDisplayer displayer, boolean alwaysNew) throws CreateException
      Converts all of a DisplayStack to a RGBStack.
      Parameters:
      stack - the stack to convert.
      displayer - how to convert stack to be displayed.
      alwaysNew - when true, new channels are always created. when false, they are only created if needed (e.g. if the voxel-data type is not already 8-bit).
      Returns:
      a newly created RGBStack with exactly three channels, and intensity-values converted to 8-bit.
      Throws:
      CreateException - cannot successfuly convert Stack to a DisplayStack (as an intermediate step).
    • convert

      public static RGBStack convert(DisplayStack stack, boolean alwaysNew)
      Converts all of a DisplayStack to a RGBStack.
      Parameters:
      stack - the stack to convert.
      alwaysNew - when true, new channels are always created. when false, they are only created if needed (e.g. if the voxel-data type is not already 8-bit).
      Returns:
      a newly created RGBStack with identical voxels and size as stack.
    • convertCropped

      public static RGBStack convertCropped(DisplayStack stack, BoundingBox box)
      Converts a bounding-box region in DisplayStack to a RGBStack.
      Parameters:
      stack - the stack, from which a portion is to be converted.
      box - the region in stack which is converted.
      Returns:
      a newly created RGBStack with identical voxels and size as stack.