Class ConvertToImageProcessor

Object
org.anchoranalysis.io.imagej.convert.ConvertToImageProcessor

public class ConvertToImageProcessor
extends Object
Converts other voxel data-structures (as used by Anchor) to an ImageJ ImageProcessor.
Author:
Owen Feehan
  • Method Summary

    Modifier and Type Method Description
    static ij.process.ImageProcessor from​(org.anchoranalysis.image.voxel.VoxelsUntyped voxels, int z)
    Creates a ImageProcessor by extracting a slice from a VoxelsUntyped.
    static ij.process.ImageProcessor fromByte​(org.anchoranalysis.image.voxel.buffer.slice.SliceBufferIndex<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedByteBuffer> pixelsForSlice, int z)
    Creates a ImageProcessor by extracting a slice from a SliceBufferIndex of type UnsignedByteBuffer.
    static ij.process.ImageProcessor fromByte​(org.anchoranalysis.image.voxel.buffer.VoxelBuffer<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedByteBuffer> slice, org.anchoranalysis.spatial.box.Extent extent)
    Creates a ImageProcessor from voxel-buffer (of type ByteBuffer) that is already a slice.
    static ij.process.ImageProcessor fromFloat​(org.anchoranalysis.image.voxel.buffer.VoxelBuffer<FloatBuffer> slice, org.anchoranalysis.spatial.box.Extent extent)
    Creates a ImageProcessor from voxel-buffer (of type FloatBuffer) that is already a slice.
    static ij.process.ImageProcessor fromShort​(org.anchoranalysis.image.voxel.buffer.slice.SliceBufferIndex<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedShortBuffer> pixelsForSlice, int z)
    Creates a ImageProcessor by extracting a slice from a SliceBufferIndex of type UnsignedShortBuffer.
    static ij.process.ImageProcessor fromShort​(org.anchoranalysis.image.voxel.buffer.VoxelBuffer<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedShortBuffer> slice, org.anchoranalysis.spatial.box.Extent extent)
    Creates a ImageProcessor from voxel-buffer (of type ShortBuffer) that is already a slice.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • from

      public static ij.process.ImageProcessor from​(org.anchoranalysis.image.voxel.VoxelsUntyped voxels, int z) throws ImageJConversionException
      Creates a ImageProcessor by extracting a slice from a VoxelsUntyped.
      Parameters:
      voxels - the voxels to extract a slice from.
      z - slice-index.
      Returns:
      a newly created image-procesor (reusing the existing buffer).
      Throws:
      ImageJConversionException - if the voxels are neither unsigned byte nor unsigned short (the only two supported types).
    • fromByte

      public static ij.process.ImageProcessor fromByte​(org.anchoranalysis.image.voxel.buffer.slice.SliceBufferIndex<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedByteBuffer> pixelsForSlice, int z)
      Creates a ImageProcessor by extracting a slice from a SliceBufferIndex of type UnsignedByteBuffer.
      Parameters:
      pixelsForSlice - the pixels to extract a slice from.
      z - slice-index.
      Returns:
      a newly created image-processor (reusing the existing buffer).
    • fromShort

      public static ij.process.ImageProcessor fromShort​(org.anchoranalysis.image.voxel.buffer.slice.SliceBufferIndex<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedShortBuffer> pixelsForSlice, int z)
      Creates a ImageProcessor by extracting a slice from a SliceBufferIndex of type UnsignedShortBuffer.
      Parameters:
      pixelsForSlice - the pixels to extract a slice from.
      z - slice-index.
      Returns:
      a newly created image-processor (reusing the existing buffer).
    • fromByte

      public static ij.process.ImageProcessor fromByte​(org.anchoranalysis.image.voxel.buffer.VoxelBuffer<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedByteBuffer> slice, org.anchoranalysis.spatial.box.Extent extent)
      Creates a ImageProcessor from voxel-buffer (of type ByteBuffer) that is already a slice.
      Parameters:
      slice - the voxels representing a slice
      extent - the size of image to create
      Returns:
      a newly created image-processor (reusing the existing buffer).
    • fromShort

      public static ij.process.ImageProcessor fromShort​(org.anchoranalysis.image.voxel.buffer.VoxelBuffer<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedShortBuffer> slice, org.anchoranalysis.spatial.box.Extent extent)
      Creates a ImageProcessor from voxel-buffer (of type ShortBuffer) that is already a slice.
      Parameters:
      slice - the voxels representing a slice.
      extent - the size of image to create.
      Returns:
      a newly created image-processor (reusing the existing buffer).
    • fromFloat

      public static ij.process.ImageProcessor fromFloat​(org.anchoranalysis.image.voxel.buffer.VoxelBuffer<FloatBuffer> slice, org.anchoranalysis.spatial.box.Extent extent)
      Creates a ImageProcessor from voxel-buffer (of type FloatBuffer) that is already a slice.
      Parameters:
      slice - the voxels representing a slice.
      extent - the size of image to create.
      Returns:
      a newly created image-processor (reusing the existing buffer).