Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Isis Developer Reference
DemShape.h
Go to the documentation of this file.
1#ifndef DemShape_h
2#define DemShape_h
7
8/* SPDX-License-Identifier: CC0-1.0 */
9
10#include "ShapeModel.h"
11
12namespace Isis {
13 class Cube;
14 class Interpolator;
15 class Portal;
16 class Projection;
17
50 class DemShape : public ShapeModel {
51 public:
52 // Constructor
53 DemShape(Target *target, Pvl &pvl);
54
55 // Constructor
56 DemShape();
57
58 // Destructor
59 ~DemShape();
60
61 // Make parent functions visible
63
64 // Intersect the shape model
65 bool intersectSurface(std::vector<double> observerPos,
66 std::vector<double> lookDirection);
67
68 Distance localRadius(const Latitude &lat, const Longitude &lon);
69
70 // Return dem scale in pixels/degree
71 double demScale();
72
73 // implement pure virtual method from ShapeModel class
74 bool isDEM() const;
75
76 // To compute the surface normal, you must call setLocalAreaPoint on top,
77 // bottom, left, and right surrounding points in the image. Then call
78 // calculateSurfaceNormal and directSurfaceNormal to calculate the normal.
79 // Use removeLOcalAreaPoints to clean up as needed. See Camera for an
80 // example, or use its GetLocalNormal method.
81
82 // Calculate the surface normal of the current intersection point
83 void calculateLocalNormal(QVector<double *> cornerNeighborPoints);
84
85 protected:
86 Cube *demCube();
87
88 private:
89
90 // Given a position along a ray, compute the difference between the radius
91 // at that position and the surface radius at that lon-lat location.
92 // Update the intersection point in the class based on the input
93 // parameters. All lengths are in km.
94 double calcDemErrUpdateIntersection(std::vector<double> const& observerPos,
95 std::vector<double> const& lookDirection,
96 double t,
97 double * intersectionPoint,
98 bool & success);
99
100 // Find a value in the DEM. Used when intersecting a ray with the DEM.
101 // Returned value is in km.
102 double findDemValue();
103
104 Cube *m_demCube;
105 Projection *m_demProj;
106 double m_pixPerDegree;
107 Portal *m_portal;
108 Interpolator *m_interp;
109 double m_demValue;
110 bool m_demValueFound;
111 };
112}
113
114#endif
IO Handler for Isis Cubes.
Definition Cube.h:168
~DemShape()
Destroys the DemShape.
Definition DemShape.cpp:116
DemShape(Target *target, Pvl &pvl)
Construct a DemShape object.
Definition DemShape.cpp:73
Distance localRadius(const Latitude &lat, const Longitude &lon)
Gets the radius from the DEM, if we have one.
Definition DemShape.cpp:395
double demScale()
Return the scale of the DEM shape, in pixels per degree.
Definition DemShape.cpp:425
DemShape()
Construct a DemShape object.
Definition DemShape.cpp:54
Cube * demCube()
Returns the cube defining the shape model.
Definition DemShape.cpp:434
bool isDEM() const
Indicates that this shape model is from a DEM.
Definition DemShape.cpp:448
void calculateLocalNormal(QVector< double * > cornerNeighborPoints)
This method calculates the local surface normal of the current intersection point.
Definition DemShape.cpp:459
bool intersectSurface(std::vector< double > observerPos, std::vector< double > lookDirection)
Find the intersection point with the DEM.
Definition DemShape.cpp:200
Distance measurement, usually in meters.
Definition Distance.h:34
Pixel interpolator.
Definition Interpolator.h:34
This class is designed to encapsulate the concept of a Latitude.
Definition Latitude.h:51
This class is designed to encapsulate the concept of a Longitude.
Definition Longitude.h:40
Buffer for containing a two dimensional section of an image.
Definition Portal.h:36
Base class for Map Projections.
Definition Projection.h:154
virtual bool intersectSurface(std::vector< double > observerPos, std::vector< double > lookDirection)=0
ShapeModel()
Default constructor creates ShapeModel object, initializing name to an empty string,...
Definition ShapeModel.cpp:40
This class is used to create and store valid Isis targets.
Definition Target.h:63
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16