Class ncsa.horizon.coordinates.transforms.SkewRotateCoordTransform
All Packages Class Hierarchy This Package Previous Next Index
Class ncsa.horizon.coordinates.transforms.SkewRotateCoordTransform
java.lang.Object
|
+----java.util.Observable
|
+----ncsa.horizon.coordinates.CoordTransform
|
+----ncsa.horizon.coordinates.transforms.SkewRotateCoordTransform
- public class SkewRotateCoordTransform
- extends CoordTransform
an object for transforming positions from one coordinate system to
a skewed or rotated system via a (linear) matrix operation.
-
fmatrix
-
-
naxes
-
-
rmatrix
-
-
voxsz
-
-
SkewRotateCoordTransform(int, double[])
-
-
SkewRotateCoordTransform(int, double[], double[])
-
-
clone()
- create a copy of this Transform
-
forward(double[])
- apply a forward tranform on an input position.
-
forward(double[], int[])
- apply a forward tranform on an input position.
-
getInNaxes()
- return the minimum number of axes that the forward transform operates
on.
-
getMaxNaxes()
- return the maximum number of axes this transform operates on
-
getMetadata(Metadata, boolean, int[])
- update the input Metadata object to reflect the changes that this
tranform makes to a coordinate position.
-
getOutNaxes()
- return the minimum number of axes that results from the forward
transform.
-
reverse(double[])
- apply a reverse tranform on an input position.
-
reverse(double[], int[])
- apply a reverse tranform on an input position
-
setForwardMatrix(double[], double[], int)
- set the forward matrix and voxel size
-
setForwardMatrix(double[], int)
- set the forward matrix
naxes
protected int naxes
fmatrix
protected double fmatrix[]
rmatrix
protected double rmatrix[]
voxsz
protected double voxsz[]
SkewRotateCoordTransform
public SkewRotateCoordTransform(int naxes,
double matrix[]) throws SingularMatrixException
SkewRotateCoordTransform
public SkewRotateCoordTransform(int naxes,
double matrix[],
double voxsz[]) throws SingularMatrixException
forward
public synchronized double[] forward(double position[],
int axisIndices[])
- apply a forward tranform on an input position.
- Overrides:
- forward in class CoordTransform
forward
public synchronized double[] forward(double position[])
- apply a forward tranform on an input position.
- Overrides:
- forward in class CoordTransform
reverse
public synchronized double[] reverse(double position[],
int axisIndices[])
- apply a reverse tranform on an input position
- Overrides:
- reverse in class CoordTransform
reverse
public synchronized double[] reverse(double position[])
- apply a reverse tranform on an input position.
- Overrides:
- reverse in class CoordTransform
getInNaxes
public int getInNaxes()
- return the minimum number of axes that the forward transform operates
on. This value is equal to the minimum number of axes that results
from the reverse transform. This value is often equal to the that
returned by getOutNaxes(), but is not required to.
- Overrides:
- getInNaxes in class CoordTransform
getOutNaxes
public int getOutNaxes()
- return the minimum number of axes that results from the forward
transform. This value is equal to the minimum number of axes that
the reverse transform operates on. This value is often equal to the
that returned by getInNaxes(), but is not required to.
- Overrides:
- getOutNaxes in class CoordTransform
getMaxNaxes
public int getMaxNaxes()
- return the maximum number of axes this transform operates on
setForwardMatrix
public synchronized void setForwardMatrix(double matrix[],
double voxsz[],
int naxes) throws SingularMatrixException
- set the forward matrix and voxel size
- Parameters:
- matrix - the matrix assuming voxels of unit size; missing
diagonal elements will be set to 1, missing non-diagonal
elements will be set to 0.
- voxsz - the voxel size; missing elements will be assumed to be
one. matrix will be vector-multiplied by this size.
- naxes - the number of axes being operated on
- Throws: SingularMatrixException
- if the input matrix
cannot be inverted.
setForwardMatrix
public synchronized void setForwardMatrix(double matrix[],
int naxes) throws SingularMatrixException
- set the forward matrix
- Parameters:
- matrix - the matrix assuming voxels of unit size; missing
diagonal elements will be set to 1, missing non-diagonal
elements will be set to 0.
- naxes - the number of axes being operated on
- Throws: SingularMatrixException
- if the input matrix
cannot be inverted.
clone
public synchronized Object clone()
- create a copy of this Transform
- Overrides:
- clone in class CoordTransform
getMetadata
public synchronized Metadata getMetadata(Metadata in,
boolean forward,
int axisIndices[])
- update the input Metadata object to reflect the changes that this
tranform makes to a coordinate position. In general, this method
will actually edit the contents of the input Metadata when changes
are necessary.
- Overrides:
- getMetadata in class CoordTransform
All Packages Class Hierarchy This Package Previous Next Index