Class AbstractMixedTransform

java.lang.Object
net.imglib2.transform.integer.AbstractMixedTransform
All Implemented Interfaces:
BoundingBoxTransform, Mixed, Transform
Direct Known Subclasses:
ComponentMappingTransform, MixedTransform, SlicingTransform, TranslationTransform, TranslationTransform.InverseTranslationTransform

public abstract class AbstractMixedTransform extends Object implements Mixed
TODO
  • Field Details

    • numTargetDimensions

      protected final int numTargetDimensions
      dimension of target vector.
  • Constructor Details

    • AbstractMixedTransform

      protected AbstractMixedTransform(int numTargetDimensions)
  • Method Details

    • numSourceDimensions

      public int numSourceDimensions()
      Description copied from interface: Transform
      Returns n, the dimension of the source vector.
      Specified by:
      numSourceDimensions in interface Transform
      Returns:
      the dimension of the source vector.
    • numTargetDimensions

      public int numTargetDimensions()
      Description copied from interface: Transform
      Returns m, the dimension of the target vector.
      Specified by:
      numTargetDimensions in interface Transform
      Returns:
      the dimension of the target vector.
    • getTranslation

      public void getTranslation(long[] translation)
      Description copied from interface: Mixed
      Get the translation. Translation is added to the target vector after applying permutation, projection, inversion operations.
      Specified by:
      getTranslation in interface Mixed
      Parameters:
      translation - array of size at least the target dimension to store the result.
    • getTranslation

      public long getTranslation(int d)
      Description copied from interface: Mixed
      Get the d-th component of translation (see Mixed.getTranslation(long[])).
      Specified by:
      getTranslation in interface Mixed
      Parameters:
      d -
    • getComponentZero

      public void getComponentZero(boolean[] zero)
      Description copied from interface: Mixed
      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]

      Specified by:
      getComponentZero in interface Mixed
      Parameters:
      zero - array of size at least the target dimension to store the result.
    • getComponentZero

      public boolean getComponentZero(int d)
      Description copied from interface: Mixed
      Get the d-th component of zeroing vector (see Mixed.getComponentZero(boolean[])).
      Specified by:
      getComponentZero in interface Mixed
      Parameters:
      d -
    • getComponentMapping

      public void getComponentMapping(int[] component)
      Description copied from interface: Mixed
      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 Mixed.getComponentZero(boolean[]).

      Specified by:
      getComponentMapping in interface Mixed
      Parameters:
      component - array of size at least the target dimension to store the result.
    • getComponentMapping

      public int getComponentMapping(int d)
      Description copied from interface: Mixed
      Get the source dimension which is mapped to the d-th target dimension (see Mixed.getComponentMapping(int[])).
      Specified by:
      getComponentMapping in interface Mixed
      Parameters:
      d -
    • getComponentInversion

      public void getComponentInversion(boolean[] invert)
      Description copied from interface: Mixed
      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].

      Specified by:
      getComponentInversion in interface Mixed
      Parameters:
      invert - array of size at least the target dimension to store the result.
    • getComponentInversion

      public boolean getComponentInversion(int d)
      Description copied from interface: Mixed
      Get the d-th component of inversion vector (see Mixed.getComponentInversion(boolean[])).
      Specified by:
      getComponentInversion in interface Mixed
      Parameters:
      d -
    • transform

      public BoundingBox transform(BoundingBox boundingBox)
      Description copied from interface: BoundingBoxTransform
      Return a transformed bounding box. The transformation can be carried out in-place.
      Specified by:
      transform in interface BoundingBoxTransform
      Parameters:
      boundingBox -
      Returns:
      the transformed bounding box