T
- public class ConstantLocalizableByDimCursor<T extends Type<T>> extends CursorImpl<T> implements LocalizableByDimCursor<T>
LocalizableByDimCursor
that always returns the same value at each position. Here I just used Saalfeld's
implementation from the ShapeListLocalizableByDimCursor
.Modifier and Type | Field and Description |
---|---|
protected int[] |
dimensions |
protected int |
numDimensions |
protected int[] |
position |
container, debug, image, isClosed
Constructor and Description |
---|
ConstantLocalizableByDimCursor(ConstantContainer<T> container,
Image<T> image,
T type) |
Modifier and Type | Method and Description |
---|---|
void |
bck(int dim) |
void |
close() |
LocalNeighborhoodCursor<T> |
createLocalNeighborhoodCursor() |
RegionOfInterestCursor<T> |
createRegionOfInterestCursor(int[] offset,
int[] size) |
void |
fwd() |
void |
fwd(int dim) |
int[] |
getPosition()
Return a copy of the current position.
|
int |
getPosition(int dim)
Return the current position in a given dimension.
|
void |
getPosition(int[] position)
Write the current position into the passed array.
|
String |
getPositionAsString()
Create a human-readable
String representation of the current
position. |
int |
getStorageIndex() |
T |
getType() |
boolean |
hasNext()
Assumes that position is not out of bounds.
|
void |
move(int steps,
int dim) |
void |
moveRel(int[] vector) |
void |
moveTo(int[] position) |
void |
moveTo(Localizable localizable) |
void |
reset() |
void |
setPosition(int[] position) |
void |
setPosition(int position,
int dim) |
void |
setPosition(Localizable localizable) |
createPositionArray, fwd, getArrayIndex, getDimensions, getDimensions, getImage, getNumDimensions, getStorageContainer, isActive, iterator, next, remove, setDebug
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createPositionArray, getArrayIndex, getImage, getStorageContainer, isActive, setDebug
forEachRemaining, next, remove
forEach, iterator, spliterator
getDimensions, getDimensions, getNumDimensions
protected final int numDimensions
protected final int[] position
protected final int[] dimensions
public ConstantLocalizableByDimCursor(ConstantContainer<T> container, Image<T> image, T type)
public void fwd(int dim)
fwd
in interface LocalizableByDim
public void move(int steps, int dim)
move
in interface LocalizableByDim
public void bck(int dim)
bck
in interface LocalizableByDim
public void moveRel(int[] vector)
moveRel
in interface LocalizableByDim
public void moveTo(int[] position)
moveTo
in interface LocalizableByDim
public void moveTo(Localizable localizable)
moveTo
in interface LocalizableByDim
public void setPosition(Localizable localizable)
setPosition
in interface LocalizableByDim
public void setPosition(int[] position)
setPosition
in interface LocalizableByDim
public void setPosition(int position, int dim)
setPosition
in interface LocalizableByDim
public int getStorageIndex()
getStorageIndex
in interface Cursor<T extends Type<T>>
public boolean hasNext()
public void getPosition(int[] position)
Localizable
getPosition
in interface Localizable
public int[] getPosition()
Localizable
getPosition
in interface Localizable
public int getPosition(int dim)
Localizable
getPosition
in interface Localizable
public String getPositionAsString()
Localizable
String
representation of the current
position.getPositionAsString
in interface Localizable
public LocalNeighborhoodCursor<T> createLocalNeighborhoodCursor()
createLocalNeighborhoodCursor
in interface LocalizableByDimCursor<T extends Type<T>>
public RegionOfInterestCursor<T> createRegionOfInterestCursor(int[] offset, int[] size)
createRegionOfInterestCursor
in interface LocalizableByDimCursor<T extends Type<T>>
Copyright © 2015–2021 Fiji. All rights reserved.