8 #include "PhotometricFunction.h" 26 PhotometricFunction::PhotometricFunction(
PvlObject &pvl,
Cube &cube ,
bool useCamera ) {
36 PhotometricFunction::~PhotometricFunction() {}
44 void PhotometricFunction::setCamera(
Camera *cam) {
56 QString PhotometricFunction::algorithmName(
const PvlObject &pvl ) {
57 return pvl.
findObject(
"PhotometricModel").findGroup(
"Algorithm", Pvl::Traverse).findKeyword(
"Name")[0];
77 double PhotometricFunction::compute(
const double &line,
const double &sample,
int band,
bool useDem) {
79 if (m_camera->Band() != band) {
80 m_camera->SetBand(band);
83 if (!m_camera->SetImage(sample, line)) {
87 double i = m_camera->IncidenceAngle();
88 double e = m_camera->EmissionAngle();
89 double g = m_camera->PhaseAngle();
93 Angle phase, incidence, emission;
94 m_camera->LocalPhotometricAngles(phase, incidence, emission, success);
103 if ( !success || i < minimumIncidenceAngle() || i > maximumIncidenceAngle() || e < minimumEmissionAngle() || e
104 > maximumEmissionAngle() || g < minimumPhaseAngle() || g > maximumPhaseAngle()) {
108 return photometry(i, e, g, band);
123 void PhotometricFunction::setMinimumIncidenceAngle(
double angle) {
124 m_minimumIncidenceAngle = angle;
139 void PhotometricFunction::setMaximumIncidenceAngle(
double angle) {
140 m_maximumIncidenceAngle = angle;
155 void PhotometricFunction::setMinimumEmissionAngle(
double angle) {
156 m_minimumEmissionAngle = angle;
171 void PhotometricFunction::setMaximumEmissionAngle(
double angle) {
172 m_maximumEmissionAngle = angle;
187 void PhotometricFunction::setMinimumPhaseAngle(
double angle) {
188 m_minimumPhaseAngle = angle;
203 void PhotometricFunction::setMaximumPhaseAngle(
double angle) {
204 m_maximumPhaseAngle = angle;
219 double PhotometricFunction::minimumIncidenceAngle() {
220 return m_minimumIncidenceAngle;
235 double PhotometricFunction::maximumIncidenceAngle() {
236 return m_maximumIncidenceAngle;
251 double PhotometricFunction::minimumEmissionAngle() {
252 return m_minimumEmissionAngle;
267 double PhotometricFunction::maximumEmissionAngle() {
268 return m_maximumEmissionAngle;
283 double PhotometricFunction::minimumPhaseAngle() {
284 return m_minimumPhaseAngle;
299 double PhotometricFunction::maximumPhaseAngle() {
300 return m_maximumPhaseAngle;
const double Null
Value for an Isis Null pixel.
Camera * camera()
Return a camera associated with the cube.
PvlObjectIterator findObject(const QString &name, PvlObjectIterator beg, PvlObjectIterator end)
Find the index of object with a specified name, between two indexes.
Namespace for the standard library.
double degrees() const
Get the angle in units of Degrees.
Defines an angle and provides unit conversions.
Namespace for ISIS/Bullet specific routines.
Contains Pvl Groups and Pvl Objects.
IO Handler for Isis Cubes.