T
- public class HyperSphereIterator<T extends Type<T>> extends Object implements Iterable, LocalizableCursor<T>, Localizable
Container
agnostic and thus the general
purpose version of the Iterator
. For specific
Containers
, a different implementation might be more
efficient.Modifier and Type | Field and Description |
---|---|
protected int |
activeCursorIndex |
protected Localizable |
center |
protected LocalizableByDimCursor<T> |
cursor |
protected Image<T> |
image |
protected int |
maxDim |
protected int |
numDimensions |
protected int |
radius |
Constructor and Description |
---|
HyperSphereIterator(Image<T> image,
Localizable center,
int radius) |
HyperSphereIterator(Image<T> image,
Localizable center,
int radius,
OutOfBoundsStrategyFactory<T> oobFactory) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
int[] |
createPositionArray() |
void |
fwd() |
void |
fwd(long steps) |
int |
getArrayIndex() |
int[] |
getDimensions() |
void |
getDimensions(int[] position) |
Image<T> |
getImage() |
int |
getNumDimensions() |
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. |
Container<T> |
getStorageContainer() |
int |
getStorageIndex() |
T |
getType() |
boolean |
hasNext() |
boolean |
isActive() |
Iterator<T> |
iterator() |
T |
next() |
void |
remove() |
void |
reset() |
void |
setDebug(boolean debug) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
forEach, spliterator
protected final Localizable center
protected final LocalizableByDimCursor<T extends Type<T>> cursor
protected int activeCursorIndex
protected final int radius
protected final int numDimensions
protected final int maxDim
public HyperSphereIterator(Image<T> image, Localizable center, int radius)
public HyperSphereIterator(Image<T> image, Localizable center, int radius, OutOfBoundsStrategyFactory<T> oobFactory)
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 int[] createPositionArray()
createPositionArray
in interface Cursor<T extends Type<T>>
public int getArrayIndex()
getArrayIndex
in interface Cursor<T extends Type<T>>
public Container<T> getStorageContainer()
getStorageContainer
in interface Cursor<T extends Type<T>>
public int getStorageIndex()
getStorageIndex
in interface Cursor<T extends Type<T>>
public void setDebug(boolean debug)
public int[] getDimensions()
getDimensions
in interface Dimensionality
public void getDimensions(int[] position)
getDimensions
in interface Dimensionality
public int getNumDimensions()
getNumDimensions
in interface Dimensionality
Copyright © 2015–2021 Fiji. All rights reserved.