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.


Variable Index

 o fmatrix
 o naxes
 o rmatrix
 o voxsz

Constructor Index

 o SkewRotateCoordTransform(int, double[])
 o SkewRotateCoordTransform(int, double[], double[])

Method Index

 o clone()
create a copy of this Transform
 o forward(double[])
apply a forward tranform on an input position.
 o forward(double[], int[])
apply a forward tranform on an input position.
 o getInNaxes()
return the minimum number of axes that the forward transform operates on.
 o getMaxNaxes()
return the maximum number of axes this transform operates on
 o getMetadata(Metadata, boolean, int[])
update the input Metadata object to reflect the changes that this tranform makes to a coordinate position.
 o getOutNaxes()
return the minimum number of axes that results from the forward transform.
 o reverse(double[])
apply a reverse tranform on an input position.
 o reverse(double[], int[])
apply a reverse tranform on an input position
 o setForwardMatrix(double[], double[], int)
set the forward matrix and voxel size
 o setForwardMatrix(double[], int)
set the forward matrix

Variables

 o naxes
  protected int naxes
 o fmatrix
  protected double fmatrix[]
 o rmatrix
  protected double rmatrix[]
 o voxsz
  protected double voxsz[]

Constructors

 o SkewRotateCoordTransform
  public SkewRotateCoordTransform(int naxes,
                                  double matrix[]) throws SingularMatrixException
 o SkewRotateCoordTransform
  public SkewRotateCoordTransform(int naxes,
                                  double matrix[],
                                  double voxsz[]) throws SingularMatrixException

Methods

 o forward
  public synchronized double[] forward(double position[],
                                       int axisIndices[])
apply a forward tranform on an input position.
Overrides:
forward in class CoordTransform
 o forward
  public synchronized double[] forward(double position[])
apply a forward tranform on an input position.
Overrides:
forward in class CoordTransform
 o reverse
  public synchronized double[] reverse(double position[],
                                       int axisIndices[])
apply a reverse tranform on an input position
Overrides:
reverse in class CoordTransform
 o reverse
  public synchronized double[] reverse(double position[])
apply a reverse tranform on an input position.
Overrides:
reverse in class CoordTransform
 o 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
 o 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
 o getMaxNaxes
  public int getMaxNaxes()
return the maximum number of axes this transform operates on
 o 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.
 o 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.
 o clone
  public synchronized Object clone()
create a copy of this Transform
Overrides:
clone in class CoordTransform
 o 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