T
- result-type that is collectedpublic abstract class ProcessVoxelNeighborAbsoluteWithSlidingBuffer<T> extends Object implements ProcessVoxelNeighborAbsolute<T>
ProcessVoxelNeighborAbsolute
but additionally includes a SlidingBuffer
.Modifier and Type | Field and Description |
---|---|
protected int |
sourceValue
The intensity value of the source voxel.
|
protected int |
zChange
The change in the Z-dimension to reach this neighbor relative to the source coordinate.
|
Modifier | Constructor and Description |
---|---|
protected |
ProcessVoxelNeighborAbsoluteWithSlidingBuffer(SlidingBuffer<?> slidingBuffer)
Creates for a particular sliding buffer.
|
Modifier and Type | Method and Description |
---|---|
protected int |
changedOffset(int xChange,
int yChange)
Calculates the offset in the buffer for a voxel, indicated by its relative-change in
position.
|
Extent |
extent()
The size of the associated
SlidingBuffer . |
protected int |
getInt(int index)
Get a value from the buffer at a particular absolute position.
|
protected int |
getInt(int xChange,
int yChange)
Get a value from the buffer at a particular relative position.
|
void |
initSource(int sourceValue,
int sourceOffsetXY)
The value and offset for the source point (around which we process neighbors).
|
void |
notifyChangeZ(int zChange,
int z)
Notifies the processor that there has been a change in z-coordinate.
|
protected void |
putInt(int index,
int valueToAssign)
Assign a value to the buffer at a particular absolute position.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
collectResult, processPoint
protected int zChange
protected int sourceValue
protected ProcessVoxelNeighborAbsoluteWithSlidingBuffer(SlidingBuffer<?> slidingBuffer)
slidingBuffer
- the buffer.public void initSource(int sourceValue, int sourceOffsetXY)
ProcessVoxelNeighborAbsolute
This function should always be called before ProcessVoxelNeighborAbsolute.processPoint(int, int, int, int)
.
It can be called repeatedly for different points (resetting state each time).
initSource
in interface ProcessVoxelNeighborAbsolute<T>
sourceValue
- the intensity value of the source voxel.sourceOffsetXY
- the offset of the source voxel in XY.public void notifyChangeZ(int zChange, int z)
ProcessVoxelNeighborAbsolute
notifyChangeZ
in interface ProcessVoxelNeighborAbsolute<T>
zChange
- the change in the Z-dimension to reach this neighbor relative to the source
coordinate.z
- the Z-dimension coordinates for this point (the neighboring point) in global
(absolute) terms i.e. not relative to a bounding-box.public Extent extent()
SlidingBuffer
.protected int changedOffset(int xChange, int yChange)
xChange
- the relative change in the X-dimension, compared to the current buffer
position.yChange
- the relative change in the Y-dimension, compared to the current buffer
position.protected int getInt(int index)
index
- the absolute position in the buffer.protected int getInt(int xChange, int yChange)
xChange
- the relative change in the X-dimension, compared to the current buffer
position.yChange
- the relative change in the Y-dimension, compared to the current buffer
position.protected void putInt(int index, int valueToAssign)
index
- the absolute position in the buffer.valueToAssign
- the value to assign.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.