T
- buffer-typepublic interface VoxelsExtracter<T>
Modifier and Type | Method and Description |
---|---|
void |
boxCopyTo(BoundingBox from,
Voxels<T> voxelsDestination,
BoundingBox destinationBox)
Copies a bounding-box area to another
Voxels . |
void |
objectCopyTo(ObjectMask from,
Voxels<T> voxelsDestination,
BoundingBox destinationBox)
Copies an area corresponding to an object-mask to another
Voxels . |
Voxels<T> |
projectMax()
A maximum intensity projection of all slices
|
Voxels<T> |
projectMean()
A mean intensity projection of all slices.
|
Voxels<T> |
region(BoundingBox box,
boolean reuseIfPossible)
A (sub-)region of the voxels.
|
Voxels<T> |
resizedXY(int sizeX,
int sizeY,
VoxelsResizer resizer)
Creates a new voxels that are a resized version of the current voxels (only in X and Y
dimensions), interpolating as needed.
|
Voxels<T> |
slice(int sliceIndex)
Creates a new
Voxels with only particular slice. |
default int |
voxel(int x,
int y)
Gets the value of one particular voxel.
|
default int |
voxel(int x,
int y,
int z)
Gets the value of one particular voxel.
|
int |
voxel(ReadableTuple3i point)
Gets the value of one particular voxel.
|
VoxelsPredicate |
voxelsEqualTo(int equalToValue)
Operations on whether particular voxels are equal to a particular value.
|
VoxelsPredicate |
voxelsGreaterThan(int threshold)
Operations on whether particular voxels are greater than a threshold (but not equal to).
|
MinMaxRange |
voxelsWithMinMaxIntensity()
Finds the minimum-value and maximum of any voxel.
|
long |
voxelWithMaxIntensity()
Finds the maximum-value of any voxel and rounding up (ceiling) to the nearest long.
|
long |
voxelWithMinIntensity()
Finds the minimum-value of any voxel and rounding down (floor) to the nearest long.
|
default int voxel(int x, int y)
Note that this provides very slow access, compared to iterating through slice buffers, so use sparingly.
The Z-coordinate is assumed to be 0.
x
- coordinate of voxel in X-dimension.y
- coordinate of voxel in Y-dimension.int
).default int voxel(int x, int y, int z)
Note that this provides very slow access, compared to iterating through slice buffers, so use sparingly.
x
- coordinate of voxel in X-dimension.y
- coordinate of voxel in Y-dimension.z
- coordinate of voxel in Z-dimension.int
).int voxel(ReadableTuple3i point)
Note that this provides very slow access, compared to iterating through slice buffers, so use sparingly.
point
- coordinates.int
).Voxels<T> slice(int sliceIndex)
Voxels
with only particular slice.
This is an immutable operation.
sliceIndex
- index of slice in z-dimension.Voxels<T> region(BoundingBox box, boolean reuseIfPossible)
The region may some smaller portion of the voxels, or the voxels in their entirety.
It should never be larger than the voxels.
Depending on policy, an the existing box will be reused if possible (if the region requested is equal to the box as a whole), useful to avoid unnecessary new memory allocation.
If reuseIfPossible
is false, it is guaranteed that a new voxels will always be
created.
box
- a bounding-box indicating the regions desired (not be larger than the extent)reuseIfPossible
- if true the existing box will be reused if possible,, otherwise a new
box is always created.void boxCopyTo(BoundingBox from, Voxels<T> voxelsDestination, BoundingBox destinationBox)
Voxels
.
from
and destinationBox
must have identically-sized Extent
s.
from
- box to copy from (relative to the current voxels).voxelsDestination
- where to copy into.destinationBox
- box to copy into (relative to voxelsDestination
).void objectCopyTo(ObjectMask from, Voxels<T> voxelsDestination, BoundingBox destinationBox)
Voxels
.
Only copies voxels if part of an object, otherwise voxels in the destination-buffer are not changed.
from
's bounding-box and destinationBox
must have identically-sized Extent
s.
from
- only copies voxels which correspond to an on voxels in the object-mask.voxelsDestination
- where to copy into.destinationBox
- box to copy into (relative to voxelsDestination
).Voxels<T> resizedXY(int sizeX, int sizeY, VoxelsResizer resizer)
This is an immutable operation.
sizeX
- new size in X dimension.sizeY
- new size in Y dimension.resizer
- an interpolator for resizing voxels.Voxels<T> projectMax()
Voxels<T> projectMean()
VoxelsPredicate voxelsEqualTo(int equalToValue)
equalToValue
- VoxelsPredicate voxelsGreaterThan(int threshold)
threshold
- voxel-values greater than this threshold are included.long voxelWithMinIntensity()
The computational cost of the operation is O(n)
in the number of voxels. The
result is not cached.
long voxelWithMaxIntensity()
The computational cost of the operation is O(n)
in the number of voxels. The
result is not cached.
MinMaxRange voxelsWithMinMaxIntensity()
The minimum is rounded down (floor) to the nearest long.
The maximum is rounded up (ceil) to the nearest long.
This is efficient than calling voxelWithMinIntensity()
and voxelWithMaxIntensity()
separately.
The computational cost of the operation is O(n)
in the number of voxels. The
result is not cached.
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.