Loading isis/src/apollo/apps/apollo2isis/main.cpp +12 −12 Original line number Diff line number Diff line Loading @@ -60,7 +60,7 @@ void IsisMain() { apollo = new Apollo(filename); utcTime = (QString)pdsLabel["START_TIME"]; utcTime = QString::fromStdString(pdsLabel["START_TIME"]); // Setup the output cube attributes for a 16-bit unsigned tiff Isis::CubeAttributeOutput cao; Loading Loading @@ -231,9 +231,9 @@ void TranslateApolloLabels (IString filename, Cube *opack) { PvlGroup kern("Kernels"); PvlGroup codeGroup("Code"); inst += PvlKeyword("SpacecraftName", apollo->SpacecraftName()); inst += PvlKeyword("InstrumentId", apollo->InstrumentId()); inst += PvlKeyword("TargetName", apollo->TargetName()); inst += PvlKeyword("SpacecraftName", apollo->SpacecraftName().toStdString()); inst += PvlKeyword("InstrumentId", apollo->InstrumentId().toStdString()); inst += PvlKeyword("TargetName", apollo->TargetName().toStdString()); if ( !IsValidCode() ){ PvlGroup error("ERROR"); Loading @@ -249,12 +249,12 @@ void TranslateApolloLabels (IString filename, Cube *opack) { Application::Log(error); } else { codeGroup += PvlKeyword("StartTime", FrameTime()); codeGroup += PvlKeyword("StartTime", FrameTime().toStdString()); codeGroup += PvlKeyword("SpacecraftAltitude", std::to_string(Altitude()),"meters"); if (apollo->IsMetric()){ codeGroup += PvlKeyword("ExposureDuration", std::to_string(ShutterInterval()), "milliseconds"); codeGroup += PvlKeyword("ForwardMotionCompensation", FMC()); codeGroup += PvlKeyword("ForwardMotionCompensation", FMC().toStdString()); } for (int i=0; i<4; i++) { Loading @@ -272,20 +272,20 @@ void TranslateApolloLabels (IString filename, Cube *opack) { bandBin += PvlKeyword("FilterName", "CLEAR"); bandBin += PvlKeyword("FilterId", "1"); kern += PvlKeyword("NaifFrameCode", apollo->NaifFrameCode()); kern += PvlKeyword("NaifFrameCode", apollo->NaifFrameCode().toStdString()); // Set up the nominal reseaus group Isis::PvlGroup &dataDir = Isis::Preference::Preferences().findGroup("DataDirectory"); Process p; PvlTranslationTable tTable("$ISISROOT/appdata/translations/MissionName2DataDir.trn"); QString missionDir = dataDir[tTable.Translate("MissionName", apollo->SpacecraftName())][0]; Pvl resTemplate(missionDir + "/reseaus/" + apollo->InstrumentId() + "_NOMINAL.pvl"); QString missionDir = dataDir[tTable.Translate("MissionName", QString::fromStdString(apollo->SpacecraftName()))][0]; Pvl resTemplate(missionDir.toStdString() + "/reseaus/" + apollo->InstrumentId().toStdString() + "_NOMINAL.pvl"); PvlGroup *reseaus = &resTemplate.findGroup("Reseaus"); // Update reseau locations based on refined code location for (int i=0; i<(reseaus->findKeyword("Type")).size(); i++) { double x = toDouble(reseaus->findKeyword("Sample")[i]) + sampleTranslation + 2278, y = toDouble(reseaus->findKeyword("Line")[i]) + lineTranslation - 20231; double x = std::stod(reseaus->findKeyword("Sample")[i]) + sampleTranslation + 2278, y = std::stod(reseaus->findKeyword("Line")[i]) + lineTranslation - 20231; if (apollo->IsApollo17()) { x += 50; Loading @@ -297,7 +297,7 @@ void TranslateApolloLabels (IString filename, Cube *opack) { reseaus->findKeyword("Line")[i] = std::to_string( sin(rotation)*(x-sampleTranslation) + cos(rotation)*(y-lineTranslation) + lineTranslation); } inst += PvlKeyword("StartTime", utcTime); inst += PvlKeyword("StartTime", utcTime.toStdString()); opack->putGroup(inst); opack->putGroup(bandBin); Loading isis/src/apollo/apps/apollocal/apollocal.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -39,10 +39,11 @@ namespace Isis { PvlGroup &dataDir = Preference::Preferences().findGroup("DataDirectory"); PvlTranslationTable tTable("$ISISROOT/appdata/translations/MissionName2DataDir.trn"); QString missionDir = dataDir[tTable.Translate("MissionName", (inCube->group("Instrument")).findKeyword("SpacecraftName")[0])][0]; QString missionDir = QString::fromStdString( dataDir[tTable.Translate("MissionName", QString::fromStdString( (inCube->group("Instrument")).findKeyword("SpacecraftName")[0])).toStdString()][0]); QString camera = (inCube->group("Instrument")).findKeyword("InstrumentId")[0]; QString::fromStdString((inCube->group("Instrument")).findKeyword("InstrumentId")[0]); CubeAttributeInput cai; p.SetInputCube(missionDir + "/calibration/" + camera + "_flatfield.cub", cai); Loading isis/src/apollo/apps/apollofindrx/apollofindrx.cpp +25 −25 Original line number Diff line number Diff line Loading @@ -54,8 +54,8 @@ namespace Isis { MAX_DISPY = ui.GetInteger("DELTAY"); PvlGroup &reseaus = cube->label()->findGroup("Reseaus",Pvl::Traverse); QString mission = (cube->label()->findGroup("Instrument",Pvl::Traverse))["SpacecraftName"]; QString instrument = (cube->label()->findGroup("Instrument",Pvl::Traverse))["InstrumentId"]; QString mission = QString::fromStdString((cube->label()->findGroup("Instrument",Pvl::Traverse))["SpacecraftName"]); QString instrument = QString::fromStdString((cube->label()->findGroup("Instrument",Pvl::Traverse))["InstrumentId"]); Apollo apollo(mission, instrument); if (mission.mid(0,6) != "APOLLO") { std::string msg = "This application is for use with Apollo spacecrafts only."; Loading @@ -65,21 +65,21 @@ namespace Isis { // If the Keyword sizes don't match up, throw errors. int nres = reseaus["Line"].size(); if (nres != reseaus["Sample"].size()) { QString msg = "Sample size incorrect [Sample size " + toString(reseaus["Sample"].size()) + " != " + " Line size " + toString(reseaus["Line"].size()) + "]"; std::string msg = "Sample size incorrect [Sample size " + std::to_string(reseaus["Sample"].size()) + " != " + " Line size " + std::to_string(reseaus["Line"].size()) + "]"; throw IException(IException::Unknown, msg, _FILEINFO_); } if (nres != reseaus["Type"].size()) { QString msg = "Type size incorrect [Type size " + toString(reseaus["Type"].size()) + " != " + " Line size " + toString(reseaus["Line"].size()) + "]"; std::string msg = "Type size incorrect [Type size " + std::to_string(reseaus["Type"].size()) + " != " + " Line size " + std::to_string(reseaus["Line"].size()) + "]"; throw IException(IException::Unknown, msg, _FILEINFO_); } if (nres != reseaus["Valid"].size()) { QString msg = "Valid size incorrect [Valid size " + toString(reseaus["Valid"].size()) + " != " + " Line size " + toString(reseaus["Line"].size()) + "]"; std::string msg = "Valid size incorrect [Valid size " + std::to_string(reseaus["Valid"].size()) + " != " + " Line size " + std::to_string(reseaus["Line"].size()) + "]"; throw IException(IException::Unknown, msg, _FILEINFO_); } Loading @@ -106,8 +106,8 @@ namespace Isis { int validReseaus = 0; // for (int res=0; res<nres; res++) for (int res=0; res<nres; res++) { currentLine = (int)(toDouble(reseaus["Line"][res])+0.5); currentSample = (int)(toDouble(reseaus["Sample"][res])+0.5); currentLine = (int)(std::stod(reseaus["Line"][res])+0.5); currentSample = (int)(std::stod(reseaus["Sample"][res])+0.5); // Output chips chip.SetSize(patternSize + 2*ds , patternSize + 2*dl); Loading @@ -117,13 +117,13 @@ namespace Isis { if (Walk() ) { double dx = 0, dy = 0; if (res%dim > 0 && reseaus["Valid"][res-1] == "1") dy = currentLine - patternSize/2 - dl + bestLine-1 - toDouble(reseaus["Line"][res]); if (res/dim > 0 && reseaus["Valid"][res - dim] == "1") dx = currentSample - patternSize/2 - ds + bestSample-1 - toDouble(reseaus["Sample"][res]); double horizontalShift = currentSample - patternSize/2 - ds + bestSample-1 - toDouble(reseaus["Sample"][res]) - dx, verticalShift = currentLine - patternSize/2 - dl + bestLine-1 - toDouble(reseaus["Line"][res]) - dy; if (res%dim > 0 && reseaus["Valid"][res-1] == "1") dy = currentLine - patternSize/2 - dl + bestLine-1 - std::stod(reseaus["Line"][res]); if (res/dim > 0 && reseaus["Valid"][res - dim] == "1") dx = currentSample - patternSize/2 - ds + bestSample-1 - std::stod(reseaus["Sample"][res]); double horizontalShift = currentSample - patternSize/2 - ds + bestSample-1 - std::stod(reseaus["Sample"][res]) - dx, verticalShift = currentLine - patternSize/2 - dl + bestLine-1 - std::stod(reseaus["Line"][res]) - dy; for (int i=res; i<nres; i++) { reseaus["Sample"][i] = toString(toDouble(reseaus["Sample"][i]) + horizontalShift + ((i/dim) - (res/dim) + 1)*dx); reseaus["Line"][i] = toString(toDouble(reseaus["Line"][i]) + verticalShift + ((i%dim) - (res%dim) + 1)*dy); reseaus["Sample"][i] = std::to_string(std::stod(reseaus["Sample"][i]) + horizontalShift + ((i/dim) - (res/dim) + 1)*dx); reseaus["Line"][i] = std::to_string(std::stod(reseaus["Line"][i]) + verticalShift + ((i%dim) - (res%dim) + 1)*dy); } reseaus["Valid"][res] = "1"; validReseaus++; Loading @@ -131,8 +131,8 @@ namespace Isis { std::vector< double > xy; xy.push_back(res%(int)sqrt(nres)); xy.push_back(res/(int)sqrt(nres)); sampFunc.AddKnown(xy, toDouble(reseaus["Sample"][res])); lineFunc.AddKnown(xy, toDouble(reseaus["Line"][res])); sampFunc.AddKnown(xy, std::stod(reseaus["Sample"][res])); lineFunc.AddKnown(xy, std::stod(reseaus["Line"][res])); ds = (int)(MIN_DISP+ abs(dx) + abs(horizontalShift)); dl = (int)(MIN_DISP + abs(dy) + abs(verticalShift)); Loading @@ -150,12 +150,12 @@ namespace Isis { // for invalid reseaus, refine the estimated locations for (int res=0; res<nres; res++) { if (toInt(reseaus["Valid"][res])==0) { if (std::stoi(reseaus["Valid"][res])==0) { std::vector< double > xy; xy.push_back(res%(int)sqrt(nres)); xy.push_back(res/(int)sqrt(nres)); reseaus["Sample"][res] = toString(sampFunc.Evaluate(xy)); reseaus["Line"][res] = toString(lineFunc.Evaluate(xy)); reseaus["Sample"][res] = std::to_string(sampFunc.Evaluate(xy)); reseaus["Line"][res] = std::to_string(lineFunc.Evaluate(xy)); } } Loading @@ -170,7 +170,7 @@ namespace Isis { if (cube->label()->hasObject("History")) { // Record apollofindrx history to the cube QString histName = (QString)cube->label()->findObject("History")["Name"]; QString histName = QString::fromStdString(cube->label()->findObject("History")["Name"]); // create a History Blob with value found in the History PvlObject's Name keyword // read cube's History PvlObject data into the History Blob History hist = cube->readHistory(histName); Loading isis/src/apollo/apps/apollopanstitcher/apollopanstitcher.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -167,7 +167,7 @@ namespace Isis { //parameters for maximum correlation autoregestration // see: ///usgs/pkgs/isis3nightly2011-09-21/isis/doc/documents/patternSMatch/patternSMatch.html#DistanceTolerance FileName fiducialPvl("$ISISROOT/appdata/templates/apollo/PanFiducialFinder.def"); pvl.read(fiducialPvl.expanded()); //read in the autoreg parameters pvl.read(fiducialPvl.expanded().toStdString()); //read in the autoreg parameters AutoReg *arS = AutoRegFactory::Create(pvl); *arS->PatternChip() = patternS; //patternS chip is constant Loading isis/src/apollo/apps/apolloremrx/apolloremrx.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -47,8 +47,8 @@ namespace Isis { PvlKeyword &status = info->group("RESEAUS")["STATUS"]; QString in = info->fileName(); QString spacecraft = (info->group("Instrument")["SpacecraftName"]); QString instrument = (info->group("Instrument")["InstrumentId"]); QString spacecraft = QString::fromStdString(info->group("Instrument")["SpacecraftName"]); QString instrument = QString::fromStdString(info->group("Instrument")["InstrumentId"]); if (spacecraft.mid(0,6) != "APOLLO") { std::string msg = "This application is for use with Apollo spacecrafts only. "; throw IException(IException::Unknown, msg, _FILEINFO_); Loading @@ -56,12 +56,12 @@ namespace Isis { Apollo apollo(spacecraft, instrument); // Check reseau status and make sure it is not nominal or removed if ((QString)status == "Nominal") { if ((std::string)status == "Nominal") { QString msg = "Input file [" + in + "] appears to have nominal reseau status. You must run findrx first."; throw IException(IException::User,msg, _FILEINFO_); } if ((QString)status == "Removed") { if ((std::string)status == "Removed") { QString msg = "Input file [" + in + "] appears to already have reseaus removed."; throw IException(IException::User,msg, _FILEINFO_); Loading Loading @@ -99,9 +99,9 @@ namespace Isis { Brick brick(dim,dim,1,cube.pixelType()); int width = ui.GetInteger("WIDTH"); for (int res=0; res<numres; res++) { if ((resvalid == 0 || toInt(valid[res]) == 1)) { int baseSamp = (int)(toDouble(samps[res])+0.5) - (dim/2); int baseLine = (int)(toDouble(lines[res])+0.5) - (dim/2); if ((resvalid == 0 || std::stoi(valid[res]) == 1)) { int baseSamp = (int)(std::stod(samps[res])+0.5) - (dim/2); int baseLine = (int)(std::stod(lines[res])+0.5) - (dim/2); brick.SetBasePosition(baseSamp,baseLine,1); cube.read(brick); if (action == "NULL") { Loading Loading
isis/src/apollo/apps/apollo2isis/main.cpp +12 −12 Original line number Diff line number Diff line Loading @@ -60,7 +60,7 @@ void IsisMain() { apollo = new Apollo(filename); utcTime = (QString)pdsLabel["START_TIME"]; utcTime = QString::fromStdString(pdsLabel["START_TIME"]); // Setup the output cube attributes for a 16-bit unsigned tiff Isis::CubeAttributeOutput cao; Loading Loading @@ -231,9 +231,9 @@ void TranslateApolloLabels (IString filename, Cube *opack) { PvlGroup kern("Kernels"); PvlGroup codeGroup("Code"); inst += PvlKeyword("SpacecraftName", apollo->SpacecraftName()); inst += PvlKeyword("InstrumentId", apollo->InstrumentId()); inst += PvlKeyword("TargetName", apollo->TargetName()); inst += PvlKeyword("SpacecraftName", apollo->SpacecraftName().toStdString()); inst += PvlKeyword("InstrumentId", apollo->InstrumentId().toStdString()); inst += PvlKeyword("TargetName", apollo->TargetName().toStdString()); if ( !IsValidCode() ){ PvlGroup error("ERROR"); Loading @@ -249,12 +249,12 @@ void TranslateApolloLabels (IString filename, Cube *opack) { Application::Log(error); } else { codeGroup += PvlKeyword("StartTime", FrameTime()); codeGroup += PvlKeyword("StartTime", FrameTime().toStdString()); codeGroup += PvlKeyword("SpacecraftAltitude", std::to_string(Altitude()),"meters"); if (apollo->IsMetric()){ codeGroup += PvlKeyword("ExposureDuration", std::to_string(ShutterInterval()), "milliseconds"); codeGroup += PvlKeyword("ForwardMotionCompensation", FMC()); codeGroup += PvlKeyword("ForwardMotionCompensation", FMC().toStdString()); } for (int i=0; i<4; i++) { Loading @@ -272,20 +272,20 @@ void TranslateApolloLabels (IString filename, Cube *opack) { bandBin += PvlKeyword("FilterName", "CLEAR"); bandBin += PvlKeyword("FilterId", "1"); kern += PvlKeyword("NaifFrameCode", apollo->NaifFrameCode()); kern += PvlKeyword("NaifFrameCode", apollo->NaifFrameCode().toStdString()); // Set up the nominal reseaus group Isis::PvlGroup &dataDir = Isis::Preference::Preferences().findGroup("DataDirectory"); Process p; PvlTranslationTable tTable("$ISISROOT/appdata/translations/MissionName2DataDir.trn"); QString missionDir = dataDir[tTable.Translate("MissionName", apollo->SpacecraftName())][0]; Pvl resTemplate(missionDir + "/reseaus/" + apollo->InstrumentId() + "_NOMINAL.pvl"); QString missionDir = dataDir[tTable.Translate("MissionName", QString::fromStdString(apollo->SpacecraftName()))][0]; Pvl resTemplate(missionDir.toStdString() + "/reseaus/" + apollo->InstrumentId().toStdString() + "_NOMINAL.pvl"); PvlGroup *reseaus = &resTemplate.findGroup("Reseaus"); // Update reseau locations based on refined code location for (int i=0; i<(reseaus->findKeyword("Type")).size(); i++) { double x = toDouble(reseaus->findKeyword("Sample")[i]) + sampleTranslation + 2278, y = toDouble(reseaus->findKeyword("Line")[i]) + lineTranslation - 20231; double x = std::stod(reseaus->findKeyword("Sample")[i]) + sampleTranslation + 2278, y = std::stod(reseaus->findKeyword("Line")[i]) + lineTranslation - 20231; if (apollo->IsApollo17()) { x += 50; Loading @@ -297,7 +297,7 @@ void TranslateApolloLabels (IString filename, Cube *opack) { reseaus->findKeyword("Line")[i] = std::to_string( sin(rotation)*(x-sampleTranslation) + cos(rotation)*(y-lineTranslation) + lineTranslation); } inst += PvlKeyword("StartTime", utcTime); inst += PvlKeyword("StartTime", utcTime.toStdString()); opack->putGroup(inst); opack->putGroup(bandBin); Loading
isis/src/apollo/apps/apollocal/apollocal.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -39,10 +39,11 @@ namespace Isis { PvlGroup &dataDir = Preference::Preferences().findGroup("DataDirectory"); PvlTranslationTable tTable("$ISISROOT/appdata/translations/MissionName2DataDir.trn"); QString missionDir = dataDir[tTable.Translate("MissionName", (inCube->group("Instrument")).findKeyword("SpacecraftName")[0])][0]; QString missionDir = QString::fromStdString( dataDir[tTable.Translate("MissionName", QString::fromStdString( (inCube->group("Instrument")).findKeyword("SpacecraftName")[0])).toStdString()][0]); QString camera = (inCube->group("Instrument")).findKeyword("InstrumentId")[0]; QString::fromStdString((inCube->group("Instrument")).findKeyword("InstrumentId")[0]); CubeAttributeInput cai; p.SetInputCube(missionDir + "/calibration/" + camera + "_flatfield.cub", cai); Loading
isis/src/apollo/apps/apollofindrx/apollofindrx.cpp +25 −25 Original line number Diff line number Diff line Loading @@ -54,8 +54,8 @@ namespace Isis { MAX_DISPY = ui.GetInteger("DELTAY"); PvlGroup &reseaus = cube->label()->findGroup("Reseaus",Pvl::Traverse); QString mission = (cube->label()->findGroup("Instrument",Pvl::Traverse))["SpacecraftName"]; QString instrument = (cube->label()->findGroup("Instrument",Pvl::Traverse))["InstrumentId"]; QString mission = QString::fromStdString((cube->label()->findGroup("Instrument",Pvl::Traverse))["SpacecraftName"]); QString instrument = QString::fromStdString((cube->label()->findGroup("Instrument",Pvl::Traverse))["InstrumentId"]); Apollo apollo(mission, instrument); if (mission.mid(0,6) != "APOLLO") { std::string msg = "This application is for use with Apollo spacecrafts only."; Loading @@ -65,21 +65,21 @@ namespace Isis { // If the Keyword sizes don't match up, throw errors. int nres = reseaus["Line"].size(); if (nres != reseaus["Sample"].size()) { QString msg = "Sample size incorrect [Sample size " + toString(reseaus["Sample"].size()) + " != " + " Line size " + toString(reseaus["Line"].size()) + "]"; std::string msg = "Sample size incorrect [Sample size " + std::to_string(reseaus["Sample"].size()) + " != " + " Line size " + std::to_string(reseaus["Line"].size()) + "]"; throw IException(IException::Unknown, msg, _FILEINFO_); } if (nres != reseaus["Type"].size()) { QString msg = "Type size incorrect [Type size " + toString(reseaus["Type"].size()) + " != " + " Line size " + toString(reseaus["Line"].size()) + "]"; std::string msg = "Type size incorrect [Type size " + std::to_string(reseaus["Type"].size()) + " != " + " Line size " + std::to_string(reseaus["Line"].size()) + "]"; throw IException(IException::Unknown, msg, _FILEINFO_); } if (nres != reseaus["Valid"].size()) { QString msg = "Valid size incorrect [Valid size " + toString(reseaus["Valid"].size()) + " != " + " Line size " + toString(reseaus["Line"].size()) + "]"; std::string msg = "Valid size incorrect [Valid size " + std::to_string(reseaus["Valid"].size()) + " != " + " Line size " + std::to_string(reseaus["Line"].size()) + "]"; throw IException(IException::Unknown, msg, _FILEINFO_); } Loading @@ -106,8 +106,8 @@ namespace Isis { int validReseaus = 0; // for (int res=0; res<nres; res++) for (int res=0; res<nres; res++) { currentLine = (int)(toDouble(reseaus["Line"][res])+0.5); currentSample = (int)(toDouble(reseaus["Sample"][res])+0.5); currentLine = (int)(std::stod(reseaus["Line"][res])+0.5); currentSample = (int)(std::stod(reseaus["Sample"][res])+0.5); // Output chips chip.SetSize(patternSize + 2*ds , patternSize + 2*dl); Loading @@ -117,13 +117,13 @@ namespace Isis { if (Walk() ) { double dx = 0, dy = 0; if (res%dim > 0 && reseaus["Valid"][res-1] == "1") dy = currentLine - patternSize/2 - dl + bestLine-1 - toDouble(reseaus["Line"][res]); if (res/dim > 0 && reseaus["Valid"][res - dim] == "1") dx = currentSample - patternSize/2 - ds + bestSample-1 - toDouble(reseaus["Sample"][res]); double horizontalShift = currentSample - patternSize/2 - ds + bestSample-1 - toDouble(reseaus["Sample"][res]) - dx, verticalShift = currentLine - patternSize/2 - dl + bestLine-1 - toDouble(reseaus["Line"][res]) - dy; if (res%dim > 0 && reseaus["Valid"][res-1] == "1") dy = currentLine - patternSize/2 - dl + bestLine-1 - std::stod(reseaus["Line"][res]); if (res/dim > 0 && reseaus["Valid"][res - dim] == "1") dx = currentSample - patternSize/2 - ds + bestSample-1 - std::stod(reseaus["Sample"][res]); double horizontalShift = currentSample - patternSize/2 - ds + bestSample-1 - std::stod(reseaus["Sample"][res]) - dx, verticalShift = currentLine - patternSize/2 - dl + bestLine-1 - std::stod(reseaus["Line"][res]) - dy; for (int i=res; i<nres; i++) { reseaus["Sample"][i] = toString(toDouble(reseaus["Sample"][i]) + horizontalShift + ((i/dim) - (res/dim) + 1)*dx); reseaus["Line"][i] = toString(toDouble(reseaus["Line"][i]) + verticalShift + ((i%dim) - (res%dim) + 1)*dy); reseaus["Sample"][i] = std::to_string(std::stod(reseaus["Sample"][i]) + horizontalShift + ((i/dim) - (res/dim) + 1)*dx); reseaus["Line"][i] = std::to_string(std::stod(reseaus["Line"][i]) + verticalShift + ((i%dim) - (res%dim) + 1)*dy); } reseaus["Valid"][res] = "1"; validReseaus++; Loading @@ -131,8 +131,8 @@ namespace Isis { std::vector< double > xy; xy.push_back(res%(int)sqrt(nres)); xy.push_back(res/(int)sqrt(nres)); sampFunc.AddKnown(xy, toDouble(reseaus["Sample"][res])); lineFunc.AddKnown(xy, toDouble(reseaus["Line"][res])); sampFunc.AddKnown(xy, std::stod(reseaus["Sample"][res])); lineFunc.AddKnown(xy, std::stod(reseaus["Line"][res])); ds = (int)(MIN_DISP+ abs(dx) + abs(horizontalShift)); dl = (int)(MIN_DISP + abs(dy) + abs(verticalShift)); Loading @@ -150,12 +150,12 @@ namespace Isis { // for invalid reseaus, refine the estimated locations for (int res=0; res<nres; res++) { if (toInt(reseaus["Valid"][res])==0) { if (std::stoi(reseaus["Valid"][res])==0) { std::vector< double > xy; xy.push_back(res%(int)sqrt(nres)); xy.push_back(res/(int)sqrt(nres)); reseaus["Sample"][res] = toString(sampFunc.Evaluate(xy)); reseaus["Line"][res] = toString(lineFunc.Evaluate(xy)); reseaus["Sample"][res] = std::to_string(sampFunc.Evaluate(xy)); reseaus["Line"][res] = std::to_string(lineFunc.Evaluate(xy)); } } Loading @@ -170,7 +170,7 @@ namespace Isis { if (cube->label()->hasObject("History")) { // Record apollofindrx history to the cube QString histName = (QString)cube->label()->findObject("History")["Name"]; QString histName = QString::fromStdString(cube->label()->findObject("History")["Name"]); // create a History Blob with value found in the History PvlObject's Name keyword // read cube's History PvlObject data into the History Blob History hist = cube->readHistory(histName); Loading
isis/src/apollo/apps/apollopanstitcher/apollopanstitcher.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -167,7 +167,7 @@ namespace Isis { //parameters for maximum correlation autoregestration // see: ///usgs/pkgs/isis3nightly2011-09-21/isis/doc/documents/patternSMatch/patternSMatch.html#DistanceTolerance FileName fiducialPvl("$ISISROOT/appdata/templates/apollo/PanFiducialFinder.def"); pvl.read(fiducialPvl.expanded()); //read in the autoreg parameters pvl.read(fiducialPvl.expanded().toStdString()); //read in the autoreg parameters AutoReg *arS = AutoRegFactory::Create(pvl); *arS->PatternChip() = patternS; //patternS chip is constant Loading
isis/src/apollo/apps/apolloremrx/apolloremrx.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -47,8 +47,8 @@ namespace Isis { PvlKeyword &status = info->group("RESEAUS")["STATUS"]; QString in = info->fileName(); QString spacecraft = (info->group("Instrument")["SpacecraftName"]); QString instrument = (info->group("Instrument")["InstrumentId"]); QString spacecraft = QString::fromStdString(info->group("Instrument")["SpacecraftName"]); QString instrument = QString::fromStdString(info->group("Instrument")["InstrumentId"]); if (spacecraft.mid(0,6) != "APOLLO") { std::string msg = "This application is for use with Apollo spacecrafts only. "; throw IException(IException::Unknown, msg, _FILEINFO_); Loading @@ -56,12 +56,12 @@ namespace Isis { Apollo apollo(spacecraft, instrument); // Check reseau status and make sure it is not nominal or removed if ((QString)status == "Nominal") { if ((std::string)status == "Nominal") { QString msg = "Input file [" + in + "] appears to have nominal reseau status. You must run findrx first."; throw IException(IException::User,msg, _FILEINFO_); } if ((QString)status == "Removed") { if ((std::string)status == "Removed") { QString msg = "Input file [" + in + "] appears to already have reseaus removed."; throw IException(IException::User,msg, _FILEINFO_); Loading Loading @@ -99,9 +99,9 @@ namespace Isis { Brick brick(dim,dim,1,cube.pixelType()); int width = ui.GetInteger("WIDTH"); for (int res=0; res<numres; res++) { if ((resvalid == 0 || toInt(valid[res]) == 1)) { int baseSamp = (int)(toDouble(samps[res])+0.5) - (dim/2); int baseLine = (int)(toDouble(lines[res])+0.5) - (dim/2); if ((resvalid == 0 || std::stoi(valid[res]) == 1)) { int baseSamp = (int)(std::stod(samps[res])+0.5) - (dim/2); int baseLine = (int)(std::stod(lines[res])+0.5) - (dim/2); brick.SetBasePosition(baseSamp,baseLine,1); cube.read(brick); if (action == "NULL") { Loading