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:

  1. project down (discard some components of the source vector)
  2. component permutation
  3. component inversion
  4. project up (add zero components in the target vector)
  5. translation
Author:
Tobias Pietzsch
  • Method Details

    • 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 (see getTranslation(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 (see getComponentZero(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 (see getComponentMapping(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 (see getComponentInversion(boolean[])).
      Parameters:
      d -
    • getMatrix

      double[][] getMatrix()
      Get the matrix that transforms homogeneous source points to homogeneous target points. For testing purposes.