Class ncsa.horizon.coordinates.transforms.LinToSphLinCoordTransform
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ncsa.horizon.coordinates.transforms.LinToSphLinCoordTransform

java.lang.Object
   |
   +----java.util.Observable
           |
           +----ncsa.horizon.coordinates.CoordTransform
                   |
                   +----ncsa.horizon.coordinates.transforms.LinToSphLinCoordTransform

public class LinToSphLinCoordTransform
extends CoordTransform
an object that transforms positions in a linear, multi-dimensional space (often the data space) into a world coordinate space that contains zero or one pair of axes representing longitude and latitude. The longitude and latitude axes are de-projected from the linear space via one of the projections given in FITSWCS.ProjectionType. Prior to deprojection, all axes may be optionally sent through a skewing/rotating transform.

Variable Index

 o latax
 o lin
 o longax
 o name
 o naxes
 o proj
 o skew
 o sph

Constructor Index

 o LinToSphLinCoordTransform(int, double[], double[], double[], double[], String[], double[], int, int, String, double[], Double, Double)
create a LinToSphLinCoordTransform object specifying all internal data.
 o LinToSphLinCoordTransform(int, double[], double[], double[], double[], String[], int, int, String)
create a LinToSphLinCoordTransform object specifying internal data.
 o LinToSphLinCoordTransform(int, double[], double[], double[], double[], String[], int, int, String, double[])
create a LinToSphLinCoordTransform object specifying internal data.
 o LinToSphLinCoordTransform(Metadata)
create a Transform based on the specified metadata
 o LinToSphLinCoordTransform(Metadata, int, int)
create a Transform based on the specified metadata

Method Index

 o clone()
create a copy of this Transform
 o determineConstraints(Metadata, boolean)
make an educated guess as to the proper way to apply this transform to a coordinate system with the specified Metadata.
 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 getName()
return the axis name to be given to a transformed axis.
 o getName(int)
return the axis name to be given to a transformed axis, or null if the name is not updated by getMetadata().
 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 setName(int, String)
set the axis name to be given to a transformed axis.
 o setName(String[])
set the axis names to be given to each transformed axis.

Variables

 o naxes
  protected int naxes
 o skew
  protected SkewRotateCoordTransform skew
 o lin
  protected LinearCoordTransform lin
 o sph
  protected SphericalTransform sph
 o proj
  protected Projection proj
 o longax
  protected int longax
 o latax
  protected int latax
 o name
  protected String name[]

Constructors

 o LinToSphLinCoordTransform
  public LinToSphLinCoordTransform(Metadata md) throws IllegalTransformException
create a Transform based on the specified metadata
Parameters:
md - the metadata to examine for data defining the transform
longaxis - the index (relative to zero) of the longitude axis, or <0 if the axis should be determined from the metadata
lataxis - the index (relative to zero) of the latitude axis, or <0 if the axis should be determined from the metadata
 o LinToSphLinCoordTransform
  public LinToSphLinCoordTransform(Metadata md,
                                   int longaxis,
                                   int lataxis) throws IllegalTransformException
create a Transform based on the specified metadata
Parameters:
md - the metadata to examine for data defining the transform
longaxis - the index (relative to zero) of the longitude axis, or <0 if the axis should be determined from the metadata
lataxis - the index (relative to zero) of the latitude axis, or <0 if the axis should be determined from the metadata
 o LinToSphLinCoordTransform
  public LinToSphLinCoordTransform(int naxes,
                                   double refpos[],
                                   double refoff[],
                                   double refval[],
                                   double stepsz[],
                                   String names[],
                                   double matrix[],
                                   int longaxis,
                                   int lataxis,
                                   String pcode,
                                   double prjparms[],
                                   Double longpole,
                                   Double latpole) throws IllegalTransformException
create a LinToSphLinCoordTransform object specifying all internal data. Missing values in the input array are set to default values.
Parameters:
naxes - the maximum number of axes this transform can operate on
refpos - the position in the "input" system (the system forward() transforms from) that is equal to the the refval position. Default equals 0.
refval - the position in the "output" system (the system forward() transforms to) that is equal to the the refpos position. Default equals 0.
refoff - An extra offset that gets added to the reference position. Default equals 0;
stepsz - the size of a voxel of the "output" system (the system that forward() transforms to) in units of the "input" system
names - names to assign to transformed axes. A null element of null array means do not reassign name. These values only affect the behavior of getMetadata();
matrix - a linear tranformation matrix for correcting for skew and/or rotation. A null value means no matrix should be applied.
longaxis - the index (relative to zero) of the longitude axis, or <0 if such an axis does not exist.
lataxis - the index (relative to zero) of the latitude axis, or <0 if such an axis does not exist.
pcode - a 3-character string representing the projection type; currently supported types include those listed in ProjectionType
prjparms - an array containing the projection parameters (or null if none available). The number of elements needed depends on the value of pcode.
longpole - The world longitude of the reference system's pole, or null if the default should be used. A value of 999.0 is also taken to mean that the default should be used.
latpole - The world latitude of the reference system's pole, or null if the default should be used. A value of 999.0 is also taken to mean that the default should be used.
Throws: IllegalTransformException
if the parameters do not define a valid transformation.
 o LinToSphLinCoordTransform
  public LinToSphLinCoordTransform(int naxes,
                                   double refpos[],
                                   double refoff[],
                                   double refval[],
                                   double stepsz[],
                                   String names[],
                                   int longaxis,
                                   int lataxis,
                                   String pcode,
                                   double prjparms[]) throws IllegalTransformException
