Interface Mixed
-
- All Superinterfaces:
BoundingBoxTransform,Transform
- All Known Subinterfaces:
ComponentMapping,Slicing,Translation
- All Known Implementing Classes:
AbstractMixedTransform,ComponentMappingTransform,MixedTransform,SlicingTransform,TranslationTransform,TranslationTransform.InverseTranslationTransform
public interface Mixed extends Transform, BoundingBoxTransform
Mixed transform allows to express common integer view transformations such as translation, rotation, rotoinversion, and projection.It transform a n-dimensional source vector to a m-dimensional target vector, and can be represented as a m+1 × n+1 homogeneous matrix. The mixed transform can be decomposed as follows:
- project down (discard some components of the source vector)
- component permutation
- component inversion
- project up (add zero components in the target vector)
- translation
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidgetComponentInversion(boolean[] invert)Get an array indicating for each target component, whether the source component it is taken from should be inverted.booleangetComponentInversion(int d)Get the d-th component of inversion vector (seegetComponentInversion(boolean[])).intgetComponentMapping(int d)Get the source dimension which is mapped to the d-th target dimension (seegetComponentMapping(int[])).voidgetComponentMapping(int[] component)Get an array indicating for each target dimensions from which source dimension it is taken.voidgetComponentZero(boolean[] zero)Get a boolean array indicating which target dimensions are _not_ taken from source dimensions.booleangetComponentZero(int d)Get the d-th component of zeroing vector (seegetComponentZero(boolean[])).double[][]getMatrix()Get the matrix that transforms homogeneous source points to homogeneous target points.longgetTranslation(int d)Get the d-th component of translation (seegetTranslation(long[])).voidgetTranslation(long[] translation)Get the translation.-
Methods inherited from interface net.imglib2.transform.integer.BoundingBoxTransform
transform
-
Methods inherited from interface net.imglib2.transform.Transform
apply, apply, apply, numSourceDimensions, numTargetDimensions
-
-
-
-
Method Detail
-
getTranslation
void getTranslation(long[] translation)
Get the translation. Translation is added to the target vector after applying permutation, projection, inversion operations.- Parameters:
translation- array of size at least the target dimension to store the result.
-
getTranslation
long getTranslation(int d)
Get the d-th component of translation (seegetTranslation(long[])).- Parameters:
d-
-
getComponentZero
void getComponentZero(boolean[] zero)
Get a boolean array indicating which target dimensions are _not_ taken from source dimensions.For instance, if the transform maps 2D (x,y) coordinates to the first two components of a 3D (x,y,z) coordinate, the result will be [false, false, true]
- Parameters:
zero- array of size at least the target dimension to store the result.
-
getComponentZero
boolean getComponentZero(int d)
Get the d-th component of zeroing vector (seegetComponentZero(boolean[])).- Parameters:
d-
-
getComponentMapping
void getComponentMapping(int[] component)
Get an array indicating for each target dimensions from which source dimension it is taken.For instance, if the transform maps 2D (x,y) coordinates to the first two components of a 3D (x,y,z) coordinate, the result will be [0, 1, x]. Here, the value of x is undefined because the third target dimension does not correspond to any source dimension. See
getComponentZero(boolean[]).- Parameters:
component- array of size at least the target dimension to store the result.
-
getComponentMapping
int getComponentMapping(int d)
Get the source dimension which is mapped to the d-th target dimension (seegetComponentMapping(int[])).- Parameters:
d-
-
getComponentInversion
void getComponentInversion(boolean[] invert)
Get an array indicating for each target component, whether the source component it is taken from should be inverted.For instance, if rotating a 2D (x,y) coordinates by 180 degrees will map it to (-x,-y). In this case, the result will be [true, true].
- Parameters:
invert- array of size at least the target dimension to store the result.
-
getComponentInversion
boolean getComponentInversion(int d)
Get the d-th component of inversion vector (seegetComponentInversion(boolean[])).- Parameters:
d-
-
getMatrix
double[][] getMatrix()
Get the matrix that transforms homogeneous source points to homogeneous target points. For testing purposes.
-
-