Class BufferedImageFromVoxels
Object
BufferedImageFromVoxels
Converts a
Voxels
instance into an AWT BufferedImage
.- Author:
- Owen Feehan
-
Method Summary
Modifier and TypeMethodDescriptionstatic BufferedImage
createGrayscaleByte
(Voxels<UnsignedByteBuffer> voxels) Creates aBufferedImage
from aVoxels<UnsignedByteBuffer>
.static BufferedImage
Creates aBufferedImage
from aVoxels<UnsignedShortBuffer>
.
-
Method Details
-
createGrayscaleByte
public static BufferedImage createGrayscaleByte(Voxels<UnsignedByteBuffer> voxels) throws CreateException Creates aBufferedImage
from aVoxels<UnsignedByteBuffer>
.- Parameters:
voxels
- the voxels.- Returns:
- a newly created 8-bit
BufferedImage
that 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 aBufferedImage
from aVoxels<UnsignedShortBuffer>
.- Parameters:
voxels
- the voxels.- Returns:
- a newly created 16-bit
BufferedImage
that 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.
-