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, setDebugclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreatePositionArray, getArrayIndex, getImage, getStorageContainer, isActive, setDebugforEachRemaining, next, removeforEach, iterator, spliteratorgetDimensions, getDimensions, getNumDimensionsprotected 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 LocalizableByDimpublic void move(int steps,
int dim)
move in interface LocalizableByDimpublic void bck(int dim)
bck in interface LocalizableByDimpublic void moveRel(int[] vector)
moveRel in interface LocalizableByDimpublic void moveTo(int[] position)
moveTo in interface LocalizableByDimpublic void moveTo(Localizable localizable)
moveTo in interface LocalizableByDimpublic void setPosition(Localizable localizable)
setPosition in interface LocalizableByDimpublic void setPosition(int[] position)
setPosition in interface LocalizableByDimpublic void setPosition(int position,
int dim)
setPosition in interface LocalizableByDimpublic int getStorageIndex()
getStorageIndex in interface Cursor<T extends Type<T>>public boolean hasNext()
public void getPosition(int[] position)
LocalizablegetPosition in interface Localizablepublic int[] getPosition()
LocalizablegetPosition in interface Localizablepublic int getPosition(int dim)
LocalizablegetPosition in interface Localizablepublic String getPositionAsString()
LocalizableString representation of the current
position.getPositionAsString in interface Localizablepublic 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.