public class ConvertToImg extends Object
Modifier and Type | Method and Description |
---|---|
static net.imglib2.img.Img<? extends net.imglib2.type.numeric.RealType<?>> |
from(VoxelsUntyped voxels)
Converts from a
VoxelsUntyped (Anchor structure) to a Img (ImgLib2
structure). |
static net.imglib2.img.Img<net.imglib2.type.numeric.integer.UnsignedByteType> |
fromByte(VoxelBuffer<UnsignedByteBuffer> buffer,
Extent extent)
Creates an
Img from a VoxelBuffer with an unsigned byte data-type. |
static net.imglib2.img.Img<net.imglib2.type.numeric.integer.UnsignedByteType> |
fromByte(Voxels<UnsignedByteBuffer> voxels)
Creates an
Img from Voxels with an unsigned byte data-type. |
static net.imglib2.img.Img<net.imglib2.type.numeric.real.FloatType> |
fromFloat(VoxelBuffer<FloatBuffer> buffer,
Extent extent)
Creates an
Img from a VoxelBuffer with a float data-type. |
static net.imglib2.img.Img<net.imglib2.type.numeric.real.FloatType> |
fromFloat(Voxels<FloatBuffer> voxels)
Creates an
Img from Voxels with a float data-type. |
static net.imglib2.img.Img<net.imglib2.type.numeric.integer.UnsignedShortType> |
fromShort(VoxelBuffer<UnsignedShortBuffer> buffer,
Extent extent)
Creates an
Img from a VoxelBuffer with an unsigned short data-type. |
static net.imglib2.img.Img<net.imglib2.type.numeric.integer.UnsignedShortType> |
fromShort(Voxels<UnsignedShortBuffer> voxels)
Creates an
Img from Voxels with an unsigned short data-type. |
static net.imglib2.img.Img<? extends net.imglib2.type.numeric.RealType<?>> |
fromSlice(VoxelsUntyped voxels,
int sliceIndex)
Creates an
Img from a single z-slice of a VoxelsUntyped . |
public static net.imglib2.img.Img<? extends net.imglib2.type.numeric.RealType<?>> from(VoxelsUntyped voxels)
VoxelsUntyped
(Anchor structure) to a Img
(ImgLib2
structure).
The voxel buffers are reused (without duplication).
voxels
- the voxels to convert.Img
object reusing the buffers of voxels
.public static net.imglib2.img.Img<? extends net.imglib2.type.numeric.RealType<?>> fromSlice(VoxelsUntyped voxels, int sliceIndex)
Img
from a single z-slice of a VoxelsUntyped
.voxels
- the voxels to extract z-slice from to create a Img
.sliceIndex
- the index of the slice in the z dimension.Img
, either reusing the memory in voxels
or else a
copy of it.public static net.imglib2.img.Img<net.imglib2.type.numeric.integer.UnsignedByteType> fromByte(VoxelBuffer<UnsignedByteBuffer> buffer, Extent extent)
Img
from a VoxelBuffer
with an unsigned byte data-type.buffer
- the buffer to use for the voxels in the Img
.extent
- the size of the image, whose volume should match buffer
's size exactly.Img
, either reusing the memory in buffer
or else a
copy of it.public static net.imglib2.img.Img<net.imglib2.type.numeric.integer.UnsignedShortType> fromShort(VoxelBuffer<UnsignedShortBuffer> buffer, Extent extent)
Img
from a VoxelBuffer
with an unsigned short data-type.buffer
- the buffer to use for the voxels in the Img
.extent
- the size of the image, whose volume should match buffer
's size exactly.Img
, either reusing the memory in buffer
or else a
copy of it.public static net.imglib2.img.Img<net.imglib2.type.numeric.real.FloatType> fromFloat(VoxelBuffer<FloatBuffer> buffer, Extent extent)
Img
from a VoxelBuffer
with a float data-type.buffer
- the buffer to use for the voxels in the Img
.extent
- the size of the image, whose volume should match buffer
's size exactly.Img
,either reusing the memory in buffer
or else a
copy of it.public static net.imglib2.img.Img<net.imglib2.type.numeric.integer.UnsignedByteType> fromByte(Voxels<UnsignedByteBuffer> voxels)
Img
from Voxels
with an unsigned byte data-type.voxels
- the voxels to use in the Img
.Img
, either reusing the memory in voxels
or else a
copy of it.public static net.imglib2.img.Img<net.imglib2.type.numeric.integer.UnsignedShortType> fromShort(Voxels<UnsignedShortBuffer> voxels)
Img
from Voxels
with an unsigned short data-type.voxels
- the voxels to use in the Img
.Img
, either reusing the memory in voxels
or else a
copy of it.public static net.imglib2.img.Img<net.imglib2.type.numeric.real.FloatType> fromFloat(Voxels<FloatBuffer> voxels)
Img
from Voxels
with a float data-type.voxels
- the voxels to use in the Img
.Img
, either reusing the memory in voxels
or else a
copy of it.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.