T
- buffer-typepublic abstract class BinaryVoxels<T> extends Object implements BinaryOnOffSetter
Voxels
but should only contain two distinct intensity-values representing on
and off. states.Constructor and Description |
---|
BinaryVoxels(Voxels<T> voxels,
BinaryValuesInt binaryValues) |
Modifier and Type | Method and Description |
---|---|
VoxelsAssigner |
assignOff()
Creates an assigner that may set the off state in subsequently specified regions of
the voxels.
|
VoxelsAssigner |
assignOn()
Creates an assigner that may set the on state in subsequently specified regions of the
voxels.
|
BinaryValuesInt |
binaryValues()
Which two intensity values represent off and on states.
|
protected abstract BinaryVoxels<T> |
binaryVoxelsFor(Voxels<T> voxels,
BinaryValuesInt binaryValues)
Creates a
BinaryVoxels corresponding to a particular voxels and BinaryValuesInt . |
int |
countOff()
Counts the number of voxels with an off state.
|
int |
countOn()
Counts the number of voxels with an on state.
|
abstract BinaryVoxels<T> |
duplicate()
Deep-copy of the object, including duplicating voxel buffers in memory.
|
Extent |
extent()
The size of the voxels across three dimensions.
|
VoxelsExtracter<T> |
extract()
Interface that allows read/copy/duplication operations to be performed regarding the voxels
intensities.
|
boolean |
hasOffVoxel()
At least one voxel exists with an off value.
|
boolean |
hasOnVoxel()
At least one voxel exists with an on value.
|
void |
invert()
Changes the off state to be the on state and vice-versa.
|
VoxelBuffer<T> |
slice(int z)
A
VoxelBuffer corresponding to a particular z-slice. |
BinaryVoxels<T> |
sliceBinary(int z)
A particular z-slice, wrapped into a
BinaryVoxels . |
T |
sliceBuffer(int z)
A buffer corresponding to a particular z-slice.
|
SliceBufferIndex<T> |
slices()
An index mapping slice of voxels (in the z dimension) to a particular buffer with the
corresponding voxel intensities.
|
String |
toString() |
Voxels<T> |
voxels()
Voxels that should only have two intensity-values (representing on and off
states).
|
public BinaryVoxels(Voxels<T> voxels, BinaryValuesInt binaryValues)
public void invert()
Only the binaryValues
(acting as an index to the intensity values) is changed; the
voxels remain themselves unchanged.
public Extent extent()
public boolean hasOnVoxel()
public boolean hasOffVoxel()
public abstract BinaryVoxels<T> duplicate()
public T sliceBuffer(int z)
This buffer is either a NIO or other classes that wraps the underlying array storing voxel intensities.
z
- the index (beginning at 0) of all z-slices.z
.public VoxelBuffer<T> slice(int z)
VoxelBuffer
corresponding to a particular z-slice.z
- the index (beginning at 0) of all z-slices.z
.public BinaryVoxels<T> sliceBinary(int z)
BinaryVoxels
.z
- the index (beginning at 0) of all z-slices.BinaryVoxels
wrapping the single z-slice at position z
.protected abstract BinaryVoxels<T> binaryVoxelsFor(Voxels<T> voxels, BinaryValuesInt binaryValues)
BinaryVoxels
corresponding to a particular voxels and BinaryValuesInt
.voxels
- the voxels.binaryValues
- the binary-values.BinaryVoxels
.public VoxelsAssigner assignOn()
public VoxelsAssigner assignOff()
public int countOn()
public int countOff()
public VoxelsExtracter<T> extract()
public SliceBufferIndex<T> slices()
public Voxels<T> voxels()
public BinaryValuesInt binaryValues()
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.