    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.

##

latax
lin
longax
name
naxes
proj
skew
sph

##

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

##

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

##

naxes

      protected int naxes

skew

      protected SkewRotateCoordTransform skew

lin

      protected LinearCoordTransform lin

sph

      protected SphericalTransform sph

proj

      protected Projection proj

longax

      protected int longax

latax

      protected int latax

name

      protected String name[]

##

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

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

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.

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.

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.

##

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

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

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

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

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

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

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)

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

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().

clone

      public synchronized Object clone()

  create a copy of this Transform
  Overrides:
    clone in class CoordTransform

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

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