Class PermutationTransform
java.lang.Object
net.imglib2.transform.integer.permutation.AbstractPermutationTransform
net.imglib2.transform.integer.permutation.PermutationTransform
- All Implemented Interfaces:
InvertibleTransform, Transform
Bijective integer transform mapping between integer coordinates in [0,n-1].
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final intprotected final intFields inherited from class AbstractPermutationTransform
inverseLut, lut -
Constructor Summary
ConstructorsConstructorDescriptionPermutationTransform(int[] lut, int numSourceDimensions, int numTargetDimensions) -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(int[] source, int[] target) Apply theTransformto a source vector to obtain a target vector.voidapply(long[] source, long[] target) Apply theTransformto a source vector to obtain a target vector.voidapply(Localizable source, Positionable target) voidapplyInverse(int[] source, int[] target) Apply the inverse transform to a target vector to obtain a source vector.voidapplyInverse(long[] source, long[] target) Apply the inverse transform to a target vector to obtain a source vector.voidapplyInverse(Positionable source, Localizable target) Apply the inverse transform to a targetLocalizableto obtain a sourcePositionable.static booleancheckInterval(Interval interval, int[] lut) Test whether a given lut can be applied to an interval.inverse()Get the inverse transform.intReturns n, the dimension of the source vector.intReturns m, the dimension of the target vector.Methods inherited from class AbstractPermutationTransform
apply, applyChecked, applyInverse, applyInverseChecked, checkBijectivity, getInverseLutCopy, getLutCopy
-
Field Details
-
numSourceDimensions
protected final int numSourceDimensions -
numTargetDimensions
protected final int numTargetDimensions
-
-
Constructor Details
-
PermutationTransform
public PermutationTransform(int[] lut, int numSourceDimensions, int numTargetDimensions) - Parameters:
lut- must be a bijective permutation over its index set, i.e. for a lut of length n, the sorted content the array must be [0,...,n-1] which is the index set of the lut.numSourceDimensions-numTargetDimensions-
-
-
Method Details
-
numSourceDimensions
public int numSourceDimensions()Description copied from interface:TransformReturns n, the dimension of the source vector.- Returns:
- the dimension of the source vector.
-
numTargetDimensions
public int numTargetDimensions()Description copied from interface:TransformReturns m, the dimension of the target vector.- Returns:
- the dimension of the target vector.
-
apply
-
apply
-
apply
Description copied from interface:Transform- Parameters:
source- source coordinates.target- set this to the target coordinates.
-
applyInverse
public void applyInverse(long[] source, long[] target) Description copied from interface:InvertibleTransformApply the inverse transform to a target vector to obtain a source vector.- Parameters:
source- set this to the source coordinates.target- target coordinates.
-
applyInverse
public void applyInverse(int[] source, int[] target) Description copied from interface:InvertibleTransformApply the inverse transform to a target vector to obtain a source vector.- Parameters:
source- set this to the source coordinates.target- target coordinates.
-
applyInverse
Description copied from interface:InvertibleTransformApply the inverse transform to a targetLocalizableto obtain a sourcePositionable.- Parameters:
source- set this to the source coordinates.target- target coordinates.
-
inverse
Description copied from interface:InvertibleTransformGet the inverse transform.- Returns:
- the inverse transform
-
checkInterval
Test whether a given lut can be applied to an interval. This means that the interval is a hypercube at min = 0n with size = lut.length.- Parameters:
interval-lut-- Returns:
-