Isis 3.0
Home
UniversalGroundMap.h
Go to the documentation of this file.
1 #ifndef UniversalGroundMap_h
2 #define UniversalGroundMap_h
3 
25 namespace Isis {
26  class Camera;
27  class Cube;
28  class Projection;
29  class Pvl;
30  class SurfacePoint;
31  class Latitude;
32  class Longitude;
33 
84  public:
100  };
101 
104 
105  void SetBand(const int band);
106  bool SetUniversalGround(double lat, double lon);
107  bool SetGround(Latitude lat, Longitude lon);
108  bool SetGround(const SurfacePoint &);
109  double Sample() const;
110  double Line() const;
111 
112  bool SetImage(double sample, double line);
113  double UniversalLatitude() const;
114  double UniversalLongitude() const;
115  double Resolution() const;
116 
117  bool GroundRange(Cube *cube,
118  Latitude &minLat, Latitude &maxLat,
119  Longitude &minLon, Longitude &maxLon,
120  bool allowEstimation = true);
121 
128  bool HasProjection() {
129  return p_projection != 0;
130  };
131 
132 
139  bool HasCamera() {
140  return p_camera != 0;
141  };
142 
145  return p_projection;
146  };
147 
149  Isis::Camera *Camera() const {
150  return p_camera;
151  };
152 
153 
154  private:
155  Isis::Camera *p_camera;
156  Isis::Projection *p_projection;
157  };
158 };
159 
160 #endif
This class defines a body-fixed surface point.
Definition: SurfacePoint.h:86
double Sample() const
Returns the current line value of the camera model or projection.
Definition: UniversalGroundMap.cpp:167
Universal Ground Map.
Definition: UniversalGroundMap.h:83
Isis::Camera * Camera() const
Return the camera associated with the ground map (NULL implies none)
Definition: UniversalGroundMap.h:149
~UniversalGroundMap()
Destroys the UniversalGroundMap object.
Definition: UniversalGroundMap.cpp:74
double Resolution() const
Returns the resolution of the camera model or projection.
Definition: UniversalGroundMap.cpp:261
Use the projection for functionality well outside the original image if available, and fall back to camera.
Definition: UniversalGroundMap.h:99
This class is designed to encapsulate the concept of a Latitude.
Definition: Latitude.h:59
double UniversalLatitude() const
Returns the universal latitude of the camera model or projection.
Definition: UniversalGroundMap.cpp:214
double Line() const
Returns the current line value of the camera model or projection.
Definition: UniversalGroundMap.cpp:181
Definition: Camera.h:240
This class is designed to encapsulate the concept of a Longitude.
Definition: Longitude.h:52
Base class for Map Projections.
Definition: Projection.h:169
bool SetGround(Latitude lat, Longitude lon)
Returns whether the lat/lon position was set successfully in the camera model or projection.
Definition: UniversalGroundMap.cpp:121
double UniversalLongitude() const
Returns the universal longitude of the camera model or projection.
Definition: UniversalGroundMap.cpp:237
CameraPriority
This enum is used to define whether to use a camera or projection primarily, and which to fall back o...
Definition: UniversalGroundMap.h:89
UniversalGroundMap(Cube &cube, CameraPriority priority=CameraFirst)
Constructs a UniversalGroundMap object from a cube.
Definition: UniversalGroundMap.cpp:27
bool SetImage(double sample, double line)
Returns whether the sample/line postion was set successfully in the camera model or projection...
Definition: UniversalGroundMap.cpp:200
void SetBand(const int band)
Set the image band number.
Definition: UniversalGroundMap.cpp:66
bool HasCamera()
Returns whether the ground map has a camera or not.
Definition: UniversalGroundMap.h:139
This is the default because cameras are projection-aware.
Definition: UniversalGroundMap.h:94
bool SetUniversalGround(double lat, double lon)
Returns whether the lat/lon position was set successfully in the camera model or projection.
Definition: UniversalGroundMap.cpp:96
Isis::Projection * Projection() const
Return the projection associated with the ground map (NULL implies none)
Definition: UniversalGroundMap.h:144
bool HasProjection()
Returns whether the ground map has a projection or not.
Definition: UniversalGroundMap.h:128
bool GroundRange(Cube *cube, Latitude &minLat, Latitude &maxLat, Longitude &minLon, Longitude &maxLon, bool allowEstimation=true)
Find the lat/lon range of the image.
Definition: UniversalGroundMap.cpp:287
IO Handler for Isis Cubes.
Definition: Cube.h:158