Class AbstractShearTransform
java.lang.Object
net.imglib2.transform.integer.shear.AbstractShearTransform
- All Implemented Interfaces:
BoundingBoxTransform
,InvertibleTransform
,Transform
- Direct Known Subclasses:
InverseShearTransform
,ShearTransform
public abstract class AbstractShearTransform
extends Object
implements InvertibleTransform, BoundingBoxTransform
Most simple case of a shear transform that just implements
for a integer valued coordinate:
coordinate[ shearDimension ] += coordinate[ referenceDimension ] (forward)
coordinate[ shearDimension ] -= coordinate[ referenceDimension ] (backward)
This abstract class holds the inverse and implements applyInverse in
terms of inverse.apply
- Author:
- Philipp Hanslovsky
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AbstractShearTransform
protected final int
protected final int
protected final int
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractShearTransform
(int nDim, int shearDimension, int referenceDimension) protected
AbstractShearTransform
(int nDim, int shearDimension, int referenceDimension, AbstractShearTransform inverse) -
Method Summary
Modifier and TypeMethodDescriptionvoid
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
.abstract AbstractShearTransform
copy()
int
abstract long[]
getShear()
int
inverse()
Get the inverse transform.int
int
Returns n, the dimension of the source vector.int
Returns m, the dimension of the target vector.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.integer.BoundingBoxTransform
transform
-
Field Details
-
nDim
protected final int nDim -
shearDimension
protected final int shearDimension -
referenceDimension
protected final int referenceDimension -
inverse
-
-
Constructor Details
-
AbstractShearTransform
protected AbstractShearTransform(int nDim, int shearDimension, int referenceDimension) -
AbstractShearTransform
protected AbstractShearTransform(int nDim, int shearDimension, int referenceDimension, AbstractShearTransform inverse)
-
-
Method Details
-
getReferenceDimension
public int getReferenceDimension() -
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.
-
numDimensions
public int numDimensions() -
getShearDimension
public int getShearDimension() -
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
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
Description copied from interface:InvertibleTransform
Get the inverse transform.- Specified by:
inverse
in interfaceInvertibleTransform
- Returns:
- the inverse transform
-
getShear
public abstract long[] getShear() -
copy
-