当前位置: 首页>>代码示例>>C++>>正文


C++ ControlPoint::GetAprioriSurfacePoint方法代码示例

本文整理汇总了C++中ControlPoint::GetAprioriSurfacePoint方法的典型用法代码示例。如果您正苦于以下问题:C++ ControlPoint::GetAprioriSurfacePoint方法的具体用法?C++ ControlPoint::GetAprioriSurfacePoint怎么用?C++ ControlPoint::GetAprioriSurfacePoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ControlPoint的用法示例。


在下文中一共展示了ControlPoint::GetAprioriSurfacePoint方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: fillLineEdits

void QnetSetAprioriDialog::fillLineEdits() {

    QString id = m_points.at(0)->text();
    ControlPoint *pt = m_qnetTool->controlNet()->GetPoint(id);
    SurfacePoint sPt = pt->GetAprioriSurfacePoint();
    vector<Distance> targetRadii = m_qnetTool->controlNet()->GetTargetRadii();
    sPt.SetRadii(Distance(targetRadii[0]),
                 Distance(targetRadii[1]),
                 Distance(targetRadii[2]));
    if (sPt.GetLatitude().degrees() != Null) {
        aprioriLatEdit->setText(
            QString::number(sPt.GetLatitude().degrees()));
    }
    if (sPt.GetLatSigmaDistance().meters() != Null) {
        latSigmaEdit->setText(
            QString::number(sPt.GetLatSigmaDistance().meters()));
    }
    if (sPt.GetLongitude().degrees() != Null) {
        aprioriLonEdit->setText(
            QString::number(sPt.GetLongitude().degrees()));
    }
    if (sPt.GetLonSigmaDistance().meters() != Null) {
        lonSigmaEdit->setText(
            QString::number(sPt.GetLonSigmaDistance().meters()));
    }
    if (sPt.GetLocalRadius().meters() != Null) {
        aprioriRadiusEdit->setText(
            QString::number(sPt.GetLocalRadius().meters()));
    }
    if (sPt.GetLocalRadiusSigma().meters() != Null) {
        radiusSigmaEdit->setText(
            QString::number(sPt.GetLocalRadiusSigma().meters()));
    }
}
开发者ID:jlaura,项目名称:isis3,代码行数:34,代码来源:QnetSetAprioriDialog.cpp

示例2: setApriori


//.........这里部分代码省略.........
        if (userEnteredRadioButton->isChecked() && aprioriLatEdit->text() != "") {
            lat = aprioriLatEdit->text().toDouble();
        }
        if (latSigmaEdit->text() != "") {
            latSigma = latSigmaEdit->text().toDouble();
        }
    }
    if (longitudeConstraintsGroupBox->isChecked()) {

        if (userEnteredRadioButton->isChecked() && aprioriLonEdit->text() != "") {
            lon = aprioriLonEdit->text().toDouble();
        }
        if (lonSigmaEdit->text() != "") {
            lonSigma = lonSigmaEdit->text().toDouble();
        }
    }

    if (radiusConstraintsGroupBox->isChecked()) {

        if (userEnteredRadioButton->isChecked() && aprioriRadiusEdit->text() != "") {
            radius = aprioriRadiusEdit->text().toDouble();
        }
        if (radiusSigmaEdit->text() != "") {
            radiusSigma = radiusSigmaEdit->text().toDouble();
        }
    }

    //  If the SetAprioriPoint group box selected, set aprioriSurfacePoint for
    //  those points not editLocked.
    for (int i = 0; i < m_points.size(); i++) {
        QString id = m_points.at(i)->text();
        ControlPoint *pt = m_qnetTool->controlNet()->GetPoint(id);
        if (pt->IsEditLocked()) continue;

        if (!pt->HasAprioriCoordinates()) {
            QString msg = "Point [" + id + "] does not have an Apriori coordinate.  "
                          "Make sure to save the ground source measurement then the Point before "
                          "setting the sigmas.  The sigmas for this point will not be set.";
            QMessageBox::warning((QWidget *)parent(), "Warning", msg);
            continue;
        }

        if (pointSourceGroupBox->isChecked()) {
            if (referenceMeasureRadioButton->isChecked()) {
                ControlMeasure *m = pt->GetRefMeasure();
                // Find camera from network camera list
                int camIndex = m_qnetTool->serialNumberList()->SerialNumberIndex(
                                   m->GetCubeSerialNumber());
                Camera *cam = m_qnetTool->controlNet()->Camera(camIndex);
                cam->SetImage(m->GetSample(),m->GetLine());
                pt->SetAprioriSurfacePoint(cam->GetSurfacePoint());
                pt->SetAprioriSurfacePointSource(ControlPoint::SurfacePointSource::Reference);
            }
            else if (averageMeasuresRadioButton->isChecked()) {
                pt->ComputeApriori();
                // Do not need to set AprioriSurfacePointSource or AprioriRadiusSource,
                // ComputeApriori does this for us.
            }
            else if (userEnteredRadioButton->isChecked()) {
                pt->SetAprioriSurfacePoint(SurfacePoint(
                                               Latitude(lat, Angle::Degrees),
                                               Longitude(lon, Angle::Degrees),
                                               Distance(radius,Distance::Meters)));
                pt->SetAprioriSurfacePointSource(ControlPoint::SurfacePointSource::User);
                pt->SetAprioriRadiusSource(ControlPoint::RadiusSource::User);
            }
        }

        try {
            //  Read Surface point from the control point and set the sigmas,
            //  first set the target radii
            SurfacePoint spt = pt->GetAprioriSurfacePoint();
            vector<Distance> targetRadii = m_qnetTool->controlNet()->GetTargetRadii();
            spt.SetRadii(Distance(targetRadii[0]),
                         Distance(targetRadii[1]),
                         Distance(targetRadii[2]));
            spt.SetSphericalSigmasDistance(Distance(latSigma,Distance::Meters),
                                           Distance(lonSigma,Distance::Meters),
                                           Distance(radiusSigma,Distance::Meters));
            //  Write the surface point back out to the controlPoint
            pt->SetAprioriSurfacePoint(spt);
            //  TODO:  Is the following line necessary, should error be thrown
            //  for free or fixed pts?
            //pt->SetType(ControlPoint::Constrained);
            emit pointChanged(id);
            emit netChanged();
        }
        catch (IException &e)  {
            QString message = "Error setting sigmas. \n";
            message += e.toString();
            QMessageBox::critical((QWidget *)parent(),"Error",message);
            QApplication::restoreOverrideCursor();
            // Sigmas failed, but surface pt coordinate was set
            emit pointChanged(id);
            emit netChanged();
            return;
        }
    }

}
开发者ID:jlaura,项目名称:isis3,代码行数:101,代码来源:QnetSetAprioriDialog.cpp


注:本文中的ControlPoint::GetAprioriSurfacePoint方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。