Class VoxelsResizerExecutionTime
Object
org.anchoranalysis.image.voxel.resizer.VoxelsResizer
org.anchoranalysis.image.voxel.resizer.VoxelsResizerExecutionTime
public class VoxelsResizerExecutionTime extends VoxelsResizer
Calls another
VoxelsResizer recording each resize call via a ExecutionTimeRecorder.- Author:
- Owen Feehan
-
Constructor Summary
Constructors Constructor Description VoxelsResizerExecutionTime(VoxelsResizer resizer, ExecutionTimeRecorder executionTimeRecorder, String operationIdentifierPrefix)Creates with anVoxelsResizerandExecutionTimeRecorder. -
Method Summary
Modifier and Type Method Description booleancanValueRangeChange()Returns true if it's possible for values to be created after interpolation that aren't found in the input-image.protected VoxelBuffer<UnsignedByteBuffer>resizeByte(VoxelBuffer<UnsignedByteBuffer> voxelsSource, VoxelBuffer<UnsignedByteBuffer> voxelsDestination, Extent extentSource, Extent extentDestination)Interpolates fromvoxelsSourcetovoxelsDestinationfor unsigned 8-bit buffers.protected VoxelBuffer<FloatBuffer>resizeFloat(VoxelBuffer<FloatBuffer> voxelsSource, VoxelBuffer<FloatBuffer> voxelsDestination, Extent extentSource, Extent extentDestination)Interpolates fromvoxelsSourcetovoxelsDestinationfor float buffers.protected VoxelBuffer<UnsignedShortBuffer>resizeShort(VoxelBuffer<UnsignedShortBuffer> voxelsSource, VoxelBuffer<UnsignedShortBuffer> voxelsDestination, Extent extentSource, Extent extentDestination)Interpolates fromvoxelsSourcetovoxelsDestinationfor unsigned 16-bit buffers.
-
Constructor Details
-
VoxelsResizerExecutionTime
public VoxelsResizerExecutionTime(VoxelsResizer resizer, ExecutionTimeRecorder executionTimeRecorder, String operationIdentifierPrefix)Creates with anVoxelsResizerandExecutionTimeRecorder.- Parameters:
resizer- an interpolator for resizing voxels.executionTimeRecorder- the recorder of the execution times.operationIdentifierPrefix- a prefix that will be prepended to the identifiers used to record execution time (to help make them unique to a given context).
-
-
Method Details
-
canValueRangeChange
public boolean canValueRangeChange()Description copied from class:VoxelsResizerReturns true if it's possible for values to be created after interpolation that aren't found in the input-image.- Specified by:
canValueRangeChangein classVoxelsResizer- Returns:
- true if values can be created in the destination buffer that were not found in the source buffer.
-
resizeByte
protected VoxelBuffer<UnsignedByteBuffer> resizeByte(VoxelBuffer<UnsignedByteBuffer> voxelsSource, VoxelBuffer<UnsignedByteBuffer> voxelsDestination, Extent extentSource, Extent extentDestination)Description copied from class:VoxelsResizerInterpolates fromvoxelsSourcetovoxelsDestinationfor unsigned 8-bit buffers.Both buffers must be 2-dimensional, not 3-dimensional.
- Specified by:
resizeBytein classVoxelsResizer- 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 VoxelBuffer<UnsignedShortBuffer> resizeShort(VoxelBuffer<UnsignedShortBuffer> voxelsSource, VoxelBuffer<UnsignedShortBuffer> voxelsDestination, Extent extentSource, Extent extentDestination)Description copied from class:VoxelsResizerInterpolates fromvoxelsSourcetovoxelsDestinationfor unsigned 16-bit buffers.Both buffers must be 2-dimensional, not 3-dimensional.
- Specified by:
resizeShortin classVoxelsResizer- 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 VoxelBuffer<FloatBuffer> resizeFloat(VoxelBuffer<FloatBuffer> voxelsSource, VoxelBuffer<FloatBuffer> voxelsDestination, Extent extentSource, Extent extentDestination)Description copied from class:VoxelsResizerInterpolates fromvoxelsSourcetovoxelsDestinationfor float buffers.Both buffers must be 2-dimensional, not 3-dimensional.
- Specified by:
resizeFloatin classVoxelsResizer- 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).
-