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