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 AbstractShearTransformprotected final intprotected final intprotected final int -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractShearTransform(int nDim, int shearDimension, int referenceDimension) protectedAbstractShearTransform(int nDim, int shearDimension, int referenceDimension, AbstractShearTransform inverse) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyInverse(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.abstract AbstractShearTransformcopy()intabstract long[]getShear()intinverse()Get the inverse transform.intintReturns n, the dimension of the source vector.intReturns m, the dimension of the target vector.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:TransformReturns n, the dimension of the source vector.- Specified by:
numSourceDimensionsin interfaceTransform- Returns:
- the dimension of the source vector.
-
numTargetDimensions
public int numTargetDimensions()Description copied from interface:TransformReturns m, the dimension of the target vector.- Specified by:
numTargetDimensionsin 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:InvertibleTransformApply the inverse transform to a target vector to obtain a source vector.- Specified by:
applyInversein interfaceInvertibleTransform- 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.- Specified by:
applyInversein interfaceInvertibleTransform- 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.- Specified by:
applyInversein interfaceInvertibleTransform- Parameters:
source- set this to the source coordinates.target- target coordinates.
-
inverse
Description copied from interface:InvertibleTransformGet the inverse transform.- Specified by:
inversein interfaceInvertibleTransform- Returns:
- the inverse transform
-
getShear
public abstract long[] getShear() -
copy
-