![]() |
Isis 3 Programmer Reference
|
Universal Ground Map. More...
#include <UniversalGroundMap.h>
Public Types | |
enum | CameraPriority { CameraFirst, ProjectionFirst } |
This enum is used to define whether to use a camera or projection primarily, and which to fall back on. More... | |
Public Member Functions | |
UniversalGroundMap (Cube &cube, CameraPriority priority=CameraFirst) | |
Constructs a UniversalGroundMap object from a cube. More... | |
~UniversalGroundMap () | |
Destroys the UniversalGroundMap object. More... | |
void | SetBand (const int band) |
Set the image band number. More... | |
bool | SetUniversalGround (double lat, double lon) |
Returns whether the lat/lon position was set successfully in the camera model or projection. More... | |
bool | SetUnboundGround (Latitude lat, Longitude lon) |
Returns whether the lat/lon position was set successfully in the camera model or projection. More... | |
bool | SetGround (Latitude lat, Longitude lon) |
Returns whether the lat/lon position was set successfully in the camera model or projection. More... | |
bool | SetGround (const SurfacePoint &) |
Returns whether the SurfacePoint was set successfully in the camera model or projection. More... | |
double | Sample () const |
Returns the current line value of the camera model or projection. More... | |
double | Line () const |
Returns the current line value of the camera model or projection. More... | |
bool | SetImage (double sample, double line) |
Returns whether the sample/line postion was set successfully in the camera model or projection. More... | |
double | UniversalLatitude () const |
Returns the universal latitude of the camera model or projection. More... | |
double | UniversalLongitude () const |
Returns the universal longitude of the camera model or projection. More... | |
double | Resolution () const |
Returns the resolution of the camera model or projection. More... | |
bool | GroundRange (Cube *cube, Latitude &minLat, Latitude &maxLat, Longitude &minLon, Longitude &maxLon, bool allowEstimation=true) |
Find the lat/lon range of the image. More... | |
bool | HasProjection () |
Returns whether the ground map has a projection or not. More... | |
bool | HasCamera () |
Returns whether the ground map has a camera or not. More... | |
Isis::Projection * | Projection () const |
Return the projection associated with the ground map (NULL implies none) More... | |
Isis::Camera * | Camera () const |
Return the camera associated with the ground map (NULL implies none) More... | |
Private Attributes | |
Isis::Camera * | p_camera |
The camera (if the image has a camera) More... | |
Isis::Projection * | p_projection |
The projection (if the image is projected) More... | |
Universal Ground Map.
???
Definition at line 69 of file UniversalGroundMap.h.
This enum is used to define whether to use a camera or projection primarily, and which to fall back on.
Definition at line 75 of file UniversalGroundMap.h.
Isis::UniversalGroundMap::UniversalGroundMap | ( | Cube & | cube, |
CameraPriority | priority = CameraFirst |
||
) |
Constructs a UniversalGroundMap object from a cube.
cube | The Cube to create the UniversalGroundMap from |
priority | Try to make a camera or projection first |
Definition at line 33 of file UniversalGroundMap.cpp.
References Isis::IException::append(), CameraFirst, Isis::CameraFactory::Create(), Isis::ProjectionFactory::CreateFromCube(), Isis::Cube::fileName(), Isis::Cube::label(), p_camera, p_projection, and Isis::IException::Unknown.
Isis::UniversalGroundMap::~UniversalGroundMap | ( | ) |
Destroys the UniversalGroundMap object.
Definition at line 80 of file UniversalGroundMap.cpp.
References p_camera, and p_projection.
|
inline |
Return the camera associated with the ground map (NULL implies none)
Definition at line 136 of file UniversalGroundMap.h.
References p_camera.
Referenced by Isis::ImagePolygon::Create(), Isis::CubeViewport::CubeViewport(), Isis::FindTool::distancePerPixel(), Isis::MosaicSceneItem::drawImage(), Isis::ImagePolygon::FixPolePoly(), Isis::ImagePolygon::initCube(), and Isis::ImagePolygon::SetImage().
bool Isis::UniversalGroundMap::GroundRange | ( | Cube * | cube, |
Latitude & | minLat, | ||
Latitude & | maxLat, | ||
Longitude & | minLon, | ||
Longitude & | maxLon, | ||
bool | allowEstimation = true |
||
) |
Find the lat/lon range of the image.
This will use the image footprint, camera, or projection in order to find a good result.
Cube* | This is required for estimation. You can pass in NULL (it will disable estimation). |
minLat | This is an output: minimum latitude |
maxLat | This is an output: maximum latitude |
minLon | This is an output: minimum longitude |
maxLon | This is an output: maximum longitude |
allowEstimation | If this is true then extra efforts will be made to guess the ground range of the input. This can still fail. |
Definition at line 320 of file UniversalGroundMap.cpp.
References Isis::Angle::Degrees, Isis::Camera::GroundRange(), HasCamera(), Isis::PvlContainer::hasKeyword(), HasProjection(), Isis::Angle::isValid(), Isis::Cube::lineCount(), Isis::PolygonTools::MakeMultiPolygon(), Isis::ShapeModel::name(), p_camera, p_projection, Isis::ImagePolygon::Polys(), Isis::Projection::projectionType(), Isis::Cube::readFootprint(), Isis::Projection::RingPlane, Isis::Cube::sampleCount(), Isis::Projection::SetWorld(), Isis::Target::shape(), Isis::Spice::target(), Isis::TProjection::UniversalLatitude(), and Isis::TProjection::UniversalLongitude().
Referenced by Isis::FeatureNomenclatureTool::findMissingNomenclature().
|
inline |
Returns whether the ground map has a camera or not.
Definition at line 126 of file UniversalGroundMap.h.
References p_camera.
Referenced by GroundRange(), and Isis::InterestOperator::Operate().
|
inline |
Returns whether the ground map has a projection or not.
Definition at line 115 of file UniversalGroundMap.h.
References p_projection.
Referenced by Isis::FindTool::distancePerPixel(), and GroundRange().
double Isis::UniversalGroundMap::Line | ( | ) | const |
Returns the current line value of the camera model or projection.
Definition at line 214 of file UniversalGroundMap.cpp.
References Isis::Camera::Line(), p_camera, p_projection, and Isis::Projection::WorldY().
Referenced by Isis::FindTool::centerLinkedViewports(), Isis::StereoTool::createPoint(), Isis::ControlPointEditWidget::demRadius(), Isis::QnetTool::demRadius(), Isis::FindTool::distancePerPixel(), Isis::ControlNetTool::drawGroundMeasures(), Isis::ControlMeasureEditWidget::findPoint(), Isis::ControlPointEdit::findPoint(), Isis::FindTool::handleRecordClicked(), Isis::PolygonTools::LatLonToSampleLine(), Isis::FindTool::paintViewport(), and Isis::FindTool::updateTool().
|
inline |
Return the projection associated with the ground map (NULL implies none)
Definition at line 131 of file UniversalGroundMap.h.
References p_projection.
Referenced by Isis::CubeViewport::CubeViewport(), Isis::FindTool::distancePerPixel(), Isis::MosaicSceneItem::drawImage(), and Isis::ImagePolygon::FixPolePoly().
double Isis::UniversalGroundMap::Resolution | ( | ) | const |
Returns the resolution of the camera model or projection.
Definition at line 294 of file UniversalGroundMap.cpp.
References p_camera, p_projection, Isis::Camera::PixelResolution(), and Isis::Projection::Resolution().
Referenced by Isis::FindTool::distancePerPixel().
double Isis::UniversalGroundMap::Sample | ( | ) | const |
Returns the current line value of the camera model or projection.
Definition at line 200 of file UniversalGroundMap.cpp.
References p_camera, p_projection, Isis::Camera::Sample(), and Isis::Projection::WorldX().
Referenced by Isis::FindTool::centerLinkedViewports(), Isis::StereoTool::createPoint(), Isis::ControlPointEditWidget::demRadius(), Isis::QnetTool::demRadius(), Isis::FindTool::distancePerPixel(), Isis::ControlNetTool::drawGroundMeasures(), Isis::ControlMeasureEditWidget::findPoint(), Isis::ControlPointEdit::findPoint(), Isis::FindTool::handleRecordClicked(), Isis::PolygonTools::LatLonToSampleLine(), Isis::FindTool::paintViewport(), and Isis::FindTool::updateTool().
void Isis::UniversalGroundMap::SetBand | ( | const int | band | ) |
Set the image band number.
[in] | band | (int) Image band number |
Definition at line 72 of file UniversalGroundMap.cpp.
References p_camera, and Isis::Camera::SetBand().
Referenced by Isis::ImagePolygon::initCube().
bool Isis::UniversalGroundMap::SetGround | ( | const SurfacePoint & | sp | ) |
Returns whether the SurfacePoint was set successfully in the camera model or projection.
sp | The Surface Point to set ground with |
Definition at line 180 of file UniversalGroundMap.cpp.
References Isis::Angle::degrees(), Isis::SurfacePoint::GetLatitude(), Isis::SurfacePoint::GetLongitude(), Isis::Camera::InCube(), p_camera, p_projection, Isis::Camera::SetGround(), and Isis::Projection::SetUniversalGround().
Returns whether the lat/lon position was set successfully in the camera model or projection.
lat | The universal latitude or ring radius for ring planes |
lon | The universal longitude or ring longitude (azimuth) for ring planes |
Definition at line 127 of file UniversalGroundMap.cpp.
References Isis::Angle::degrees(), Isis::Camera::InCube(), p_camera, p_projection, Isis::Camera::SetGround(), and Isis::Projection::SetUniversalGround().
Referenced by Isis::ControlNetTool::drawGroundMeasures(), and Isis::StereoTool::measureSaved().
bool Isis::UniversalGroundMap::SetImage | ( | double | sample, |
double | line | ||
) |
Returns whether the sample/line postion was set successfully in the camera model or projection.
sample | The sample position |
line | The line position |
Definition at line 233 of file UniversalGroundMap.cpp.
References p_camera, p_projection, Isis::Camera::SetImage(), and Isis::Projection::SetWorld().
Referenced by Isis::FindTool::distancePerPixel(), Isis::ControlMeasureEditWidget::findPoint(), Isis::ControlPointEdit::findPoint(), Isis::SpatialPlotTool::getSpatialStatistics(), Isis::StereoTool::measureSaved(), Isis::ControlNetTool::mouseButtonRelease(), Isis::FindTool::mouseButtonRelease(), Isis::QnetTool::mouseButtonRelease(), Isis::InterestOperator::Operate(), Isis::ImagePolygon::SetImage(), Isis::ControlMeasureEditWidget::updateLeftPositionLabel(), Isis::ControlPointEdit::updateLeftPositionLabel(), Isis::ControlMeasureEditWidget::updateRightPositionLabel(), Isis::ControlPointEdit::updateRightPositionLabel(), and Isis::FindTool::updateTool().
Returns whether the lat/lon position was set successfully in the camera model or projection.
This will not adjust the longitude based on the longitude domain.
lat | The universal latitude or ring radius for ring planes |
lon | The universal longitude or ring longitude (azimuth) for ring planes |
Definition at line 154 of file UniversalGroundMap.cpp.
References Isis::Angle::degrees(), Isis::Camera::InCube(), p_camera, p_projection, Isis::Camera::SetGround(), and Isis::Projection::SetUnboundUniversalGround().
bool Isis::UniversalGroundMap::SetUniversalGround | ( | double | lat, |
double | lon | ||
) |
Returns whether the lat/lon position was set successfully in the camera model or projection.
lat | The universal latitude or ring radius for ring planes |
lon | The universal longitude or ring longitude (azimuth) for ring planes |
Definition at line 102 of file UniversalGroundMap.cpp.
References Isis::Camera::InCube(), p_camera, p_projection, Isis::Projection::SetUniversalGround(), and Isis::Camera::SetUniversalGround().
Referenced by Isis::FindTool::centerLinkedViewports(), Isis::StereoTool::createPoint(), Isis::ControlPointEditWidget::demRadius(), Isis::QnetTool::demRadius(), Isis::FindTool::distancePerPixel(), Isis::MosaicSceneItem::drawImage(), Isis::ControlMeasureEditWidget::findPoint(), Isis::ControlPointEdit::findPoint(), Isis::ImagePolygon::FixPolePoly(), Isis::FindTool::handleRecordClicked(), Isis::PolygonTools::LatLonToSampleLine(), Isis::FindTool::paintViewport(), Isis::ControlPointEditWidget::setShapesForPoint(), and Isis::FindTool::updateTool().
double Isis::UniversalGroundMap::UniversalLatitude | ( | ) | const |
Returns the universal latitude of the camera model or projection.
Definition at line 247 of file UniversalGroundMap.cpp.
References p_camera, p_projection, Isis::Projection::projectionType(), Isis::RingPlaneProjection::RingRadius(), Isis::Projection::Triaxial, Isis::TProjection::UniversalLatitude(), and Isis::Sensor::UniversalLatitude().
Referenced by Isis::FindTool::distancePerPixel(), Isis::ControlMeasureEditWidget::findPoint(), Isis::ControlPointEdit::findPoint(), Isis::StereoTool::measureSaved(), Isis::ControlNetTool::mouseButtonRelease(), Isis::FindTool::mouseButtonRelease(), Isis::QnetTool::mouseButtonRelease(), Isis::ControlMeasureEditWidget::updateLeftPositionLabel(), Isis::ControlPointEdit::updateLeftPositionLabel(), Isis::ControlMeasureEditWidget::updateRightPositionLabel(), Isis::ControlPointEdit::updateRightPositionLabel(), Isis::FindTool::updateTool(), and Isis::ImagePolygon::WalkPoly().
double Isis::UniversalGroundMap::UniversalLongitude | ( | ) | const |
Returns the universal longitude of the camera model or projection.
Definition at line 270 of file UniversalGroundMap.cpp.
References p_camera, p_projection, Isis::Projection::projectionType(), Isis::RingPlaneProjection::RingLongitude(), Isis::Projection::Triaxial, Isis::TProjection::UniversalLongitude(), and Isis::Sensor::UniversalLongitude().
Referenced by Isis::FindTool::distancePerPixel(), Isis::ControlMeasureEditWidget::findPoint(), Isis::ControlPointEdit::findPoint(), Isis::StereoTool::measureSaved(), Isis::ControlNetTool::mouseButtonRelease(), Isis::FindTool::mouseButtonRelease(), Isis::QnetTool::mouseButtonRelease(), Isis::ControlMeasureEditWidget::updateLeftPositionLabel(), Isis::ControlPointEdit::updateLeftPositionLabel(), Isis::ControlMeasureEditWidget::updateRightPositionLabel(), Isis::ControlPointEdit::updateRightPositionLabel(), Isis::FindTool::updateTool(), and Isis::ImagePolygon::WalkPoly().
|
private |
The camera (if the image has a camera)
Definition at line 142 of file UniversalGroundMap.h.
Referenced by Camera(), GroundRange(), HasCamera(), Line(), Resolution(), Sample(), SetBand(), SetGround(), SetImage(), SetUnboundGround(), SetUniversalGround(), UniversalGroundMap(), UniversalLatitude(), UniversalLongitude(), and ~UniversalGroundMap().
|
private |
The projection (if the image is projected)
Definition at line 143 of file UniversalGroundMap.h.
Referenced by GroundRange(), HasProjection(), Line(), Projection(), Resolution(), Sample(), SetGround(), SetImage(), SetUnboundGround(), SetUniversalGround(), UniversalGroundMap(), UniversalLatitude(), UniversalLongitude(), and ~UniversalGroundMap().
U.S. Department of the Interior | U.S. Geological Survey ISIS | Privacy & Disclaimers | Astrogeology Research Program To contact us, please post comments and questions on the USGS Astrogeology Discussion Board To report a bug, or suggest a feature go to: ISIS Github File Modified: 07/13/2023 15:23:56 |