Isis 3 Programmer Reference
DemShape.h
1 #ifndef DemShape_h
2 #define DemShape_h
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 
10 #include "ShapeModel.h"
11 
12 template<class T> class QVector;
13 
14 namespace Isis {
15  class Cube;
16  class Interpolator;
17  class Portal;
18  class Projection;
19 
52  class DemShape : public ShapeModel {
53  public:
54  // Constructor
55  DemShape(Target *target, Pvl &pvl);
56 
57  // Constructor
58  DemShape();
59 
60  // Destructor
61  ~DemShape();
62 
63  // Make parent functions visible
64  using Isis::ShapeModel::intersectSurface;
65 
66  // Intersect the shape model
67  bool intersectSurface(std::vector<double> observerPos,
68  std::vector<double> lookDirection);
69 
70  Distance localRadius(const Latitude &lat, const Longitude &lon);
71 
72  // Return dem scale in pixels/degree
73  double demScale();
74 
75  // Calculate the default normal of the current intersection point
76  virtual void calculateDefaultNormal();
77 
78  // implement pure virtual method from ShapeModel class
79  bool isDEM() const;
80 
81  // To compute the surface normal, you must call setLocalAreaPoint on top,
82  // bottom, left, and right surrounding points in the image. Then call
83  // calculateSurfaceNormal and directSurfaceNormal to calculate the normal.
84  // Use removeLOcalAreaPoints to clean up as needed. See Camera for an
85  // example, or use its GetLocalNormal method.
86 
87  // Calculate the surface normal of the current intersection point
88  void calculateLocalNormal(QVector<double *> cornerNeighborPoints);
90 
91  protected:
92  Cube *demCube();
93 
94  private:
97  double m_pixPerDegree;
100  };
101 }
102 
103 #endif
Isis::DemShape::DemShape
DemShape()
Construct a DemShape object.
Definition: DemShape.cpp:54
Isis::DemShape::demScale
double demScale()
Return the scale of the DEM shape, in pixels per degree.
Definition: DemShape.cpp:295
Isis::Portal
Buffer for containing a two dimensional section of an image.
Definition: Portal.h:36
Isis::Latitude
This class is designed to encapsulate the concept of a Latitude.
Definition: Latitude.h:51
Isis::DemShape::intersectSurface
bool intersectSurface(std::vector< double > observerPos, std::vector< double > lookDirection)
Find the intersection point with the DEM.
Definition: DemShape.cpp:143
Isis::DemShape::m_demProj
Projection * m_demProj
The projection of the model.
Definition: DemShape.h:96
Isis::DemShape::demCube
Cube * demCube()
Returns the cube defining the shape model.
Definition: DemShape.cpp:342
Isis::DemShape::m_portal
Portal * m_portal
Buffer used to read from the model.
Definition: DemShape.h:98
Isis::Pvl
Container for cube-like labels.
Definition: Pvl.h:119
Isis::DemShape::calculateDefaultNormal
virtual void calculateDefaultNormal()
This method calculates the default normal (Ellipsoid for backwards compatability) for the DemShape.
Definition: DemShape.cpp:305
Isis::DemShape::calculateLocalNormal
void calculateLocalNormal(QVector< double * > cornerNeighborPoints)
This method calculates the local surface normal of the current intersection point.
Definition: DemShape.cpp:367
Isis::Distance
Distance measurement, usually in meters.
Definition: Distance.h:34
Isis::Longitude
This class is designed to encapsulate the concept of a Longitude.
Definition: Longitude.h:40
Isis::DemShape::localRadius
Distance localRadius(const Latitude &lat, const Longitude &lon)
Gets the radius from the DEM, if we have one.
Definition: DemShape.cpp:264
Isis::DemShape::~DemShape
~DemShape()
Destroys the DemShape.
Definition: DemShape.cpp:112
Isis::DemShape::m_interp
Interpolator * m_interp
Use bilinear interpolation from dem.
Definition: DemShape.h:99
Isis::DemShape::m_pixPerDegree
double m_pixPerDegree
Scale of DEM file in pixels per degree.
Definition: DemShape.h:97
Isis::Cube
IO Handler for Isis Cubes.
Definition: Cube.h:167
Isis::Interpolator
Pixel interpolator.
Definition: Interpolator.h:34
Isis::DemShape
Define shapes and provide utilities for targets stored as ISIS maps.
Definition: DemShape.h:52
Isis::ShapeModel
Define shapes and provide utilities for Isis targets.
Definition: ShapeModel.h:62
QVector
This is free and unencumbered software released into the public domain.
Definition: Calculator.h:18
Isis::Projection
Base class for Map Projections.
Definition: Projection.h:155
Isis::Target
This class is used to create and store valid Isis targets.
Definition: Target.h:63
Isis::DemShape::isDEM
bool isDEM() const
Indicates that this shape model is from a DEM.
Definition: DemShape.cpp:356
Isis::DemShape::calculateSurfaceNormal
void calculateSurfaceNormal()
This method calculates the surface normal of the current intersection point.
Definition: DemShape.cpp:421
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::DemShape::m_demCube
Cube * m_demCube
The cube containing the model.
Definition: DemShape.h:95