File failed to load: https://isis.astrogeology.usgs.gov/9.0.0/Object/assets/jax/output/NativeMML/config.js
Isis 3 Programmer Reference
LidarData.cpp
1#include "LidarData.h"
2
3#include <QByteArray>
4#include <QFile>
5#include <QJsonArray>
6#include <QJsonDocument>
7#include <QJsonObject>
8#include <QJsonValue>
9#include <QList>
10#include <QMapIterator>
11#include <QRegExp>
12#include <QSharedPointer>
13#include <QString>
14#include <QStringList>
15#include <QTextStream>
16
17#include "Angle.h"
18#include "CameraFactory.h"
19#include "ControlNet.h"
20#include "Distance.h"
21#include "FileName.h"
22#include "IException.h"
23#include "iTime.h"
24#include "Latitude.h"
25#include "Longitude.h"
26#include "Progress.h"
27#include "SerialNumberList.h"
28#include "SurfacePoint.h"
29
30using namespace boost::numeric::ublas;
31
32namespace Isis {
33
34
39 m_numSimultaneousMeasures = 0;
40 m_numAsynchronousMeasures = 0;
41 }
42
43
52
59
62 if (!point) {
63 QString msg = "Point " + pointId + " is not in the lidar data.";
64 throw IException(IException::Programmer, msg, _FILEINFO_);
65 }
66 return point;
67 }
68
69
82 if (!sort) {
83 // This is the default behavior. The list is coming from a QHash so the point order
84 // will vary.
85 return m_points.values();
86 }
87 else {
88 // Sort the points as recommended by QT with std::sort since qsort is deprecated
90 std::sort(pointlist.begin(), pointlist.end(),
92 return pointlist;
93 }
94 }
95
96
103 return m_points.size();
104 }
105
106
113 return m_numSimultaneousMeasures;
114 }
115
122 return m_numAsynchronousMeasures;
123 }
124
125
132 return m_numSimultaneousMeasures + m_numAsynchronousMeasures;
133 }
134
135
148 void LidarData::SetImages(ControlNet &controlNet, Progress *progress) {
149
150 // iterate over map between serial number and camera pointers
151 QMapIterator< QString, Isis::Camera *> it(p_cameraMap);
152 while (it.hasNext()) {
153 it.next();
154 QString serialNumber = it.key();
155
156 // get corresponding camera pointer from controlNet
157 Isis::Camera *cam = controlNet.Camera(serialNumber);
158 p_cameraMap[serialNumber] = cam;
159 p_cameraValidMeasuresMap[serialNumber] = 0; // not sure if all this is needed
160 p_cameraRejectedMeasuresMap[serialNumber] = 0;
161 p_cameraList.push_back(cam);
162 }
163
164 // Loop through all measures and set the camera
165 QHashIterator< QString, QSharedPointer<LidarControlPoint> > p(m_points);
166 while (p.hasNext()) {
167 p.next();
168 LidarControlPointQsp curPoint = p.value();
169
170 QList< QString > serialNums = curPoint->getCubeSerialNumbers();
171 for (int m = 0; m < serialNums.size(); m++) {
172 ControlMeasure *curMeasure = (*curPoint)[serialNums[m]];
173
174 QString serialNumber = curMeasure->GetCubeSerialNumber();
175 Isis::Camera *cam = p_cameraMap[serialNumber];
176
177 if (cam == NULL) {
178 IString msg = "Lidar Control point [" + curPoint->GetId() +
179 "], measure [" + curMeasure->GetCubeSerialNumber() +
180 "] does not have a cube in the ISIS control net with a matching serial number";
181 throw IException(IException::User, msg, _FILEINFO_);
182 }
183
184 curMeasure->SetCamera(cam);
185
186 // increment number of measures for this image (camera)
187 if (!curMeasure->IsIgnored()) {
188 p_cameraValidMeasuresMap[serialNumber]++;
189 }
190 }
191 }
192 }
193
194
211 // First check if cameras have already been setup via another SetImages call
212 if (p_cameraList.size() > 0) {
213 return;
214 }
215 // Prep for reporting progress
216 if (progress != NULL) {
217 progress->SetText("Setting input images...");
218 progress->SetMaximumSteps(list.size());
219 progress->CheckStatus();
220 }
221 // Open the camera for all the images in the serial number list
222 for (int i = 0; i < list.size(); i++) {
223 QString serialNumber = list.serialNumber(i);
224 QString filename = list.fileName(i);
225 Cube cube(filename, "r");
226
227 try {
229 p_cameraMap[serialNumber] = cam;
230 p_cameraValidMeasuresMap[serialNumber] = 0;
231 p_cameraRejectedMeasuresMap[serialNumber] = 0;
232 p_cameraList.push_back(cam);
233 }
234 catch (IException &e) {
235 QString msg = "Unable to create camera for cube file ";
236 msg += filename;
237 throw IException(e, IException::Unknown, msg, _FILEINFO_);
238 }
239
240 if (progress != NULL)
241 progress->CheckStatus();
242 }
243
244 // Loop through all measures and set the camera
245 QHashIterator< QString, QSharedPointer<LidarControlPoint> > p(m_points);
246 while (p.hasNext()) {
247 p.next();
248 LidarControlPointQsp curPoint = p.value();
249
250 QList< QString > serialNums = curPoint->getCubeSerialNumbers();
251 for (int m = 0; m < serialNums.size(); m++) {
252 ControlMeasure *curMeasure = (*curPoint)[serialNums[m]];
253
254 QString serialNumber = curMeasure->GetCubeSerialNumber();
255 if (list.hasSerialNumber(serialNumber)) {
256 curMeasure->SetCamera(p_cameraMap[serialNumber]);
257
258 // increment number of measures for this image (camera)
259 if (!curMeasure->IsIgnored()) p_cameraValidMeasuresMap[serialNumber]++;
260 }
261 else {
262 IString msg = "Control point [" + curPoint->GetId() +
263 "], measure [" + curMeasure->GetCubeSerialNumber() +
264 "] does not have a cube with a matching serial number";
265 throw IException(IException::User, msg, _FILEINFO_);
266 }
267 }
268 }
269 }
270
271
281 void LidarData::read(FileName lidarDataFile) {
282 // Set up the input file
283 QFile loadFile(lidarDataFile.expanded());
284 // Make sure we can open the file successfully
285 if (!loadFile.open(QIODevice::ReadOnly)) {
286 QString msg("Could not open " + loadFile.fileName());
287 throw IException(IException::User, msg, _FILEINFO_);
288 }
289
290 // Load file
291 QByteArray saveData = loadFile.readAll();
292 QCborValue loadData(saveData);
293 QJsonDocument loadDoc(QJsonDocument::fromJson(loadData.toByteArray()));
294
295 int totalMeasures = 0;
296
297 // Unserialize LidarData
298 QJsonObject lidarDataObject = loadDoc.object();
299 if (lidarDataObject.contains("points") && lidarDataObject["points"].isArray()) {
300 // Unserialize LidarControlPoints
301 QJsonArray pointArray = lidarDataObject["points"].toArray();
302 for (int pointIndex = 0; pointIndex < pointArray.size(); pointIndex++) {
303 // Unserialize LidarControlPoint
304 QJsonObject pointObject = pointArray[pointIndex].toObject();
305
306 QString id;
307 if (pointObject.contains("id") && pointObject["id"].isString()) {
308 id = pointObject["id"].toString();
309 }
310
311 double range = 0.0;
312 if (pointObject.contains("range") && pointObject["range"].isDouble()) {
313 range = pointObject["range"].toDouble();
314 }
315
316 double sigmaRange = 0.0;
317 if (pointObject.contains("sigmaRange") && pointObject["sigmaRange"].isDouble()) {
318 sigmaRange = pointObject["sigmaRange"].toDouble();
319 }
320
321 double time = 0.0;
322 if (pointObject.contains("time") && pointObject["time"].isDouble()) {
323 time = pointObject["time"].toDouble();
324 }
325
326 double latitude = 0.0;
327 if (pointObject.contains("latitude") && pointObject["latitude"].isDouble()) {
328 latitude = pointObject["latitude"].toDouble();
329 }
330
331 double longitude = 0.0;
332 if (pointObject.contains("longitude") && pointObject["longitude"].isDouble()) {
333 longitude = pointObject["longitude"].toDouble();
334 }
335
336 double radius = 0.0;
337 if (pointObject.contains("radius") && pointObject["radius"].isDouble()) {
338 radius = pointObject["radius"].toDouble();
339 }
340
343 lcp->SetId(id);
344 lcp->setTime(iTime(time));
345 lcp->setRange(range);
346 lcp->setSigmaRange(sigmaRange);
347
348 if (pointObject.contains("aprioriMatrix") &&
349 pointObject["aprioriMatrix"].isArray()) {
350 QJsonArray aprioriMatrixArray = pointObject["aprioriMatrix"].toArray();
351 boost::numeric::ublas::symmetric_matrix<double, upper> aprioriMatrix(3);
352 aprioriMatrix.clear();
353 aprioriMatrix(0, 0) = aprioriMatrixArray[0].toDouble();
354 aprioriMatrix(0, 1) = aprioriMatrix(1, 0) = aprioriMatrixArray[1].toDouble();
355 aprioriMatrix(0, 2) = aprioriMatrix(2, 0) = aprioriMatrixArray[2].toDouble();
356 aprioriMatrix(1, 1) = aprioriMatrixArray[3].toDouble();
357 aprioriMatrix(1, 2) = aprioriMatrix(2, 1) = aprioriMatrixArray[4].toDouble();
358 aprioriMatrix(2, 2) = aprioriMatrixArray[5].toDouble();
359
360 lcp->SetAprioriSurfacePoint(SurfacePoint(Latitude(latitude, Angle::Units::Degrees),
363 aprioriMatrix));
364 lcp->SetType(ControlPoint::Constrained);
365 }
366 else {
367 lcp->SetAprioriSurfacePoint(SurfacePoint(Latitude(latitude, Angle::Units::Degrees),
370 }
371
372 // Set the adjusted surface point if it exists
373 if (pointObject.contains("adjustedLatitude") &&
374 pointObject["adjustedLatitude"].isDouble() &&
375 pointObject.contains("adjustedLongitude") &&
376 pointObject["adjustedLongitude"].isDouble() &&
377 pointObject.contains("adjustedRadius") &&
378 pointObject["adjustedRadius"].isDouble()) {
379
380 double adjustedLatitude = 0.0;
381 adjustedLatitude = pointObject["adjustedLatitude"].toDouble();
382
383 double adjustedLongitude = 0.0;
384 adjustedLongitude = pointObject["adjustedLongitude"].toDouble();
385
386 double adjustedRadius = 0.0;
387 adjustedRadius = pointObject["radius"].toDouble();
388
389 if (pointObject.contains("adjustedMatrix") &&
390 pointObject["adjustedMatrix"].isArray()) {
391 QJsonArray adjustedMatrixArray = pointObject["adjustedMatrix"].toArray();
392 boost::numeric::ublas::symmetric_matrix<double, upper> adjustedMatrix(3);
393 adjustedMatrix.clear();
394 adjustedMatrix(0, 0) = adjustedMatrixArray[0].toDouble();
395 adjustedMatrix(0, 1) = adjustedMatrix(1, 0) = adjustedMatrixArray[1].toDouble();
396 adjustedMatrix(0, 2) = adjustedMatrix(2, 0) = adjustedMatrixArray[2].toDouble();
397 adjustedMatrix(1, 1) = adjustedMatrixArray[3].toDouble();
398 adjustedMatrix(1, 2) = adjustedMatrix(2, 1) = adjustedMatrixArray[4].toDouble();
399 adjustedMatrix(2, 2) = adjustedMatrixArray[5].toDouble();
400
401 lcp->SetAdjustedSurfacePoint(SurfacePoint(Latitude(adjustedLatitude, Angle::Units::Degrees),
402 Longitude(adjustedLongitude, Angle::Units::Degrees),
403 Distance(adjustedRadius, Distance::Units::Kilometers),
404 adjustedMatrix));
405 lcp->SetType(ControlPoint::Constrained);
406 }
407 else {
408 lcp->SetAdjustedSurfacePoint(SurfacePoint(Latitude(adjustedLatitude, Angle::Units::Degrees),
409 Longitude(adjustedLongitude, Angle::Units::Degrees),
410 Distance(adjustedRadius, Distance::Units::Kilometers)));
411 }
412 }
413
414 if (pointObject.contains("simultaneousImages") &&
415 pointObject["simultaneousImages"].isArray()) {
416 QJsonArray simultaneousArray =
417 pointObject["simultaneousImages"].toArray();
418
419 for (int simIndex = 0; simIndex < simultaneousArray.size(); simIndex ++) {
420 QString newSerial;
421 // Unserialize each simultaneous image serial number
422 newSerial = simultaneousArray[simIndex].toString();
423 lcp->addSimultaneous(newSerial);
424 m_numSimultaneousMeasures++;
425 }
426 }
427
428 // Unserialize ControlMeasures
429 if (pointObject.contains("measures") && pointObject["measures"].isArray()) {
430 QJsonArray measureArray = pointObject["measures"].toArray();
431 for (int measureIndex = 0; measureIndex < measureArray.size(); measureIndex++) {
432 // Unserialize ControlMeasure
433 QJsonObject measureObject = measureArray[measureIndex].toObject();
434
435 double line = 0.0;
436 if (measureObject.contains("line") && measureObject["line"].toDouble()) {
437 line = measureObject["line"].toDouble();
438 }
439
440 double sample = 0.0;
441 if (measureObject.contains("sample") && measureObject["sample"].toDouble()) {
442 sample = measureObject["sample"].toDouble();
443 }
444
445 QString serialNumber;
446 if (measureObject.contains("serialNumber") && measureObject["serialNumber"].isString()) {
447 serialNumber = measureObject["serialNumber"].toString();
448 }
449
450 if (!p_cameraMap.contains(serialNumber)) {
451 p_cameraMap.insert(serialNumber, NULL);
452 }
453
454 // QString type;
455 // if (measureObject.contains("type") && measureObject["type"].isString()) {
456 // type = measureObject["type"].toString();
457 // }
458
459 ControlMeasure *measure = new ControlMeasure();
460 measure->SetCoordinate(sample, line);
461 measure->SetCubeSerialNumber(serialNumber);
462 // measure->SetType(measure->StringToMeasureType(type));
463 lcp->Add(measure);
464 totalMeasures++;
465 }
466 }
467
468 insert(lcp);
469 }
470 }
471 m_numAsynchronousMeasures = totalMeasures - m_numSimultaneousMeasures;
472 }
473
474
486 void LidarData::write(FileName outputFile, LidarData::Format format) {
487 bool sort = false; // Default behavior
488
489 // Set up the output file
490 if (format == Json) {
491 outputFile = outputFile.setExtension("json");
492 }
493 else if (format == Test) {
494 // Format is same as Json, but points are sorted instead of random so that
495 // output can be compared to truth data
496 outputFile = outputFile.setExtension("json");
497 sort = true;
498 }
499 else {
500 outputFile = outputFile.setExtension("dat");
501 }
502 QFile saveFile(outputFile.expanded());
503
504 if (!saveFile.open(QIODevice::WriteOnly)) {
505 QString msg("Could not open " + saveFile.fileName());
506 throw IException(IException::User, msg, _FILEINFO_);
507 }
508
509 // Serialize LidarData
510 QJsonObject lidarDataObject;
511 QJsonArray pointArray;
512 // Serialize the LidarControlPoints it contains
513 foreach (QSharedPointer<LidarControlPoint> lcp, points(sort)) {
514 // Serialize LidarControlPoint
515 QJsonObject pointObject;
516 pointObject["id"] = lcp->GetId();
517 pointObject["range"] = lcp->range();
518 pointObject["sigmaRange"] = lcp->sigmaRange();
519 pointObject["time"] = lcp->time().Et();
520
521 // Serialize the AprioriSurfacePoint
522 SurfacePoint aprioriSurfacePoint = lcp->GetAprioriSurfacePoint();
523 if (aprioriSurfacePoint.Valid()) {
524 pointObject["latitude"] = aprioriSurfacePoint.GetLatitude().planetocentric(Angle::Units::Degrees);
525 pointObject["longitude"] = aprioriSurfacePoint.GetLongitude().positiveEast(Angle::Units::Degrees);
526 pointObject["radius"] = aprioriSurfacePoint.GetLocalRadius().kilometers();
527
528 // Serialize the apriori matrix
529 symmetric_matrix<double, upper> aprioriMatrix = aprioriSurfacePoint.GetSphericalMatrix();
530 QJsonArray aprioriMatrixArray;
531 aprioriMatrixArray += aprioriMatrix(0, 0);
532 aprioriMatrixArray += aprioriMatrix(0, 1);
533 aprioriMatrixArray += aprioriMatrix(0, 2);
534 aprioriMatrixArray += aprioriMatrix(1, 1);
535 aprioriMatrixArray += aprioriMatrix(1, 2);
536 aprioriMatrixArray += aprioriMatrix(2, 2);
537
538 // If the covariance matrix has a value, add it to the PVL point.
539 if ( aprioriMatrix(0, 0) != 0.0
540 || aprioriMatrix(0, 1) != 0.0
541 || aprioriMatrix(0, 2) != 0.0
542 || aprioriMatrix(1, 1) != 0.0
543 || aprioriMatrix(1, 2) != 0.0
544 || aprioriMatrix(2, 2) != 0.0 ) {
545 pointObject["aprioriMatrix"] = aprioriMatrixArray;
546 }
547 }
548
549 // Serialize the AdjustedSurfacePoint
550 SurfacePoint adjustedSurfacePoint = lcp->GetAdjustedSurfacePoint();
551 if (adjustedSurfacePoint.Valid()) {
552 pointObject["adjustedLatitude"] =
553 adjustedSurfacePoint.GetLatitude().planetocentric(Angle::Units::Degrees);
554 pointObject["adjustedLongitude"] =
555 adjustedSurfacePoint.GetLongitude().positiveEast(Angle::Units::Degrees);
556 pointObject["adjustedRadius"] = adjustedSurfacePoint.GetLocalRadius().kilometers();
557
558 // Serialize the adjusted matrix
559 symmetric_matrix<double, upper> adjustedMatrix = adjustedSurfacePoint.GetSphericalMatrix();
560 QJsonArray adjustedMatrixArray;
561 adjustedMatrixArray += adjustedMatrix(0, 0);
562 adjustedMatrixArray += adjustedMatrix(0, 1);
563 adjustedMatrixArray += adjustedMatrix(0, 2);
564 adjustedMatrixArray += adjustedMatrix(1, 1);
565 adjustedMatrixArray += adjustedMatrix(1, 2);
566 adjustedMatrixArray += adjustedMatrix(2, 2);
567
568 // If the covariance matrix has a value, add it to the PVL point.
569 if ( adjustedMatrix(0, 0) != 0.0
570 || adjustedMatrix(0, 1) != 0.0
571 || adjustedMatrix(0, 2) != 0.0
572 || adjustedMatrix(1, 1) != 0.0
573 || adjustedMatrix(1, 2) != 0.0
574 || adjustedMatrix(2, 2) != 0.0 ) {
575 pointObject["adjustedMatrix"] = adjustedMatrixArray;
576 }
577 }
578
579 // Serialize the list of simultaneous images
580 QJsonArray simultaneousArray;
581 foreach (QString sn, lcp->snSimultaneous()) {
582 simultaneousArray.append(sn);
583 }
584 pointObject["simultaneousImages"] = simultaneousArray;
585
586 QJsonArray measureArray;
587 // Serialize the ControlMeasures it contains
588 foreach (ControlMeasure *measure, lcp->getMeasures()) {
589 // Serialize ControlMeasure
590 QJsonObject measureObject;
591 measureObject["line"] = measure->GetLine();
592 measureObject["sample"] = measure->GetSample();
593 measureObject["serialNumber"] = measure->GetCubeSerialNumber();
594 // measureObject["type"] = measure->GetMeasureTypeString();
595 measureArray.append(measureObject);
596
597 }
598 // Add the ControlMeasures to the LidarControlPoint
599 pointObject["measures"] = measureArray;
600
601 pointArray.append(pointObject);
602
603 }
604 // Add the LidarControlPoints to the LidarData
605 lidarDataObject["points"] = pointArray;
606
607 // Write the JSON to the file
608 QJsonDocument lidarDataDoc(lidarDataObject);
609 if (format == Json || format == Test) {
610 saveFile.write(lidarDataDoc.toJson());
611 }
612 else {
613 QCborValue json(lidarDataDoc.toJson());
614 saveFile.write(json.toByteArray());
615 }
616 }
617
626 bool LidarData::ValidateSerialNumber(QString serialNumber) const {
627 return p_cameraMap.contains(serialNumber);
628 }
629
630
639 int LidarData::GetNumberOfValidMeasuresInImage(const QString &serialNumber) {
640 // If SetImage was called, use the map that has been populated with valid measures
641 if (p_cameraList.size() > 0) {
642 return p_cameraValidMeasuresMap[serialNumber];
643 }
644 return GetValidMeasuresInCube(serialNumber).size();
645 }
646
647
654 return p_cameraRejectedMeasuresMap[serialNumber];
655 }
656
663 QList< ControlMeasure * > validMeasures;
664
665 // Get measures in cube will validate this for us, so we don't need to re-check
666 QList< ControlMeasure * > measureList = GetMeasuresInCube(serialNumber);
667
668 foreach(ControlMeasure * measure, measureList) {
669 if (!measure->IsIgnored()) {
670 validMeasures.append(measure);
671 }
672 }
673
674 return validMeasures;
675 }
676
683 if( !ValidateSerialNumber(serialNumber) ) {
684 IString msg = "Cube Serial Number [" + serialNumber + "] not found in "
685 "the network";
686 throw IException(IException::Programmer, msg, _FILEINFO_);
687
688 }
690 foreach(QSharedPointer <LidarControlPoint> point, m_points) {
691 if (point->HasSerialNumber(serialNumber)) {
692 measures.append(point->GetMeasure(serialNumber));
693 }
694 }
695 return measures;
696 }
697}
@ Degrees
Degrees are generally considered more human readable, 0-360 is one circle, however most math does not...
Definition Angle.h:56
static Camera * Create(Cube &cube)
Creates a Camera object using Pvl Specifications.
a control measurement
Status SetCubeSerialNumber(QString newSerialNumber)
Set cube serial number.
Status SetCoordinate(double sample, double line)
Set the coordinate of the measurement.
QString GetCubeSerialNumber() const
Return the serial number of the cube containing the coordinate.
Status SetCamera(Isis::Camera *camera)
Set pointer to camera associated with a measure.
a control network
Definition ControlNet.h:258
Isis::Camera * Camera(int index)
Returns the camera list from the given image number.
@ Constrained
A Constrained point is a Control Point whose lat/lon/radius is somewhat established and should not be...
IO Handler for Isis Cubes.
Definition Cube.h:168
Distance measurement, usually in meters.
Definition Distance.h:34
double kilometers() const
Get the distance in kilometers.
Definition Distance.cpp:106
@ Kilometers
The distance is being specified in kilometers.
Definition Distance.h:45
File name manipulation and expansion.
Definition FileName.h:100
FileName setExtension(const QString &extension) const
Sets all current file extensions to a new extension in the file name.
Definition FileName.cpp:265
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
Definition FileName.cpp:196
Isis exception class.
Definition IException.h:91
@ Unknown
A type of error that cannot be classified as any of the other error types.
Definition IException.h:118
@ User
A type of error that could only have occurred due to a mistake on the user's part (e....
Definition IException.h:126
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition IException.h:146
Adds specific functionality to C++ strings.
Definition IString.h:165
This class is designed to encapsulate the concept of a Latitude.
Definition Latitude.h:51
double planetocentric(Angle::Units units=Angle::Radians) const
Get the latitude in the planetocentric (universal) coordinate system.
Definition Latitude.cpp:282
A lidar control ControlPoint.
QSharedPointer< LidarControlPoint > point(QString pointId) const
Gets a single LidarDataPoint by ID.
Definition LidarData.cpp:60
QVector< Isis::Camera * > p_cameraList
vector of image# to camera
Definition LidarData.h:92
int numberLidarPoints()
Returns number of Lidar data points.
bool ValidateSerialNumber(QString serialNumber) const
Does a check to ensure that the given serial number is contained within the network.
QList< ControlMeasure * > GetValidMeasuresInCube(QString serialNumber)
Get all the valid measures pertaining to a given cube serial number.
Format
Enumerates the file formats for serializing the LidarData class.
Definition LidarData.h:53
@ Test
Serializes to an ordered JSON .json file for comparing to truth data.
Definition LidarData.h:56
@ Json
Serializes to a JSON .json file.
Definition LidarData.h:55
void SetImages(SerialNumberList &list, Progress *progress=0)
Creates the ControlNet's image camera's based on the list of Serial Numbers.
LidarData()
Default constructor.
Definition LidarData.cpp:38
void read(FileName)
Unserialize LidarData.
QMap< QString, Isis::Camera * > p_cameraMap
camera
Definition LidarData.h:88
QList< QSharedPointer< LidarControlPoint > > points(bool sort=false) const
Gets the list of Lidar data points optionally sorted .
Definition LidarData.cpp:81
void write(FileName, Format)
Serializes LidarData.
int numberMeasures()
Returns total number of lidar measures.
int numberSimultaneousMeasures()
Returns number of simultaneous lidar measures.
QMap< QString, int > p_cameraRejectedMeasuresMap
#rejected measures
Definition LidarData.h:90
void insert(QSharedPointer< LidarControlPoint > point)
Adds a LidarControlPoint to the LidarData.
Definition LidarData.cpp:49
int GetNumberOfValidMeasuresInImage(const QString &serialNumber)
Return the number of measures in image specified by serialNumber.
QMap< QString, int > p_cameraValidMeasuresMap
#measures
Definition LidarData.h:89
QList< ControlMeasure * > GetMeasuresInCube(QString serialNumber)
Get all the measures pertaining to a given cube serial number.
QHash< QString, QSharedPointer< LidarControlPoint > > m_points
hash of LidarControlPoints
Definition LidarData.h:85
int numberAsynchronousMeasures()
Returns number of non-simultaneous lidar measures.
int GetNumberOfJigsawRejectedMeasuresInImage(const QString &serialNumber)
Return the number of jigsaw rejected measures in image specified by serialNumber.
This class is designed to encapsulate the concept of a Longitude.
Definition Longitude.h:40
double positiveEast(Angle::Units units=Angle::Radians) const
Get the longitude in the PositiveEast coordinate system.
Program progress reporter.
Definition Progress.h:42
void SetMaximumSteps(const int steps)
This sets the maximum number of steps in the process.
Definition Progress.cpp:85
void SetText(const QString &text)
Changes the value of the text string reported just before 0% processed.
Definition Progress.cpp:61
void CheckStatus()
Checks and updates the status.
Definition Progress.cpp:105
Serial Number list generator.
bool hasSerialNumber(QString sn)
Determines whether or not the requested serial number exists in the list.
QString serialNumber(const QString &filename)
Return a serial number given a filename.
int size() const
How many serial number / filename combos are in the list.
QString fileName(const QString &sn)
Return a filename given a serial number.
This class defines a body-fixed surface point.
Latitude GetLatitude() const
Return the body-fixed latitude for the surface point.
Longitude GetLongitude() const
Return the body-fixed longitude for the surface point.
Distance GetLocalRadius() const
Return the radius of the surface point.
Parse and return pieces of a time string.
Definition iTime.h:65
This is free and unencumbered software released into the public domain.
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16
QSharedPointer< LidarControlPoint > LidarControlPointQsp
Definition for a shared pointer to a LidarControlPoint.