Class AbstractPermutationTransform
java.lang.Object
net.imglib2.transform.integer.permutation.AbstractPermutationTransform
- All Implemented Interfaces:
InvertibleTransform
,Transform
- Direct Known Subclasses:
PermutationTransform
,SingleDimensionPermutationTransform
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
apply
(int x) long
applyChecked
(int x) int
applyInverse
(int y) long
applyInverseChecked
(int y) static final boolean
checkBijectivity
(int[] lut) int[]
int[]
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.imglib2.transform.InvertibleTransform
applyInverse, applyInverse, applyInverse, inverse
Methods inherited from interface net.imglib2.transform.Transform
apply, apply, apply, numSourceDimensions, numTargetDimensions
-
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)
-