Class ConvertToImagePlus
Object
ConvertToImagePlus
Converts a channel or voxels into a
ImagePlus.- Author:
- Owen Feehan
-
Method Summary
Modifier and TypeMethodDescriptionstatic ij.ImagePlusCreates anImagePlusfrom aChannel.static ij.ImagePlusCreates anImagePlusfrom aStack.static ij.ImagePlusfrom(VoxelsUntyped voxels) Creates anImagePlusfrom aVoxelsUntyped.static ij.ImagePlusfromSlice(Voxels<UnsignedByteBuffer> voxels, int sliceIndex, String name) Creates anImagePlusfrom one slice of aVoxels<UnsignedByteBuffer> voxels.
-
Method Details
-
from
Creates 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(Voxels<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.
-