public class ApplyKernel extends Object
Kernel
to BinaryVoxels
.Modifier and Type | Method and Description |
---|---|
static BinaryVoxels<UnsignedByteBuffer> |
apply(BinaryKernel kernel,
BinaryVoxels<UnsignedByteBuffer> voxels,
KernelApplicationParameters parameters)
Apply the kernel to
BinaryVoxels<UnsignedByteBuffer> using the same binary-values as
voxels to calculate a value for each voxel. |
static int |
applyForCount(BinaryKernel kernel,
BinaryVoxels<UnsignedByteBuffer> voxels,
KernelApplicationParameters parameters)
Applies a
BinaryKernel to voxels and counts how many true values occur en aggregate. |
static int |
applyForCount(CountKernel kernel,
BinaryVoxels<UnsignedByteBuffer> voxels,
BoundingBox box,
KernelApplicationParameters parameters)
Applies the kernel to voxels and sums the returned value.
|
static int |
applyForCount(CountKernel kernel,
BinaryVoxels<UnsignedByteBuffer> voxels,
KernelApplicationParameters parameters)
Applies the kernel to voxels and sums the returned value.
|
static boolean |
applyUntilPositive(CountKernel kernel,
BinaryVoxels<UnsignedByteBuffer> voxels,
BoundingBox box,
KernelApplicationParameters parameters)
Applies the kernel to voxels until a positive value is returned, then exits with true.
|
public static BinaryVoxels<UnsignedByteBuffer> apply(BinaryKernel kernel, BinaryVoxels<UnsignedByteBuffer> voxels, KernelApplicationParameters parameters)
BinaryVoxels<UnsignedByteBuffer>
using the same binary-values as
voxels
to calculate a value for each voxel.kernel
- the kernel to apply.voxels
- the voxels to apply the kernel on.parameters
- parameters influencing how the kernel is applied.BinaryVoxels<UnsignedByteBuffer>
that is the result of
applying the kernel, and using the same binary-values as voxels
.public static int applyForCount(CountKernel kernel, BinaryVoxels<UnsignedByteBuffer> voxels, KernelApplicationParameters parameters)
kernel
- the kernel to be applied.voxels
- the voxels to iterate over.parameters
- parameters that affect how the kernel is applied.public static int applyForCount(CountKernel kernel, BinaryVoxels<UnsignedByteBuffer> voxels, BoundingBox box, KernelApplicationParameters parameters) throws OperationFailedException
kernel
- the kernel to be applied.voxels
- the voxels to iterate over.box
- a bounding-box (coordinates relative to voxels) that restricts where iteration
occurs. Must be contained within voxels.parameters
- parameters that affect how the kernel is applied.OperationFailedException
- if the operation cannot complete successfully.public static boolean applyUntilPositive(CountKernel kernel, BinaryVoxels<UnsignedByteBuffer> voxels, BoundingBox box, KernelApplicationParameters parameters) throws OperationFailedException
kernel
- the kernel to be applied.voxels
- the voxels to iterate over.box
- a bounding-box (coordinates relative to voxels) that restricts where iteration
occurs. Must be contained within voxels.parameters
- parameters that affect how the kernel is applied.OperationFailedException
- if the operation cannot complete successfully.public static int applyForCount(BinaryKernel kernel, BinaryVoxels<UnsignedByteBuffer> voxels, KernelApplicationParameters parameters)
BinaryKernel
to voxels and counts how many true values occur en aggregate.kernel
- the kernel to be applied.voxels
- the voxels to iterate over.parameters
- parameters that affect how the kernel is applied.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.