Package net.imglib2.transform.integer
Class SequentializeTransform
java.lang.Object
net.imglib2.transform.integer.SequentializeTransform
- All Implemented Interfaces:
InvertibleTransform,Transform
Transform n-dimensional to m-dimensional coordinates
(m<n) by
flattening dimensions >m. An example of this transformation is the
way, a 2D image is flattened out as a 1D array in memory.- Author:
- Tobias Pietzsch
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final InvertibleTransformprotected final intprotected final intprotected final intdimension of source vector.protected final intdimension of target vector.protected final long[] -
Constructor Summary
Constructors -
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.inverse()Get the inverse transform.intReturns n, the dimension of the source vector.intReturns m, the dimension of the target vector.
-
Field Details
-
numSourceDimensions
protected final int numSourceDimensionsdimension of source vector. -
numTargetDimensions
protected final int numTargetDimensionsdimension of target vector. -
maxSourceDimension
protected final int maxSourceDimension -
maxTargetDimension
protected final int maxTargetDimension -
seqDimensions
protected final long[] seqDimensions -
inverse
-
-
Constructor Details
-
SequentializeTransform
public SequentializeTransform(long[] sourceDimensions, int numTargetDimensions)
-
-
Method Details
-
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.
-
apply
public void apply(long[] source, long[] target) Description copied from interface:TransformApply theTransformto a source vector to obtain a target vector. -
apply
public void apply(int[] source, int[] target) Description copied from interface:TransformApply theTransformto a source vector to obtain a target vector. -
apply
Description copied from interface:Transform -
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
-