Package net.imglib2.transform
Class InverseTransform
- java.lang.Object
-
- net.imglib2.transform.InverseTransform
-
- All Implemented Interfaces:
InvertibleTransform
,Transform
public final class InverseTransform extends java.lang.Object implements InvertibleTransform
Final implementation of the inverse of anInvertibleTransform
that simply replaces apply by applyInverse and conversely. The originalInvertibleTransform
is returned oninverse()
.- Author:
- Tobias Pietzsch, Stephan Saalfeld
-
-
Constructor Summary
Constructors Constructor Description InverseTransform(InvertibleTransform transform)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
apply(int[] source, int[] target)
Apply theTransform
to a source vector to obtain a target vector.void
apply(long[] source, long[] target)
Apply theTransform
to a source vector to obtain a target vector.void
apply(Localizable source, Positionable target)
void
applyInverse(int[] source, int[] target)
Apply the inverse transform to a target vector to obtain a source vector.void
applyInverse(long[] source, long[] target)
Apply the inverse transform to a target vector to obtain a source vector.void
applyInverse(Positionable source, Localizable target)
Apply the inverse transform to a targetLocalizable
to obtain a sourcePositionable
.InvertibleTransform
inverse()
Get the inverse transform.int
numSourceDimensions()
Returns n, the dimension of the source vector.int
numTargetDimensions()
Returns m, the dimension of the target vector.
-
-
-
Constructor Detail
-
InverseTransform
public InverseTransform(InvertibleTransform transform)
-
-
Method Detail
-
numSourceDimensions
public int numSourceDimensions()
Description copied from interface:Transform
Returns n, the dimension of the source vector.- Specified by:
numSourceDimensions
in interfaceTransform
- Returns:
- the dimension of the source vector.
-
numTargetDimensions
public int numTargetDimensions()
Description copied from interface:Transform
Returns m, the dimension of the target vector.- Specified by:
numTargetDimensions
in interfaceTransform
- Returns:
- the dimension of the target vector.
-
apply
public void apply(long[] source, long[] target)
Description copied from interface:Transform
Apply theTransform
to a source vector to obtain a target vector.
-
apply
public void apply(int[] source, int[] target)
Description copied from interface:Transform
Apply theTransform
to a source vector to obtain a target vector.
-
apply
public void apply(Localizable source, Positionable target)
Description copied from interface:Transform
-
applyInverse
public void applyInverse(long[] source, long[] target)
Description copied from interface:InvertibleTransform
Apply the inverse transform to a target vector to obtain a source vector.- Specified by:
applyInverse
in interfaceInvertibleTransform
- Parameters:
source
- set this to the source coordinates.target
- target coordinates.
-
applyInverse
public void applyInverse(int[] source, int[] target)
Description copied from interface:InvertibleTransform
Apply the inverse transform to a target vector to obtain a source vector.- Specified by:
applyInverse
in interfaceInvertibleTransform
- Parameters:
source
- set this to the source coordinates.target
- target coordinates.
-
applyInverse
public void applyInverse(Positionable source, Localizable target)
Description copied from interface:InvertibleTransform
Apply the inverse transform to a targetLocalizable
to obtain a sourcePositionable
.- Specified by:
applyInverse
in interfaceInvertibleTransform
- Parameters:
source
- set this to the source coordinates.target
- target coordinates.
-
inverse
public InvertibleTransform inverse()
Description copied from interface:InvertibleTransform
Get the inverse transform.- Specified by:
inverse
in interfaceInvertibleTransform
- Returns:
- the inverse transform
-
-