create a LinToSphLinCoordTransform object specifying internal data. Missing values in the input array are set to default values.
Parameters:
naxes - the maximum number of axes this transform can operate on
refpos - the position in the "input" system (the system forward() transforms from) that is equal to the the refval position. Default equals 0.
refval - the position in the "output" system (the system forward() transforms to) that is equal to the the refpos position. Default equals 0.
refoff - An extra offset that gets added to the reference position. Default equals 0;
stepsz - the size of a voxel of the "output" system (the system that forward() transforms to) in units of the "input" system
names - names to assign to transformed axes. A null element of null array means do not reassign name. These values only affect the behavior of getMetadata();
longaxis - the index (relative to zero) of the longitude axis, or <0 if such an axis does not exist.
lataxis - the index (relative to zero) of the latitude axis, or <0 if such an axis does not exist.
pcode - a 3-character string representing the projection type; currently supported types include those listed in ProjectionType
prjparms - an array containing the projection parameters (or null if none available). The number of elements needed depends on the value of pcode.
Throws: IllegalTransformException
if the parameters do not define a valid transformation.
 o LinToSphLinCoordTransform
  public LinToSphLinCoordTransform(int naxes,
                                   double refpos[],
                                   double refoff[],
                                   double refval[],
                                   double stepsz[],
                                   String names[],
                                   int longaxis,
                                   int lataxis,
                                   String pcode) throws IllegalTransformException
create a LinToSphLinCoordTransform object specifying internal data. Missing values in the input array are set to default values.
Parameters:
naxes - the maximum number of axes this transform can operate on
refpos - the position in the "input" system (the system forward() transforms from) that is equal to the the refval position. Default equals 0.
refval - the position in the "output" system (the system forward() transforms to) that is equal to the the refpos position. Default equals 0.
refoff - An extra offset that gets added to the reference position. Default equals 0;
stepsz - the size of a voxel of the "output" system (the system that forward() transforms to) in units of the "input" system
names - names to assign to transformed axes. A null element of null array means do not reassign name. These values only affect the behavior of getMetadata();
longaxis - the index (relative to zero) of the longitude axis, or <0 if such an axis does not exist.
lataxis - the index (relative to zero) of the latitude axis, or <0 if such an axis does not exist.
pcode - a 3-character string representing the projection type; currently supported types include those listed in ProjectionType
Throws: IllegalTransformException
if the parameters do not define a valid transformation.

Methods

 o forward
  public synchronized double[] forward(double position[],
                                       int axisIndices[]) throws PositionBeyondDomainException, TransformUndefinedException
apply a forward tranform on an input position.
Parameters:
position - an array giving the input position to transform
axisIndices - an array containing the indices of the position array that should be used in the tranformation. The order of the indices indicate how the position should be interpreted by the transform.
Overrides:
forward in class CoordTransform
 o forward
  public synchronized double[] forward(double position[]) throws PositionBeyondDomainException, TransformUndefinedException
apply a forward tranform on an input position.
Parameters:
position - an array giving the input position to transform
Overrides:
forward in class CoordTransform
 o reverse
  public synchronized double[] reverse(double position[],
                                       int axisIndices[]) throws PositionBeyondDomainException, TransformUndefinedException
apply a reverse tranform on an input position.
Parameters:
position - an array giving the input position to transform
axisIndices - an array containing the indices of the position array that should be used in the tranformation. The order of the indices indicate how the position should be interpreted by the transform.
Overrides:
reverse in class CoordTransform
 o reverse
  public synchronized double[] reverse(double position[]) throws PositionBeyondDomainException, TransformUndefinedException
apply a reverse tranform on an input position.
Parameters:
position - an array giving the input position to transform
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 setName
  public synchronized void setName(int axis,
                                   String in) throws ArrayIndexOutOfBoundsException
set the axis name to be given to a transformed axis. Note that this name is only used by the getMetadatum() method and is applied regardless of the value of the forward argument to that method.
Parameters:
axis - the index of the axis to be set (first axis has index 0)
in - the name to give to the axis, null means use the name of the untransformed axis
 o getName
  public synchronized String getName(int axis) throws ArrayIndexOutOfBoundsException
return the axis name to be given to a transformed axis, or null if the name is not updated by getMetadata().
Parameters:
axis - the index of the axis (first axis has index 0)
 o setName
  public synchronized void setName(String in[])
set the axis names to be given to each transformed axis. Note that these names are only used by the getMetadatum() method and are applied regardless of the value of the forward argument to that method.
Parameters:
in - values to be set
 o getName
  public synchronized String[] getName() throws ArrayIndexOutOfBoundsException
return the axis name to be given to a transformed axis. Null values in the output array indicate that the name for that axis will not be updated by getMetadata().
 o clone
  public synchronized Object clone()
create a copy of this Transform
Overrides:
clone in class CoordTransform
 o determineConstraints
  public CoordTransformConstraints determineConstraints(Metadata in,
                                                        boolean forwards)
make an educated guess as to the proper way to apply this transform to a coordinate system with the specified Metadata. This method returns a default CoordTransformConstraints object that is consistant with the system description that was provided to this transform at construction; the input Metadata are ignored.
Overrides:
determineConstraints 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