Isis Developer Reference
DemShape.h
Go to the documentation of this file.
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
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:
95  Cube *m_demCube;
96  Projection *m_demProj;
97  double m_pixPerDegree;
98  Portal *m_portal;
99  Interpolator *m_interp;
100  };
101 }
102 
103 #endif
Isis::DemShape::DemShape
DemShape()
Construct a DemShape object.
Definition: DemShape.cpp:54
Isis::Distance::kilometers
double kilometers() const
Get the distance in kilometers.
Definition: Distance.cpp:106
Isis::Angle::Degrees
@ Degrees
Degrees are generally considered more human readable, 0-360 is one circle, however most math does not...
Definition: Angle.h:56
Table.h
Portal.h
Isis::Interpolator::BiLinearType
@ BiLinearType
Definition: Interpolator.h:43
Isis::PvlObject::findGroup
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
Definition: PvlObject.h:129
Cube.h
EllipsoidShape.h
Isis::SurfacePoint::GetX
Displacement GetX() const
Definition: SurfacePoint.cpp:1436
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::ShapeModel::surfaceIntersection
SurfacePoint * surfaceIntersection() const
Returns the surface intersection for this ShapeModel.
Definition: ShapeModel.cpp:358
Isis::Cube::read
void read(Blob &blob, const std::vector< PvlKeyword > keywords=std::vector< PvlKeyword >()) const
This method will read data from the specified Blob object.
Definition: Cube.cpp:807
ShapeModel.h
Isis::ShapeModel::targetRadii
std::vector< Distance > targetRadii() const
Returns the radii of the body in km.
Definition: ShapeModel.cpp:465
Isis::ShapeModel::setHasIntersection
void setHasIntersection(bool b)
Sets the flag to indicate whether this ShapeModel has an intersection.
Definition: ShapeModel.cpp:554
Isis::Buffer::DoubleBuffer
double * DoubleBuffer() const
Returns the value of the shape buffer.
Definition: Buffer.h:138
Target.h
Isis::DemShape::demCube
Cube * demCube()
Returns the cube defining the shape model.
Definition: DemShape.cpp:342
Spice.h
Longitude.h
NaifStatus.h
Isis::PvlContainer::hasKeyword
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
Definition: PvlContainer.cpp:159
Isis::Pvl
Container for cube-like labels.
Definition: Pvl.h:119
Isis::SurfacePoint::GetZ
Displacement GetZ() const
Definition: SurfacePoint.cpp:1450
Isis::Interpolator::Lines
int Lines()
Returns the number of lines needed by the interpolator.
Definition: Interpolator.cpp:236
Isis::DemShape::calculateDefaultNormal
virtual void calculateDefaultNormal()
This method calculates the default normal (Ellipsoid for backwards compatability) for the DemShape.
Definition: DemShape.cpp:305
Isis::CubeManager::Open
static Cube * Open(const QString &cubeFileName)
This method calls the method OpenCube() on the static instance.
Definition: CubeManager.h:84
Isis::Projection::SetUniversalGround
virtual bool SetUniversalGround(const double coord1, const double coord2)
This method is used to set the lat/lon or radius/azimuth (i.e.
Definition: Projection.cpp:417
Isis::NaifStatus::CheckErrors
static void CheckErrors(bool resetNaif=true)
This method looks for any naif errors that might have occurred.
Definition: NaifStatus.cpp:28
Isis::ShapeModel::setNormal
void setNormal(const std::vector< double >)
Sets the normal for the currect intersection point.
Definition: ShapeModel.cpp:487
Isis::ShapeModel::intersectSurface
virtual bool intersectSurface(std::vector< double > observerPos, std::vector< double > lookDirection)=0
Isis::IsSpecial
bool IsSpecial(const double d)
Returns if the input pixel is special.
Definition: SpecialPixel.h:197
Isis::Interpolator::HotSample
double HotSample()
Returns the sample coordinate of the center pixel in the buffer for the interpolator.
Definition: Interpolator.cpp:265
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
DemShape.h
Isis::Longitude
This class is designed to encapsulate the concept of a Longitude.
Definition: Longitude.h:40
Isis::PvlObject::Traverse
@ Traverse
Search child objects.
Definition: PvlObject.h:158
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::Projection::WorldY
virtual double WorldY() const
This returns the world Y coordinate provided SetGround, SetCoordinate, SetUniversalGround,...
Definition: Projection.cpp:544
Isis::ShapeModel::setName
void setName(QString name)
Sets the shape name.
Definition: ShapeModel.cpp:532
Isis::ShapeModel::resolution
double resolution()
Convenience method to get pixel resolution (m/pix) at current intersection point.
Definition: ShapeModel.cpp:592
Isis::DemShape::~DemShape
~DemShape()
Destroys the DemShape.
Definition: DemShape.cpp:112
Isis::Distance::Meters
@ Meters
The distance is being specified in meters.
Definition: Distance.h:43
Latitude.h
Isis::PvlGroup
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
Pvl.h
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
SurfacePoint.h
Isis::Cube::addCachingAlgorithm
void addCachingAlgorithm(CubeCachingAlgorithm *)
This will add the given caching algorithm to the list of attempted caching algorithms.
Definition: Cube.cpp:1922
Isis::ShapeModel::intersectEllipsoid
bool intersectEllipsoid(const std::vector< double > observerPosRelativeToTarget, const std::vector< double > &observerLookVectorToTarget)
Finds the intersection point on the ellipsoid model using the given position of the observer (spacecr...
Definition: ShapeModel.cpp:267
Isis::Projection::WorldX
virtual double WorldX() const
This returns the world X coordinate provided SetGround, SetCoordinate, SetUniversalGround,...
Definition: Projection.cpp:524
Isis::SurfacePoint::FromNaifArray
void FromNaifArray(const double naifValues[3])
A naif array is a c-style array of size 3.
Definition: SurfacePoint.cpp:891
Isis::Cube
IO Handler for Isis Cubes.
Definition: Cube.h:167
Isis::Interpolator
Pixel interpolator.
Definition: Interpolator.h:34
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::ShapeModel::setHasNormal
void setHasNormal(bool status)
Sets the flag to indicate whether this ShapeModel has a surface normal.
Definition: ShapeModel.cpp:581
Isis::Displacement::kilometers
double kilometers() const
Get the displacement in kilometers.
Definition: Displacement.cpp:94
Isis::DemShape
Define shapes and provide utilities for targets stored as ISIS maps.
Definition: DemShape.h:52
IException.h
Isis::IException::Programmer
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:146
std
Namespace for the standard library.
Isis::ShapeModel
Define shapes and provide utilities for Isis targets.
Definition: ShapeModel.h:62
Isis::Angle::isValid
bool isValid() const
This indicates whether we have a legitimate angle stored or are in an unset, or invalid,...
Definition: Angle.cpp:95
Isis::Cube::pixelType
PixelType pixelType() const
Definition: Cube.cpp:1758
Isis::Interpolator::Interpolate
double Interpolate(const double isamp, const double iline, const double buf[])
Performs an interpolation on the data according to the parameters set in the constructor.
Definition: Interpolator.cpp:56
Isis::Cube::label
Pvl * label() const
Returns a pointer to the IsisLabel object associated with the cube.
Definition: Cube.cpp:1701
Isis::SurfacePoint::ToNaifArray
void ToNaifArray(double naifOutput[3]) const
A naif array is a c-style array of size 3.
Definition: SurfacePoint.cpp:870
Isis::UniqueIOCachingAlgorithm
This algorithm is designed for applications that jump around between a couple of spots in the cube wi...
Definition: UniqueIOCachingAlgorithm.h:30
Isis::Angle::degrees
double degrees() const
Get the angle in units of Degrees.
Definition: Angle.h:232
Projection.h
Isis::ShapeModel::hasIntersection
bool hasIntersection()
Returns intersection status.
Definition: ShapeModel.cpp:368
Isis::Interpolator::Samples
int Samples()
Returns the number of samples needed by the interpolator.
Definition: Interpolator.cpp:208
Isis::IString
Adds specific functionality to C++ strings.
Definition: IString.h:165
Distance.h
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::Interpolator::HotLine
double HotLine()
Returns the line coordinate of the center pixel in the buffer for the interpolator.
Definition: Interpolator.cpp:297
CubeManager.h
Interpolator.h
Isis::Portal::SetPosition
void SetPosition(const double sample, const double line, const int band)
Sets the line and sample position of the buffer.
Definition: Portal.h:93
Isis::Target
This class is used to create and store valid Isis targets.
Definition: Target.h:63
Isis::RAD2DEG
const double RAD2DEG
Multiplier for converting from radians to degrees.
Definition: Constants.h:44
UniqueIOCachingAlgorithm.h
Isis::Cube::projection
Projection * projection()
Definition: Cube.cpp:1794
Isis::DemShape::isDEM
bool isDEM() const
Indicates that this shape model is from a DEM.
Definition: DemShape.cpp:356
Isis::SurfacePoint::GetY
Displacement GetY() const
Definition: SurfacePoint.cpp:1443
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::ShapeModel::normal
std::vector< double > normal()
Returns the local surface normal at the current intersection point.
Definition: ShapeModel.cpp:401