Isis 3.0 Programmer Reference
Back | Home
DemShape.h
Go to the documentation of this file.
1 #ifndef DemShape_h
2 #define DemShape_h
3 
25 #include "ShapeModel.h"
26 
27 template<class T> class QVector;
28 
29 namespace Isis {
30  class Cube;
31  class Interpolator;
32  class Portal;
33  class Projection;
34 
57  class DemShape : public ShapeModel {
58  public:
59  // Constructor
60  DemShape(Target *target, Pvl &pvl);
61 
62  // Constructor
63  DemShape();
64 
65  // Destructor
66  ~DemShape();
67 
68  // Intersect the shape model
69  bool intersectSurface(std::vector<double> observerPos,
70  std::vector<double> lookDirection);
71 
72  Distance localRadius(const Latitude &lat, const Longitude &lon);
73 
74  // Return dem scale in pixels/degree
75  double demScale();
76 
77  // Calculate the default normal of the current intersection point
78  virtual void calculateDefaultNormal();
79 
80  // implement pure virtual method from ShapeModel class
81  bool isDEM() const;
82 
83  // To compute the surface normal, you must call setLocalAreaPoint on top,
84  // bottom, left, and right surrounding points in the image. Then call
85  // calculateSurfaceNormal and directSurfaceNormal to calculate the normal.
86  // Use removeLOcalAreaPoints to clean up as needed. See Camera for an
87  // example, or use its GetLocalNormal method.
88 
89  // Calculate the surface normal of the current intersection point
90  void calculateLocalNormal(QVector<double *> cornerNeighborPoints);
92 
93  protected:
94  Cube *demCube();
95 
96  private:
99  double m_pixPerDegree;
102  };
103 }
104 
105 #endif
Portal * m_portal
Buffer used to read from the model.
Definition: DemShape.h:100
~DemShape()
Destroys the DemShape.
Definition: DemShape.cpp:106
void calculateSurfaceNormal()
This method calculates the surface normal of the current intersection point.
Definition: DemShape.cpp:387
Buffer for containing a two dimensional section of an image.
Definition: Portal.h:52
Cube * m_demCube
The cube containing the model.
Definition: DemShape.h:97
This class is designed to encapsulate the concept of a Latitude.
Definition: Latitude.h:59
Distance measurement, usually in meters.
Definition: Distance.h:47
Projection * m_demProj
The projection of the model.
Definition: DemShape.h:98
This class is designed to encapsulate the concept of a Longitude.
Definition: Longitude.h:52
Base class for Map Projections.
Definition: Projection.h:169
Define shapes and provide utilities for targets stored as Isis3 maps.
Definition: DemShape.h:57
void calculateLocalNormal(QVector< double * > cornerNeighborPoints)
This method calculates the local surface normal of the current intersection point.
Definition: DemShape.cpp:333
Container for cube-like labels.
Definition: Pvl.h:135
This class is used to create and store valid Isis3 targets.
Definition: Target.h:63
Define shapes and provide utilities for Isis3 targets.
Definition: ShapeModel.h:68
Cube * demCube()
Returns the cube defining the shape model.
Definition: DemShape.cpp:308
Pixel interpolator.
Definition: Interpolator.h:51
double m_pixPerDegree
Scale of DEM file in pixels per degree.
Definition: DemShape.h:99
Distance localRadius(const Latitude &lat, const Longitude &lon)
Gets the radius from the DEM, if we have one.
Definition: DemShape.cpp:258
double demScale()
Return the scale of the DEM shape, in pixels per degree.
Definition: DemShape.cpp:289
bool intersectSurface(std::vector< double > observerPos, std::vector< double > lookDirection)
Find the intersection point with the DEM.
Definition: DemShape.cpp:137
Interpolator * m_interp
Use bilinear interpolation from dem.
Definition: DemShape.h:101
virtual void calculateDefaultNormal()
This method calculates the default normal (Ellipsoid for backwards compatability) for the DemShape...
Definition: DemShape.cpp:298
DemShape()
Construct a DemShape object.
Definition: DemShape.cpp:48
IO Handler for Isis Cubes.
Definition: Cube.h:158
bool isDEM() const
Indicates that this shape model is from a DEM.
Definition: DemShape.cpp:322

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 ISIS Support Center
File Modified: 07/12/2023 23:17:33