Class TranslationTransform

java.lang.Object
net.imglib2.transform.integer.AbstractMixedTransform
net.imglib2.transform.integer.TranslationTransform
All Implemented Interfaces:
Concatenable<Translation>, PreConcatenable<Translation>, BoundingBoxTransform, Mixed, Translation, InvertibleTransform, Transform

public class TranslationTransform extends AbstractMixedTransform implements Translation, Concatenable<Translation>, PreConcatenable<Translation>
TODO
  • Field Details

  • Constructor Details

    • TranslationTransform

      public TranslationTransform(int targetDim)
    • TranslationTransform

      public TranslationTransform(long[] translation)
  • Method Details

    • getTranslation

      public void getTranslation(long[] t)
      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
      Overrides:
      getTranslation in class AbstractMixedTransform
      Parameters:
      t - 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
      Overrides:
      getTranslation in class AbstractMixedTransform
      Parameters:
      d -
    • setTranslation

      public void setTranslation(long[] t)
    • apply

      public void apply(long[] source, long[] target)
      Description copied from interface: Transform
      Apply the Transform to a source vector to obtain a target vector.
      Specified by:
      apply in interface Transform
      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 the Transform to a source vector to obtain a target vector.
      Specified by:
      apply in interface Transform
      Parameters:
      source - source coordinates.
      target - set this to the target coordinates.
    • apply

      public void apply(Localizable source, Positionable target)
      Description copied from interface: Transform
      Apply the Transform to a source Localizable to obtain a target Positionable.
      Specified by:
      apply in interface Transform
      Parameters:
      source - source coordinates.
      target - set this to the target coordinates.
    • concatenate

      public TranslationTransform concatenate(Translation t)
      Description copied from interface: Concatenable
      Concatenate this object with a. The result will be an object that can be concatenated with another A. The conventional meaning for concatenating transformations is the following: Let ba = b.concatenate(a). Applying ba to x is equivalent to first applying a to x and then applying b to the result.
      Specified by:
      concatenate in interface Concatenable<Translation>
    • getConcatenableClass

      public Class<Translation> getConcatenableClass()
      Specified by:
      getConcatenableClass in interface Concatenable<Translation>
    • preConcatenate

      public TranslationTransform preConcatenate(Translation t)
      Description copied from interface: PreConcatenable
      Pre-concatenate this object with a. The result will be an object that can be pre-concatenated with another A. The conventional meaning for concatenating transformations is the following: Let ba = a.preConcatenate(b). Applying ba to x is equivalent to first applying a to x and then applying b to the result.
      Specified by:
      preConcatenate in interface PreConcatenable<Translation>
    • getPreConcatenableClass

      public Class<Translation> getPreConcatenableClass()
      Specified by:
      getPreConcatenableClass in interface PreConcatenable<Translation>
    • set

      public void set(Translation transform)
      set parameters to transform.
      Parameters:
      transform -
    • getMatrix

      public double[][] getMatrix()
      Get the matrix that transforms homogeneous source points to homogeneous target points. For testing purposes.
      Specified by:
      getMatrix in interface Mixed
    • applyInverse

      public void applyInverse(long[] source, long[] target)
      Description copied from interface: InvertibleTransform
      Apply the inverse transform to a target vector to obtain a source vector.
      Specified by:
      applyInverse in interface InvertibleTransform
      Parameters:
      source - set this to the source coordinates.
      target - target coordinates.
    • applyInverse

      public void applyInverse(int[] source, int[] target)
      Description copied from interface: InvertibleTransform
      Apply the inverse transform to a target vector to obtain a source vector.
      Specified by:
      applyInverse in interface InvertibleTransform
      Parameters:
      source - set this to the source coordinates.
      target - target coordinates.
    • applyInverse

      public void applyInverse(Positionable source, Localizable target)
      Description copied from interface: InvertibleTransform
      Apply the inverse transform to a target Localizable to obtain a source Positionable.
      Specified by:
      applyInverse in interface InvertibleTransform
      Parameters:
      source - set this to the source coordinates.
      target - target coordinates.
    • inverse

      Description copied from interface: InvertibleTransform
      Get the inverse transform.
      Specified by:
      inverse in interface InvertibleTransform
      Returns:
      the inverse transform