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)static org.anchoranalysis.image.voxel.buffer.VoxelBuffer<?>toVoxelBuffer(org.opencv.core.Mat mat, org.anchoranalysis.spatial.box.Extent extent)Converts aMatto aVoxelBuffer.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 aMatto aVoxelBufferwith voxel data-typeUnsignedByteBuffer.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 aMatto aVoxelBufferwith voxel data-typeUnsignedShortBuffer.
-
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.OperationFailedExceptionConverts aMatto aVoxelBuffer.- Parameters:
mat- theMatto convert.extent- the size of the image in theMat.- Returns:
- a newly created
VoxelBuffer, converted frommat. - 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 aMatto aVoxelBufferwith voxel data-typeUnsignedByteBuffer.- Parameters:
mat- theMatto convert.extent- the size of the image in theMat.- Returns:
- a newly created
VoxelBuffer, converted frommat.
-
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 aMatto aVoxelBufferwith voxel data-typeUnsignedShortBuffer.- Parameters:
mat- theMatto convert.extent- the size of the image in theMat.- Returns:
- a newly created
VoxelBuffer, converted frommat.
-
floatFromMat
public static org.anchoranalysis.image.voxel.buffer.VoxelBuffer<FloatBuffer> floatFromMat(org.opencv.core.Mat mat, org.anchoranalysis.spatial.box.Extent extent)- Parameters:
mat- theMatto convert.extent- the size of the image in theMat.- Returns:
- a newly created
VoxelBuffer, converted frommat.
-