Class AbstractPermutationTransform

java.lang.Object
net.imglib2.transform.integer.permutation.AbstractPermutationTransform
All Implemented Interfaces:
InvertibleTransform, Transform
Direct Known Subclasses:
PermutationTransform, SingleDimensionPermutationTransform

public abstract class AbstractPermutationTransform extends Object implements InvertibleTransform
Bijective integer transform mapping between integer coordinates in [0,n-1]. Currently, this transform handles only coordinates in the integer range because it is implemented using primitive arrays with integer indices for efficiency reasons. Expect this permutation to be transferred to long coordinates some time in more distant future.
Author:
Philipp Hanslovsky, Stephan Saalfeld
  • Field Details

    • lut

      protected final int[] lut
    • inverseLut

      protected final int[] inverseLut
  • Constructor Details

    • AbstractPermutationTransform

      public AbstractPermutationTransform(int[] lut)
      Parameters:
      lut - must be a bijective permutation over its index set, i.e. for a lut of length n, the sorted content of the array must be [0,...,n-1] which is the index set of the lut.
  • Method Details

    • apply

      public int apply(int x)
    • applyChecked

      public long applyChecked(int x)
    • applyInverse

      public int applyInverse(int y)
    • applyInverseChecked

      public long applyInverseChecked(int y)
    • getLutCopy

      public int[] getLutCopy()
    • getInverseLutCopy

      public int[] getInverseLutCopy()
    • checkBijectivity

      public static final boolean checkBijectivity(int[] lut)