File failed to load: https://isis.astrogeology.usgs.gov/6.0.0/Object/assets/jax/output/NativeMML/config.js
Isis 3 Programmer Reference
ControlMeasureLogData.cpp
1 
7 /* SPDX-License-Identifier: CC0-1.0 */
8 
9 #include "ControlMeasureLogData.h"
10 
11 #include <QVariant>
12 
13 #include "PvlKeyword.h"
14 #include "SpecialPixel.h"
15 
16 namespace Isis {
21  Init();
22  }
23 
24 
32  double value) {
33  p_dataType = dataType;
34  p_numericalValue = value;
35  }
36 
37 
45  Init();
46  p_dataType = dataType;
47  }
48 
49 
58  Init();
59 
60  QString name = keywordRep.name();
61  p_dataType = NameToDataType(name);
63  p_numericalValue = toDouble(keywordRep[0]);
64  }
65 
72  other) {
73  p_dataType = other.p_dataType;
75  }
76 
77 
82  }
83 
84 
92  }
93 
94 
101  p_numericalValue = value;
102  }
103 
104 
112  Init();
113  p_dataType = newDataType;
114  }
115 
116 
124  return p_numericalValue;
125  }
126 
127 
136  return p_dataType;
137  }
138 
139 
145  return QVariant(p_numericalValue);
146  }
147 
148 
155  return (p_numericalValue != Null) &&
157  }
158 
159 
167  if(IsValid())
169  else
170  return PvlKeyword();
171  }
172 
181  QString name) const {
182  for (int i = InvalidNumericLogDataType + 1;
183  i < MaximumNumericLogDataType; i++) {
184  try {
185  QString thisTypeName = DataTypeToName((NumericLogDataType) i);
186 
187  if (name.compare(thisTypeName, Qt::CaseInsensitive) == 0) {
188  return (NumericLogDataType) i;
189  }
190  }
191  catch (IException &) {
192  }
193  }
194 
196  }
197 
198 
207  switch(type) {
209  IString msg = "Cannot convert an invalid data type to a string";
210  throw IException(IException::Programmer, msg, _FILEINFO_);
211  }
212 
214  return "Obsolete_Eccentricity";
215 
216  case GoodnessOfFit:
217  return "GoodnessOfFit";
218 
219  case MinimumPixelZScore:
220  return "MinimumPixelZScore";
221 
222  case MaximumPixelZScore:
223  return "MaximumPixelZScore";
224 
225  case PixelShift:
226  return "PixelShift";
227 
229  return "WholePixelCorrelation";
230 
231  case SubPixelCorrelation:
232  return "SubPixelCorrelation";
233 
235  return "Obsolete_AverageResidual";
236  }
237 
238  QString msg = "Unknown data type [" + toString(type) + "]";
239  throw IException(IException::Programmer, msg, _FILEINFO_);
240  }
241 }
Isis::ControlMeasureLogData::Obsolete_AverageResidual
@ Obsolete_AverageResidual
Deprecated keyword kept for backwards compatability with older Control Networks.
Definition: ControlMeasureLogData.h:105
Isis::PvlKeyword::name
QString name() const
Returns the keyword name.
Definition: PvlKeyword.h:98
Isis::PvlKeyword
A single keyword-value pair.
Definition: PvlKeyword.h:82
Isis::ControlMeasureLogData::GetNumericalValue
double GetNumericalValue() const
Get the value associated with this log data.
Definition: ControlMeasureLogData.cpp:123
Isis::ControlMeasureLogData::SubPixelCorrelation
@ SubPixelCorrelation
Deprecated keyword kept for backwards compatability with older Control Networks.
Definition: ControlMeasureLogData.h:99
Isis::ControlMeasureLogData::MaximumNumericLogDataType
static const int MaximumNumericLogDataType
This value must be > the largest enumerated value in this type or convertions to and from Pvl will no...
Definition: ControlMeasureLogData.h:112
Isis::ControlMeasureLogData::GetDataType
NumericLogDataType GetDataType() const
Get the data type associated with this log data.
Definition: ControlMeasureLogData.cpp:135
Isis::ControlMeasureLogData::SetNumericalValue
void SetNumericalValue(double value)
This updates the value associated with a NumericLogDataType.
Definition: ControlMeasureLogData.cpp:100
Isis::ControlMeasureLogData::NumericLogDataType
NumericLogDataType
Please do not change existing values in this list except the size - it will break backwards compadibi...
Definition: ControlMeasureLogData.h:49
Isis::ControlMeasureLogData::MaximumPixelZScore
@ MaximumPixelZScore
Definition: ControlMeasureLogData.h:81
Isis::ControlMeasureLogData::ControlMeasureLogData
ControlMeasureLogData()
This creates an empty, invalid (IsValid() will return false), instance.
Definition: ControlMeasureLogData.cpp:20
Isis::ControlMeasureLogData::p_numericalValue
double p_numericalValue
The actual value of the data.
Definition: ControlMeasureLogData.h:139
Isis::ControlMeasureLogData::ToKeyword
PvlKeyword ToKeyword() const
This converts the log data to a PvlKeyword.
Definition: ControlMeasureLogData.cpp:166
Isis::ControlMeasureLogData::NameToDataType
NumericLogDataType NameToDataType(QString name) const
This converts a string to a log data type and is useful for converting Pvl keywords to Numeric Log Da...
Definition: ControlMeasureLogData.cpp:180
Isis::toString
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
Isis::ControlMeasureLogData::IsValid
bool IsValid() const
This tests if the log data is complete and valid.
Definition: ControlMeasureLogData.cpp:154
Isis::ControlMeasureLogData::MinimumPixelZScore
@ MinimumPixelZScore
Control measures store z-scores in pairs.
Definition: ControlMeasureLogData.h:76
Isis::ControlMeasureLogData::~ControlMeasureLogData
~ControlMeasureLogData()
Destructor.
Definition: ControlMeasureLogData.cpp:81
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::ControlMeasureLogData::DataTypeToName
QString DataTypeToName(NumericLogDataType type) const
This converts the log data type to a string and is used internally for convertions to and from Pvl.
Definition: ControlMeasureLogData.cpp:206
Isis::ControlMeasureLogData::Init
void Init()
This is a helper method for the constructor that initializes the data to a default,...
Definition: ControlMeasureLogData.cpp:89
Isis::Null
const double Null
Value for an Isis Null pixel.
Definition: SpecialPixel.h:95
Isis::ControlMeasureLogData::InvalidNumericLogDataType
@ InvalidNumericLogDataType
This is a placeholder for unset values.
Definition: ControlMeasureLogData.h:53
Isis::ControlMeasureLogData::PixelShift
@ PixelShift
Deprecated keyword kept for backwards compatability with older Control Networks.
Definition: ControlMeasureLogData.h:87
Isis::ControlMeasureLogData::SetDataType
void SetDataType(NumericLogDataType newDataType)
This changes the type of this log data.
Definition: ControlMeasureLogData.cpp:111
Isis::toDouble
double toDouble(const QString &string)
Global function to convert from a string to a double.
Definition: IString.cpp:149
Isis::IException::Programmer
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:146
Isis::ControlMeasureLogData::p_dataType
NumericLogDataType p_dataType
Which kind of value are we storing.
Definition: ControlMeasureLogData.h:137
Isis::ControlMeasureLogData::WholePixelCorrelation
@ WholePixelCorrelation
Deprecated keyword kept for backwards compatability with older Control Networks.
Definition: ControlMeasureLogData.h:93
Isis::ControlMeasureLogData::GoodnessOfFit
@ GoodnessOfFit
GoodnessOfFit is pointreg information for reference measures.
Definition: ControlMeasureLogData.h:67
Isis::IString
Adds specific functionality to C++ strings.
Definition: IString.h:165
Isis::ControlMeasureLogData::Obsolete_Eccentricity
@ Obsolete_Eccentricity
Deprecated keyword kept for backwards compatability with older Control Networks.
Definition: ControlMeasureLogData.h:59
Isis::ControlMeasureLogData
Statistical and similar ControlMeasure associated information.
Definition: ControlMeasureLogData.h:37
Isis::ControlMeasureLogData::GetValue
QVariant GetValue() const
Get the data type associated with this log data.
Definition: ControlMeasureLogData.cpp:144
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 07/13/2023 15:16:18