Class BufferedImageFromVoxels
Object
BufferedImageFromVoxels
Converts a
Voxels instance into an AWT BufferedImage.- Author:
- Owen Feehan
-
Method Summary
Modifier and TypeMethodDescriptionstatic BufferedImagecreateGrayscaleByte(Voxels<UnsignedByteBuffer> voxels) Creates aBufferedImagefrom aVoxels<UnsignedByteBuffer>.static BufferedImageCreates aBufferedImagefrom aVoxels<UnsignedShortBuffer>.
-
Method Details
-
createGrayscaleByte
public static BufferedImage createGrayscaleByte(Voxels<UnsignedByteBuffer> voxels) throws CreateException Creates aBufferedImagefrom aVoxels<UnsignedByteBuffer>.- Parameters:
voxels- the voxels.- Returns:
- a newly created 8-bit
BufferedImagethat reuses the underlying array in the buffer ofvoxels. - Throws:
CreateException- if the stack does not conform to a supported data-type or number of channels or if the stack is 3D which is unsupported.
-
createGrayscaleShort
public static BufferedImage createGrayscaleShort(Voxels<UnsignedShortBuffer> voxels) throws CreateException Creates aBufferedImagefrom aVoxels<UnsignedShortBuffer>.- Parameters:
voxels- the voxels.- Returns:
- a newly created 16-bit
BufferedImagethat reuses the underlying array in the buffer ofvoxels. - Throws:
CreateException- if the stack does not conform to a supported data-type or number of channels or if the stack is 3D which is unsupported.
-