本文整理汇总了C++中ControlPoint::GetType方法的典型用法代码示例。如果您正苦于以下问题:C++ ControlPoint::GetType方法的具体用法?C++ ControlPoint::GetType怎么用?C++ ControlPoint::GetType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ControlPoint
的用法示例。
在下文中一共展示了ControlPoint::GetType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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");
//.........这里部分代码省略.........