Package net.imglib2.transform.integer
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
TODO
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final intdimension of target vector. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgetComponentInversion(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 (seeMixed.getComponentInversion(boolean[])).intgetComponentMapping(int d) Get the source dimension which is mapped to the d-th target dimension (seeMixed.getComponentMapping(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 (seeMixed.getComponentZero(boolean[])).longgetTranslation(int d) Get the d-th component of translation (seeMixed.getTranslation(long[])).voidgetTranslation(long[] translation) Get the translation.intReturns n, the dimension of the source vector.intReturns m, the dimension of the target vector.transform(BoundingBox boundingBox) Return a transformed bounding box.
-
Field Details
-
numTargetDimensions
protected final int numTargetDimensionsdimension of target vector.
-
-
Constructor Details
-
AbstractMixedTransform
protected AbstractMixedTransform(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.
-
getTranslation
public void getTranslation(long[] translation) Description copied from interface:MixedGet the translation. Translation is added to the target vector after applying permutation, projection, inversion operations.- Specified by:
getTranslationin interfaceMixed- Parameters:
translation- array of size at least the target dimension to store the result.
-
getTranslation
public long getTranslation(int d) Description copied from interface:MixedGet the d-th component of translation (seeMixed.getTranslation(long[])).- Specified by:
getTranslationin interfaceMixed- Parameters:
d-
-
getComponentZero
public void getComponentZero(boolean[] zero) Description copied from interface:MixedGet 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:
getComponentZeroin interfaceMixed- Parameters:
zero- array of size at least the target dimension to store the result.
-
getComponentZero
public boolean getComponentZero(int d) Description copied from interface:MixedGet the d-th component of zeroing vector (seeMixed.getComponentZero(boolean[])).- Specified by:
getComponentZeroin interfaceMixed- Parameters:
d-
-
getComponentMapping
public void getComponentMapping(int[] component) Description copied from interface:MixedGet 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:
getComponentMappingin interfaceMixed- Parameters:
component- array of size at least the target dimension to store the result.
-
getComponentMapping
public int getComponentMapping(int d) Description copied from interface:MixedGet the source dimension which is mapped to the d-th target dimension (seeMixed.getComponentMapping(int[])).- Specified by:
getComponentMappingin interfaceMixed- Parameters:
d-
-
getComponentInversion
public void getComponentInversion(boolean[] invert) Description copied from interface:MixedGet 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:
getComponentInversionin interfaceMixed- Parameters:
invert- array of size at least the target dimension to store the result.
-
getComponentInversion
public boolean getComponentInversion(int d) Description copied from interface:MixedGet the d-th component of inversion vector (seeMixed.getComponentInversion(boolean[])).- Specified by:
getComponentInversionin interfaceMixed- Parameters:
d-
-
transform
Description copied from interface:BoundingBoxTransformReturn a transformed bounding box. The transformation can be carried out in-place.- Specified by:
transformin interfaceBoundingBoxTransform- Parameters:
boundingBox-- Returns:
- the transformed bounding box
-