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


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

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


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

示例1: unlockPoint

void QnetSetAprioriDialog::unlockPoint(QListWidgetItem *pointId) {

    ControlPoint *pt = m_qnetTool->controlNet()->GetPoint(pointId->text());
    if (pt->IsEditLocked() && pointId->checkState() == Qt::Unchecked) {
        pt->SetEditLock(false);
        editLockPointsListBox->removeItemWidget(pointId);
        pointId->setHidden(true);
        editLockPointsListBox->repaint();
        this->repaint();
        emit netChanged();
    }
}
开发者ID:jlaura,项目名称:isis3,代码行数:12,代码来源:QnetSetAprioriDialog.cpp

示例2: setPoints

/**
 * Set control points in the dialog
 *
 * @param selectedPoints QList<QListWidgetItem *> ControlPoints listed
 *
 * @internal
 * @history 2011-10-03 Tracie Sucharski - Do not enable user Entered Button,
 *                        this will only be enabled if the group box is enabled.
 */
void QnetSetAprioriDialog::setPoints(QList<QListWidgetItem *> selectedPoints) {

    editLockPointsListBox->clear();
    clearLineEdits();

    m_points = selectedPoints;
    if (m_points.size() == 1) {
        fillLineEdits();
    }
    else {
        userEnteredRadioButton->setEnabled(false);
    }

    // Fill editLock List Box
    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()) {
            QListWidgetItem *item = new QListWidgetItem(*(m_points[i]));
            item->setCheckState(Qt::Checked);
            editLockPointsListBox->addItem(item);
        }
    }
}
开发者ID:jlaura,项目名称:isis3,代码行数:33,代码来源:QnetSetAprioriDialog.cpp

示例3: IsisMain


