public static enum StackView.StackAccessMode extends Enum<StackView.StackAccessMode>
RandomAccess
on the (n+1)-dimensional
StackView
maps position changes into position changes of the
underlying n-dimensional RandomAccess
es.
Each RandomAccess
on a StackView
keeps a list of
RandomAccess
es on all constituent hyper-slices of the
StackView
.
Enum Constant and Description |
---|
DEFAULT
The default behavior is the following.
|
MOVE_ALL_SLICE_ACCESSES
Alternative behavior for some special cases; this is faster assuming
that we access in a loop over dimensions with the last dimension (the
hyper-slice dimension) in the inner loop.
|
Modifier and Type | Method and Description |
---|---|
static StackView.StackAccessMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static StackView.StackAccessMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final StackView.StackAccessMode DEFAULT
There is one "active" slice RandomAccess
, namely the
zth RandomAccess
, where z denotes the
(n+1)th dimension of the current position.
When changing any dimension of the position, except the
(n+1)th, this position change is applied to the active slice
RandomAccess
. When changing the (n+1)th dimension of
the position, a new slice RandomAccess
becomes active is set
to the position of the previously active slice RandomAccess
.
public static final StackView.StackAccessMode MOVE_ALL_SLICE_ACCESSES
When changing any dimension of the position, except the
(n+1)th, this position change is applied to the all
slice RandomAccess
es. The current (n+1)th dimension
of the position is maintained as an index. When get()
is
called it is forwarded to the slice RandomAccess
at that
index.
The potential advantage of this approach is that it does not need to
do a full setPosition()
when changing slices. Only use this
if you know what you are doing.
public static StackView.StackAccessMode[] values()
for (StackView.StackAccessMode c : StackView.StackAccessMode.values()) System.out.println(c);
public static StackView.StackAccessMode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2015–2022 ImgLib2. All rights reserved.