A transform that performs the AIR projection. More...
#include <AIR.h>


Public Member Functions | |
| virtual void | adjustValues (AxisModelBase &model, hippodraw::Axes::Type axes, const Range &limit) |
| Sets the range of given axis to be a new "nice" within the limits given. More... | |
| AIR (UnaryTransform *z) | |
| The constructor. More... | |
| AIR (const AIR &) | |
| The copy constructor. More... | |
| virtual double | aspectRatio () const |
| Returns the aspect ratio. More... | |
| virtual Rect | calcRectangle (const Range &x, const Range &y) |
| Returns a rectangle enclosing the transformed data space. More... | |
| virtual AIR * | clone () const |
| Creates a new Transform object by copying an existing one. More... | |
| virtual bool | inverseTransform (double &lon, double &lat) const |
| Transform the transformed coordinates on X and Y axis back to the original true data space. More... | |
| void | inverseTransformZ (double &z) const |
| Inverse transforms the z coordinate. More... | |
| virtual bool | isLinearInXY () const |
Returns true if the transform would be one to one on both the X and Y axes. More... | |
| virtual bool | isLinearInZ () const |
Returns true if the transform would be one to one on Z axes. More... | |
| bool | isPeriodic () const |
| Sets whether this transform is periodic. More... | |
| virtual const Range & | limitX () const |
| Returns the Range limits of the first coordinate. More... | |
| virtual const Range & | limitY () const |
| Returns the Range limits of the second coordinate. More... | |
| const Range & | limitZ () const |
| Returns the Range limits on the third coordinate. More... | |
| double | moduloAdd (double a1, double a2, hippodraw::Axes::Type axis) const |
| Modulo Addition along either X or Y axis. More... | |
| double | moduloAddX (double x1, double x2) const |
| Modulo Addition along X axis. More... | |
| double | moduloAddY (double y1, double y2) const |
| Modulo Addition along Y axis. More... | |
| double | moduloSub (double s1, double s2, hippodraw::Axes::Type axis) const |
| Modulo Subtraction along either X or Y axis. More... | |
| double | moduloSubX (double x1, double x2) const |
| Modulo Subtraction along X axis. More... | |
| double | moduloSubY (double y1, double y2) const |
| Modulo Subtraction along Y axis. More... | |
| const std::string & | name () const |
| Returns the name of the Transform. More... | |
| bool | needsGrid () const |
| Returns whether this transform needs grid. More... | |
| bool | needsXTicks () const |
| Returns whether this transform needs x ticks. More... | |
| bool | needsYTicks () const |
| Returns whether this transform needs y ticks. More... | |
| void | setNeedsGrid (bool needs_grid) |
| Sets whether this transform needs grid. More... | |
| void | setNeedsXTicks (bool needs_x_ticks) |
| Sets whether this transform needs x ticks. More... | |
| void | setNeedsYTicks (bool needs_y_ticks) |
| Sets whether this transform needs y yicks. More... | |
| virtual const std::vector < AxisTick > & | setTicks (AxisModelBase &axis_model, hippodraw::Axes::Type axis) |
| void | setXOffset (double x_offset) |
| Sets the xOffset of the (periodic) transform. More... | |
| void | setYOffset (double y_offset) |
| Sets the yOffset of the (periodic) transform. More... | |
| void | setZTransform (TransformBase *transform) |
| Sets the transform function on the Z axis. More... | |
| virtual void | transform (double &lon, double &lat) const |
| Transform the coordinates on the X and Y axes. More... | |
| virtual void | transform (std::vector< double > &lon, std::vector< double > &lat) const |
| A transform on two axes. More... | |
| void | transformZ (double &z) const |
| Transforms the z coordinate. More... | |
| virtual void | validate (Range &lat, Range &lon) const |
| Validates the Ranges. More... | |
| double | xOffset () const |
| Returns the xOffset of the (periodic) transform. More... | |
| double | yOffset () const |
| Returns the yOffset of the (periodic) transform. More... | |
| TransformBase * | zTransform () const |
| Returns the transform function on the Z axis. More... | |
| virtual | ~AIR () |
| The virtual destructor. More... | |
Protected Member Functions | |
| const std::vector< AxisTick > & | genTicks (AxisModelBase &axis, hippodraw::Axes::Type axistype) |
| Generates the ticks in the axis. More... | |
| void | initwcs (const std::string &transformName, double *crpix, double *crval, double *cdelt, double crota2, bool galactic) |
| Initialize the WCS transform type. More... | |
| void | setFirstTick (AxisModelBase &axis) |
| Sets the first tick on the axis. More... | |
| void | setTickStep (AxisModelBase &axis) |
| Helps to decide the tick size for the corresponding axis. More... | |
| void | throwWCSMissing () const |
| Throws an exception if WCSLIB support is missing. More... | |
Protected Attributes | |
| bool | m_is_periodic |
| Is this transform periodic. More... | |
| std::string | m_name |
| Name of the Transform. More... | |
| bool | m_needs_grid |
| Does this binary transform needs grid? More... | |
| bool | m_needs_x_ticks |
| Does this binary transform x ticks? More... | |
| bool | m_needs_y_ticks |
| Does this binary transform y ticks? More... | |
| std::vector< AxisTick > | m_ticks |
| The ticks last generated by this transform. More... | |
| wcsprm * | m_wcs |
| char | m_wcs_struct [2000] |
| Range | m_x_limits |
| The limits on X axis of the transform. More... | |
| double | m_x_offset |
| The xoffset of this periodic transform. More... | |
| Range | m_y_limits |
| The limits on Y axis of the transform. More... | |
| double | m_y_offset |
| The yoffset of this periodic transform. More... | |
| UnaryTransform * | m_z |
| The transform on the Z axis. More... | |
| AIR | ( | UnaryTransform * | z | ) |
The constructor.
The constructor taking a UnaryTransform for its Z axis.
Definition at line 18 of file AIR.cxx.
References PeriodicBinaryTransform::initwcs(), and TransformBase::m_name.
The copy constructor.
Definition at line 29 of file AIR.cxx.
References PeriodicBinaryTransform::initwcs().
|
virtualinherited |
Sets the range of given axis to be a new "nice" within the limits given.
Implements BinaryTransform.
Definition at line 303 of file PeriodicBinaryTransform.cxx.
|
virtual |
Returns the aspect ratio.
Some transforms require a specific ration of the width to the height of the display. Returning a value of 2.0, for example, means that the width should be twice the height. Returning a value of 0.0 means any aspect ratio may be used.
Reimplemented from BinaryTransform.
Returns a rectangle enclosing the transformed data space.
Implements BinaryTransform.
Definition at line 202 of file PeriodicBinaryTransform.cxx.
References Range::high(), i, Range::low(), and PeriodicBinaryTransform::transform().
|
virtual |
Creates a new Transform object by copying an existing one.
Implements BinaryTransform.
|
protectedinherited |
Generates the ticks in the axis.
Handle too many ticks better, rather than doing nothing. See more detailed comment in code.
Do not use sprintf, it cause warnings from VS 8.
Definition at line 354 of file PeriodicBinaryTransform.cxx.
References hippodraw::FLT_EQUAL(), AxisModelBase::getFirstTick(), AxisModelBase::getPMag(), AxisModelBase::getRange(), AxisModelBase::getRMag(), AxisModelBase::getScaleFactor(), AxisModelBase::getTickStep(), Range::high(), PeriodicBinaryTransform::m_ticks, PeriodicBinaryTransform::moduloAddX(), PeriodicBinaryTransform::moduloAddY(), AxisModelBase::setUsePMag(), hippodraw::Axes::X, PeriodicBinaryTransform::xOffset(), hippodraw::Axes::Y, and PeriodicBinaryTransform::yOffset().
Referenced by PeriodicBinaryTransform::setTicks().
|
protectedinherited |
Initialize the WCS transform type.
Definition at line 473 of file PeriodicBinaryTransform.cxx.
References i, PeriodicBinaryTransform::m_wcs, PeriodicBinaryTransform::m_wcs_struct, and PeriodicBinaryTransform::throwWCSMissing().
Referenced by AIR::AIR(), AIR2::AIR2(), ARC::ARC(), ARC2::ARC2(), Cartesian::Cartesian(), Cartesian2::Cartesian2(), GlobalSinusoidal::GlobalSinusoidal(), GlobalSinusoidal2::GlobalSinusoidal2(), HammerAito::HammerAito(), HammerAito2::HammerAito2(), Lambert::Lambert(), Lambert2::Lambert2(), Mercator::Mercator(), Mercator2::Mercator2(), SIN::SIN(), SIN2::SIN2(), STG::STG(), STG2::STG2(), TAN::TAN(), and TAN2::TAN2().
|
virtualinherited |
Transform the transformed coordinates on X and Y axis back to the original true data space.
Return true if success, else return false.
Implements BinaryTransform.
Definition at line 545 of file PeriodicBinaryTransform.cxx.
References PeriodicBinaryTransform::m_wcs, and PeriodicBinaryTransform::throwWCSMissing().
|
inherited |
Inverse transforms the z coordinate.
Definition at line 106 of file BinaryTransform.cxx.
References UnaryTransform::inverseTransform(), and BinaryTransform::m_z.
|
virtualinherited |
Returns true if the transform would be one to one on both the X and Y axes.
Clients can use this function to avoid calling the transform in for loops.
Implements BinaryTransform.
Definition at line 460 of file PeriodicBinaryTransform.cxx.
|
virtualinherited |
Returns true if the transform would be one to one on Z axes.
Clients can use this function to avoid calling the transform in for loops.
Definition at line 153 of file BinaryTransform.cxx.
References UnaryTransform::isLinear(), and BinaryTransform::m_z.
Referenced by ContourPointRep::getContour().
|
inherited |
Sets whether this transform is periodic.
Definition at line 148 of file BinaryTransform.cxx.
References BinaryTransform::m_is_periodic.
Referenced by BinaryTransform::BinaryTransform(), AxisRepBase::drawCrossHairs(), ContourPointRep::drawProjectedValues(), CompositePlotter::fillPickedPoint(), XyPlotter::getZValues(), Inspector::setHighRange(), and Inspector::updateTransformTab().
|
virtualinherited |
Returns the Range limits of the first coordinate.
Implements BinaryTransform.
Definition at line 87 of file PeriodicBinaryTransform.cxx.
References PeriodicBinaryTransform::m_x_limits.
|
virtualinherited |
Returns the Range limits of the second coordinate.
Implements BinaryTransform.
Definition at line 93 of file PeriodicBinaryTransform.cxx.
References PeriodicBinaryTransform::m_y_limits.
|
inherited |
Returns the Range limits on the third coordinate.
Definition at line 112 of file BinaryTransform.cxx.
References UnaryTransform::limits(), and BinaryTransform::m_z.
Referenced by CompositePlotter::autoScaleZ(), and CompositePlotter::setRangePrivate().
|
inherited |
Modulo Addition along either X or Y axis.
Definition at line 123 of file PeriodicBinaryTransform.cxx.
References hippodraw::a2, PeriodicBinaryTransform::moduloAddX(), PeriodicBinaryTransform::moduloAddY(), hippodraw::Axes::X, and hippodraw::Axes::Y.
|
inherited |
Modulo Addition along X axis.
Definition at line 147 of file PeriodicBinaryTransform.cxx.
References Range::high(), Range::low(), PeriodicBinaryTransform::m_x_limits, and PeriodicBinaryTransform::moduloSubX().
Referenced by CompositePlotter::fillPickedPoint(), PeriodicBinaryTransform::genTicks(), PeriodicBinaryTransform::moduloAdd(), PeriodicBinaryTransform::moduloSubX(), and Inspector::setHighRange().
|
inherited |
Modulo Addition along Y axis.
Definition at line 176 of file PeriodicBinaryTransform.cxx.
References Range::high(), Range::low(), PeriodicBinaryTransform::m_y_limits, and PeriodicBinaryTransform::moduloSubY().
Referenced by CompositePlotter::fillPickedPoint(), PeriodicBinaryTransform::genTicks(), PeriodicBinaryTransform::moduloAdd(), PeriodicBinaryTransform::moduloSubY(), and Inspector::setHighRange().
|
inherited |
Modulo Subtraction along either X or Y axis.
Definition at line 136 of file PeriodicBinaryTransform.cxx.
References PeriodicBinaryTransform::moduloSubX(), PeriodicBinaryTransform::moduloSubY(), hippodraw::Axes::X, and hippodraw::Axes::Y.
|
inherited |
Modulo Subtraction along X axis.
Definition at line 162 of file PeriodicBinaryTransform.cxx.
References Range::high(), Range::low(), PeriodicBinaryTransform::m_x_limits, and PeriodicBinaryTransform::moduloAddX().
Referenced by AxisRepBase::drawCrossHairs(), PeriodicBinaryTransform::moduloAddX(), and PeriodicBinaryTransform::moduloSub().
|
inherited |
Modulo Subtraction along Y axis.
Definition at line 191 of file PeriodicBinaryTransform.cxx.
References Range::high(), Range::low(), PeriodicBinaryTransform::m_y_limits, and PeriodicBinaryTransform::moduloAddY().
Referenced by AxisRepBase::drawCrossHairs(), PeriodicBinaryTransform::moduloAddY(), and PeriodicBinaryTransform::moduloSub().
|
inherited |
Returns the name of the Transform.
Definition at line 45 of file TransformBase.cxx.
References TransformBase::m_name.
Referenced by BinaryTransform::BinaryTransform(), TransformXML::createElement(), DisplayController::getLog(), DisplayController::setLog(), Inspector::updateTransformTab(), and XYTransform::XYTransform().
|
inherited |
Returns whether this transform needs grid.
Definition at line 118 of file BinaryTransform.cxx.
References BinaryTransform::m_needs_grid.
Referenced by BinaryTransform::BinaryTransform().
|
inherited |
Returns whether this transform needs x ticks.
Definition at line 128 of file BinaryTransform.cxx.
References BinaryTransform::m_needs_x_ticks.
Referenced by BinaryTransform::BinaryTransform(), and CompositePlotter::drawAxisRep().
|
inherited |
Returns whether this transform needs y ticks.
Definition at line 138 of file BinaryTransform.cxx.
References BinaryTransform::m_needs_y_ticks.
Referenced by BinaryTransform::BinaryTransform(), and CompositePlotter::drawAxisRep().
|
protectedinherited |
Sets the first tick on the axis.
Definition at line 340 of file PeriodicBinaryTransform.cxx.
References AxisModelBase::getRange(), Range::low(), and AxisModelBase::setFirstTick().
Referenced by PeriodicBinaryTransform::setTicks().
|
inherited |
Sets whether this transform needs grid.
Definition at line 123 of file BinaryTransform.cxx.
References BinaryTransform::m_needs_grid.
|
inherited |
Sets whether this transform needs x ticks.
Definition at line 133 of file BinaryTransform.cxx.
References BinaryTransform::m_needs_x_ticks.
|
inherited |
Sets whether this transform needs y yicks.
Definition at line 143 of file BinaryTransform.cxx.
References BinaryTransform::m_needs_y_ticks.
|
virtualinherited |
Implements BinaryTransform.
Definition at line 289 of file PeriodicBinaryTransform.cxx.
References PeriodicBinaryTransform::genTicks(), BinaryTransform::m_z, PeriodicBinaryTransform::setFirstTick(), PeriodicBinaryTransform::setTickStep(), and hippodraw::Axes::Z.
|
protectedinherited |
Helps to decide the tick size for the corresponding axis.
Definition at line 317 of file PeriodicBinaryTransform.cxx.
References AxisModelBase::getRange(), AxisModelBase::getScaleFactor(), Range::high(), Range::length(), Range::low(), AxisModelBase::setPMag(), AxisModelBase::setRMag(), and AxisModelBase::setTickStep().
Referenced by PeriodicBinaryTransform::setTicks().
|
inherited |
Sets the xOffset of the (periodic) transform.
Definition at line 104 of file PeriodicBinaryTransform.cxx.
References PeriodicBinaryTransform::m_x_offset.
Referenced by Inspector::autoScale_clicked(), Inspector::rotateY(), Inspector::setHighRange(), and Inspector::setYRotateText().
|
inherited |
Sets the yOffset of the (periodic) transform.
Definition at line 114 of file PeriodicBinaryTransform.cxx.
References PeriodicBinaryTransform::m_y_offset.
Referenced by Inspector::autoScale_clicked(), Inspector::rotateX(), Inspector::setHighRange(), and Inspector::setXRotateText().
|
inherited |
Sets the transform function on the Z axis.
The transform object must be derived class of UnaryTransform, otherwise the transform object pointer is set to null.
Definition at line 93 of file BinaryTransform.cxx.
References BinaryTransform::m_z, and BinaryTransform::transform().
|
protectedinherited |
Throws an exception if WCSLIB support is missing.
Definition at line 506 of file PeriodicBinaryTransform.cxx.
Referenced by PeriodicBinaryTransform::initwcs(), PeriodicBinaryTransform::inverseTransform(), and PeriodicBinaryTransform::transform().
|
virtualinherited |
Transform the coordinates on the X and Y axes.
Implements BinaryTransform.
Definition at line 518 of file PeriodicBinaryTransform.cxx.
References PeriodicBinaryTransform::m_wcs, and PeriodicBinaryTransform::throwWCSMissing().
Referenced by PeriodicBinaryTransform::calcRectangle().
|
virtualinherited |
A transform on two axes.
Implements BinaryTransform.
Definition at line 579 of file PeriodicBinaryTransform.cxx.
References i, PeriodicBinaryTransform::m_wcs, num_util::size(), and PeriodicBinaryTransform::throwWCSMissing().
|
inherited |
Transforms the z coordinate.
Definition at line 100 of file BinaryTransform.cxx.
References BinaryTransform::m_z, and UnaryTransform::transform().
Referenced by ContourPointRep::drawContourTicks(), AxisRepColor::drawZTickLabels(), AxisRepColor::drawZTickLines(), and CompositePlotter::prepareToDraw().
Validates the Ranges.
Adjusts Ranges to be restricted to that which is valid for the transform.
Implements BinaryTransform.
Definition at line 275 of file PeriodicBinaryTransform.cxx.
References Range::high(), Range::low(), PeriodicBinaryTransform::m_x_limits, PeriodicBinaryTransform::m_y_limits, Range::setHigh(), and Range::setLow().
|
inherited |
Returns the xOffset of the (periodic) transform.
Definition at line 99 of file PeriodicBinaryTransform.cxx.
References PeriodicBinaryTransform::m_x_offset.
Referenced by AxisRepBase::drawCrossHairs(), CompositePlotter::fillPickedPoint(), PeriodicBinaryTransform::genTicks(), Inspector::setHighRange(), and Inspector::updateTransformTab().
|
inherited |
Returns the yOffset of the (periodic) transform.
Definition at line 109 of file PeriodicBinaryTransform.cxx.
References PeriodicBinaryTransform::m_y_offset.
Referenced by AxisRepBase::drawCrossHairs(), CompositePlotter::fillPickedPoint(), PeriodicBinaryTransform::genTicks(), Inspector::setHighRange(), and Inspector::updateTransformTab().
|
inherited |
Returns the transform function on the Z axis.
Definition at line 86 of file BinaryTransform.cxx.
References BinaryTransform::m_z.
Referenced by DisplayController::getLog(), and DisplayController::setLog().
|
protectedinherited |
Is this transform periodic.
Definition at line 57 of file BinaryTransform.h.
Referenced by BinaryTransform::BinaryTransform(), and BinaryTransform::isPeriodic().
|
protectedinherited |
Name of the Transform.
Definition at line 42 of file TransformBase.h.
Referenced by AIR::AIR(), AIR2::AIR2(), ARC::ARC(), ARC2::ARC2(), BinaryTransform::BinaryTransform(), Cartesian::Cartesian(), Cartesian2::Cartesian2(), GlobalSinusoidal::GlobalSinusoidal(), GlobalSinusoidal2::GlobalSinusoidal2(), HammerAito::HammerAito(), HammerAito2::HammerAito2(), Lambert::Lambert(), Lambert2::Lambert2(), LinearTransform::LinearTransform(), LogTransform::LogTransform(), Mercator::Mercator(), Mercator2::Mercator2(), TransformBase::name(), SIN::SIN(), SIN2::SIN2(), STG::STG(), STG2::STG2(), TAN::TAN(), TAN2::TAN2(), TransformBase::TransformBase(), XYTransform::XYTransform(), XYZTransform::XYZTransform(), and XYZTransformBase::XYZTransformBase().
|
protectedinherited |
Does this binary transform needs grid?
Definition at line 48 of file BinaryTransform.h.
Referenced by BinaryTransform::BinaryTransform(), BinaryTransform::needsGrid(), and BinaryTransform::setNeedsGrid().
|
protectedinherited |
Does this binary transform x ticks?
Definition at line 51 of file BinaryTransform.h.
Referenced by BinaryTransform::BinaryTransform(), BinaryTransform::needsXTicks(), and BinaryTransform::setNeedsXTicks().
|
protectedinherited |
Does this binary transform y ticks?
Definition at line 54 of file BinaryTransform.h.
Referenced by BinaryTransform::BinaryTransform(), BinaryTransform::needsYTicks(), and BinaryTransform::setNeedsYTicks().
|
protectedinherited |
The ticks last generated by this transform.
Definition at line 94 of file PeriodicBinaryTransform.h.
Referenced by PeriodicBinaryTransform::genTicks().
|
protectedinherited |
Definition at line 55 of file PeriodicBinaryTransform.h.
Referenced by PeriodicBinaryTransform::initwcs(), PeriodicBinaryTransform::inverseTransform(), and PeriodicBinaryTransform::transform().
|
protectedinherited |
Definition at line 56 of file PeriodicBinaryTransform.h.
Referenced by PeriodicBinaryTransform::initwcs().
|
protectedinherited |
The limits on X axis of the transform.
Definition at line 60 of file PeriodicBinaryTransform.h.
Referenced by PeriodicBinaryTransform::limitX(), PeriodicBinaryTransform::moduloAddX(), PeriodicBinaryTransform::moduloSubX(), and PeriodicBinaryTransform::validate().
|
protectedinherited |
The xoffset of this periodic transform.
Definition at line 66 of file PeriodicBinaryTransform.h.
Referenced by PeriodicBinaryTransform::setXOffset(), and PeriodicBinaryTransform::xOffset().
|
protectedinherited |
The limits on Y axis of the transform.
Definition at line 63 of file PeriodicBinaryTransform.h.
Referenced by PeriodicBinaryTransform::limitY(), PeriodicBinaryTransform::moduloAddY(), PeriodicBinaryTransform::moduloSubY(), and PeriodicBinaryTransform::validate().
|
protectedinherited |
The yoffset of this periodic transform.
Definition at line 69 of file PeriodicBinaryTransform.h.
Referenced by PeriodicBinaryTransform::setYOffset(), and PeriodicBinaryTransform::yOffset().
|
protectedinherited |
The transform on the Z axis.
Definition at line 45 of file BinaryTransform.h.
Referenced by XYTransform::adjustValues(), BinaryTransform::BinaryTransform(), BinaryTransform::inverseTransformZ(), BinaryTransform::isLinearInZ(), BinaryTransform::limitZ(), XYTransform::setTicks(), PeriodicBinaryTransform::setTicks(), BinaryTransform::setZTransform(), BinaryTransform::transformZ(), BinaryTransform::zTransform(), and BinaryTransform::~BinaryTransform().