public class BinaryVoxelsFactory extends Object
BinaryVoxels
parameterized by size and initial state.Modifier and Type | Method and Description |
---|---|
static BinaryVoxels<UnsignedByteBuffer> |
createEmptyOff(Extent extent)
Creates binary-voxels using unsigned 8-bit byte type and with all voxels set to off
(0).
|
static BinaryVoxels<?> |
createEmptyOff(Extent extent,
VoxelDataType dataType)
Creates an empty binary-voxels of a particular data-type with all voxels initialized to
off.
|
static BinaryVoxels<UnsignedByteBuffer> |
createEmptyOn(Extent extent)
Creates binary-voxels using unsigned 8-bit byte type and with all voxels set to on
(255).
|
static BinaryVoxels<UnsignedByteBuffer> |
reuseByte(Voxels<UnsignedByteBuffer> voxels)
Like
reuseByte(org.anchoranalysis.image.voxel.Voxels<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedByteBuffer>) but uses default binary-values for off (0) and on
(255). |
static BinaryVoxels<UnsignedByteBuffer> |
reuseByte(Voxels<UnsignedByteBuffer> voxels,
BinaryValuesInt binaryValues)
Reuses an existing voxel-buffer (of type unsigned byte) as a binary-version which should have
only two intensity-values representing off and on.
|
static BinaryVoxels<UnsignedIntBuffer> |
reuseInt(Voxels<UnsignedIntBuffer> voxels,
BinaryValuesInt binaryValues)
Reuses an existing voxel-buffer (of type unsigned int) as a binary-version which should have
only two intensity-values representing off and on.
|
public static BinaryVoxels<UnsignedByteBuffer> createEmptyOn(Extent extent)
extent
- the size of the voxels.public static BinaryVoxels<UnsignedByteBuffer> createEmptyOff(Extent extent)
extent
- the size of the voxels.public static BinaryVoxels<?> createEmptyOff(Extent extent, VoxelDataType dataType) throws CreateException
extent
- the size of the voxels.dataType
- the data-type of the underlying voxel-buffer, either unsigned-byte or
unsigned-int.CreateException
- if an unsupported data-type is requested.public static BinaryVoxels<UnsignedByteBuffer> reuseByte(Voxels<UnsignedByteBuffer> voxels)
reuseByte(org.anchoranalysis.image.voxel.Voxels<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedByteBuffer>)
but uses default binary-values for off (0) and on
(255).voxels
- voxel-buffer to treat as binary (and internally reused).public static BinaryVoxels<UnsignedByteBuffer> reuseByte(Voxels<UnsignedByteBuffer> voxels, BinaryValuesInt binaryValues)
No check occurs that only these intensity values exist.
voxels
- voxel-buffer to treat as binary (and internally reused).binaryValues
- how to interpret off and on states.public static BinaryVoxels<UnsignedIntBuffer> reuseInt(Voxels<UnsignedIntBuffer> voxels, BinaryValuesInt binaryValues)
No check occurs that only these intensity values exist.
voxels
- voxel-buffer to treat as binary (and internally reused).binaryValues
- how to interpret off and on states.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.