Enum StackView.StackAccessMode

java.lang.Object
java.lang.Enum<StackView.StackAccessMode>
net.imglib2.view.StackView.StackAccessMode
All Implemented Interfaces:
Serializable, Comparable<StackView.StackAccessMode>, java.lang.constant.Constable
Enclosing class:
StackView<T>

public static enum StackView.StackAccessMode extends Enum<StackView.StackAccessMode>
Describes how a RandomAccess on the (n+1)-dimensional StackView maps position changes into position changes of the underlying n-dimensional RandomAccesses.

Each RandomAccess on a StackView keeps a list of RandomAccesses on all constituent hyper-slices of the StackView.

  • Enum Constant Details

    • DEFAULT

      public static final StackView.StackAccessMode DEFAULT
      The default behavior is the following.

      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.

    • MOVE_ALL_SLICE_ACCESSES

      public static final StackView.StackAccessMode 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. Works as follows.

      When changing any dimension of the position, except the (n+1)th, this position change is applied to the all slice RandomAccesses. 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.

  • Method Details

    • values

      public static StackView.StackAccessMode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static StackView.StackAccessMode valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null