Isis 3 Programmer Reference
ControlMeasure.h
1 #ifndef ControlMeasure_h
2 #define ControlMeasure_h
3 
10 /* SPDX-License-Identifier: CC0-1.0 */
11 
12 #include <QObject>
13 
14 template< class A> class QVector;
15 template< class A> class QList;
16 class QString;
17 class QStringList;
18 class QVariant;
19 
20 namespace Isis {
21  class Application;
22  class Camera;
23  class ControlMeasureLogData;
24  class ControlPoint;
25  class PvlGroup;
26  class PvlKeyword;
27 
175  class ControlMeasure : public QObject {
176 
177  Q_OBJECT
178 
179  friend class ControlPoint;
180  public:
206  enum MeasureType {
215  };
216 
217  enum Status {
218  Success,
219  MeasureLocked
220  };
221 
222 
232  enum ModType {
233  IgnoredModified
234  };
235 
236  enum DataField {
237  AprioriLine = 1,
238  AprioriSample = 2,
239  ChooserName = 4,
240  CubeSerialNumber = 8,
241  Coordinate = 16,
242  DateTime = 32,
243  Diameter = 64,
244  EditLock = 128,
245  Rejected = 256,
246  FocalPlaneMeasured = 512,
247  FocalPlaneComputed = 1024,
248  Ignore = 2048,
249  SampleResidual = 4096,
250  LineResidual = 8192,
251  SampleSigma = 16384,
252  LineSigma = 32768,
253  Type = 65536
254  };
255 
256  ControlMeasure();
257  ControlMeasure(const ControlMeasure &other);
258  ~ControlMeasure();
259 
260  ControlPoint *Parent() { return parentPoint; }
261 
262  Status SetAprioriLine(double aprioriLine);
263  Status SetAprioriSample(double aprioriSample);
264  Status SetCamera(Isis::Camera *camera);
265  Status SetChooserName();
266  Status SetChooserName(QString name);
267  Status SetCoordinate(double sample, double line);
268  Status SetCoordinate(double sample, double line, MeasureType type);
269  Status SetCubeSerialNumber(QString newSerialNumber);
270  Status SetDateTime();
271  Status SetDateTime(QString datetime);
272  Status SetDiameter(double diameter);
273  Status SetEditLock(bool editLock);
274  Status SetFocalPlaneMeasured(double x, double y);
275  Status SetFocalPlaneComputed(double x, double y);
276  Status SetIgnored(bool newIgnoredStatus);
277  Status SetLineSigma(double lineSigma);
278  Status SetRejected(bool rejected);
279  Status SetResidual(double sampResidual, double lineResidual);
280  Status SetSampleSigma(double sampleSigma);
281  Status SetType(MeasureType type);
282 
283  void DeleteLogData(long dataType);
284  QVariant GetLogValue(long dataType) const;
285  bool HasLogData(long dataType) const;
286  void SetLogData(ControlMeasureLogData);
287  void UpdateLogData(ControlMeasureLogData);
288 
289  double GetAprioriLine() const;
290  double GetAprioriSample() const;
291  Isis::Camera *Camera() const;
292  QString GetChooserName() const;
293  bool HasChooserName() const;
294  QString GetCubeSerialNumber() const;
295  QString GetDateTime() const;
296  bool HasDateTime() const;
297  double GetDiameter() const;
298  ControlMeasureLogData GetLogData(long dataType) const;
299  bool IsEditLocked() const;
300  bool IsRejected() const;
301  double GetFocalPlaneComputedX() const;
302  double GetFocalPlaneComputedY() const;
303  double GetFocalPlaneMeasuredX() const;
304  double GetFocalPlaneMeasuredY() const;
305  double GetMeasureData(QString) const;
306  bool IsIgnored() const;
307  bool IsMeasured() const;
308  bool IsRegistered() const;
309  bool IsStatisticallyRelevant(DataField field) const;
310  double GetLine() const;
311  double GetLineResidual() const;
312  double GetLineSigma() const;
314  QVector<ControlMeasureLogData> GetLastRunLogDataEntries() const;
315  double GetResidualMagnitude() const;
316  double GetSample() const;
317  double GetSampleResidual() const;
318  double GetSampleSigma() const;
319  MeasureType GetType() const;
320  QString GetPointId() const;
321 
322  double GetSampleShift() const;
323  double GetLineShift() const;
324  double GetPixelShift() const;
325 
327 
329 
330  static QString MeasureTypeToString(MeasureType type);
331  static MeasureType StringToMeasureType(QString str);
332  QString GetMeasureTypeString() const;
333 
334  const ControlMeasure &operator=(const ControlMeasure &other);
335  bool operator != (const Isis::ControlMeasure &pMeasure) const;
336  bool operator == (const Isis::ControlMeasure &pMeasure) const;
337 
338  private: // methods
339  void InitializeToNull();
340  void MeasureModified();
341 
342  private: // data
344  // structure connecting measures in an image
345 
346  QString *p_serialNumber;
347  MeasureType p_measureType;
348 
349  QVector<ControlMeasureLogData> * p_loggedData;
350  PvlGroup *p_comments;
351 
356  QString *p_chooserName;
357  QString *p_dateTime;
358  bool p_editLock;
359  bool p_ignore;
361  double p_sample;
362  double p_line;
363  double p_diameter;
364 
366  double p_aprioriLine;
367 
370 
371  double p_computedEphemerisTime;
372 
373  double p_sampleSigma;
374  double p_lineSigma;
376  double p_lineResidual;
377  Isis::Camera *p_camera;
378  double p_focalPlaneMeasuredX;
379  double p_focalPlaneMeasuredY;
380  double p_focalPlaneComputedX;
381  double p_focalPlaneComputedY;
382  double p_measuredEphemerisTime;
383  };
384 }
385 
386 #endif
Isis::ControlMeasure::operator!=
bool operator!=(const Isis::ControlMeasure &pMeasure) const
Compare 2 Control Measures for inequality.
Definition: ControlMeasure.cpp:1066
Isis::ControlMeasure::GetResidualMagnitude
double GetResidualMagnitude() const
Return Residual magnitude.
Definition: ControlMeasure.cpp:712
Isis::ControlMeasure::PrintableClassData
QList< QStringList > PrintableClassData() const
Data accessor method, provides access to string representations of all variable values and names.
Definition: ControlMeasure.cpp:854
Isis::ControlMeasure::RegisteredPixel
@ RegisteredPixel
Registered to whole pixel (e.g.,pointreg)
Definition: ControlMeasure.h:212
Isis::ControlMeasure::RegisteredSubPixel
@ RegisteredSubPixel
Registered to sub-pixel (e.g., pointreg)
Definition: ControlMeasure.h:214
Isis::ControlMeasure::operator=
const ControlMeasure & operator=(const ControlMeasure &other)
Assignment operator.
Definition: ControlMeasure.cpp:1001
QList
This is free and unencumbered software released into the public domain.
Definition: BoxcarCachingAlgorithm.h:13
Isis::ControlMeasure::SetCubeSerialNumber
Status SetCubeSerialNumber(QString newSerialNumber)
Set cube serial number.
Definition: ControlMeasure.cpp:187
Isis::ControlMeasure::SetLogData
void SetLogData(ControlMeasureLogData)
This adds or updates the log data information associated with data's type.
Definition: ControlMeasure.cpp:435
Isis::ControlMeasure::p_sampleSigma
double p_sampleSigma
Uncertainty/sigma in pixels of the measurement (current sample/line)
Definition: ControlMeasure.h:373
Isis::ControlMeasure::parentPoint
ControlPoint * parentPoint
Pointer to parent ControlPoint, may be null.
Definition: ControlMeasure.h:343
Isis::ControlMeasure::MeasureType
MeasureType
Control network measurement types.
Definition: ControlMeasure.h:206
Isis::ControlMeasure::StringToMeasureType
static MeasureType StringToMeasureType(QString str)
Definition: ControlMeasure.cpp:919
Isis::ControlMeasure::UpdateLogData
void UpdateLogData(ControlMeasureLogData)
This updates existing log data information associated with data's type.
Definition: ControlMeasure.cpp:504
Isis::ControlMeasure::p_editLock
bool p_editLock
If true do not edit anything in measure.
Definition: ControlMeasure.h:358
Isis::ControlMeasure::SetResidual
Status SetResidual(double sampResidual, double lineResidual)
Set the BundleAdjust Residual of the coordinate.
Definition: ControlMeasure.cpp:399
Isis::ControlMeasure::SetFocalPlaneMeasured
Status SetFocalPlaneMeasured(double x, double y)
Set the focal plane x/y for the measured line/sample.
Definition: ControlMeasure.cpp:299
Isis::ControlMeasure::p_jigsawRejected
bool p_jigsawRejected
Status of measure for last bundle adjust iteration.
Definition: ControlMeasure.h:360
Isis::ControlMeasure::GetMeasureTypeString
QString GetMeasureTypeString() const
Obtain a string representation of the MeasureType.
Definition: ControlMeasure.cpp:987
Isis::ControlMeasure::HasDateTime
bool HasDateTime() const
Returns true if the datetime is not empty.
Definition: ControlMeasure.cpp:573
Isis::ControlMeasure::Candidate
@ Candidate
(e.g., autoseed, interest) AKA predicted, unmeasured, unverified
Definition: ControlMeasure.h:208
Isis::ControlMeasure::DeleteLogData
void DeleteLogData(long dataType)
This deletes log data of the specified type.
Definition: ControlMeasure.cpp:455
Isis::Camera
Definition: Camera.h:236
Isis::ControlMeasure::GetDateTime
QString GetDateTime() const
Return the date/time the coordinate was last changed.
Definition: ControlMeasure.cpp:563
Isis::ControlMeasure::ControlMeasure
ControlMeasure()
Create a new control measure and initialize it to nulls and zeros.
Definition: ControlMeasure.cpp:30
Isis::ControlMeasure::SetDateTime
Status SetDateTime()
Date Time - Creation Time.
Definition: ControlMeasure.cpp:247
QStringList
Isis::Coordinate
Define a generic Y/X container.
Definition: GruenTypes.h:53
Isis::ControlMeasure::SetRejected
Status SetRejected(bool rejected)
Set "jigsaw" rejected flag for a measure.
Definition: ControlMeasure.cpp:343
Isis::ControlMeasure::~ControlMeasure
~ControlMeasure()
Free the memory allocated by a control.
Definition: ControlMeasure.cpp:110
Isis::ControlMeasure::p_aprioriSample
double p_aprioriSample
The first identified location of the.
Definition: ControlMeasure.h:365
Isis::ControlMeasure::p_sample
double p_sample
Current sample/line measurement.
Definition: ControlMeasure.h:361
Isis::ControlMeasure::GetCubeSerialNumber
QString GetCubeSerialNumber() const
Return the serial number of the cube containing the coordinate.
Definition: ControlMeasure.cpp:557
Isis::ControlPoint
A single control point.
Definition: ControlPoint.h:354
Isis::ControlMeasure::ModType
ModType
Control Measure Modification Types.
Definition: ControlMeasure.h:232
Isis::PvlGroup
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
Isis::ControlMeasure::p_sampleResidual
double p_sampleResidual
Jigsaw information - Solution error - replaces p_sampleError.
Definition: ControlMeasure.h:375
Isis::ControlMeasure::SetCamera
Status SetCamera(Isis::Camera *camera)
Set pointer to camera associated with a measure.
Definition: ControlMeasure.cpp:169
Isis::ControlMeasure::p_lineResidual
double p_lineResidual
Jigsaw information - Solution error - replaces p_lineError.
Definition: ControlMeasure.h:376
Isis::ControlMeasure::GetMeasureDataNames
static QVector< QString > GetMeasureDataNames()
Returns a list of all valid options to pass to GetMeasureData.
Definition: ControlMeasure.cpp:833
Isis::ControlMeasure::Manual
@ Manual
Hand Measured (e.g., qnet)
Definition: ControlMeasure.h:210
Isis::ControlMeasure::MeasureTypeToString
static QString MeasureTypeToString(MeasureType type)
Return the String Control Measure type.
Definition: ControlMeasure.cpp:951
Isis::ControlMeasure::SetChooserName
Status SetChooserName()
Set chooser name to a user who last changed the coordinate.
Definition: ControlMeasure.cpp:196
Isis::ControlMeasure::IsEditLocked
bool IsEditLocked() const
Return value for p_editLock or implicit lock on reference measure.
Definition: ControlMeasure.cpp:601
Isis::ControlMeasure::GetDiameter
double GetDiameter() const
Return the diameter of the crater in pixels (0 implies no crater)
Definition: ControlMeasure.cpp:580
Isis::ControlMeasure::SetDiameter
Status SetDiameter(double diameter)
Set the crater diameter at the coordinate.
Definition: ControlMeasure.cpp:272
Isis::ControlMeasure::GetLogDataEntries
QVector< ControlMeasureLogData > GetLogDataEntries() const
Return all of the log data for the measure.
Definition: ControlMeasure.cpp:796
Isis::ControlMeasure::InitializeToNull
void InitializeToNull()
initialize pointers and other data to NULL
Definition: ControlMeasure.cpp:77
Isis::ControlMeasure::p_aprioriLine
double p_aprioriLine
measure by autoseed. Pointreg/Interest always use this location to start it's search....
Definition: ControlMeasure.h:366
Isis::ControlMeasure::GetMeasureData
double GetMeasureData(QString) const
One Getter to rule them all.
Definition: ControlMeasure.cpp:806
Isis::ControlMeasure::GetLogValue
QVariant GetLogValue(long dataType) const
Get the value of the log data with the specified type as a variant.
Definition: ControlMeasure.cpp:469
Isis::ControlMeasure::SetType
Status SetType(MeasureType type)
Set how the coordinate was obtained.
Definition: ControlMeasure.cpp:420
Isis::ControlMeasure::p_lineSigma
double p_lineSigma
Not sure how we determine this for automated or manual picking.
Definition: ControlMeasure.h:374
QObject
QVector
This is free and unencumbered software released into the public domain.
Definition: Calculator.h:18
Isis::ControlMeasure::HasChooserName
bool HasChooserName() const
Returns true if the choosername is not empty.
Definition: ControlMeasure.cpp:552
Isis::ControlMeasure::GetChooserName
QString GetChooserName() const
Return the chooser name.
Definition: ControlMeasure.cpp:542
Isis::ControlMeasure::SetFocalPlaneComputed
Status SetFocalPlaneComputed(double x, double y)
Set the computed focal plane x/y for the apriori lat/lon.
Definition: ControlMeasure.cpp:319
Isis::ControlMeasure::HasLogData
bool HasLogData(long dataType) const
Test if we have a valid log data value of the specified type.
Definition: ControlMeasure.cpp:486
Isis::ControlMeasure::p_line
double p_line
Jigsaw uses this measure.
Definition: ControlMeasure.h:362
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::ControlMeasure::p_chooserName
QString * p_chooserName
list the program used and the definition file or include the user name for qnet
Definition: ControlMeasure.h:356
Isis::ControlMeasure::SetCoordinate
Status SetCoordinate(double sample, double line)
Set the coordinate of the measurement.
Definition: ControlMeasure.cpp:219
Isis::ControlMeasure::operator==
bool operator==(const Isis::ControlMeasure &pMeasure) const
Check for Control Measures equality.
Definition: ControlMeasure.cpp:1087
Isis::ControlMeasure
a control measurement
Definition: ControlMeasure.h:175