public abstract class VoxelsResizerImgLib2 extends VoxelsResizer
VoxelBuffer
s using ImgLib2's interpolation.
By default, voxels at the boundaries are mirrored (i.e. voxels just after the boundary are treated like the closest voxel inside the boundary), but this can be changed to an extent strategy instead.
Constructor and Description |
---|
VoxelsResizerImgLib2(net.imglib2.interpolation.InterpolatorFactory<net.imglib2.type.numeric.integer.UnsignedByteType,net.imglib2.RandomAccessible<net.imglib2.type.numeric.integer.UnsignedByteType>> factoryByte,
net.imglib2.interpolation.InterpolatorFactory<net.imglib2.type.numeric.integer.UnsignedShortType,net.imglib2.RandomAccessible<net.imglib2.type.numeric.integer.UnsignedShortType>> factoryShort,
net.imglib2.interpolation.InterpolatorFactory<net.imglib2.type.numeric.real.FloatType,net.imglib2.RandomAccessible<net.imglib2.type.numeric.real.FloatType>> factoryFloat) |
Modifier and Type | Method and Description |
---|---|
void |
extendWith(int extendValue)
Switches to extend constant-value out-of-bounds strategy
|
VoxelBuffer<UnsignedByteBuffer> |
resizeByte(VoxelBuffer<UnsignedByteBuffer> voxelsSource,
VoxelBuffer<UnsignedByteBuffer> voxelsDestination,
Extent extentSource,
Extent extentDestination)
Interpolates from
voxelsSource to voxelsDestination for unsigned 8-bit
buffers. |
VoxelBuffer<FloatBuffer> |
resizeFloat(VoxelBuffer<FloatBuffer> voxelsSource,
VoxelBuffer<FloatBuffer> voxelsDestination,
Extent extentSource,
Extent extentDestination)
Interpolates from
voxelsSource to voxelsDestination for float buffers. |
VoxelBuffer<UnsignedShortBuffer> |
resizeShort(VoxelBuffer<UnsignedShortBuffer> voxelsSource,
VoxelBuffer<UnsignedShortBuffer> voxelsDestination,
Extent extentSource,
Extent extentDestination)
Interpolates from
voxelsSource to voxelsDestination for unsigned 16-bit
buffers. |
canValueRangeChange, resize
public VoxelsResizerImgLib2(net.imglib2.interpolation.InterpolatorFactory<net.imglib2.type.numeric.integer.UnsignedByteType,net.imglib2.RandomAccessible<net.imglib2.type.numeric.integer.UnsignedByteType>> factoryByte, net.imglib2.interpolation.InterpolatorFactory<net.imglib2.type.numeric.integer.UnsignedShortType,net.imglib2.RandomAccessible<net.imglib2.type.numeric.integer.UnsignedShortType>> factoryShort, net.imglib2.interpolation.InterpolatorFactory<net.imglib2.type.numeric.real.FloatType,net.imglib2.RandomAccessible<net.imglib2.type.numeric.real.FloatType>> factoryFloat)
public VoxelBuffer<UnsignedByteBuffer> resizeByte(VoxelBuffer<UnsignedByteBuffer> voxelsSource, VoxelBuffer<UnsignedByteBuffer> voxelsDestination, Extent extentSource, Extent extentDestination)
VoxelsResizer
voxelsSource
to voxelsDestination
for unsigned 8-bit
buffers.
Both buffers must be 2-dimensional, not 3-dimensional.
resizeByte
in class VoxelsResizer
voxelsSource
- voxels to interpolate from.voxelsDestination
- voxels to write the interpolated values into.extentSource
- extent corresponding to voxelsSource
.extentDestination
- extent corresponding to extentDestination
.public VoxelBuffer<UnsignedShortBuffer> resizeShort(VoxelBuffer<UnsignedShortBuffer> voxelsSource, VoxelBuffer<UnsignedShortBuffer> voxelsDestination, Extent extentSource, Extent extentDestination)
VoxelsResizer
voxelsSource
to voxelsDestination
for unsigned 16-bit
buffers.
Both buffers must be 2-dimensional, not 3-dimensional.
resizeShort
in class VoxelsResizer
voxelsSource
- voxels to interpolate from.voxelsDestination
- voxels to write the interpolated values into.extentSource
- extent corresponding to voxelsSource
.extentDestination
- extent corresponding to extentDestination
.public VoxelBuffer<FloatBuffer> resizeFloat(VoxelBuffer<FloatBuffer> voxelsSource, VoxelBuffer<FloatBuffer> voxelsDestination, Extent extentSource, Extent extentDestination)
VoxelsResizer
voxelsSource
to voxelsDestination
for float buffers.
Both buffers must be 2-dimensional, not 3-dimensional.
resizeFloat
in class VoxelsResizer
voxelsSource
- voxels to interpolate from.voxelsDestination
- voxels to write the interpolated values into.extentSource
- extent corresponding to voxelsSource
.extentDestination
- extent corresponding to extentDestination
.public void extendWith(int extendValue)
extendValue
- constant-value to use for all values outside the boundaryCopyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.