Class ConvertToImagePlus
Object
org.anchoranalysis.io.imagej.convert.ConvertToImagePlus
public class ConvertToImagePlus extends Object
Converts a channel or voxels into a
ImagePlus.- Author:
- Owen Feehan
-
Method Summary
Modifier and Type Method Description static ij.ImagePlusfrom(Channel channel)Creates anImagePlusfrom aChannel.static ij.ImagePlusfrom(Stack stack, boolean makeRGB)Creates anImagePlusfrom aStack.static ij.ImagePlusfrom(org.anchoranalysis.image.voxel.VoxelsUntyped voxels)Creates anImagePlusfrom aVoxelsUntyped.static ij.ImagePlusfromSlice(org.anchoranalysis.image.voxel.Voxels<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedByteBuffer> voxels, int sliceIndex, String name)Creates anImagePlusfrom one slice of aVoxels<UnsignedByteBuffer> voxels.
-
Method Details
-
from
public static ij.ImagePlus from(org.anchoranalysis.image.voxel.VoxelsUntyped voxels) throws ImageJConversionExceptionCreates anImagePlusfrom aVoxelsUntyped.The default image-resolution (see
Resolution()is employed.- Parameters:
voxels- the voxels to be converted- Returns:
- a newly created image-plus, reusing the input voxel's buffer without copying.
- Throws:
ImageJConversionException- if the voxels are neither unsigned byte nor unsigned short (the only two supported types)
-
from
Creates anImagePlusfrom aChannel.- Parameters:
channel- the channel to be converted- Returns:
- a newly created image-plus, reusing the input channels's buffer without copying.
- Throws:
ImageJConversionException- if the voxels are neither unsigned byte nor unsigned short (the only two supported types)
-
from
Creates anImagePlusfrom aStack.- Parameters:
stack- the stack of channels to be convertedmakeRGB- if true, the stack is assumed to have respectively red, green, blue channels exactly. and outputted as a RGB-type image, otherwise an interleaved image-stack is created.- Returns:
- a newly created image-plus, reusing the input channels's buffer without copying.
- Throws:
ImageJConversionException- if any RGB channel is not unsigned 8-bit
-
fromSlice
public static ij.ImagePlus fromSlice(org.anchoranalysis.image.voxel.Voxels<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedByteBuffer> voxels, int sliceIndex, String name)Creates anImagePlusfrom one slice of aVoxels<UnsignedByteBuffer> voxels.- Parameters:
voxels- the voxels from which a slice will be extracted to be convertedsliceIndex- slice-index (z coordinate) to extractname- the name to use in the image-plus- Returns:
- a newly created image-plus, reusing the input channels's buffer without copying.
-