//.........这里部分代码省略.........

      Longitude lon = surfacePoint.GetLongitude();
      Latitude lat = surfacePoint.GetLatitude();

      Coordinate *coord = new Coordinate(lon.degrees(), lat.degrees());
      Envelope *envelope = new Envelope(*coord);
      coordTree.insert(envelope, point);
    }
  }
  else {
    for (int cp = 0; cp < inNet.GetNumPoints(); cp++) {
      pointList.append(inNet.GetPoint(cp));
    }
  }

  // Loop through all the images
  for (int img = 0; img < addList.size(); img++) {
    Cube cube;
    cube.open(addList[img].toString());
    Pvl *cubepvl = cube.label();
    QString sn = SerialNumber::Compose(*cubepvl);
    Camera *cam = cube.camera();

    // Loop through all the control points
    QList<ControlPoint *> validPoints = usePolygon ?
        getValidPoints(cube, coordTree) : pointList;

    bool imageAdded = false;
    for (int cp = 0; cp < validPoints.size(); cp++) {
      ControlPoint *point = validPoints[cp];

      // If the point is locked and Apriori source is "AverageOfMeasures"
      // then do not add the measures.
      if (point->IsEditLocked() &&
          point->GetAprioriSurfacePointSource() ==
              ControlPoint::SurfacePointSource::AverageOfMeasures) {
        continue;
      }

      if (point->HasSerialNumber(sn)) continue;

      // Only use the surface point's latitude and longitude, rely on the DEM
      // for computing the radius.  We do this because otherwise we will receive
      // inconsistent results from successive runs of this program if the
      // different DEMs are used, or the point X, Y, Z was generated from the
      // ellipsoid.
      SurfacePoint surfacePoint = g_surfacePoints[point->GetId()];
      if (cam->SetGround(
              surfacePoint.GetLatitude(), surfacePoint.GetLongitude())) {

        // Make sure the samp & line are inside the image
        if (cam->InCube()) {
          ControlMeasure *newCm = new ControlMeasure();
          newCm->SetCoordinate(cam->Sample(), cam->Line(), ControlMeasure::Candidate);
          newCm->SetAprioriSample(cam->Sample());
          newCm->SetAprioriLine(cam->Line());
          newCm->SetCubeSerialNumber(sn);
          newCm->SetDateTime();
          newCm->SetChooserName("Application cnetadd");

          // Check the measure for DEFFILE validity
          if (checkMeasureValidity) {
            if (!validator.ValidEmissionAngle(cam->EmissionAngle())) {
              //TODO: log that it was Emission Angle that failed the check
              newCm->SetIgnored(true);
            }
开发者ID:corburn,项目名称:ISIS,代码行数:67,代码来源:cnetadd.cpp

示例4: FindCnetRef

  /**
   * FindCnetRef traverses all the control points and measures in the network and checks for
   * valid Measure which passes the Emission Incidence Angle, DN value tests and chooses the
   * measure with the best Resolution criteria as the reference. Creates a new control network
   * with these adjustments.
   *
   * @author Sharmila Prasad (5/25/2010)
   * @history 2010-10-04 Sharmila Prasad - Modified for Binary CNet (Edit Lock)
   *
   * @param pNewNet   - Modified output Control Net
   *
   */
  void CnetRefByResolution::FindCnetRef(ControlNet &pNewNet) {
    // Process each existing control point in the network
    int iPointsModified = 0;
    int iMeasuresModified = 0;
    int iRefChanged = 0;

    //Status Report
    mStatus.SetText("Choosing Reference by Resolution...");
    mStatus.SetMaximumSteps(pNewNet.GetNumPoints());
    mStatus.CheckStatus();

    //mPvlLog += GetStdOptions();
    for (int point = 0; point < pNewNet.GetNumPoints(); ++point) {
      ControlPoint *newPnt = pNewNet.GetPoint(point);
      bool bError = false;
      
      // Create a copy of original control point
      const ControlPoint origPnt(*newPnt);

      mdResVector.clear();

      // Logging
      PvlObject pvlPointObj("PointDetails");
      pvlPointObj += Isis::PvlKeyword("PointId", newPnt->GetId());

      // Edit Lock Option
      bool bPntEditLock = newPnt->IsEditLocked();
      if (!bPntEditLock) {
        newPnt->SetDateTime(Application::DateTime());
      }
      else {
        pvlPointObj += Isis::PvlKeyword("Reference", "No Change, PointEditLock"); 
      }

      int iNumMeasuresLocked = newPnt->GetNumLockedMeasures();
      bool bRefLocked = newPnt->GetRefMeasure()->IsEditLocked();
      int numMeasures = newPnt->GetNumMeasures();
      
      int iRefIndex = -1;
      if (newPnt->IsReferenceExplicit())
        iRefIndex = newPnt->IndexOfRefMeasure();
      QString istrTemp;

      std::vector <PvlGroup> pvlGrpVector;
      int iBestIndex = 0;

      // Only perform the interest operation on points of type "Free" and
      // Points having atleast 1 measure and Point is not Ignored
      // Check for EditLock in the Measures and also verfify that
      // only a Reference Measure can be Locked else error
      if (!newPnt->IsIgnored() && newPnt->GetType() == ControlPoint::Free && numMeasures > 0 &&
          (iNumMeasuresLocked == 0 || (iNumMeasuresLocked > 0 && bRefLocked))) {
        int iNumIgnore = 0;
        QString istrTemp;
        for (int measure = 0; measure < newPnt->GetNumMeasures(); ++measure) {
          ControlMeasure *newMsr = newPnt->GetMeasure(measure);
          bool bMeasureLocked = newMsr->IsEditLocked();
          double dSample      = newMsr->GetSample();
          double dLine        = newMsr->GetLine();
          QString sn      = newMsr->GetCubeSerialNumber();

          if (!bPntEditLock && !bMeasureLocked) {
            newMsr->SetDateTime(Application::DateTime());
            newMsr->SetChooserName("Application cnetref(Resolution)");
          }
         
          // Log
          PvlGroup pvlMeasureGrp("MeasureDetails");
          pvlMeasureGrp += Isis::PvlKeyword("SerialNum", sn);
          pvlMeasureGrp += Isis::PvlKeyword("OriginalLocation", LocationString(dSample, dLine));

          if (bMeasureLocked)
            pvlMeasureGrp += Isis::PvlKeyword("EditLock", "True");

          if (!newMsr->IsIgnored()) {
            Cube *measureCube = mCubeMgr.OpenCube(mSerialNumbers.FileName(sn));
            
            MeasureValidationResults results =
              ValidStandardOptions(newMsr, measureCube, &pvlMeasureGrp);
            if (!results.isValid()) {
              if (bPntEditLock) {
                pvlMeasureGrp += Isis::PvlKeyword("UnIgnored", "Failed Validation Test but not Ignored as Point EditLock is True");
              }
              else if (bMeasureLocked) {
                pvlMeasureGrp += Isis::PvlKeyword("UnIgnored", "Failed Validation Test but not Ignored as Measure EditLock is True");
              }
              else {
                pvlMeasureGrp += Isis::PvlKeyword("Ignored", "Failed Validation Test");
//.........这里部分代码省略.........
开发者ID:corburn,项目名称:ISIS,代码行数:101,代码来源:CnetRefByResolution.cpp

示例5: setApriori

/**
 * Slot to set apriori on selected Points from Navigator list box
 *
 * @author 2011-03-24 Tracie Sucharski
 *
 * @internal
 * @todo  This method should be temporary until the control point editor
 *           comes online.  If this stick around, needs to be re-disigned-
 *           put in a separate class??
 *
 * @history 2011-04-04 Tracie Sucharski - Grey out userEntered if more than
 *                        a single point is selected.  Grey out lat,lon,radius
 *                        edits if UserEntered is not selected.
 * @history 2011-04-13 Tracie Sucharski - If single point selected, fill in
 *                        LineEdit's with current controlPoint values.
 * @history 2011-04-19 Tracie Sucharski - Redesign using modeless dialog.
 * @history 2011-04-26 Tracie Sucharski - Move from QnetNavTool to
 *                        QnetSetAprioriDialog.
 */
void QnetSetAprioriDialog::setApriori() {

    double latSigma = Null;
    double lat = Null;
    double lonSigma = Null;
    double lon = Null;
    double radiusSigma = Null;
    double radius = Null;

    if (latitudeConstraintsGroupBox->isChecked()) {

        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,
//.........这里部分代码省略.........
开发者ID:jlaura,项目名称:isis3,代码行数:101,代码来源:QnetSetAprioriDialog.cpp


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