Class ConvertToNativeImg

Object
org.anchoranalysis.image.voxel.convert.imglib2.ConvertToNativeImg

public class ConvertToNativeImg
extends Object
Converts the Voxels and VoxelBuffer data-types used in Anchor to the NativeImg used in ImgLib2.
Author:
Owen Feehan
  • Method Summary

    Modifier and Type Method Description
    static net.imglib2.img.NativeImg<net.imglib2.type.numeric.integer.UnsignedByteType,​net.imglib2.img.basictypeaccess.array.ByteArray> fromByte​(Voxels<UnsignedByteBuffer> voxels)
    Creates an NativeImg from Voxels with an unsigned byte data-type.
    static net.imglib2.img.NativeImg<net.imglib2.type.numeric.real.FloatType,​net.imglib2.img.basictypeaccess.array.FloatArray> fromFloat​(Voxels<FloatBuffer> voxels)
    Creates an NativeImg from Voxels with a float data-type.
    static net.imglib2.img.NativeImg<net.imglib2.type.numeric.integer.UnsignedShortType,​net.imglib2.img.basictypeaccess.array.ShortArray> fromShort​(Voxels<UnsignedShortBuffer> voxels)
    Creates an NativeImg from Voxels with an unsigned short data-type.

    Methods inherited from class java.lang.Object

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

    • fromByte

      public static net.imglib2.img.NativeImg<net.imglib2.type.numeric.integer.UnsignedByteType,​net.imglib2.img.basictypeaccess.array.ByteArray> fromByte​(Voxels<UnsignedByteBuffer> voxels)
      Creates an NativeImg from Voxels with an unsigned byte data-type.
      Parameters:
      voxels - the voxels to use in the NativeImg.
      Returns:
      the newly created NativeImg, either reusing the memory in voxels or else a copy of it.
    • fromShort

      public static net.imglib2.img.NativeImg<net.imglib2.type.numeric.integer.UnsignedShortType,​net.imglib2.img.basictypeaccess.array.ShortArray> fromShort​(Voxels<UnsignedShortBuffer> voxels)
      Creates an NativeImg from Voxels with an unsigned short data-type.
      Parameters:
      voxels - the voxels to use in the NativeImg.
      Returns:
      the newly created NativeImg, either reusing the memory in voxels or else a copy of it.
    • fromFloat

      public static net.imglib2.img.NativeImg<net.imglib2.type.numeric.real.FloatType,​net.imglib2.img.basictypeaccess.array.FloatArray> fromFloat​(Voxels<FloatBuffer> voxels)
      Creates an NativeImg from Voxels with a float data-type.
      Parameters:
      voxels - the voxels to use in the NativeImg.
      Returns:
      the newly created NativeImg, either reusing the memory in voxels or else a copy of it.