Class VoxelsResizer
Object
VoxelsResizer
- Direct Known Subclasses:
VoxelsResizerExecutionTime,VoxelsResizerImageJ,VoxelsResizerImgLib2,VoxelsResizerNone,VoxelsResizerOpenCV
Copies voxels while performing interpolation.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanReturns true if it's possible for values to be created after interpolation that aren't found in the input-image.voidresize(VoxelsUntyped source, VoxelsUntyped destination) Copies voxels slice-by-slice fromsourcetodestinationperforming necessary interpolation.protected abstract VoxelBuffer<UnsignedByteBuffer> resizeByte(VoxelBuffer<UnsignedByteBuffer> voxelsSource, VoxelBuffer<UnsignedByteBuffer> voxelsDestination, Extent extentSource, Extent extentDestination) Interpolates fromvoxelsSourcetovoxelsDestinationfor unsigned 8-bit buffers.protected abstract VoxelBuffer<FloatBuffer> resizeFloat(VoxelBuffer<FloatBuffer> voxelsSource, VoxelBuffer<FloatBuffer> voxelsDestination, Extent extentSource, Extent extentDestination) Interpolates fromvoxelsSourcetovoxelsDestinationfor float buffers.protected abstract VoxelBuffer<UnsignedShortBuffer> resizeShort(VoxelBuffer<UnsignedShortBuffer> voxelsSource, VoxelBuffer<UnsignedShortBuffer> voxelsDestination, Extent extentSource, Extent extentDestination) Interpolates fromvoxelsSourcetovoxelsDestinationfor unsigned 16-bit buffers.
-
Constructor Details
-
VoxelsResizer
public VoxelsResizer()
-
-
Method Details
-
resize
Copies voxels slice-by-slice fromsourcetodestinationperforming necessary interpolation.Note that interpolation only occurs in the XY plane, and the number of Z-slices should be identical for both
sourceanddestination.- Parameters:
source- the voxels to copy from.destination- the voxels to copy interpolated-values into, which may differ in size in the XY dimensions.
-
canValueRangeChange
public abstract boolean canValueRangeChange()Returns true if it's possible for values to be created after interpolation that aren't found in the input-image.- Returns:
- true if values can be created in the destination buffer that were not found in the source buffer.
-
resizeByte
protected abstract VoxelBuffer<UnsignedByteBuffer> resizeByte(VoxelBuffer<UnsignedByteBuffer> voxelsSource, VoxelBuffer<UnsignedByteBuffer> voxelsDestination, Extent extentSource, Extent extentDestination) Interpolates fromvoxelsSourcetovoxelsDestinationfor unsigned 8-bit buffers.Both buffers must be 2-dimensional, not 3-dimensional.
- Parameters:
voxelsSource- voxels to interpolate from.voxelsDestination- voxels to write the interpolated values into.extentSource- extent corresponding tovoxelsSource.extentDestination- extent corresponding toextentDestination.- Returns:
- the destination buffer (either as passed, or a new one that was created).
-
resizeShort
protected abstract VoxelBuffer<UnsignedShortBuffer> resizeShort(VoxelBuffer<UnsignedShortBuffer> voxelsSource, VoxelBuffer<UnsignedShortBuffer> voxelsDestination, Extent extentSource, Extent extentDestination) Interpolates fromvoxelsSourcetovoxelsDestinationfor unsigned 16-bit buffers.Both buffers must be 2-dimensional, not 3-dimensional.
- Parameters:
voxelsSource- voxels to interpolate from.voxelsDestination- voxels to write the interpolated values into.extentSource- extent corresponding tovoxelsSource.extentDestination- extent corresponding toextentDestination.- Returns:
- the destination buffer (either as passed, or a new one that was created).
-
resizeFloat
protected abstract VoxelBuffer<FloatBuffer> resizeFloat(VoxelBuffer<FloatBuffer> voxelsSource, VoxelBuffer<FloatBuffer> voxelsDestination, Extent extentSource, Extent extentDestination) Interpolates fromvoxelsSourcetovoxelsDestinationfor float buffers.Both buffers must be 2-dimensional, not 3-dimensional.
- Parameters:
voxelsSource- voxels to interpolate from.voxelsDestination- voxels to write the interpolated values into.extentSource- extent corresponding tovoxelsSource.extentDestination- extent corresponding toextentDestination.- Returns:
- the destination buffer (either as passed, or a new one that was created).
-