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
49 void LidarData::insert(QSharedPointer<LidarControlPoint> point) {
50 m_points.insert(point->GetId(), point);
51 }
52
60 QSharedPointer<LidarControlPoint> LidarData::point(QString pointId) const{
61 QSharedPointer<LidarControlPoint> point = m_points.value(pointId, 0);
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
81 QList< QSharedPointer<LidarControlPoint> > LidarData::points(bool sort) const {
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
89 QList< QSharedPointer<LidarControlPoint> > pointlist = points();
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 // Try to load from JSON (ASCII); if it can not, load as binary.
293 QJsonDocument loadDoc(QJsonDocument::fromJson(saveData));
294 if (loadDoc.isNull()) {
295 loadDoc = QJsonDocument::fromBinaryData(saveData);
296 }
297
298 int totalMeasures = 0;
299
300 // Unserialize LidarData
301 QJsonObject lidarDataObject = loadDoc.object();
302 if (lidarDataObject.contains("points") && lidarDataObject["points"].isArray()) {
303 // Unserialize LidarControlPoints
304 QJsonArray pointArray = lidarDataObject["points"].toArray();
305 for (int pointIndex = 0; pointIndex < pointArray.size(); pointIndex++) {
306 // Unserialize LidarControlPoint
307 QJsonObject pointObject = pointArray[pointIndex].toObject();
308
309 QString id;
310 if (pointObject.contains("id") && pointObject["id"].isString()) {
311 id = pointObject["id"].toString();
312 }
313
314 double range = 0.0;
315 if (pointObject.contains("range") && pointObject["range"].isDouble()) {
316 range = pointObject["range"].toDouble();
317 }
318
319 double sigmaRange = 0.0;
320 if (pointObject.contains("sigmaRange") && pointObject["sigmaRange"].isDouble()) {
321 sigmaRange = pointObject["sigmaRange"].toDouble();
322 }
323
324 double time = 0.0;
325 if (pointObject.contains("time") && pointObject["time"].isDouble()) {
326 time = pointObject["time"].toDouble();
327 }
328
329 double latitude = 0.0;
330 if (pointObject.contains("latitude") && pointObject["latitude"].isDouble()) {
331 latitude = pointObject["latitude"].toDouble();
332 }
333
334 double longitude = 0.0;
335 if (pointObject.contains("longitude") && pointObject["longitude"].isDouble()) {
336 longitude = pointObject["longitude"].toDouble();
337 }
338
339 double radius = 0.0;
340 if (pointObject.contains("radius") && pointObject["radius"].isDouble()) {
341 radius = pointObject["radius"].toDouble();
342 }
343
344 QSharedPointer<LidarControlPoint> lcp =
345 QSharedPointer<LidarControlPoint>(new LidarControlPoint());
346 lcp->SetId(id);
347 lcp->setTime(iTime(time));
348 lcp->setRange(range);
349 lcp->setSigmaRange(sigmaRange);
350
351 if (pointObject.contains("aprioriMatrix") &&
352 pointObject["aprioriMatrix"].isArray()) {
353 QJsonArray aprioriMatrixArray = pointObject["aprioriMatrix"].toArray();
354 boost::numeric::ublas::symmetric_matrix<double, upper> aprioriMatrix(3);
355 aprioriMatrix.clear();
356 aprioriMatrix(0, 0) = aprioriMatrixArray[0].toDouble();
357 aprioriMatrix(0, 1) = aprioriMatrix(1, 0) = aprioriMatrixArray[1].toDouble();
358 aprioriMatrix(0, 2) = aprioriMatrix(2, 0) = aprioriMatrixArray[2].toDouble();
359 aprioriMatrix(1, 1) = aprioriMatrixArray[3].toDouble();
360 aprioriMatrix(1, 2) = aprioriMatrix(2, 1) = aprioriMatrixArray[4].toDouble();
361 aprioriMatrix(2, 2) = aprioriMatrixArray[5].toDouble();
362
363 lcp->SetAprioriSurfacePoint(SurfacePoint(Latitude(latitude, Angle::Units::Degrees),
366 aprioriMatrix));
367 lcp->SetType(ControlPoint::Constrained);
368 }
369 else {
370 lcp->SetAprioriSurfacePoint(SurfacePoint(Latitude(latitude, Angle::Units::Degrees),
373 }
374
375 // Set the adjusted surface point if it exists
376 if (pointObject.contains("adjustedLatitude") &&
377 pointObject["adjustedLatitude"].isDouble() &&
378 pointObject.contains("adjustedLongitude") &&
379 pointObject["adjustedLongitude"].isDouble() &&
380 pointObject.contains("adjustedRadius") &&
381 pointObject["adjustedRadius"].isDouble()) {
382
383 double adjustedLatitude = 0.0;
384 adjustedLatitude = pointObject["adjustedLatitude"].toDouble();
385
386 double adjustedLongitude = 0.0;
387 adjustedLongitude = pointObject["adjustedLongitude"].toDouble();
388
389 double adjustedRadius = 0.0;
390 adjustedRadius = pointObject["radius"].toDouble();
391
392 if (pointObject.contains("adjustedMatrix") &&
393 pointObject["adjustedMatrix"].isArray()) {
394 QJsonArray adjustedMatrixArray = pointObject["adjustedMatrix"].toArray();
395 boost::numeric::ublas::symmetric_matrix<double, upper> adjustedMatrix(3);
396 adjustedMatrix.clear();
397 adjustedMatrix(0, 0) = adjustedMatrixArray[0].toDouble();
398 adjustedMatrix(0, 1) = adjustedMatrix(1, 0) = adjustedMatrixArray[1].toDouble();
399 adjustedMatrix(0, 2) = adjustedMatrix(2, 0) = adjustedMatrixArray[2].toDouble();
400 adjustedMatrix(1, 1) = adjustedMatrixArray[3].toDouble();
401 adjustedMatrix(1, 2) = adjustedMatrix(2, 1) = adjustedMatrixArray[4].toDouble();
402 adjustedMatrix(2, 2) = adjustedMatrixArray[5].toDouble();
403
404 lcp->SetAdjustedSurfacePoint(SurfacePoint(Latitude(adjustedLatitude, Angle::Units::Degrees),
405 Longitude(adjustedLongitude, Angle::Units::Degrees),
406 Distance(adjustedRadius, Distance::Units::Kilometers),
407 adjustedMatrix));
408 lcp->SetType(ControlPoint::Constrained);
409 }
410 else {
411 lcp->SetAdjustedSurfacePoint(SurfacePoint(Latitude(adjustedLatitude, Angle::Units::Degrees),
412 Longitude(adjustedLongitude, Angle::Units::Degrees),
413 Distance(adjustedRadius, Distance::Units::Kilometers)));
414 }
415 }
416
417 if (pointObject.contains("simultaneousImages") &&
418 pointObject["simultaneousImages"].isArray()) {
419 QJsonArray simultaneousArray =
420 pointObject["simultaneousImages"].toArray();
421
422 for (int simIndex = 0; simIndex < simultaneousArray.size(); simIndex ++) {
423 QString newSerial;
424 // Unserialize each simultaneous image serial number
425 newSerial = simultaneousArray[simIndex].toString();
426 lcp->addSimultaneous(newSerial);
427 m_numSimultaneousMeasures++;
428 }
429 }
430
431 // Unserialize ControlMeasures
432 if (pointObject.contains("measures") && pointObject["measures"].isArray()) {
433 QJsonArray measureArray = pointObject["measures"].toArray();
434 for (int measureIndex = 0; measureIndex < measureArray.size(); measureIndex++) {
435 // Unserialize ControlMeasure
436 QJsonObject measureObject = measureArray[measureIndex].toObject();
437
438 double line = 0.0;
439 if (measureObject.contains("line") && measureObject["line"].toDouble()) {
440 line = measureObject["line"].toDouble();
441 }
442
443 double sample = 0.0;
444 if (measureObject.contains("sample") && measureObject["sample"].toDouble()) {
445 sample = measureObject["sample"].toDouble();
446 }
447
448 QString serialNumber;
449 if (measureObject.contains("serialNumber") && measureObject["serialNumber"].isString()) {
450 serialNumber = measureObject["serialNumber"].toString();
451 }
452
453 if (!p_cameraMap.contains(serialNumber)) {
454 p_cameraMap.insert(serialNumber, NULL);
455 }
456
457 // QString type;
458 // if (measureObject.contains("type") && measureObject["type"].isString()) {
459 // type = measureObject["type"].toString();
460 // }
461
462 ControlMeasure *measure = new ControlMeasure();
463 measure->SetCoordinate(sample, line);
464 measure->SetCubeSerialNumber(serialNumber);
465 // measure->SetType(measure->StringToMeasureType(type));
466 lcp->Add(measure);
467 totalMeasures++;
468 }
469 }
470
471 insert(lcp);
472 }
473 }
474 m_numAsynchronousMeasures = totalMeasures - m_numSimultaneousMeasures;
475 }
476
477
489 void LidarData::write(FileName outputFile, LidarData::Format format) {
490 bool sort = false; // Default behavior
491
492 // Set up the output file
493 if (format == Json) {
494 outputFile = outputFile.setExtension("json");
495 }
496 else if (format == Test) {
497 // Format is same as Json, but points are sorted instead of random so that
498 // output can be compared to truth data
499 outputFile = outputFile.setExtension("json");
500 sort = true;
501 }
502 else {
503 outputFile = outputFile.setExtension("dat");
504 }
505 QFile saveFile(outputFile.expanded());
506
507 if (!saveFile.open(QIODevice::WriteOnly)) {
508 QString msg("Could not open " + saveFile.fileName());
509 throw IException(IException::User, msg, _FILEINFO_);
510 }
511
512 // Serialize LidarData
513 QJsonObject lidarDataObject;
514 QJsonArray pointArray;
515 // Serialize the LidarControlPoints it contains
516 foreach (QSharedPointer<LidarControlPoint> lcp, points(sort)) {
517 // Serialize LidarControlPoint
518 QJsonObject pointObject;
519 pointObject["id"] = lcp->GetId();
520 pointObject["range"] = lcp->range();
521 pointObject["sigmaRange"] = lcp->sigmaRange();
522 pointObject["time"] = lcp->time().Et();
523
524 // Serialize the AprioriSurfacePoint
525 SurfacePoint aprioriSurfacePoint = lcp->GetAprioriSurfacePoint();
526 if (aprioriSurfacePoint.Valid()) {
527 pointObject["latitude"] = aprioriSurfacePoint.GetLatitude().planetocentric(Angle::Units::Degrees);
528 pointObject["longitude"] = aprioriSurfacePoint.GetLongitude().positiveEast(Angle::Units::Degrees);
529 pointObject["radius"] = aprioriSurfacePoint.GetLocalRadius().kilometers();
530
531 // Serialize the apriori matrix
532 symmetric_matrix<double, upper> aprioriMatrix = aprioriSurfacePoint.GetSphericalMatrix();
533 QJsonArray aprioriMatrixArray;
534 aprioriMatrixArray += aprioriMatrix(0, 0);
535 aprioriMatrixArray += aprioriMatrix(0, 1);
536 aprioriMatrixArray += aprioriMatrix(0, 2);
537 aprioriMatrixArray += aprioriMatrix(1, 1);
538 aprioriMatrixArray += aprioriMatrix(1, 2);
539 aprioriMatrixArray += aprioriMatrix(2, 2);
540
541 // If the covariance matrix has a value, add it to the PVL point.
542 if ( aprioriMatrix(0, 0) != 0.0
543 || aprioriMatrix(0, 1) != 0.0
544 || aprioriMatrix(0, 2) != 0.0
545 || aprioriMatrix(1, 1) != 0.0
546 || aprioriMatrix(1, 2) != 0.0
547 || aprioriMatrix(2, 2) != 0.0 ) {
548 pointObject["aprioriMatrix"] = aprioriMatrixArray;
549 }
550 }
551
552 // Serialize the AdjustedSurfacePoint
553 SurfacePoint adjustedSurfacePoint = lcp->GetAdjustedSurfacePoint();
554 if (adjustedSurfacePoint.Valid()) {
555 pointObject["adjustedLatitude"] =
556 adjustedSurfacePoint.GetLatitude().planetocentric(Angle::Units::Degrees);
557 pointObject["adjustedLongitude"] =
558 adjustedSurfacePoint.GetLongitude().positiveEast(Angle::Units::Degrees);
559 pointObject["adjustedRadius"] = adjustedSurfacePoint.GetLocalRadius().kilometers();
560
561 // Serialize the adjusted matrix
562 symmetric_matrix<double, upper> adjustedMatrix = adjustedSurfacePoint.GetSphericalMatrix();
563 QJsonArray adjustedMatrixArray;
564 adjustedMatrixArray += adjustedMatrix(0, 0);
565 adjustedMatrixArray += adjustedMatrix(0, 1);
566 adjustedMatrixArray += adjustedMatrix(0, 2);
567 adjustedMatrixArray += adjustedMatrix(1, 1);
568 adjustedMatrixArray += adjustedMatrix(1, 2);
569 adjustedMatrixArray += adjustedMatrix(2, 2);
570
571 // If the covariance matrix has a value, add it to the PVL point.
572 if ( adjustedMatrix(0, 0) != 0.0
573 || adjustedMatrix(0, 1) != 0.0
574 || adjustedMatrix(0, 2) != 0.0
575 || adjustedMatrix(1, 1) != 0.0
576 || adjustedMatrix(1, 2) != 0.0
577 || adjustedMatrix(2, 2) != 0.0 ) {
578 pointObject["adjustedMatrix"] = adjustedMatrixArray;
579 }
580 }
581
582 // Serialize the list of simultaneous images
583 QJsonArray simultaneousArray;
584 foreach (QString sn, lcp->snSimultaneous()) {
585 simultaneousArray.append(sn);
586 }
587 pointObject["simultaneousImages"] = simultaneousArray;
588
589 QJsonArray measureArray;
590 // Serialize the ControlMeasures it contains
591 foreach (ControlMeasure *measure, lcp->getMeasures()) {
592 // Serialize ControlMeasure
593 QJsonObject measureObject;
594 measureObject["line"] = measure->GetLine();
595 measureObject["sample"] = measure->GetSample();
596 measureObject["serialNumber"] = measure->GetCubeSerialNumber();
597 // measureObject["type"] = measure->GetMeasureTypeString();
598 measureArray.append(measureObject);
599
600 }
601 // Add the ControlMeasures to the LidarControlPoint
602 pointObject["measures"] = measureArray;
603
604 pointArray.append(pointObject);
605
606 }
607 // Add the LidarControlPoints to the LidarData
608 lidarDataObject["points"] = pointArray;
609
610 // Write the JSON to the file
611 QJsonDocument lidarDataDoc(lidarDataObject);
612 if (format == Json || format == Test) {
613 saveFile.write(lidarDataDoc.toJson());
614 }
615 else {
616 saveFile.write(lidarDataDoc.toBinaryData());
617 }
618 }
619
628 bool LidarData::ValidateSerialNumber(QString serialNumber) const {
629 return p_cameraMap.contains(serialNumber);
630 }
631
632
641 int LidarData::GetNumberOfValidMeasuresInImage(const QString &serialNumber) {
642 // If SetImage was called, use the map that has been populated with valid measures
643 if (p_cameraList.size() > 0) {
644 return p_cameraValidMeasuresMap[serialNumber];
645 }
646 return GetValidMeasuresInCube(serialNumber).size();
647 }
648
649
656 return p_cameraRejectedMeasuresMap[serialNumber];
657 }
658
664 QList< ControlMeasure * > LidarData::GetValidMeasuresInCube(QString serialNumber) {
665 QList< ControlMeasure * > validMeasures;
666
667 // Get measures in cube will validate this for us, so we don't need to re-check
668 QList< ControlMeasure * > measureList = GetMeasuresInCube(serialNumber);
669
670 foreach(ControlMeasure * measure, measureList) {
671 if (!measure->IsIgnored()) {
672 validMeasures.append(measure);
673 }
674 }
675
676 return validMeasures;
677 }
678
684 QList< ControlMeasure * > LidarData::GetMeasuresInCube(QString serialNumber) {
685 if( !ValidateSerialNumber(serialNumber) ) {
686 IString msg = "Cube Serial Number [" + serialNumber + "] not found in "
687 "the network";
688 throw IException(IException::Programmer, msg, _FILEINFO_);
689
690 }
691 QList< ControlMeasure * > measures;
692 foreach(QSharedPointer <LidarControlPoint> point, m_points) {
693 if (point->HasSerialNumber(serialNumber)) {
694 measures.append(point->GetMeasure(serialNumber));
695 }
696 }
697 return measures;
698 }
699}
@ 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
QString GetCubeSerialNumber() const
Return the serial number of the cube containing the coordinate.
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
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.
Definition Apollo.h:16