Class ConvertToImagePlus

Object
ConvertToImagePlus

public class ConvertToImagePlus extends Object
Converts a channel or voxels into a ImagePlus.
Author:
Owen Feehan
  • Method Details

    • from

      public static ij.ImagePlus from(VoxelsUntyped voxels) throws ImageJConversionException
      Creates an ImagePlus from a VoxelsUntyped.

      The default image-resolution (see Resolution() is employed.

      Parameters:
      voxels - the voxels to be converted
      Returns:
      a newly created image-plus, reusing the input voxel's buffer without copying.
      Throws:
      ImageJConversionException - if the voxels are neither unsigned byte nor unsigned short (the only two supported types)
    • from

      public static ij.ImagePlus from(Channel channel) throws ImageJConversionException
      Creates an ImagePlus from a Channel.
      Parameters:
      channel - the channel to be converted
      Returns:
      a newly created image-plus, reusing the input channels's buffer without copying.
      Throws:
      ImageJConversionException - if the voxels are neither unsigned byte nor unsigned short (the only two supported types)
    • from

      public static ij.ImagePlus from(Stack stack, boolean makeRGB) throws ImageJConversionException
      Creates an ImagePlus from a Stack.
      Parameters:
      stack - the stack of channels to be converted
      makeRGB - if true, the stack is assumed to have respectively red, green, blue channels exactly. and outputted as a RGB-type image, otherwise an interleaved image-stack is created.
      Returns:
      a newly created image-plus, reusing the input channels's buffer without copying.
      Throws:
      ImageJConversionException - if any RGB channel is not unsigned 8-bit
    • fromSlice

      public static ij.ImagePlus fromSlice(Voxels<UnsignedByteBuffer> voxels, int sliceIndex, String name)
      Creates an ImagePlus from one slice of a Voxels<UnsignedByteBuffer> voxels.
      Parameters:
      voxels - the voxels from which a slice will be extracted to be converted
      sliceIndex - slice-index (z coordinate) to extract
      name - the name to use in the image-plus
      Returns:
      a newly created image-plus, reusing the input channels's buffer without copying.