Class ShearTransform
java.lang.Object
net.imglib2.transform.integer.shear.AbstractShearTransform
net.imglib2.transform.integer.shear.ShearTransform
- All Implemented Interfaces:
BoundingBoxTransform
,InvertibleTransform
,Transform
Forward implementation of the most simple case of a shear transform:
coordinate[ shearDimension ] += coordinate[ referenceDimension ]
- Author:
- Philipp Hanslovsky
-
Field Summary
Fields inherited from class net.imglib2.transform.integer.shear.AbstractShearTransform
inverse, nDim, referenceDimension, shearDimension
-
Constructor Summary
ConstructorsModifierConstructorDescriptionShearTransform
(int nDim, int shearDimension, int referenceDimension) protected
ShearTransform
(int nDim, int shearDimension, int referenceDimension, AbstractShearTransform inverse) Protected constructor for passing an inverse to avoid construction of unnecessary objects. -
Method Summary
Modifier and TypeMethodDescriptionvoid
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) copy()
long[]
getShear()
transform
(BoundingBox bb) Return a transformed bounding box.Methods inherited from class net.imglib2.transform.integer.shear.AbstractShearTransform
applyInverse, applyInverse, applyInverse, getReferenceDimension, getShearDimension, inverse, numDimensions, numSourceDimensions, numTargetDimensions
-
Constructor Details
-
ShearTransform
public ShearTransform(int nDim, int shearDimension, int referenceDimension) - Parameters:
nDim
- Number of dimensions (source and target dimensions must be the same)shearDimension
- Dimension to be sheared.referenceDimension
- Dimension used as reference for shear.
-
ShearTransform
protected ShearTransform(int nDim, int shearDimension, int referenceDimension, AbstractShearTransform inverse) Protected constructor for passing an inverse to avoid construction of unnecessary objects.- Parameters:
nDim
- Number of dimensions (source and target dimensions must be the same)shearDimension
- Dimension to be sheared.referenceDimension
- Dimension used as reference for shear.inverse
-
-
-
Method Details
-
apply
public void apply(long[] source, long[] target) Description copied from interface:Transform
Apply theTransform
to a source vector to obtain a target vector.- Parameters:
source
- source coordinates.target
- set this to the target coordinates.
-
apply
public void apply(int[] source, int[] target) Description copied from interface:Transform
Apply theTransform
to a source vector to obtain a target vector.- Parameters:
source
- source coordinates.target
- set this to the target coordinates.
-
apply
Description copied from interface:Transform
- Parameters:
source
- source coordinates.target
- set this to the target coordinates.
-
copy
- Specified by:
copy
in classAbstractShearTransform
-
getShear
public long[] getShear()- Specified by:
getShear
in classAbstractShearTransform
-
transform
Description copied from interface:BoundingBoxTransform
Return a transformed bounding box. The transformation can be carried out in-place.- Parameters:
bb
-- Returns:
- the transformed bounding box
-