Loading isis/src/control/objs/ControlPoint/ControlPoint.cpp +131 −66 Original line number Diff line number Diff line Loading @@ -83,9 +83,10 @@ namespace Isis { ControlMeasure *newMeasure = new ControlMeasure(*otherCm); AddMeasure(newMeasure); if (other.referenceMeasure == otherCm) if (other.referenceMeasure == otherCm) { SetRefMeasure(newMeasure); } } id = other.id; chooserName = other.chooserName; Loading Loading @@ -284,8 +285,9 @@ namespace Isis { ValidateMeasure(serialNumber); ControlMeasure *cm = (*measures)[serialNumber]; if (cm->IsEditLocked()) if (cm->IsEditLocked()) { return ControlMeasure::MeasureLocked; } // remove measure from the point's data structures measures->remove(serialNumber); Loading @@ -306,9 +308,10 @@ namespace Isis { if (parentNetwork) { parentNetwork->measureDeleted(cm); if (!IsIgnored() && !cm->IsIgnored()) if (!IsIgnored() && !cm->IsIgnored()) { parentNetwork->emitNetworkStructureModified(); } } delete cm; cm = NULL; Loading Loading @@ -353,8 +356,9 @@ namespace Isis { * @author Sharmila Prasad (10/22/2010) */ ControlPoint::Status ControlPoint::ResetApriori() { if (IsEditLocked()) if (IsEditLocked()) { return PointLocked; } aprioriSurfacePointSource = SurfacePointSource::None; aprioriSurfacePointSourceFile = ""; Loading Loading @@ -458,8 +462,9 @@ namespace Isis { * @param name The username of the person who last modified this control point */ ControlPoint::Status ControlPoint::SetChooserName(QString name) { if (editLock) if (editLock) { return PointLocked; } chooserName = name; return Success; } Loading @@ -474,8 +479,9 @@ namespace Isis { * @param newDateTime The date and time this control point was last modified */ ControlPoint::Status ControlPoint::SetDateTime(QString newDateTime) { if (editLock) if (editLock) { return PointLocked; } dateTime = newDateTime; return Success; } Loading Loading @@ -518,12 +524,14 @@ namespace Isis { * @return (int) status Success or PointLocked */ ControlPoint::Status ControlPoint::SetId(QString newId) { if (editLock) if (editLock) { return PointLocked; } QString oldId = id; id = newId; if (parentNetwork) if (parentNetwork) { parentNetwork->UpdatePointReference(this, oldId); } return Success; } Loading @@ -534,8 +542,9 @@ namespace Isis { * @param cm The new reference measure */ ControlPoint::Status ControlPoint::SetRefMeasure(ControlMeasure *cm) { if (editLock) if (editLock) { return PointLocked; } ASSERT(cm); SetExplicitReference(cm); Loading @@ -549,8 +558,9 @@ namespace Isis { * @param index The index of the new reference measure */ ControlPoint::Status ControlPoint::SetRefMeasure(int index) { if (editLock) if (editLock) { return PointLocked; } if (index < 0 || index >= cubeSerials->size()) { QString msg = "Index ["; Loading @@ -569,8 +579,9 @@ namespace Isis { * @param sn The serial number of the new reference measure */ ControlPoint::Status ControlPoint::SetRefMeasure(QString sn) { if (editLock) if (editLock) { return PointLocked; } if (!cubeSerials->contains(sn)) { QString msg = "Point [" + id + "] has no measure with serial number [" + Loading Loading @@ -614,8 +625,9 @@ namespace Isis { * un-ignore */ ControlPoint::Status ControlPoint::SetIgnored(bool newIgnoreStatus) { if (editLock) if (editLock) { return PointLocked; } bool oldStatus = ignore; ignore = newIgnoreStatus; Loading @@ -626,12 +638,14 @@ namespace Isis { if (parentNetwork) { foreach(ControlMeasure * cm, measures->values()) { if (!cm->IsIgnored()) { if (ignore) if (ignore) { parentNetwork->measureIgnored(cm); else } else { parentNetwork->measureUnIgnored(cm); } } } parentNetwork->emitNetworkStructureModified(); } } Loading Loading @@ -676,8 +690,9 @@ namespace Isis { throw IException(IException::Programmer, msg, _FILEINFO_); } if (editLock) if (editLock) { return PointLocked; } PointModified(); type = newType; return Success; Loading @@ -693,8 +708,9 @@ namespace Isis { */ ControlPoint::Status ControlPoint::SetAprioriRadiusSource( RadiusSource::Source source) { if (editLock) if (editLock) { return PointLocked; } PointModified(); aprioriRadiusSource = source; return Success; Loading @@ -711,8 +727,9 @@ namespace Isis { */ ControlPoint::Status ControlPoint::SetAprioriRadiusSourceFile( QString sourceFile) { if (editLock) if (editLock) { return PointLocked; } PointModified(); aprioriRadiusSourceFile = sourceFile; return Success; Loading @@ -738,8 +755,9 @@ namespace Isis { std::vector<Distance> targetRadii = parentNetwork->GetTargetRadii(); aprioriSurfacePoint.SetRadii(targetRadii[0], targetRadii[1], targetRadii[2]); } if (editLock) if (editLock) { return PointLocked; } if (aprioriSP.GetLatSigma().isValid()) { constraintStatus.set(LatitudeConstrained); } Loading @@ -764,8 +782,9 @@ namespace Isis { */ ControlPoint::Status ControlPoint::SetAprioriSurfacePointSource( SurfacePointSource::Source source) { if (editLock) if (editLock) { return PointLocked; } PointModified(); aprioriSurfacePointSource = source; return Success; Loading @@ -781,8 +800,9 @@ namespace Isis { */ ControlPoint::Status ControlPoint::SetAprioriSurfacePointSourceFile( QString sourceFile) { if (editLock) if (editLock) { return PointLocked; } PointModified(); aprioriSurfacePointSourceFile = sourceFile; return Success; Loading Loading @@ -880,8 +900,9 @@ namespace Isis { else { // JAA: Don't stop if we know the lat/lon. The SetImage may fail // but the FocalPlane measures have been set if (GetType() == Fixed) if (GetType() == Fixed) { continue; } // TODO: What do we do // QString msg = "Cannot compute lat/lon/radius (x/y/z) for " Loading Loading @@ -977,8 +998,9 @@ namespace Isis { * duplication of code */ ControlPoint::Status ControlPoint::ComputeResiduals() { if (IsIgnored()) if (IsIgnored()) { return Failure; } PointModified(); Loading @@ -987,11 +1009,12 @@ namespace Isis { for (int j = 0; j < keys.size(); j++) { ControlMeasure *m = (*measures)[keys[j]]; if (m->IsIgnored()) if (m->IsIgnored()) { continue; } // The following lines actually check for Candidate measures // Commented out on 2011-03-24 by DAC // if (!m->IsMeasured()) // if (!m->IsMeasured()) { // continue; // TODO: Should we use crater diameter? Loading Loading @@ -1046,10 +1069,12 @@ namespace Isis { double adjLine; // Step 1. What happens if measured line is 1??? TODO if (computedY < 0) if (computedY < 0) { adjLine = m->GetLine() - 1.; else } else { adjLine = m->GetLine() + 1.; } cam->SetImage(sample, adjLine); SurfacePoint sp = cam->GetSurfacePoint(); Loading @@ -1063,10 +1088,12 @@ namespace Isis { cam->GroundMap()->GetXY(sp, &focalplaneX, &scalingY); double deltaLine; if (computedY < 0) if (computedY < 0) { deltaLine = -computedY/scalingY; else } else { deltaLine = computedY/scalingY; } // Now map through the camera steps to take X from slant range to ground // range to pixels. Y just tracks through as 0. Loading Loading @@ -1129,8 +1156,9 @@ namespace Isis { */ ControlPoint::Status ControlPoint::ComputeResiduals_Millimeters() { if (IsIgnored()) if (IsIgnored()) { return Failure; } PointModified(); Loading @@ -1139,11 +1167,12 @@ namespace Isis { for (int j = 0; j < keys.size(); j++) { ControlMeasure *m = (*measures)[keys[j]]; if (m->IsIgnored()) if (m->IsIgnored()) { continue; } // The following lines actually check for Candidate measures // Commented out on 2011-03-24 by DAC // if (!m->IsMeasured()) // if (!m->IsMeasured()) { // continue; // TODO: Should we use crater diameter? Loading @@ -1157,8 +1186,9 @@ namespace Isis { // going to distorted focal plane or ground range in this case), so we // can hold the Spice to calculate residuals in undistorted focal plane // coordinates. if (cam->GetCameraType() != 0) // no need to call setimage for framing camera if (cam->GetCameraType() != 0) { // no need to call setimage for framing camera cam->SetImage(m->GetSample(), m->GetLine()); } cam->GroundMap()->GetXY(GetAdjustedSurfacePoint(), &cudx, &cudy); // double mudx = m->GetFocalPlaneMeasuredX(); Loading Loading @@ -1213,11 +1243,13 @@ namespace Isis { * the a priori surface point. */ SurfacePoint ControlPoint::GetBestSurfacePoint() const { if (adjustedSurfacePoint.Valid()) if (adjustedSurfacePoint.Valid()) { return adjustedSurfacePoint; else } else { return aprioriSurfacePoint; } } /** Loading Loading @@ -1289,14 +1321,18 @@ namespace Isis { errMsg += pointTypeString; errMsg += "\"."; if (pointTypeString == "Fixed") if (pointTypeString == "Fixed") { type = ControlPoint::Fixed; else if (pointTypeString == "Constrained") } else if (pointTypeString == "Constrained") { type = ControlPoint::Constrained; else if (pointTypeString == "Free") } else if (pointTypeString == "Free") { type = ControlPoint::Free; else } else { throw IException(IException::Programmer, errMsg, _FILEINFO_); } return type; } Loading Loading @@ -1369,16 +1405,21 @@ namespace Isis { str = str.toLower(); RadiusSource::Source source = RadiusSource::None; if (str == "user") if (str == "user") { source = RadiusSource::User; else if (str == "averageofmeasures") } else if (str == "averageofmeasures") { source = RadiusSource::AverageOfMeasures; else if (str == "ellipsoid") } else if (str == "ellipsoid") { source = RadiusSource::Ellipsoid; else if (str == "dem") } else if (str == "dem") { source = RadiusSource::DEM; else if (str == "bundlesolution") } else if (str == "bundlesolution") { source = RadiusSource::BundleSolution; } return source; } Loading Loading @@ -1446,16 +1487,21 @@ namespace Isis { str = str.toLower(); SurfacePointSource::Source source = SurfacePointSource::None; if (str == "user") if (str == "user") { source = SurfacePointSource::User; else if (str == "averageofmeasures") } else if (str == "averageofmeasures") { source = SurfacePointSource::AverageOfMeasures; else if (str == "reference") } else if (str == "reference") { source = SurfacePointSource::Reference; else if (str == "basemap") } else if (str == "basemap") { source = SurfacePointSource::Basemap; else if (str == "bundlesolution") } else if (str == "bundlesolution") { source = SurfacePointSource::BundleSolution; } return source; } Loading Loading @@ -1490,8 +1536,9 @@ namespace Isis { bool ControlPoint::HasAprioriCoordinates() { if (aprioriSurfacePoint.GetX().isValid() && aprioriSurfacePoint.GetY().isValid() && aprioriSurfacePoint.GetZ().isValid()) aprioriSurfacePoint.GetZ().isValid()) { return true; } return false; // return aprioriSurfacePoint.Valid(); ??? Loading Loading @@ -1567,9 +1614,10 @@ namespace Isis { int size = 0; QList<QString> keys = measures->keys(); for (int cm = 0; cm < keys.size(); cm++) { if (!(*measures)[keys[cm]]->IsIgnored()) if (!(*measures)[keys[cm]]->IsIgnored()) { size++; } } return size; } Loading @@ -1583,9 +1631,10 @@ namespace Isis { int size = 0; QList<QString> keys = measures->keys(); for (int cm = 0; cm < keys.size(); cm++) { if ((*measures)[keys[cm]]->IsEditLocked()) if ((*measures)[keys[cm]]->IsEditLocked()) { size++; } } return size; } Loading Loading @@ -1696,9 +1745,10 @@ namespace Isis { double(ControlMeasure::*statFunc)() const) const { Statistics stats; foreach(ControlMeasure * cm, *measures) { if (!cm->IsIgnored()) if (!cm->IsIgnored()) { stats.AddData((cm->*statFunc)()); } } return stats; } Loading @@ -1707,9 +1757,10 @@ namespace Isis { Statistics ControlPoint::GetStatistic(long dataType) const { Statistics stats; foreach(ControlMeasure * cm, *measures) { if (!cm->IsIgnored()) if (!cm->IsIgnored()) { stats.AddData(cm->GetLogData(dataType).GetNumericalValue()); } } return stats; } Loading @@ -1726,9 +1777,10 @@ namespace Isis { QList< ControlMeasure * > orderedMeasures; for (int i = 0; i < cubeSerials->size(); i++) { ControlMeasure *measure = measures->value((*cubeSerials)[i]); if (!excludeIgnored || !measure->IsIgnored()) if (!excludeIgnored || !measure->IsIgnored()) { orderedMeasures.append(measures->value((*cubeSerials)[i])); } } return orderedMeasures; } Loading Loading @@ -1869,9 +1921,10 @@ namespace Isis { ControlMeasure *newMeasure = new ControlMeasure; *newMeasure = *i.value(); AddMeasure(newMeasure); if (other.referenceMeasure == i.value()) if (other.referenceMeasure == i.value()) { SetRefMeasure(newMeasure); } } id = other.id; chooserName = other.chooserName; Loading Loading @@ -1938,18 +1991,21 @@ namespace Isis { */ double ControlPoint::GetSampleResidualRms() const { int nmeasures = measures->size(); if( nmeasures <= 0 ) if ( nmeasures <= 0 ) { return 0.0; } Statistics stats; for( int i = 0; i < nmeasures; i++) { const ControlMeasure* m = GetMeasure(i); if( !m ) if ( !m ) { continue; } if( !m->IsIgnored() || m->IsRejected() ) if ( !m->IsIgnored() || m->IsRejected() ) { continue; } stats.AddData(m->GetSampleResidual()); } Loading @@ -1966,18 +2022,21 @@ namespace Isis { */ double ControlPoint::GetLineResidualRms() const { int nmeasures = measures->size(); if( nmeasures <= 0 ) if ( nmeasures <= 0 ) { return 0.0; } Statistics stats; for( int i = 0; i < nmeasures; i++) { const ControlMeasure* m = GetMeasure(i); if( !m ) if ( !m ) { continue; } if( !m->IsIgnored() || m->IsRejected() ) if ( !m->IsIgnored() || m->IsRejected() ) { continue; } stats.AddData(m->GetLineResidual()); } Loading @@ -1994,18 +2053,21 @@ namespace Isis { */ double ControlPoint::GetResidualRms() const { int nmeasures = measures->size(); if( nmeasures <= 0 ) if ( nmeasures <= 0 ) { return 0.0; } Statistics stats; for( int i = 0; i < nmeasures; i++) { const ControlMeasure* m = GetMeasure(i); if( !m ) if ( !m ) { continue; } if( m->IsIgnored() || m->IsRejected() ) if ( m->IsIgnored() || m->IsRejected() ) { continue; } stats.AddData(m->GetSampleResidual()); stats.AddData(m->GetLineResidual()); Loading @@ -2020,17 +2082,20 @@ namespace Isis { */ void ControlPoint::ClearJigsawRejected() { int nmeasures = measures->size(); if( nmeasures <= 0 ) if ( nmeasures <= 0 ) { return; } for( int i = 0; i < nmeasures; i++) { ControlMeasure* m = GetMeasure(i); if( !m ) if ( !m ) { continue; } m->SetRejected(false); } SetRejected(false); } } Loading
isis/src/control/objs/ControlPoint/ControlPoint.cpp +131 −66 Original line number Diff line number Diff line Loading @@ -83,9 +83,10 @@ namespace Isis { ControlMeasure *newMeasure = new ControlMeasure(*otherCm); AddMeasure(newMeasure); if (other.referenceMeasure == otherCm) if (other.referenceMeasure == otherCm) { SetRefMeasure(newMeasure); } } id = other.id; chooserName = other.chooserName; Loading Loading @@ -284,8 +285,9 @@ namespace Isis { ValidateMeasure(serialNumber); ControlMeasure *cm = (*measures)[serialNumber]; if (cm->IsEditLocked()) if (cm->IsEditLocked()) { return ControlMeasure::MeasureLocked; } // remove measure from the point's data structures measures->remove(serialNumber); Loading @@ -306,9 +308,10 @@ namespace Isis { if (parentNetwork) { parentNetwork->measureDeleted(cm); if (!IsIgnored() && !cm->IsIgnored()) if (!IsIgnored() && !cm->IsIgnored()) { parentNetwork->emitNetworkStructureModified(); } } delete cm; cm = NULL; Loading Loading @@ -353,8 +356,9 @@ namespace Isis { * @author Sharmila Prasad (10/22/2010) */ ControlPoint::Status ControlPoint::ResetApriori() { if (IsEditLocked()) if (IsEditLocked()) { return PointLocked; } aprioriSurfacePointSource = SurfacePointSource::None; aprioriSurfacePointSourceFile = ""; Loading Loading @@ -458,8 +462,9 @@ namespace Isis { * @param name The username of the person who last modified this control point */ ControlPoint::Status ControlPoint::SetChooserName(QString name) { if (editLock) if (editLock) { return PointLocked; } chooserName = name; return Success; } Loading @@ -474,8 +479,9 @@ namespace Isis { * @param newDateTime The date and time this control point was last modified */ ControlPoint::Status ControlPoint::SetDateTime(QString newDateTime) { if (editLock) if (editLock) { return PointLocked; } dateTime = newDateTime; return Success; } Loading Loading @@ -518,12 +524,14 @@ namespace Isis { * @return (int) status Success or PointLocked */ ControlPoint::Status ControlPoint::SetId(QString newId) { if (editLock) if (editLock) { return PointLocked; } QString oldId = id; id = newId; if (parentNetwork) if (parentNetwork) { parentNetwork->UpdatePointReference(this, oldId); } return Success; } Loading @@ -534,8 +542,9 @@ namespace Isis { * @param cm The new reference measure */ ControlPoint::Status ControlPoint::SetRefMeasure(ControlMeasure *cm) { if (editLock) if (editLock) { return PointLocked; } ASSERT(cm); SetExplicitReference(cm); Loading @@ -549,8 +558,9 @@ namespace Isis { * @param index The index of the new reference measure */ ControlPoint::Status ControlPoint::SetRefMeasure(int index) { if (editLock) if (editLock) { return PointLocked; } if (index < 0 || index >= cubeSerials->size()) { QString msg = "Index ["; Loading @@ -569,8 +579,9 @@ namespace Isis { * @param sn The serial number of the new reference measure */ ControlPoint::Status ControlPoint::SetRefMeasure(QString sn) { if (editLock) if (editLock) { return PointLocked; } if (!cubeSerials->contains(sn)) { QString msg = "Point [" + id + "] has no measure with serial number [" + Loading Loading @@ -614,8 +625,9 @@ namespace Isis { * un-ignore */ ControlPoint::Status ControlPoint::SetIgnored(bool newIgnoreStatus) { if (editLock) if (editLock) { return PointLocked; } bool oldStatus = ignore; ignore = newIgnoreStatus; Loading @@ -626,12 +638,14 @@ namespace Isis { if (parentNetwork) { foreach(ControlMeasure * cm, measures->values()) { if (!cm->IsIgnored()) { if (ignore) if (ignore) { parentNetwork->measureIgnored(cm); else } else { parentNetwork->measureUnIgnored(cm); } } } parentNetwork->emitNetworkStructureModified(); } } Loading Loading @@ -676,8 +690,9 @@ namespace Isis { throw IException(IException::Programmer, msg, _FILEINFO_); } if (editLock) if (editLock) { return PointLocked; } PointModified(); type = newType; return Success; Loading @@ -693,8 +708,9 @@ namespace Isis { */ ControlPoint::Status ControlPoint::SetAprioriRadiusSource( RadiusSource::Source source) { if (editLock) if (editLock) { return PointLocked; } PointModified(); aprioriRadiusSource = source; return Success; Loading @@ -711,8 +727,9 @@ namespace Isis { */ ControlPoint::Status ControlPoint::SetAprioriRadiusSourceFile( QString sourceFile) { if (editLock) if (editLock) { return PointLocked; } PointModified(); aprioriRadiusSourceFile = sourceFile; return Success; Loading @@ -738,8 +755,9 @@ namespace Isis { std::vector<Distance> targetRadii = parentNetwork->GetTargetRadii(); aprioriSurfacePoint.SetRadii(targetRadii[0], targetRadii[1], targetRadii[2]); } if (editLock) if (editLock) { return PointLocked; } if (aprioriSP.GetLatSigma().isValid()) { constraintStatus.set(LatitudeConstrained); } Loading @@ -764,8 +782,9 @@ namespace Isis { */ ControlPoint::Status ControlPoint::SetAprioriSurfacePointSource( SurfacePointSource::Source source) { if (editLock) if (editLock) { return PointLocked; } PointModified(); aprioriSurfacePointSource = source; return Success; Loading @@ -781,8 +800,9 @@ namespace Isis { */ ControlPoint::Status ControlPoint::SetAprioriSurfacePointSourceFile( QString sourceFile) { if (editLock) if (editLock) { return PointLocked; } PointModified(); aprioriSurfacePointSourceFile = sourceFile; return Success; Loading Loading @@ -880,8 +900,9 @@ namespace Isis { else { // JAA: Don't stop if we know the lat/lon. The SetImage may fail // but the FocalPlane measures have been set if (GetType() == Fixed) if (GetType() == Fixed) { continue; } // TODO: What do we do // QString msg = "Cannot compute lat/lon/radius (x/y/z) for " Loading Loading @@ -977,8 +998,9 @@ namespace Isis { * duplication of code */ ControlPoint::Status ControlPoint::ComputeResiduals() { if (IsIgnored()) if (IsIgnored()) { return Failure; } PointModified(); Loading @@ -987,11 +1009,12 @@ namespace Isis { for (int j = 0; j < keys.size(); j++) { ControlMeasure *m = (*measures)[keys[j]]; if (m->IsIgnored()) if (m->IsIgnored()) { continue; } // The following lines actually check for Candidate measures // Commented out on 2011-03-24 by DAC // if (!m->IsMeasured()) // if (!m->IsMeasured()) { // continue; // TODO: Should we use crater diameter? Loading Loading @@ -1046,10 +1069,12 @@ namespace Isis { double adjLine; // Step 1. What happens if measured line is 1??? TODO if (computedY < 0) if (computedY < 0) { adjLine = m->GetLine() - 1.; else } else { adjLine = m->GetLine() + 1.; } cam->SetImage(sample, adjLine); SurfacePoint sp = cam->GetSurfacePoint(); Loading @@ -1063,10 +1088,12 @@ namespace Isis { cam->GroundMap()->GetXY(sp, &focalplaneX, &scalingY); double deltaLine; if (computedY < 0) if (computedY < 0) { deltaLine = -computedY/scalingY; else } else { deltaLine = computedY/scalingY; } // Now map through the camera steps to take X from slant range to ground // range to pixels. Y just tracks through as 0. Loading Loading @@ -1129,8 +1156,9 @@ namespace Isis { */ ControlPoint::Status ControlPoint::ComputeResiduals_Millimeters() { if (IsIgnored()) if (IsIgnored()) { return Failure; } PointModified(); Loading @@ -1139,11 +1167,12 @@ namespace Isis { for (int j = 0; j < keys.size(); j++) { ControlMeasure *m = (*measures)[keys[j]]; if (m->IsIgnored()) if (m->IsIgnored()) { continue; } // The following lines actually check for Candidate measures // Commented out on 2011-03-24 by DAC // if (!m->IsMeasured()) // if (!m->IsMeasured()) { // continue; // TODO: Should we use crater diameter? Loading @@ -1157,8 +1186,9 @@ namespace Isis { // going to distorted focal plane or ground range in this case), so we // can hold the Spice to calculate residuals in undistorted focal plane // coordinates. if (cam->GetCameraType() != 0) // no need to call setimage for framing camera if (cam->GetCameraType() != 0) { // no need to call setimage for framing camera cam->SetImage(m->GetSample(), m->GetLine()); } cam->GroundMap()->GetXY(GetAdjustedSurfacePoint(), &cudx, &cudy); // double mudx = m->GetFocalPlaneMeasuredX(); Loading Loading @@ -1213,11 +1243,13 @@ namespace Isis { * the a priori surface point. */ SurfacePoint ControlPoint::GetBestSurfacePoint() const { if (adjustedSurfacePoint.Valid()) if (adjustedSurfacePoint.Valid()) { return adjustedSurfacePoint; else } else { return aprioriSurfacePoint; } } /** Loading Loading @@ -1289,14 +1321,18 @@ namespace Isis { errMsg += pointTypeString; errMsg += "\"."; if (pointTypeString == "Fixed") if (pointTypeString == "Fixed") { type = ControlPoint::Fixed; else if (pointTypeString == "Constrained") } else if (pointTypeString == "Constrained") { type = ControlPoint::Constrained; else if (pointTypeString == "Free") } else if (pointTypeString == "Free") { type = ControlPoint::Free; else } else { throw IException(IException::Programmer, errMsg, _FILEINFO_); } return type; } Loading Loading @@ -1369,16 +1405,21 @@ namespace Isis { str = str.toLower(); RadiusSource::Source source = RadiusSource::None; if (str == "user") if (str == "user") { source = RadiusSource::User; else if (str == "averageofmeasures") } else if (str == "averageofmeasures") { source = RadiusSource::AverageOfMeasures; else if (str == "ellipsoid") } else if (str == "ellipsoid") { source = RadiusSource::Ellipsoid; else if (str == "dem") } else if (str == "dem") { source = RadiusSource::DEM; else if (str == "bundlesolution") } else if (str == "bundlesolution") { source = RadiusSource::BundleSolution; } return source; } Loading Loading @@ -1446,16 +1487,21 @@ namespace Isis { str = str.toLower(); SurfacePointSource::Source source = SurfacePointSource::None; if (str == "user") if (str == "user") { source = SurfacePointSource::User; else if (str == "averageofmeasures") } else if (str == "averageofmeasures") { source = SurfacePointSource::AverageOfMeasures; else if (str == "reference") } else if (str == "reference") { source = SurfacePointSource::Reference; else if (str == "basemap") } else if (str == "basemap") { source = SurfacePointSource::Basemap; else if (str == "bundlesolution") } else if (str == "bundlesolution") { source = SurfacePointSource::BundleSolution; } return source; } Loading Loading @@ -1490,8 +1536,9 @@ namespace Isis { bool ControlPoint::HasAprioriCoordinates() { if (aprioriSurfacePoint.GetX().isValid() && aprioriSurfacePoint.GetY().isValid() && aprioriSurfacePoint.GetZ().isValid()) aprioriSurfacePoint.GetZ().isValid()) { return true; } return false; // return aprioriSurfacePoint.Valid(); ??? Loading Loading @@ -1567,9 +1614,10 @@ namespace Isis { int size = 0; QList<QString> keys = measures->keys(); for (int cm = 0; cm < keys.size(); cm++) { if (!(*measures)[keys[cm]]->IsIgnored()) if (!(*measures)[keys[cm]]->IsIgnored()) { size++; } } return size; } Loading @@ -1583,9 +1631,10 @@ namespace Isis { int size = 0; QList<QString> keys = measures->keys(); for (int cm = 0; cm < keys.size(); cm++) { if ((*measures)[keys[cm]]->IsEditLocked()) if ((*measures)[keys[cm]]->IsEditLocked()) { size++; } } return size; } Loading Loading @@ -1696,9 +1745,10 @@ namespace Isis { double(ControlMeasure::*statFunc)() const) const { Statistics stats; foreach(ControlMeasure * cm, *measures) { if (!cm->IsIgnored()) if (!cm->IsIgnored()) { stats.AddData((cm->*statFunc)()); } } return stats; } Loading @@ -1707,9 +1757,10 @@ namespace Isis { Statistics ControlPoint::GetStatistic(long dataType) const { Statistics stats; foreach(ControlMeasure * cm, *measures) { if (!cm->IsIgnored()) if (!cm->IsIgnored()) { stats.AddData(cm->GetLogData(dataType).GetNumericalValue()); } } return stats; } Loading @@ -1726,9 +1777,10 @@ namespace Isis { QList< ControlMeasure * > orderedMeasures; for (int i = 0; i < cubeSerials->size(); i++) { ControlMeasure *measure = measures->value((*cubeSerials)[i]); if (!excludeIgnored || !measure->IsIgnored()) if (!excludeIgnored || !measure->IsIgnored()) { orderedMeasures.append(measures->value((*cubeSerials)[i])); } } return orderedMeasures; } Loading Loading @@ -1869,9 +1921,10 @@ namespace Isis { ControlMeasure *newMeasure = new ControlMeasure; *newMeasure = *i.value(); AddMeasure(newMeasure); if (other.referenceMeasure == i.value()) if (other.referenceMeasure == i.value()) { SetRefMeasure(newMeasure); } } id = other.id; chooserName = other.chooserName; Loading Loading @@ -1938,18 +1991,21 @@ namespace Isis { */ double ControlPoint::GetSampleResidualRms() const { int nmeasures = measures->size(); if( nmeasures <= 0 ) if ( nmeasures <= 0 ) { return 0.0; } Statistics stats; for( int i = 0; i < nmeasures; i++) { const ControlMeasure* m = GetMeasure(i); if( !m ) if ( !m ) { continue; } if( !m->IsIgnored() || m->IsRejected() ) if ( !m->IsIgnored() || m->IsRejected() ) { continue; } stats.AddData(m->GetSampleResidual()); } Loading @@ -1966,18 +2022,21 @@ namespace Isis { */ double ControlPoint::GetLineResidualRms() const { int nmeasures = measures->size(); if( nmeasures <= 0 ) if ( nmeasures <= 0 ) { return 0.0; } Statistics stats; for( int i = 0; i < nmeasures; i++) { const ControlMeasure* m = GetMeasure(i); if( !m ) if ( !m ) { continue; } if( !m->IsIgnored() || m->IsRejected() ) if ( !m->IsIgnored() || m->IsRejected() ) { continue; } stats.AddData(m->GetLineResidual()); } Loading @@ -1994,18 +2053,21 @@ namespace Isis { */ double ControlPoint::GetResidualRms() const { int nmeasures = measures->size(); if( nmeasures <= 0 ) if ( nmeasures <= 0 ) { return 0.0; } Statistics stats; for( int i = 0; i < nmeasures; i++) { const ControlMeasure* m = GetMeasure(i); if( !m ) if ( !m ) { continue; } if( m->IsIgnored() || m->IsRejected() ) if ( m->IsIgnored() || m->IsRejected() ) { continue; } stats.AddData(m->GetSampleResidual()); stats.AddData(m->GetLineResidual()); Loading @@ -2020,17 +2082,20 @@ namespace Isis { */ void ControlPoint::ClearJigsawRejected() { int nmeasures = measures->size(); if( nmeasures <= 0 ) if ( nmeasures <= 0 ) { return; } for( int i = 0; i < nmeasures; i++) { ControlMeasure* m = GetMeasure(i); if( !m ) if ( !m ) { continue; } m->SetRejected(false); } SetRejected(false); } }