Isis Developer Reference
PhotometricFunction.h
Go to the documentation of this file.
1#ifndef PhotometricFunction_h
2#define PhotometricFunction_h
3
10/* SPDX-License-Identifier: CC0-1.0 */
11
12#include "IString.h"
13#include "Camera.h"
14#include "DbProfile.h"
15#include "SpecialPixel.h"
16
17#include <iostream>
18#include <sstream>
19#include <iomanip>
20
21namespace Isis {
22
23 class PvlObject;
24 class Camera;
25
39
40 public:
41 PhotometricFunction(PvlObject &pvl, Cube &cube, bool useCamera);
42 virtual ~PhotometricFunction();
43
44 void setCamera(Camera *cam);
45 static QString algorithmName( const PvlObject &pvl );
46 virtual double compute( const double &line, const double &sample, int band = 1, bool useDem = false);
47 virtual double photometry( double i, double e, double g, int band = 1 ) const = 0;
48 virtual void report( PvlContainer &pvl ) = 0;
49 virtual void setMinimumIncidenceAngle( double angle );
50 virtual void setMaximumIncidenceAngle( double angle );
51 virtual void setMinimumEmissionAngle( double angle );
52 virtual void setMaximumEmissionAngle( double angle );
53 virtual void setMinimumPhaseAngle( double angle );
54 virtual void setMaximumPhaseAngle( double angle );
55 virtual double minimumIncidenceAngle();
56 virtual double maximumIncidenceAngle();
57 virtual double minimumEmissionAngle();
58 virtual double maximumEmissionAngle();
59 virtual double minimumPhaseAngle();
60 virtual double maximumPhaseAngle();
61
62
63 protected:
64
65 Camera *m_camera; //<! Camera used for calculating photmetric angles
66 double m_iRef; //<! Incidence refernce angle
67 double m_eRef; //<! Emission reference angle
68 double m_gRef; //<! Phase reference angle
69 double m_minimumIncidenceAngle; //<! The minimum incidence angle to perform computations
70 double m_maximumIncidenceAngle; //<! The maximum incidence angle to perform computations
71 double m_minimumEmissionAngle; //<! The minimum emission angle to perform computations
72 double m_maximumEmissionAngle; //<! The maximum emission angle to perform computations
73 double m_minimumPhaseAngle; //<! The minimum phase angle to perform computations
74 double m_maximumPhaseAngle; //<! The maximum phase angle to perform computations
75 DbProfile m_normProf; //<! Parameters for the normalization model
76
92 template<typename T>
93 T ConfKey( const DbProfile &conf, const QString &keyname, const T &defval, int index = 0 ) const {
94 if (!conf.exists(keyname)) {
95 return (defval);
96 }
97 if (conf.count(keyname) < index) {
98 return (defval);
99 }
100 return conf.value(keyname, index);
101 }
102 };
103};
104#endif
Definition Camera.h:236
IO Handler for Isis Cubes.
Definition Cube.h:168
A DbProfile is a container for access parameters to a database.
Definition DbProfile.h:51
An abstract implementation of the photometric function.
Definition PhotometricFunction.h:38
PhotometricFunction(PvlObject &pvl, Cube &cube, bool useCamera)
Construct Photometric function from Pvl and Cube file.
Definition PhotometricFunction.cpp:34
double m_minimumIncidenceAngle
Definition PhotometricFunction.h:69
virtual void setMaximumIncidenceAngle(double angle)
Mutator function to set maximum incidence angle.
Definition PhotometricFunction.cpp:147
virtual double photometry(double i, double e, double g, int band=1) const =0
virtual void setMaximumEmissionAngle(double angle)
Mutator function to set maximum emission angle.
Definition PhotometricFunction.cpp:179
DbProfile m_normProf
Definition PhotometricFunction.h:75
virtual double compute(const double &line, const double &sample, int band=1, bool useDem=false)
Computes Photometric function from cube attributes.
Definition PhotometricFunction.cpp:85
double m_maximumEmissionAngle
Definition PhotometricFunction.h:72
virtual ~PhotometricFunction()
Destructor.
Definition PhotometricFunction.cpp:44
virtual void setMinimumPhaseAngle(double angle)
Mutator function to set minimum phase angle.
Definition PhotometricFunction.cpp:195
virtual double maximumEmissionAngle()
Accessor method to access maximum emission angle.
Definition PhotometricFunction.cpp:275
static QString algorithmName(const PvlObject &pvl)
Finds the name of the algorithm defined in a PVL object.
Definition PhotometricFunction.cpp:64
virtual double maximumPhaseAngle()
Accessor method to access maximum phase angle.
Definition PhotometricFunction.cpp:307
virtual double minimumIncidenceAngle()
Accessor method to access minimum incidence angle.
Definition PhotometricFunction.cpp:227
Camera * m_camera
Definition PhotometricFunction.h:65
double m_iRef
Definition PhotometricFunction.h:66
double m_eRef
Definition PhotometricFunction.h:67
virtual double minimumEmissionAngle()
Accessor method to access minimum emission angle.
Definition PhotometricFunction.cpp:259
T ConfKey(const DbProfile &conf, const QString &keyname, const T &defval, int index=0) const
Helper template to initialize parameters.
Definition PhotometricFunction.h:93
virtual void setMaximumPhaseAngle(double angle)
Mutator function to set maximum phase angle.
Definition PhotometricFunction.cpp:211
virtual void setMinimumEmissionAngle(double angle)
Mutator function to set minimum emission angle.
Definition PhotometricFunction.cpp:163
virtual void setMinimumIncidenceAngle(double angle)
Mutator function to set minimum incidence angle.
Definition PhotometricFunction.cpp:131
double m_minimumEmissionAngle
Definition PhotometricFunction.h:71
double m_gRef
Definition PhotometricFunction.h:68
double m_minimumPhaseAngle
Definition PhotometricFunction.h:73
double m_maximumPhaseAngle
Definition PhotometricFunction.h:74
virtual double minimumPhaseAngle()
Accessor method to access minimum phase angle.
Definition PhotometricFunction.cpp:291
virtual double maximumIncidenceAngle()
Accessor method to access maximum incidence angle.
Definition PhotometricFunction.cpp:243
double m_maximumIncidenceAngle
Definition PhotometricFunction.h:70
virtual void report(PvlContainer &pvl)=0
void setCamera(Camera *cam)
Set the camera used to compute photometric angles.
Definition PhotometricFunction.cpp:52
Contains more than one keyword-value pair.
Definition PvlContainer.h:49
Contains Pvl Groups and Pvl Objects.
Definition PvlObject.h:61
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16