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
14template< class A> class QVector;
15template< class A> class QList;
16class QString;
17class QStringList;
18class QVariant;
19
20namespace 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:
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
257 ControlMeasure(const ControlMeasure &other);
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;
313 QVector<ControlMeasureLogData> GetLogDataEntries() 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
326 static QVector<QString> GetMeasureDataNames();
327
328 QList<QStringList> PrintableClassData() const;
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
357 QString *p_dateTime;
359 bool p_ignore;
361 double p_sample;
362 double p_line;
363 double p_diameter;
364
369
370
371 double p_computedEphemerisTime;
372
374 double p_lineSigma;
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
a control measurement
bool IsEditLocked() const
Return value for p_editLock or implicit lock on reference measure.
Status SetCubeSerialNumber(QString newSerialNumber)
Set cube serial number.
QString GetDateTime() const
Return the date/time the coordinate was last changed.
double p_sampleResidual
Jigsaw information - Solution error - replaces p_sampleError.
static QString MeasureTypeToString(MeasureType type)
Return the String Control Measure type.
bool operator!=(const Isis::ControlMeasure &pMeasure) const
Compare 2 Control Measures for inequality.
double p_aprioriLine
measure by autoseed. Pointreg/Interest always use this location to start it's search....
bool HasLogData(long dataType) const
Test if we have a valid log data value of the specified type.
QList< QStringList > PrintableClassData() const
Data accessor method, provides access to string representations of all variable values and names.
Status SetCoordinate(double sample, double line)
Set the coordinate of the measurement.
double p_sample
Current sample/line measurement.
static MeasureType StringToMeasureType(QString str)
void DeleteLogData(long dataType)
This deletes log data of the specified type.
QString GetChooserName() const
Return the chooser name.
QString GetCubeSerialNumber() const
Return the serial number of the cube containing the coordinate.
QString * p_chooserName
list the program used and the definition file or include the user name for qnet
Status SetFocalPlaneComputed(double x, double y)
Set the computed focal plane x/y for the apriori lat/lon.
double GetMeasureData(QString) const
One Getter to rule them all.
void InitializeToNull()
initialize pointers and other data to NULL
MeasureType
Control network measurement types.
@ Manual
Hand Measured (e.g., qnet)
@ Candidate
(e.g., autoseed, interest) AKA predicted, unmeasured, unverified
@ RegisteredSubPixel
Registered to sub-pixel (e.g., pointreg)
@ RegisteredPixel
Registered to whole pixel (e.g.,pointreg)
double p_line
Jigsaw uses this measure.
double p_sampleSigma
Uncertainty/sigma in pixels of the measurement (current sample/line)
bool operator==(const Isis::ControlMeasure &pMeasure) const
Check for Control Measures equality.
double p_lineSigma
Not sure how we determine this for automated or manual picking.
Status SetFocalPlaneMeasured(double x, double y)
Set the focal plane x/y for the measured line/sample.
Status SetType(MeasureType type)
Set how the coordinate was obtained.
Status SetDiameter(double diameter)
Set the crater diameter at the coordinate.
void SetLogData(ControlMeasureLogData)
This adds or updates the log data information associated with data's type.
bool HasDateTime() const
Returns true if the datetime is not empty.
QVariant GetLogValue(long dataType) const
Get the value of the log data with the specified type as a variant.
const ControlMeasure & operator=(const ControlMeasure &other)
Assignment operator.
double p_lineResidual
Jigsaw information - Solution error - replaces p_lineError.
void UpdateLogData(ControlMeasureLogData)
This updates existing log data information associated with data's type.
Status SetDateTime()
Date Time - Creation Time.
ControlPoint * parentPoint
Pointer to parent ControlPoint, may be null.
Status SetResidual(double sampResidual, double lineResidual)
Set the BundleAdjust Residual of the coordinate.
ModType
Control Measure Modification Types.
QString GetMeasureTypeString() const
Obtain a string representation of the MeasureType.
~ControlMeasure()
Free the memory allocated by a control.
Status SetCamera(Isis::Camera *camera)
Set pointer to camera associated with a measure.
double p_aprioriSample
The first identified location of the.
Status SetRejected(bool rejected)
Set "jigsaw" rejected flag for a measure.
static QVector< QString > GetMeasureDataNames()
Returns a list of all valid options to pass to GetMeasureData.
bool HasChooserName() const
Returns true if the choosername is not empty.
double GetDiameter() const
Return the diameter of the crater in pixels (0 implies no crater)
Status SetChooserName()
Set chooser name to a user who last changed the coordinate.
bool p_jigsawRejected
Status of measure for last bundle adjust iteration.
ControlMeasure()
Create a new control measure and initialize it to nulls and zeros.
bool p_editLock
If true do not edit anything in measure.
double GetResidualMagnitude() const
Return Residual magnitude.
QVector< ControlMeasureLogData > GetLogDataEntries() const
Return all of the log data for the measure.
A single control point.
Define a generic Y/X container.
Definition GruenTypes.h:53
Contains multiple PvlContainers.
Definition PvlGroup.h:41
This is free and unencumbered software released into the public domain.
This is free and unencumbered software released into the public domain.
Definition Calculator.h:18
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16