Class VoxelBufferFromMat

Object
org.anchoranalysis.plugin.opencv.convert.VoxelBufferFromMat

public class VoxelBufferFromMat
extends Object
Converts a Mat to a VoxelBuffer.
Author:
Owen Feehan
  • Method Summary

    Modifier and Type Method Description
    static org.anchoranalysis.image.voxel.buffer.VoxelBuffer<FloatBuffer> floatFromMat​(org.opencv.core.Mat mat, org.anchoranalysis.spatial.box.Extent extent)
    Converts a Mat to a VoxelBuffer with voxel data-type FloatBuffer.
    static org.anchoranalysis.image.voxel.buffer.VoxelBuffer<?> toVoxelBuffer​(org.opencv.core.Mat mat, org.anchoranalysis.spatial.box.Extent extent)
    Converts a Mat to a VoxelBuffer.
    static org.anchoranalysis.image.voxel.buffer.VoxelBuffer<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedByteBuffer> unsignedByteFromMat​(org.opencv.core.Mat mat, org.anchoranalysis.spatial.box.Extent extent)
    Converts a Mat to a VoxelBuffer with voxel data-type UnsignedByteBuffer.
    static org.anchoranalysis.image.voxel.buffer.VoxelBuffer<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedShortBuffer> unsignedShortFromMat​(org.opencv.core.Mat mat, org.anchoranalysis.spatial.box.Extent extent)
    Converts a Mat to a VoxelBuffer with voxel data-type UnsignedShortBuffer.

    Methods inherited from class java.lang.Object

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

    • toVoxelBuffer

      public static org.anchoranalysis.image.voxel.buffer.VoxelBuffer<?> toVoxelBuffer​(org.opencv.core.Mat mat, org.anchoranalysis.spatial.box.Extent extent) throws org.anchoranalysis.core.exception.OperationFailedException
      Converts a Mat to a VoxelBuffer.
      Parameters:
      mat - the Mat to convert.
      extent - the size of the image in the Mat.
      Returns:
      a newly created VoxelBuffer, converted from mat.
      Throws:
      org.anchoranalysis.core.exception.OperationFailedException - if it has an supported voxel data-type.
    • unsignedByteFromMat

      public static org.anchoranalysis.image.voxel.buffer.VoxelBuffer<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedByteBuffer> unsignedByteFromMat​(org.opencv.core.Mat mat, org.anchoranalysis.spatial.box.Extent extent)
      Converts a Mat to a VoxelBuffer with voxel data-type UnsignedByteBuffer.
      Parameters:
      mat - the Mat to convert.
      extent - the size of the image in the Mat.
      Returns:
      a newly created VoxelBuffer, converted from mat.
    • unsignedShortFromMat

      public static org.anchoranalysis.image.voxel.buffer.VoxelBuffer<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedShortBuffer> unsignedShortFromMat​(org.opencv.core.Mat mat, org.anchoranalysis.spatial.box.Extent extent)
      Converts a Mat to a VoxelBuffer with voxel data-type UnsignedShortBuffer.
      Parameters:
      mat - the Mat to convert.
      extent - the size of the image in the Mat.
      Returns:
      a newly created VoxelBuffer, converted from mat.
    • floatFromMat

      public static org.anchoranalysis.image.voxel.buffer.VoxelBuffer<FloatBuffer> floatFromMat​(org.opencv.core.Mat mat, org.anchoranalysis.spatial.box.Extent extent)
      Converts a Mat to a VoxelBuffer with voxel data-type FloatBuffer.
      Parameters:
      mat - the Mat to convert.
      extent - the size of the image in the Mat.
      Returns:
      a newly created VoxelBuffer, converted from mat.