diff --git a/isis/src/apollo/apps/apollo2isis/apollo2isis.cpp b/isis/src/apollo/apps/apollo2isis/apollo2isis.cpp index 0d05509a9c58e9c438111e4fd7dc01c8863c5f16..4e913305dc135bbcf0cc461758fd119c8882e76b 100644 --- a/isis/src/apollo/apps/apollo2isis/apollo2isis.cpp +++ b/isis/src/apollo/apps/apollo2isis/apollo2isis.cpp @@ -229,13 +229,13 @@ void TranslateApolloLabels (IString filename, Cube *opack) { if ( !IsValidCode() ){ PvlGroup error("ERROR"); - error.AddComment("The decrypted code is invalid."); + error.addComment("The decrypted code is invalid."); for (int i=0; i<4; i++) { PvlKeyword keyword("Column"+toString(i+1)); for (int j=0; j<32; j++) { keyword += toString((int)code[i][j]); } - error.AddKeyword(keyword); + error.addKeyword(keyword); codeGroup += keyword; } Application::Log(error); @@ -267,27 +267,27 @@ void TranslateApolloLabels (IString filename, Cube *opack) { kern += PvlKeyword("NaifFrameCode", apollo->NaifFrameCode()); // Set up the nominal reseaus group - Isis::PvlGroup &dataDir = Isis::Preference::Preferences().FindGroup("DataDirectory"); + Isis::PvlGroup &dataDir = Isis::Preference::Preferences().findGroup("DataDirectory"); Process p; PvlTranslationTable tTable( (QString)p.MissionData("base", "translations/MissionName2DataDir.trn")); QString missionDir = dataDir[tTable.Translate("MissionName", apollo->SpacecraftName())][0]; Pvl resTemplate(missionDir + "/reseaus/" + apollo->InstrumentId() + "_NOMINAL.pvl"); - PvlGroup *reseaus = &resTemplate.FindGroup("Reseaus"); + 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; + 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; if (apollo->IsApollo17()) { x += 50; y += 20; } - reseaus->FindKeyword("Sample")[i] = toString( + reseaus->findKeyword("Sample")[i] = toString( cos(rotation)*(x-sampleTranslation) - sin(rotation)*(y-lineTranslation) + sampleTranslation); - reseaus->FindKeyword("Line")[i] = toString( + reseaus->findKeyword("Line")[i] = toString( sin(rotation)*(x-sampleTranslation) + cos(rotation)*(y-lineTranslation) + lineTranslation); } inst += PvlKeyword("StartTime", utcTime); diff --git a/isis/src/apollo/apps/apollocal/apollocal.cpp b/isis/src/apollo/apps/apollocal/apollocal.cpp index 23a9caa9427e4f996f1827e6e329be23251c1aba..a5eb5fa2870d36fdc022eb4bb02e15ba67b587cb 100644 --- a/isis/src/apollo/apps/apollocal/apollocal.cpp +++ b/isis/src/apollo/apps/apollocal/apollocal.cpp @@ -19,13 +19,13 @@ void IsisMain() { Cube *inCube = p.SetInputCube("FROM"); PvlGroup &dataDir = - Preference::Preferences().FindGroup("DataDirectory"); + Preference::Preferences().findGroup("DataDirectory"); PvlTranslationTable tTable( (QString)p.MissionData("base", "translations/MissionName2DataDir.trn")); QString missionDir = dataDir[tTable.Translate("MissionName", - (inCube->group("Instrument")).FindKeyword("SpacecraftName")[0])][0]; + (inCube->group("Instrument")).findKeyword("SpacecraftName")[0])][0]; QString camera = - (inCube->group("Instrument")).FindKeyword("InstrumentId")[0]; + (inCube->group("Instrument")).findKeyword("InstrumentId")[0]; CubeAttributeInput cai; p.SetInputCube(missionDir + "/calibration/" + camera + "_flatfield.cub", cai); diff --git a/isis/src/apollo/apps/apollofindrx/apollofindrx.cpp b/isis/src/apollo/apps/apollofindrx/apollofindrx.cpp index 2dd88c9072480fbc99c527c7ad6ee069fbfcb082..563335d27cc16e063373f612f7908d66ac161705 100644 --- a/isis/src/apollo/apps/apollofindrx/apollofindrx.cpp +++ b/isis/src/apollo/apps/apollofindrx/apollofindrx.cpp @@ -40,9 +40,9 @@ void IsisMain () MAX_DISPY = ui.GetInteger("DELTAY"); cube.open(ui.GetFileName("FROM"),"rw"); - 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"]; + 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"]; Apollo apollo(mission, instrument); if (mission.mid(0,6) != "APOLLO") { QString msg = "This application is for use with Apollo spacecrafts only."; @@ -50,23 +50,23 @@ void IsisMain () } // If the Keyword sizes don't match up, throw errors. - int nres = reseaus["Line"].Size(); - if (nres != reseaus["Sample"].Size()) { + 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()) + "]"; + toString(reseaus["Sample"].size()) + " != " + " Line size " + + toString(reseaus["Line"].size()) + "]"; throw IException(IException::Unknown, msg, _FILEINFO_); } - if (nres != reseaus["Type"].Size()) { + if (nres != reseaus["Type"].size()) { QString msg = "Type size incorrect [Type size " + - toString(reseaus["Type"].Size()) + " != " + " Line size " + - toString(reseaus["Line"].Size()) + "]"; + toString(reseaus["Type"].size()) + " != " + " Line size " + + toString(reseaus["Line"].size()) + "]"; throw IException(IException::Unknown, msg, _FILEINFO_); } - if (nres != reseaus["Valid"].Size()) { + if (nres != reseaus["Valid"].size()) { QString msg = "Valid size incorrect [Valid size " + - toString(reseaus["Valid"].Size()) + " != " + " Line size " + - toString(reseaus["Line"].Size()) + "]"; + toString(reseaus["Valid"].size()) + " != " + " Line size " + + toString(reseaus["Line"].size()) + "]"; throw IException(IException::Unknown, msg, _FILEINFO_); } diff --git a/isis/src/apollo/apps/apollopaninit/apollopaninit.cpp b/isis/src/apollo/apps/apollopaninit/apollopaninit.cpp index 6e01089bcffabd4fef078f81af331c1e71195363..d8908adcfc564521ff028bce6b50cc91361e7c1b 100644 --- a/isis/src/apollo/apps/apollopaninit/apollopaninit.cpp +++ b/isis/src/apollo/apps/apollopaninit/apollopaninit.cpp @@ -143,21 +143,21 @@ void IsisMain() { PvlKeyword keyword; //four that are the same for every panaramic mission - keyword.SetName("SpacecraftName"); - keyword.SetValue(mission); - inst_pvlG.AddKeyword(keyword); + keyword.setName("SpacecraftName"); + keyword.setValue(mission); + inst_pvlG.addKeyword(keyword); - keyword.SetName("InstrumentName"); - keyword.SetValue(transTable.Translate("InstrumentName","whatever")); - inst_pvlG.AddKeyword(keyword); + keyword.setName("InstrumentName"); + keyword.setValue(transTable.Translate("InstrumentName","whatever")); + inst_pvlG.addKeyword(keyword); - keyword.SetName("InstrumentId"); - keyword.SetValue(transTable.Translate("InstrumentId","whatever")); - inst_pvlG.AddKeyword(keyword); + keyword.setName("InstrumentId"); + keyword.setValue(transTable.Translate("InstrumentId","whatever")); + inst_pvlG.addKeyword(keyword); - keyword.SetName("TargetName"); - keyword.SetValue(transTable.Translate("TargetName","whatever")); - inst_pvlG.AddKeyword(keyword); + keyword.setName("TargetName"); + keyword.setValue(transTable.Translate("TargetName","whatever")); + inst_pvlG.addKeyword(keyword); //three that need to be calculated from input values horV = ui.GetDouble("VEL_HORIZ"); @@ -182,61 +182,61 @@ void IsisMain() { time1 = time0 + led*FIDL*43; isisTime = time0; - keyword.SetName("StartTime"); - keyword.SetValue(iStrTEMP=isisTime.UTC()); - inst_pvlG.AddKeyword(keyword); + keyword.setName("StartTime"); + keyword.setValue(iStrTEMP=isisTime.UTC()); + inst_pvlG.addKeyword(keyword); isisTime = time1; - keyword.SetName("StopTime"); - keyword.SetValue(iStrTEMP=isisTime.UTC()); - inst_pvlG.AddKeyword(keyword); + keyword.setName("StopTime"); + keyword.setValue(iStrTEMP=isisTime.UTC()); + inst_pvlG.addKeyword(keyword); - keyword.SetName("LineExposureDuration"); + keyword.setName("LineExposureDuration"); //converted led to msec/mm--negative sign to account for the anti-parallel time and line axes - keyword.SetValue(iStrTEMP=toString(-led),"sec/mm"); - inst_pvlG.AddKeyword(keyword); + keyword.setValue(iStrTEMP=toString(-led),"sec/mm"); + inst_pvlG.addKeyword(keyword); panCube.putGroup(inst_pvlG); ///////////////////////////////////The kernals group - kernels_pvlG.SetName("Kernels"); - kernels_pvlG.Clear(); + kernels_pvlG.setName("Kernels"); + kernels_pvlG.clear(); - keyword.SetName("NaifFrameCode"); - keyword.SetValue(toString(insCode)); - kernels_pvlG.AddKeyword(keyword); + keyword.setName("NaifFrameCode"); + keyword.setValue(toString(insCode)); + kernels_pvlG.addKeyword(keyword); - keyword.SetName("LeapSecond"); - keyword.SetValue( transTable.Translate("LeapSecond","File1") ); - kernels_pvlG.AddKeyword(keyword); + keyword.setName("LeapSecond"); + keyword.setValue( transTable.Translate("LeapSecond","File1") ); + kernels_pvlG.addKeyword(keyword); - keyword.SetName("TargetAttitudeShape"); - keyword.SetValue( transTable.Translate("TargetAttitudeShape", "File1") ); - keyword.AddValue( transTable.Translate("TargetAttitudeShape", "File2") ); - keyword.AddValue( transTable.Translate("TargetAttitudeShape", "File3") ); - kernels_pvlG.AddKeyword(keyword); + keyword.setName("TargetAttitudeShape"); + keyword.setValue( transTable.Translate("TargetAttitudeShape", "File1") ); + keyword.addValue( transTable.Translate("TargetAttitudeShape", "File2") ); + keyword.addValue( transTable.Translate("TargetAttitudeShape", "File3") ); + kernels_pvlG.addKeyword(keyword); - keyword.SetName("TargetPosition"); - keyword.SetValue("Table"); - keyword.AddValue( transTable.Translate("TargetPosition", "File1") ); - keyword.AddValue( transTable.Translate("TargetPosition", "File2") ); - kernels_pvlG.AddKeyword(keyword); + keyword.setName("TargetPosition"); + keyword.setValue("Table"); + keyword.addValue( transTable.Translate("TargetPosition", "File1") ); + keyword.addValue( transTable.Translate("TargetPosition", "File2") ); + kernels_pvlG.addKeyword(keyword); - keyword.SetName("ShapeModel"); - keyword.SetValue( transTable.Translate("ShapeModel", "File1") ); - kernels_pvlG.AddKeyword(keyword); + keyword.setName("ShapeModel"); + keyword.setValue( transTable.Translate("ShapeModel", "File1") ); + kernels_pvlG.addKeyword(keyword); - keyword.SetName("InstrumentPointing"); - keyword.SetValue("Table"); - kernels_pvlG.AddKeyword(keyword); + keyword.setName("InstrumentPointing"); + keyword.setValue("Table"); + kernels_pvlG.addKeyword(keyword); - keyword.SetName("InstrumentPosition"); - keyword.SetValue("Table"); - kernels_pvlG.AddKeyword(keyword); + keyword.setName("InstrumentPosition"); + keyword.setValue("Table"); + kernels_pvlG.addKeyword(keyword); - keyword.SetName("InstrumentAddendum"); - keyword.SetValue( transTable.Translate("InstrumentAddendum",mission)); - kernels_pvlG.AddKeyword(keyword); + keyword.setName("InstrumentAddendum"); + keyword.setValue( transTable.Translate("InstrumentAddendum",mission)); + kernels_pvlG.addKeyword(keyword); panCube.putGroup(kernels_pvlG); @@ -564,21 +564,21 @@ void IsisMain() { tableRot.Label() += PvlKeyword("CkTableEndTime", toString(Q[NODES-1][4])); tableRot.Label() += PvlKeyword("Description", "Created by appollopan2isis"); - keyword.SetName("TimeDependentFrames"); - keyword.SetValue(toString(scFrameCode)); - keyword.AddValue("1"); + keyword.setName("TimeDependentFrames"); + keyword.setValue(toString(scFrameCode)); + keyword.addValue("1"); tableRot.Label() += keyword; - keyword.SetName("ConstantFrames"); - keyword.SetValue(toString(insCode)); - keyword.AddValue(toString(scFrameCode)); + keyword.setName("ConstantFrames"); + keyword.setValue(toString(insCode)); + keyword.addValue(toString(scFrameCode)); tableRot.Label() += keyword; - keyword.SetName("ConstantRotation"); - keyword.SetValue("1"); + keyword.setName("ConstantRotation"); + keyword.setValue("1"); for (i=1;i<9;i++) - if (i%4 == 0) keyword.AddValue("1"); - else keyword.AddValue("0"); + if (i%4 == 0) keyword.addValue("1"); + else keyword.addValue("0"); tableRot.Label() += keyword; panCube.write(tableRot); @@ -643,7 +643,7 @@ void IsisMain() { //parameters for maximum correlation autoregestration // see: file:///usgs/pkgs/isis3nightly2011-09-21/isis/doc/documents/patternSMatch/patternSMatch.html#DistanceTolerance FileName fiducialPvl("$apollo15/templates/apolloPanFiducialFinder.pvl"); - pvl.Read(fiducialPvl.expanded()); //read in the autoreg parameters + pvl.read(fiducialPvl.expanded()); //read in the autoreg parameters AutoReg *arS = AutoRegFactory::Create(pvl); *arS->PatternChip() = patternS; //patternS chip is constant @@ -808,7 +808,7 @@ void Load_Kernel(Isis::PvlKeyword &key) { //Load all the kernal files (file names are stored as values of the PvlKeyword) NaifStatus::CheckErrors(); - for(int i = 0; i < key.Size(); i++) { + for(int i = 0; i < key.size(); i++) { if(key[i] == "") continue; if(QString(key[i]).toUpper() == "NULL") break; if(QString(key[i]).toUpper() == "NADIR") break; diff --git a/isis/src/apollo/apps/apollopanstitcher/apollopanstitcher.cpp b/isis/src/apollo/apps/apollopanstitcher/apollopanstitcher.cpp index 316323c0acf6be06d45547d760e3976a8396840a..1ed1175a83e74c432dede6387a9b640cfb3f83e1 100644 --- a/isis/src/apollo/apps/apollopanstitcher/apollopanstitcher.cpp +++ b/isis/src/apollo/apps/apollopanstitcher/apollopanstitcher.cpp @@ -160,7 +160,7 @@ void IsisMain() { //parameters for maximum correlation autoregestration // see: ///usgs/pkgs/isis3nightly2011-09-21/isis/doc/documents/patternSMatch/patternSMatch.html#DistanceTolerance FileName fiducialPvl("$apollo15/templates/apolloPanFiducialFinder.pvl"); - pvl.Read(fiducialPvl.expanded()); //read in the autoreg parameters + pvl.read(fiducialPvl.expanded()); //read in the autoreg parameters AutoReg *arS = AutoRegFactory::Create(pvl); *arS->PatternChip() = patternS; //patternS chip is constant diff --git a/isis/src/apollo/apps/apolloremrx/apolloremrx.cpp b/isis/src/apollo/apps/apolloremrx/apolloremrx.cpp index feac63f1e80c34f89a92ff90d54b656eebab3a81..87b6da873340dd304017005bb95bd6a5d4b5deed 100644 --- a/isis/src/apollo/apps/apolloremrx/apolloremrx.cpp +++ b/isis/src/apollo/apps/apolloremrx/apolloremrx.cpp @@ -66,14 +66,14 @@ void IsisMain() { Cube cube; cube.open(out, "rw"); - PvlGroup &res = cube.label()->FindGroup("RESEAUS",Pvl::Traverse); + PvlGroup &res = cube.label()->findGroup("RESEAUS",Pvl::Traverse); // Get reseau line, sample, type, and valid Keywords - PvlKeyword lines = res.FindKeyword("LINE"); - PvlKeyword samps = res.FindKeyword("SAMPLE"); - PvlKeyword type = res.FindKeyword("TYPE"); - PvlKeyword valid = res.FindKeyword("VALID"); - int numres = lines.Size(); + PvlKeyword lines = res.findKeyword("LINE"); + PvlKeyword samps = res.findKeyword("SAMPLE"); + PvlKeyword type = res.findKeyword("TYPE"); + PvlKeyword valid = res.findKeyword("VALID"); + int numres = lines.size(); Brick brick(dim,dim,1,cube.pixelType()); int width = ui.GetInteger("WIDTH"); diff --git a/isis/src/apollo/apps/apollowarp/apollowarp.cpp b/isis/src/apollo/apps/apollowarp/apollowarp.cpp index 415fea028c36f24dd8b27e06c97c3e12e2e37766..c01e0eb3b40e93c19c917409e104dedc02a2ae61 100644 --- a/isis/src/apollo/apps/apollowarp/apollowarp.cpp +++ b/isis/src/apollo/apps/apollowarp/apollowarp.cpp @@ -30,11 +30,11 @@ void IsisMain() { } // Get the master reseau info - PvlGroup master = Pvl(reseaus["Master"]).FindGroup("MasterReseaus"); + PvlGroup master = Pvl(reseaus["Master"]).findGroup("MasterReseaus"); vector inputLine,inputSample,outputLine,outputSample; // Setup the parameters for the transform - for (int i=0; iinstrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); @@ -61,7 +61,7 @@ int main(void) { cout << "SPK Reference ID = " << cam->SpkReferenceId() << endl << endl; // Test Shutter Open/Close - const PvlGroup &inst = p.FindGroup("Instrument", Pvl::Traverse); + const PvlGroup &inst = p.findGroup("Instrument", Pvl::Traverse); QString stime = inst["StartTime"]; double et; // StartTime keyword is the center exposure time str2et_c(stime.toAscii().data(), &et); diff --git a/isis/src/apollo/objs/ApolloPanoramicCamera/ApolloPanoramicCamera.cpp b/isis/src/apollo/objs/ApolloPanoramicCamera/ApolloPanoramicCamera.cpp index 2368ec6c81befff5240d3f935dbc297bd9e15bd8..70e3286120c8469d17e79c50a92da547cacf49a3 100644 --- a/isis/src/apollo/objs/ApolloPanoramicCamera/ApolloPanoramicCamera.cpp +++ b/isis/src/apollo/objs/ApolloPanoramicCamera/ApolloPanoramicCamera.cpp @@ -47,7 +47,7 @@ namespace Isis { ikernKey = "INS" + toString((int)naifIkCode()) + "_MULTIPLI_LINE_ERROR"; multiplicativeLineTimeError = getDouble(ikernKey); - Isis::PvlGroup &inst = lab.FindGroup("Instrument", Isis::Pvl::Traverse); + Isis::PvlGroup &inst = lab.findGroup("Instrument", Isis::Pvl::Traverse); QString stime = (QString)inst["StartTime"]; SpiceDouble etStart; str2et_c(stime.toAscii().data(), &etStart); @@ -82,7 +82,7 @@ namespace Isis { detectorMap->SetDetectorSampleSumming(1.0); detectorMap->SetStartingDetectorSample(0.0); // Setup focal plane map - Isis::PvlGroup &kernel = lab.FindGroup("Kernels", Isis::Pvl::Traverse); + Isis::PvlGroup &kernel = lab.findGroup("Kernels", Isis::Pvl::Traverse); CameraFocalPlaneMap *focalMap = new CameraFocalPlaneMap(this, (int) kernel["NaifFrameCode"]); // Retrieve boresight location from instrument kernel (IK) (addendum?) @@ -100,7 +100,7 @@ namespace Isis { new LineScanCameraGroundMap(this); new LineScanCameraSkyMap(this); - Isis::PvlGroup &instP = lab.FindGroup("Kernels", Isis::Pvl::Traverse); + Isis::PvlGroup &instP = lab.findGroup("Kernels", Isis::Pvl::Traverse); m_CkFrameId = toInt(instP["NaifFrameCode"][0]); m_CkFrameId = -int(-m_CkFrameId/1000)*1000; diff --git a/isis/src/apollo/objs/ApolloPanoramicCamera/ApolloPanoramicDetectorMap.cpp b/isis/src/apollo/objs/ApolloPanoramicCamera/ApolloPanoramicDetectorMap.cpp index e24d0f2f0f56d583edaca878ef9a83e8c7f4863b..c34a5a67963ee65d7b3d5e03ec21f3ebc37f0992 100644 --- a/isis/src/apollo/objs/ApolloPanoramicCamera/ApolloPanoramicDetectorMap.cpp +++ b/isis/src/apollo/objs/ApolloPanoramicCamera/ApolloPanoramicDetectorMap.cpp @@ -94,7 +94,7 @@ namespace Isis { //read the fidicial measurements from the attached table in the camera labels to define a // series of affine transformation between image (aka encoder aka machine) coordinates // and fiducial coordinates - Table tableFid("Fiducial Measurement", m_lab->FileName()); + Table tableFid("Fiducial Measurement", m_lab->fileName()); nrec = tableFid.Records(); //get the number of records found in the cube blobs diff --git a/isis/src/apollo/objs/ApolloPanoramicCamera/unitTest.cpp b/isis/src/apollo/objs/ApolloPanoramicCamera/unitTest.cpp index 59d9c51403d0bcc12faa4fe5d5b1f8042423924e..c799fddba91ff074968cd6501f16ba287c99009a 100644 --- a/isis/src/apollo/objs/ApolloPanoramicCamera/unitTest.cpp +++ b/isis/src/apollo/objs/ApolloPanoramicCamera/unitTest.cpp @@ -66,7 +66,7 @@ int main(void) { Pvl pvlBR(FileName("$apollo15/testData/BR.cub").expanded()); ApolloPanoramicCamera *camBR = (ApolloPanoramicCamera *) CameraFactory::Create(pvlBR); - cout << "FileName: " << FileName(pvlTL.FileName()).name() << endl; + cout << "FileName: " << FileName(pvlTL.fileName()).name() << endl; cout << "CK Frame: " << camTL->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); diff --git a/isis/src/base/apps/appjit/LineScanCameraRotation.cpp b/isis/src/base/apps/appjit/LineScanCameraRotation.cpp index d4c9fe1d7d7064e5978fed6e13d9253a86b3040f..59bcf76d1d1681a49fa8933685163e287368b967 100644 --- a/isis/src/base/apps/appjit/LineScanCameraRotation.cpp +++ b/isis/src/base/apps/appjit/LineScanCameraRotation.cpp @@ -47,7 +47,7 @@ namespace Isis { } // Get the kernel group and save the instrument pointing keyword - Isis::PvlGroup kernels = lab.FindGroup("Kernels", Isis::Pvl::Traverse); + Isis::PvlGroup kernels = lab.findGroup("Kernels", Isis::Pvl::Traverse); p_ckKeyword = kernels["InstrumentPointing"]; p_cacheTime = timeCache; diff --git a/isis/src/base/apps/appjit/appjit.cpp b/isis/src/base/apps/appjit/appjit.cpp index a6e4d663603244cdbd9154117addd9a9db23395e..3b1ca04af8f3cd1ee869d23fb58b810a7890670d 100644 --- a/isis/src/base/apps/appjit/appjit.cpp +++ b/isis/src/base/apps/appjit/appjit.cpp @@ -58,8 +58,8 @@ void IsisMain() { cube.open(ui.GetFileName("MASTER"), "rw"); //check for existing polygon, if exists delete it - if(cube.label()->HasObject("Polygon")) { - cube.label()->DeleteObject("Polygon"); + if(cube.label()->hasObject("Polygon")) { + cube.label()->deleteObject("Polygon"); } // Get the camera @@ -101,26 +101,26 @@ void IsisMain() { // Pull out the pointing cache as a table and write it Table cmatrix = crot.Cache("InstrumentPointing"); - // cmatrix.Label().AddComment("Corrected using appjit and" + ui.GetFileName("JITTERFILE")); + // cmatrix.Label().addComment("Corrected using appjit and" + ui.GetFileName("JITTERFILE")); cmatrix.Label() += PvlKeyword("Description", "Corrected using appjit and" + ui.GetFileName("JITTERFILE")); cmatrix.Label() += PvlKeyword("Kernels"); PvlKeyword ckKeyword = crot.InstrumentPointingValue(); - for (int i = 0; i < ckKeyword.Size(); i++) { - cmatrix.Label()["Kernels"].AddValue(ckKeyword[i]); + for (int i = 0; i < ckKeyword.size(); i++) { + cmatrix.Label()["Kernels"].addValue(ckKeyword[i]); } cube.write(cmatrix); // Write out the instrument position table - Isis::PvlGroup kernels = cube.label()->FindGroup("Kernels", Isis::Pvl::Traverse); + Isis::PvlGroup kernels = cube.label()->findGroup("Kernels", Isis::Pvl::Traverse); // Save original kernels in keyword before changing to "Table" in the kernels group PvlKeyword origCk = kernels["InstrumentPointing"]; kernels["InstrumentPointing"] = "Table"; - for (int i = 0; i < origCk.Size(); i++) { - kernels["InstrumentPointing"].AddValue(origCk[i]); + for (int i = 0; i < origCk.size(); i++) { + kernels["InstrumentPointing"].addValue(origCk[i]); } cube.putGroup(kernels); @@ -134,8 +134,8 @@ void IsisMain() { // Open the cube cube.open(list[ifile].toString(), "rw"); //check for existing polygon, if exists delete it - if(cube.label()->HasObject("Polygon")) { - cube.label()->DeleteObject("Polygon"); + if(cube.label()->hasObject("Polygon")) { + cube.label()->deleteObject("Polygon"); } // Get the camera and make sure it is a line scan camera Camera *cam = cube.camera(); @@ -147,14 +147,14 @@ void IsisMain() { cube.write(cmatrix); // Write out the new instrument pointing table - Isis::PvlGroup kernels = cube.label()->FindGroup("Kernels", Isis::Pvl::Traverse); + Isis::PvlGroup kernels = cube.label()->findGroup("Kernels", Isis::Pvl::Traverse); // Save original kernels in keyword before changing to "Table" in the kernels group PvlKeyword origCk = kernels["InstrumentPointing"]; kernels["InstrumentPointing"] = "Table"; - for (int i = 0; i < origCk.Size(); i++) { - kernels["InstrumentPointing"].AddValue(origCk[i]); + for (int i = 0; i < origCk.size(); i++) { + kernels["InstrumentPointing"].addValue(origCk[i]); } cube.putGroup(kernels); cube.close(); diff --git a/isis/src/base/apps/automos/automos.cpp b/isis/src/base/apps/automos/automos.cpp index d13164600e65573e7feb90bf71d52f5461c8687a..83570936fcb37660985f2c2d0aaef76d54fe805f 100644 --- a/isis/src/base/apps/automos/automos.cpp +++ b/isis/src/base/apps/automos/automos.cpp @@ -107,8 +107,8 @@ void IsisMain() { } } // Logs the input file location in the mosaic - for (int i = 0; i < m.imagePositions().Groups(); i++) { - Application::Log(m.imagePositions().Group(i)); + for (int i = 0; i < m.imagePositions().groups(); i++) { + Application::Log(m.imagePositions().group(i)); } if(olistFlag) { diff --git a/isis/src/base/apps/autoregtemplate/autoregtemplate.cpp b/isis/src/base/apps/autoregtemplate/autoregtemplate.cpp index efd936ded9ea9c5f6d451616f4b81752438cd1ac..4ce21f69c62f4fc8497468b3e8f2b77b03b89408 100644 --- a/isis/src/base/apps/autoregtemplate/autoregtemplate.cpp +++ b/isis/src/base/apps/autoregtemplate/autoregtemplate.cpp @@ -19,17 +19,17 @@ void IsisMain() { // Make sure the entered algorithm name is valid QString algoName = ui.GetString("ALGORITHM"); - if(!algos.HasGroup(algoName)) { + if(!algos.hasGroup(algoName)) { // Give the user a list of possible algorithms QString msg = "Invalid value for [ALGORITHM] entered [" + algoName + "]. " + "Must be one of ["; - for(int i = 0; i < algos.Groups(); i++) { + for(int i = 0; i < algos.groups(); i++) { if(i != 0 && - algos.Group(i).Name() == algos.Group(0).Name()) break; + algos.group(i).name() == algos.group(0).name()) break; if(i != 0) msg += ", "; - msg += algos.Group(i).Name(); + msg += algos.group(i).name(); } msg += "]"; throw IException(IException::User, msg, _FILEINFO_); @@ -67,7 +67,7 @@ void IsisMain() { algorithm += PvlKeyword("ChipInterpolator", paramToInterpMap[ui.GetString("INTERP")]); // Add algorithm group to the autoreg object - autoreg.AddGroup(algorithm); + autoreg.addGroup(algorithm); // Get pattern and search chip size values for error testing int psamp = ui.GetInteger("PSAMP"); @@ -144,8 +144,8 @@ void IsisMain() { } // Add groups to the autoreg object - autoreg.AddGroup(patternChip); - autoreg.AddGroup(searchChip); + autoreg.addGroup(patternChip); + autoreg.addGroup(searchChip); // Set up the surface model testing group if(subPixelAccuracy) { @@ -169,15 +169,15 @@ void IsisMain() { + toString(winSize) + "]. Must be an odd number (Default = 5)"; throw IException(IException::User, msg, _FILEINFO_); } - autoreg.AddGroup(surfaceModel); + autoreg.addGroup(surfaceModel); } // Add autoreg group to Pvl - p.AddObject(autoreg); + p.addObject(autoreg); // Write the autoreg group pvl to the output file QString output = ui.GetFileName("TOPVL"); - p.Write(output); + p.write(output); Isis::Application::GuiLog(p); } diff --git a/isis/src/base/apps/cam2cam/cam2cam.cpp b/isis/src/base/apps/cam2cam/cam2cam.cpp index 4cec087801b1eb20d392ce07c166510ca17f45e2..017904bc4ead15242a6e633d7b4319a5239dfdb6 100644 --- a/isis/src/base/apps/cam2cam/cam2cam.cpp +++ b/isis/src/base/apps/cam2cam/cam2cam.cpp @@ -40,7 +40,7 @@ void IsisMain() { PvlGroup instgrp = mcube->group("Instrument"); if(!outcam->IsBandIndependent()) { PvlKeyword rBand("ReferenceBand", toString(referenceBand)); - rBand.AddComment("# All bands are aligned to reference band"); + rBand.addComment("# All bands are aligned to reference band"); instgrp += rBand; mcube->putGroup(instgrp); delete outcam; diff --git a/isis/src/base/apps/cam2map/cam2map.cpp b/isis/src/base/apps/cam2map/cam2map.cpp index e07de49e4e195a1bf03d494e50f8a265e26eb50a..deb9dc724b2e6fa6fc3537d5f4bd7ca08d03f521 100644 --- a/isis/src/base/apps/cam2map/cam2map.cpp +++ b/isis/src/base/apps/cam2map/cam2map.cpp @@ -44,8 +44,8 @@ void IsisMain() { // Get the map projection file provided by the user UserInterface &ui = Application::GetUserInterface(); Pvl userMap; - userMap.Read(ui.GetFileName("MAP")); - PvlGroup &userGrp = userMap.FindGroup("Mapping", Pvl::Traverse); + userMap.read(ui.GetFileName("MAP")); + PvlGroup &userGrp = userMap.findGroup("Mapping", Pvl::Traverse); // Open the input cube and get the camera icube = p.SetInputCube("FROM"); @@ -61,103 +61,103 @@ void IsisMain() { // Get the mapping grop Pvl camMap; incam->BasicMapping(camMap); - PvlGroup &camGrp = camMap.FindGroup("Mapping"); + PvlGroup &camGrp = camMap.findGroup("Mapping"); // Make the target info match the user mapfile double minlat, maxlat, minlon, maxlon; incam->GroundRange(minlat, maxlat, minlon, maxlon, userMap); - camGrp.AddKeyword(PvlKeyword("MinimumLatitude", toString(minlat)), Pvl::Replace); - camGrp.AddKeyword(PvlKeyword("MaximumLatitude", toString(maxlat)), Pvl::Replace); - camGrp.AddKeyword(PvlKeyword("MinimumLongitude", toString(minlon)), Pvl::Replace); - camGrp.AddKeyword(PvlKeyword("MaximumLongitude", toString(maxlon)), Pvl::Replace); + camGrp.addKeyword(PvlKeyword("MinimumLatitude", toString(minlat)), Pvl::Replace); + camGrp.addKeyword(PvlKeyword("MaximumLatitude", toString(maxlat)), Pvl::Replace); + camGrp.addKeyword(PvlKeyword("MinimumLongitude", toString(minlon)), Pvl::Replace); + camGrp.addKeyword(PvlKeyword("MaximumLongitude", toString(maxlon)), Pvl::Replace); // We want to delete the keywords we just added if the user wants the range // out of the mapfile, otherwise they will replace any keywords not in the // mapfile if(ui.GetString("DEFAULTRANGE") == "MAP" || ui.GetBoolean("MATCHMAP")) { - camGrp.DeleteKeyword("MinimumLatitude"); - camGrp.DeleteKeyword("MaximumLatitude"); - camGrp.DeleteKeyword("MinimumLongitude"); - camGrp.DeleteKeyword("MaximumLongitude"); + camGrp.deleteKeyword("MinimumLatitude"); + camGrp.deleteKeyword("MaximumLatitude"); + camGrp.deleteKeyword("MinimumLongitude"); + camGrp.deleteKeyword("MaximumLongitude"); } // Otherwise, remove the keywords from the map file so the camera keywords // will be propogated correctly else { - while(userGrp.HasKeyword("MinimumLatitude")) { - userGrp.DeleteKeyword("MinimumLatitude"); + while(userGrp.hasKeyword("MinimumLatitude")) { + userGrp.deleteKeyword("MinimumLatitude"); } - while(userGrp.HasKeyword("MinimumLongitude")) { - userGrp.DeleteKeyword("MinimumLongitude"); + while(userGrp.hasKeyword("MinimumLongitude")) { + userGrp.deleteKeyword("MinimumLongitude"); } - while(userGrp.HasKeyword("MaximumLatitude")) { - userGrp.DeleteKeyword("MaximumLatitude"); + while(userGrp.hasKeyword("MaximumLatitude")) { + userGrp.deleteKeyword("MaximumLatitude"); } - while(userGrp.HasKeyword("MaximumLongitude")) { - userGrp.DeleteKeyword("MaximumLongitude"); + while(userGrp.hasKeyword("MaximumLongitude")) { + userGrp.deleteKeyword("MaximumLongitude"); } } // If the user decided to enter a ground range then override if(ui.WasEntered("MINLON") && !ui.GetBoolean("MATCHMAP")) { - userGrp.AddKeyword(PvlKeyword("MinimumLongitude", + userGrp.addKeyword(PvlKeyword("MinimumLongitude", toString(ui.GetDouble("MINLON"))), Pvl::Replace); } if(ui.WasEntered("MAXLON") && !ui.GetBoolean("MATCHMAP")) { - userGrp.AddKeyword(PvlKeyword("MaximumLongitude", + userGrp.addKeyword(PvlKeyword("MaximumLongitude", toString(ui.GetDouble("MAXLON"))), Pvl::Replace); } if(ui.WasEntered("MINLAT") && !ui.GetBoolean("MATCHMAP")) { - userGrp.AddKeyword(PvlKeyword("MinimumLatitude", + userGrp.addKeyword(PvlKeyword("MinimumLatitude", toString(ui.GetDouble("MINLAT"))), Pvl::Replace); } if(ui.WasEntered("MAXLAT") && !ui.GetBoolean("MATCHMAP")) { - userGrp.AddKeyword(PvlKeyword("MaximumLatitude", + userGrp.addKeyword(PvlKeyword("MaximumLatitude", toString(ui.GetDouble("MAXLAT"))), Pvl::Replace); } // If they want the res. from the mapfile, delete it from the camera so // nothing gets overriden if(ui.GetString("PIXRES") == "MAP" || ui.GetBoolean("MATCHMAP")) { - camGrp.DeleteKeyword("PixelResolution"); + camGrp.deleteKeyword("PixelResolution"); } // Otherwise, delete any resolution keywords from the mapfile so the camera // info is propogated over else if(ui.GetString("PIXRES") == "CAMERA") { - if(userGrp.HasKeyword("Scale")) { - userGrp.DeleteKeyword("Scale"); + if(userGrp.hasKeyword("Scale")) { + userGrp.deleteKeyword("Scale"); } - if(userGrp.HasKeyword("PixelResolution")) { - userGrp.DeleteKeyword("PixelResolution"); + if(userGrp.hasKeyword("PixelResolution")) { + userGrp.deleteKeyword("PixelResolution"); } } // Copy any defaults that are not in the user map from the camera map file - for(int k = 0; k < camGrp.Keywords(); k++) { - if(!userGrp.HasKeyword(camGrp[k].Name())) { + for(int k = 0; k < camGrp.keywords(); k++) { + if(!userGrp.hasKeyword(camGrp[k].name())) { userGrp += camGrp[k]; } } // If the user decided to enter a resolution then override if(ui.GetString("PIXRES") == "MPP" && !ui.GetBoolean("MATCHMAP")) { - userGrp.AddKeyword(PvlKeyword("PixelResolution", + userGrp.addKeyword(PvlKeyword("PixelResolution", toString(ui.GetDouble("RESOLUTION"))), Pvl::Replace); - if(userGrp.HasKeyword("Scale")) { - userGrp.DeleteKeyword("Scale"); + if(userGrp.hasKeyword("Scale")) { + userGrp.deleteKeyword("Scale"); } } else if(ui.GetString("PIXRES") == "PPD" && !ui.GetBoolean("MATCHMAP")) { - userGrp.AddKeyword(PvlKeyword("Scale", + userGrp.addKeyword(PvlKeyword("Scale", toString(ui.GetDouble("RESOLUTION"))), Pvl::Replace); - if(userGrp.HasKeyword("PixelResolution")) { - userGrp.DeleteKeyword("PixelResolution"); + if(userGrp.hasKeyword("PixelResolution")) { + userGrp.deleteKeyword("PixelResolution"); } } @@ -167,22 +167,22 @@ void IsisMain() { if(incam->IntersectsLongitudeDomain(userMap)) { if(ui.GetString("LONSEAM") == "AUTO") { if((int) userGrp["LongitudeDomain"] == 360) { - userGrp.AddKeyword(PvlKeyword("LongitudeDomain", "180"), + userGrp.addKeyword(PvlKeyword("LongitudeDomain", "180"), Pvl::Replace); if(incam->IntersectsLongitudeDomain(userMap)) { // Its looks like a global image so switch back to the // users preference - userGrp.AddKeyword(PvlKeyword("LongitudeDomain", "360"), + userGrp.addKeyword(PvlKeyword("LongitudeDomain", "360"), Pvl::Replace); } } else { - userGrp.AddKeyword(PvlKeyword("LongitudeDomain", "360"), + userGrp.addKeyword(PvlKeyword("LongitudeDomain", "360"), Pvl::Replace); if(incam->IntersectsLongitudeDomain(userMap)) { // Its looks like a global image so switch back to the // users preference - userGrp.AddKeyword(PvlKeyword("LongitudeDomain", "180"), + userGrp.addKeyword(PvlKeyword("LongitudeDomain", "180"), Pvl::Replace); } } @@ -190,16 +190,16 @@ void IsisMain() { double minlat, maxlat, minlon, maxlon; incam->GroundRange(minlat, maxlat, minlon, maxlon, userMap); if(!ui.WasEntered("MINLAT")) { - userGrp.AddKeyword(PvlKeyword("MinimumLatitude", toString(minlat)), Pvl::Replace); + userGrp.addKeyword(PvlKeyword("MinimumLatitude", toString(minlat)), Pvl::Replace); } if(!ui.WasEntered("MAXLAT")) { - userGrp.AddKeyword(PvlKeyword("MaximumLatitude", toString(maxlat)), Pvl::Replace); + userGrp.addKeyword(PvlKeyword("MaximumLatitude", toString(maxlat)), Pvl::Replace); } if(!ui.WasEntered("MINLON")) { - userGrp.AddKeyword(PvlKeyword("MinimumLongitude", toString(minlon)), Pvl::Replace); + userGrp.addKeyword(PvlKeyword("MinimumLongitude", toString(minlon)), Pvl::Replace); } if(!ui.WasEntered("MAXLON")) { - userGrp.AddKeyword(PvlKeyword("MaximumLongitude", toString(maxlon)), Pvl::Replace); + userGrp.addKeyword(PvlKeyword("MaximumLongitude", toString(maxlon)), Pvl::Replace); } } @@ -362,7 +362,7 @@ void IsisMain() { int frameSize = dmap->frameletHeight() / dmap->LineScaleFactor(); // Check for even/odd cube to determine starting line - PvlGroup &instGrp = icube->label()->FindGroup("Instrument", Pvl::Traverse); + PvlGroup &instGrp = icube->label()->findGroup("Instrument", Pvl::Traverse); int startLine = 1; // Get the alpha cube group in case they cropped the image @@ -540,8 +540,8 @@ void PrintMap() { // Get mapping group from map file Pvl userMap; - userMap.Read(ui.GetFileName("MAP")); - PvlGroup &userGrp = userMap.FindGroup("Mapping", Pvl::Traverse); + userMap.read(ui.GetFileName("MAP")); + PvlGroup &userGrp = userMap.findGroup("Mapping", Pvl::Traverse); //Write map file out to the log Application::GuiLog(userGrp); @@ -553,17 +553,17 @@ void LoadMapRes() { // Get mapping group from map file Pvl userMap; - userMap.Read(ui.GetFileName("MAP")); - PvlGroup &userGrp = userMap.FindGroup("Mapping", Pvl::Traverse); + userMap.read(ui.GetFileName("MAP")); + PvlGroup &userGrp = userMap.findGroup("Mapping", Pvl::Traverse); // Set resolution - if(userGrp.HasKeyword("Scale")) { + if(userGrp.hasKeyword("Scale")) { ui.Clear("RESOLUTION"); ui.PutDouble("RESOLUTION", userGrp["Scale"]); ui.Clear("PIXRES"); ui.PutAsString("PIXRES", "PPD"); } - else if(userGrp.HasKeyword("PixelResolution")) { + else if(userGrp.hasKeyword("PixelResolution")) { ui.Clear("RESOLUTION"); ui.PutDouble("RESOLUTION", userGrp["PixelResolution"]); ui.Clear("PIXRES"); @@ -586,7 +586,7 @@ void LoadCameraRes() { Camera *cam = c.camera(); Pvl camMap; cam->BasicMapping(camMap); - PvlGroup &camGrp = camMap.FindGroup("Mapping"); + PvlGroup &camGrp = camMap.findGroup("Mapping"); ui.Clear("RESOLUTION"); ui.PutDouble("RESOLUTION", camGrp["PixelResolution"]); @@ -601,8 +601,8 @@ void LoadMapRange() { // Get map file Pvl userMap; - userMap.Read(ui.GetFileName("MAP")); - PvlGroup &userGrp = userMap.FindGroup("Mapping", Pvl::Traverse); + userMap.read(ui.GetFileName("MAP")); + PvlGroup &userGrp = userMap.findGroup("Mapping", Pvl::Traverse); // Set ground range keywords that are found in mapfile int count = 0; @@ -610,19 +610,19 @@ void LoadMapRange() { ui.Clear("MAXLAT"); ui.Clear("MINLON"); ui.Clear("MAXLON"); - if(userGrp.HasKeyword("MinimumLatitude")) { + if(userGrp.hasKeyword("MinimumLatitude")) { ui.PutDouble("MINLAT", userGrp["MinimumLatitude"]); count++; } - if(userGrp.HasKeyword("MaximumLatitude")) { + if(userGrp.hasKeyword("MaximumLatitude")) { ui.PutDouble("MAXLAT", userGrp["MaximumLatitude"]); count++; } - if(userGrp.HasKeyword("MinimumLongitude")) { + if(userGrp.hasKeyword("MinimumLongitude")) { ui.PutDouble("MINLON", userGrp["MinimumLongitude"]); count++; } - if(userGrp.HasKeyword("MaximumLongitude")) { + if(userGrp.hasKeyword("MaximumLongitude")) { ui.PutDouble("MAXLON", userGrp["MaximumLongitude"]); count++; } @@ -645,7 +645,7 @@ void LoadCameraRange() { // Get the map projection file provided by the user Pvl userMap; - userMap.Read(ui.GetFileName("MAP")); + userMap.read(ui.GetFileName("MAP")); // Open the input cube, get the camera object, and the cam map projection Cube c; diff --git a/isis/src/base/apps/caminfo/CamTools.cpp b/isis/src/base/apps/caminfo/CamTools.cpp index 9af5a55928c3e204823da0ba4fc9d7166031aa67..e11e17a1bb1158693b8c7d685321e675dee03dac 100644 --- a/isis/src/base/apps/caminfo/CamTools.cpp +++ b/isis/src/base/apps/caminfo/CamTools.cpp @@ -563,7 +563,7 @@ namespace Isis { // East 360 longitude domain and planetocentric laitudes. Pvl sinuMap; camera.BasicMapping(sinuMap); - PvlGroup &mapping = sinuMap.FindGroup("Mapping"); + PvlGroup &mapping = sinuMap.findGroup("Mapping"); double clon = g.centerLongitude; double minLon = (double) mapping["MinimumLongitude"]; @@ -578,18 +578,18 @@ namespace Isis { if(!(g.hasNorthPole || g.hasSouthPole)) { // Convert the mapping group contents to 180 Longitude domain PvlKeyword &ldkey = mapping["LongitudeDomain"]; - ldkey.SetValue("180"); + ldkey.setValue("180"); PvlKeyword &minkey = mapping["MinimumLongitude"]; PvlKeyword &maxkey = mapping["MaximumLongitude"]; - minkey.SetValue("-180.0"); - maxkey.SetValue("180.0"); + minkey.setValue("-180.0"); + maxkey.setValue("180.0"); // Compute new ranges double minLat180, maxLat180, minLon180, maxLon180; camera.GroundRange(minLat180, maxLat180, minLon180, maxLon180, sinuMap); - minkey.SetValue(ToString(minLon180)); - maxkey.SetValue(ToString(maxLon180)); + minkey.setValue(ToString(minLon180)); + maxkey.setValue(ToString(maxLon180)); clon = (minLon180 + maxLon180) / 2.0; // Convert the polygon to 180 domain @@ -660,7 +660,7 @@ namespace Isis { } // Add the mapping group used to project polygon - pband.AddGroup(_mapping.FindGroup("Mapping")); + pband.addGroup(_mapping.findGroup("Mapping")); return; } diff --git a/isis/src/base/apps/caminfo/CamTools.h b/isis/src/base/apps/caminfo/CamTools.h index c77366ed15aaefff41b94e1d6cf4ac6a89aa1cb2..457d1328973dd76b37bf65616a492fac90045f85 100644 --- a/isis/src/base/apps/caminfo/CamTools.h +++ b/isis/src/base/apps/caminfo/CamTools.h @@ -74,7 +74,7 @@ namespace Isis { inline PvlKeyword ValidateKey(const QString keyname, PvlKeyword &key, const QString &unit = "") { - if(key.IsNull()) { + if(key.isNull()) { return (PvlKeyword(keyname, "NULL")); } else { diff --git a/isis/src/base/apps/caminfo/caminfo.cpp b/isis/src/base/apps/caminfo/caminfo.cpp index b50d2ae5e4f1aaa8bc18a7a89b53274a6f90165e..8187862397a2a3aae7d2c305aef00094cb0f91e3 100644 --- a/isis/src/base/apps/caminfo/caminfo.cpp +++ b/isis/src/base/apps/caminfo/caminfo.cpp @@ -86,31 +86,31 @@ void IsisMain() { CameraStatistics stats(filename, sinc, linc); Pvl camPvl = stats.toPvl(); - PvlGroup cg = camPvl.FindGroup("Latitude", Pvl::Traverse); + PvlGroup cg = camPvl.findGroup("Latitude", Pvl::Traverse); camstats->append(MakePair("MinimumLatitude", cg["latitudeminimum"][0])); camstats->append(MakePair("MaximumLatitude", cg["latitudemaximum"][0])); - cg = camPvl.FindGroup("Longitude", Pvl::Traverse); + cg = camPvl.findGroup("Longitude", Pvl::Traverse); camstats->append(MakePair("MinimumLongitude", cg["longitudeminimum"][0])); camstats->append(MakePair("MaximumLongitude", cg["longitudemaximum"][0])); - cg = camPvl.FindGroup("Resolution", Pvl::Traverse); + cg = camPvl.findGroup("Resolution", Pvl::Traverse); camstats->append(MakePair("MinimumResolution", cg["resolutionminimum"][0])); camstats->append(MakePair("MaximumResolution", cg["resolutionmaximum"][0])); - cg = camPvl.FindGroup("PhaseAngle", Pvl::Traverse); + cg = camPvl.findGroup("PhaseAngle", Pvl::Traverse); camstats->append(MakePair("MinimumPhase", cg["phaseminimum"][0])); camstats->append(MakePair("MaximumPhase", cg["phasemaximum"][0])); - cg = camPvl.FindGroup("EmissionAngle", Pvl::Traverse); + cg = camPvl.findGroup("EmissionAngle", Pvl::Traverse); camstats->append(MakePair("MinimumEmission", cg["emissionminimum"][0])); camstats->append(MakePair("MaximumEmission", cg["emissionmaximum"][0])); - cg = camPvl.FindGroup("IncidenceAngle", Pvl::Traverse); + cg = camPvl.findGroup("IncidenceAngle", Pvl::Traverse); camstats->append(MakePair("MinimumIncidence", cg["incidenceminimum"][0])); camstats->append(MakePair("MaximumIncidence", cg["incidencemaximum"][0])); - cg = camPvl.FindGroup("LocalSolarTime", Pvl::Traverse); + cg = camPvl.findGroup("LocalSolarTime", Pvl::Traverse); camstats->append(MakePair("LocalTimeMinimum", cg["localsolartimeMinimum"][0])); camstats->append(MakePair("LocalTimeMaximum", cg["localsolartimeMaximum"][0])); } @@ -204,10 +204,10 @@ void IsisMain() { PvlObject::PvlObjectIterator objIter; bool found = false; PvlGroup fpgrp; - for (objIter=pvl.EndObject()-1; objIter>=pvl.BeginObject(); objIter--) { - if (objIter->Name().toUpper() == "FOOTPRINTINIT") { + for (objIter=pvl.endObject()-1; objIter>=pvl.beginObject(); objIter--) { + if (objIter->name().toUpper() == "FOOTPRINTINIT") { found = true; - fpgrp = objIter->FindGroup("UserParameters"); + fpgrp = objIter->findGroup("UserParameters"); break; } } @@ -215,7 +215,7 @@ void IsisMain() { QString msg = "Footprint blob was not found in input image history"; throw IException(IException::User, msg, _FILEINFO_); } - QString prec = (QString)fpgrp.FindKeyword("INCREASEPRECISION"); + QString prec = (QString)fpgrp.findKeyword("INCREASEPRECISION"); prec = prec.toUpper(); if (prec == "TRUE") { precision = true; @@ -223,28 +223,28 @@ void IsisMain() { else { precision = false; } - QString inctype = (QString)fpgrp.FindKeyword("INCTYPE"); + QString inctype = (QString)fpgrp.findKeyword("INCTYPE"); inctype = inctype.toUpper(); if (inctype == "LINCSINC") { - int linc = fpgrp.FindKeyword("LINC"); - int sinc = fpgrp.FindKeyword("SINC"); + int linc = fpgrp.findKeyword("LINC"); + int sinc = fpgrp.findKeyword("SINC"); bandGeom->setSampleInc(sinc); bandGeom->setLineInc(linc); } else { - int vertices = fpgrp.FindKeyword("NUMVERTICES"); + int vertices = fpgrp.findKeyword("NUMVERTICES"); int lincsinc = (int)(0.5 + (((incube->sampleCount() * 2) + (incube->lineCount() * 2) - 3.0) / vertices)); bandGeom->setSampleInc(lincsinc); bandGeom->setLineInc(lincsinc); } - if (fpgrp.HasKeyword("MAXINCIDENCE")) { - double maxinc = fpgrp.FindKeyword("MAXINCIDENCE"); + if (fpgrp.hasKeyword("MAXINCIDENCE")) { + double maxinc = fpgrp.findKeyword("MAXINCIDENCE"); bandGeom->setMaxIncidence(maxinc); } - if (fpgrp.HasKeyword("MAXEMISSION")) { - double maxema = fpgrp.FindKeyword("MAXEMISSION"); + if (fpgrp.hasKeyword("MAXEMISSION")) { + double maxema = fpgrp.findKeyword("MAXEMISSION"); bandGeom->setMaxEmission(maxema); } } @@ -305,21 +305,21 @@ void GeneratePVLOutput(Cube *incube, PvlObject common("Parameters"); for(int i = 0; i < general->size(); i++) common += PvlKeyword((*general)[i].first, (*general)[i].second); - params.AddObject(common); + params.addObject(common); // Add the camstats if(camstats) { PvlObject pcband("Camstats"); for(int i = 0; i < camstats->size(); i++) pcband += ValidateKey((*camstats)[i].first, toDouble((*camstats)[i].second)); - params.AddObject(pcband); + params.addObject(pcband); } // Add the input ISIS label if requested if(ui.GetBoolean("ISISLABEL")) { Pvl label = *(incube->label()); - label.SetName("IsisLabel"); - params.AddObject(label); + label.setName("IsisLabel"); + params.addObject(label); } // Add the orginal label blob @@ -327,8 +327,8 @@ void GeneratePVLOutput(Cube *incube, OriginalLabel orig; incube->read(orig); Pvl p = orig.ReturnLabels(); - p.SetName("OriginalLabel"); - params.AddObject(p); + p.setName("OriginalLabel"); + params.addObject(p); } // Add the stats @@ -336,7 +336,7 @@ void GeneratePVLOutput(Cube *incube, PvlObject sgroup("Statistics"); for(int i = 0; i < statistics->size(); i++) sgroup += ValidateKey((*statistics)[i].first, toDouble((*statistics)[i].second)); - params.AddObject(sgroup); + params.addObject(sgroup); } // Add the geometry info @@ -344,25 +344,25 @@ void GeneratePVLOutput(Cube *incube, if(ui.GetBoolean("GEOMETRY")) { PvlObject ggroup("Geometry"); bandGeom->generateGeometryKeys(ggroup); - params.AddObject(ggroup); + params.addObject(ggroup); } if(ui.GetBoolean("POLYGON") || ui.GetBoolean("USELABEL")) { PvlObject ggroup("Polygon"); bandGeom->generatePolygonKeys(ggroup); - params.AddObject(ggroup); + params.addObject(ggroup); } } // Output the result Pvl pout; QString outFile = ui.GetFileName("TO"); - pout.AddObject(params); + pout.addObject(params); if(ui.GetBoolean("APPEND")) - pout.Append(outFile); + pout.append(outFile); else - pout.Write(outFile); + pout.write(outFile); } @@ -418,8 +418,8 @@ void GenerateCSVOutput(Cube *incube, if(ui.GetBoolean("GEOMETRY")) { PvlObject geomGrp("Geometry"); bandGeom->generateGeometryKeys(geomGrp); - for(int i = 0; i < geomGrp.Keywords(); i++) { - if(not appending) keys += "Geom_" + geomGrp[i].Name() + delim; + for(int i = 0; i < geomGrp.keywords(); i++) { + if(not appending) keys += "Geom_" + geomGrp[i].name() + delim; values += geomGrp[i][0] + delim; } } diff --git a/isis/src/base/apps/campt/campt.cpp b/isis/src/base/apps/campt/campt.cpp index 8c431a8b7cfbb29be5a366856a51c12b15332bc7..e3deae534abb9e9f1387c7bb436a1ec2338fe9aa 100644 --- a/isis/src/base/apps/campt/campt.cpp +++ b/isis/src/base/apps/campt/campt.cpp @@ -69,13 +69,13 @@ void IsisMain() { // Write the pvl group out to the file if(ui.GetString("FORMAT") == "PVL") { Pvl temp; - temp.SetTerminator(""); - temp.AddGroup((*point)); + temp.setTerminator(""); + temp.addGroup((*point)); if(append) { - temp.Append(outFile); + temp.append(outFile); } else { - temp.Write(outFile); + temp.write(outFile); } } @@ -96,25 +96,25 @@ void IsisMain() { } if(writeHeader) { - for(int i = 0; i < (*point).Keywords(); i++) { - if((*point)[i].Size() == 3) { - os << (*point)[i].Name() << "X," - << (*point)[i].Name() << "Y," - << (*point)[i].Name() << "Z"; + for(int i = 0; i < (*point).keywords(); i++) { + if((*point)[i].size() == 3) { + os << (*point)[i].name() << "X," + << (*point)[i].name() << "Y," + << (*point)[i].name() << "Z"; } else { - os << (*point)[i].Name(); + os << (*point)[i].name(); } - if(i < point->Keywords() - 1) { + if(i < point->keywords() - 1) { os << ","; } } os << endl; } - for(int i = 0; i < (*point).Keywords(); i++) { - if((*point)[i].Size() == 3) { + for(int i = 0; i < (*point).keywords(); i++) { + if((*point)[i].size() == 3) { os << (QString)(*point)[i][0] << "," << (QString)(*point)[i][1] << "," << (QString)(*point)[i][2]; @@ -123,7 +123,7 @@ void IsisMain() { os << (QString)(*point)[i]; } - if(i < (*point).Keywords() - 1) { + if(i < (*point).keywords() - 1) { os << ","; } } diff --git a/isis/src/base/apps/camrange/camrange.cpp b/isis/src/base/apps/camrange/camrange.cpp index ed1ba2de4abf64ff84576d5ec34df4e86c03563f..65f3b215dae4412cb67ae6c2029fbad0cc7a8139 100644 --- a/isis/src/base/apps/camrange/camrange.cpp +++ b/isis/src/base/apps/camrange/camrange.cpp @@ -18,7 +18,7 @@ void IsisMain() { Camera *cam = icube->camera(); Pvl mapping; cam->BasicMapping(mapping); - PvlGroup &mapgrp = mapping.FindGroup("Mapping"); + PvlGroup &mapgrp = mapping.findGroup("Mapping"); // Setup the output results by first adding the filename UserInterface &ui = Application::GetUserInterface(); @@ -53,7 +53,7 @@ void IsisMain() { ugr += PvlKeyword("MaximumLongitude", toString(maxlon)); // Get the ographic latitude range - mapgrp.AddKeyword(PvlKeyword("LatitudeType", "Planetographic"), + mapgrp.addKeyword(PvlKeyword("LatitudeType", "Planetographic"), Pvl::Replace); cam->GroundRange(minlat, maxlat, minlon, maxlon, mapping); PvlGroup ogr("LatitudeRange"); @@ -62,7 +62,7 @@ void IsisMain() { ogr += PvlKeyword("MaximumLatitude", toString(maxlat)); // Get positive west longitude coordinates in 360 domain - mapgrp.AddKeyword(PvlKeyword("LongitudeDirection", "PositiveWest"), + mapgrp.addKeyword(PvlKeyword("LongitudeDirection", "PositiveWest"), Pvl::Replace); cam->GroundRange(minlat, maxlat, minlon, maxlon, mapping); PvlGroup pos360("PositiveWest360"); @@ -72,9 +72,9 @@ void IsisMain() { pos360 += PvlKeyword("MaximumLongitude", toString(maxlon)); // Get positive east longitude coordinates in 180 domain - mapgrp.AddKeyword(PvlKeyword("LongitudeDirection", "PositiveEast"), + mapgrp.addKeyword(PvlKeyword("LongitudeDirection", "PositiveEast"), Pvl::Replace); - mapgrp.AddKeyword(PvlKeyword("LongitudeDomain", "180"), + mapgrp.addKeyword(PvlKeyword("LongitudeDomain", "180"), Pvl::Replace); cam->GroundRange(minlat, maxlat, minlon, maxlon, mapping); PvlGroup pos180("PositiveEast180"); @@ -84,7 +84,7 @@ void IsisMain() { pos180 += PvlKeyword("MaximumLongitude", toString(maxlon)); // Get positive west longitude coordinates in 180 domain - mapgrp.AddKeyword(PvlKeyword("LongitudeDirection", "PositiveWest"), + mapgrp.addKeyword(PvlKeyword("LongitudeDirection", "PositiveWest"), Pvl::Replace); cam->GroundRange(minlat, maxlat, minlon, maxlon, mapping); PvlGroup neg180("PositiveWest180"); @@ -105,14 +105,14 @@ void IsisMain() { // Write the output file if requested if(ui.WasEntered("TO")) { Pvl temp; - temp.AddGroup(target); - temp.AddGroup(res); - temp.AddGroup(ugr); - temp.AddGroup(ogr); - temp.AddGroup(pos360); - temp.AddGroup(pos180); - temp.AddGroup(neg180); - temp.Write(ui.GetFileName("TO", "txt")); + temp.addGroup(target); + temp.addGroup(res); + temp.addGroup(ugr); + temp.addGroup(ogr); + temp.addGroup(pos360); + temp.addGroup(pos180); + temp.addGroup(neg180); + temp.write(ui.GetFileName("TO", "txt")); } p.EndProcess(); diff --git a/isis/src/base/apps/camstats/camstats.cpp b/isis/src/base/apps/camstats/camstats.cpp index 4d04339fd51b3cbb4e1ad411c3e1f5ffe92d45ec..6499377b2c457a0eaec290a9d609e0597b6e8771 100644 --- a/isis/src/base/apps/camstats/camstats.cpp +++ b/isis/src/base/apps/camstats/camstats.cpp @@ -34,8 +34,8 @@ void IsisMain() { // Send the Output to the log area Pvl statsPvl = camStats.toPvl(); - for (int i = 0; i < statsPvl.Groups(); i++) { - Application::Log(statsPvl.Group(i)); + for (int i = 0; i < statsPvl.groups(); i++) { + Application::Log(statsPvl.group(i)); } if(ui.WasEntered("TO")) { @@ -45,7 +45,7 @@ void IsisMain() { // If the user chose a format of PVL, then write to the output file ("TO") if(ui.GetString("FORMAT") == "PVL") { - (append) ? statsPvl.Append(outfile) : statsPvl.Write(outfile); + (append) ? statsPvl.append(outfile) : statsPvl.write(outfile); } else { // Create a flatfile of the data with columhn headings the flatfile is @@ -154,13 +154,13 @@ void IsisMain() { // Place all the gathered camera statistics in a table and attach it to the // cube. Skip "User Parameters" group. - for (int i = 1; i < statsPvl.Groups(); i++) { - PvlGroup &group = statsPvl.Group(i); + for (int i = 1; i < statsPvl.groups(); i++) { + PvlGroup &group = statsPvl.group(i); int entry = 0; - record[entry] = group.Name(); + record[entry] = group.name(); entry++; - for (int j = 0; j < group.Keywords(); j++) { + for (int j = 0; j < group.keywords(); j++) { record[entry] = toDouble(group[j][0]); entry++; } diff --git a/isis/src/base/apps/camtrim/camtrim.cpp b/isis/src/base/apps/camtrim/camtrim.cpp index 56e88606061a3bb5798e88ebecb7bd68eab53117..ccee7b5004378f684c7868fef6cc7ebb32bf335c 100644 --- a/isis/src/base/apps/camtrim/camtrim.cpp +++ b/isis/src/base/apps/camtrim/camtrim.cpp @@ -52,7 +52,7 @@ void IsisMain() { // lat/lons the user wants if(ui.WasEntered("MAP")) { Pvl lab; - lab.Read(ui.GetFileName("MAP")); + lab.read(ui.GetFileName("MAP")); proj = ProjectionFactory::Create(lab); // add mapping to print.prt diff --git a/isis/src/base/apps/cathist/cathist.cpp b/isis/src/base/apps/cathist/cathist.cpp index 0bad55d62af0160b6641999af81f93e56d2095ad..39b32f0bedbf7fa247b70fe2f95051828d5d03fa 100644 --- a/isis/src/base/apps/cathist/cathist.cpp +++ b/isis/src/base/apps/cathist/cathist.cpp @@ -36,10 +36,10 @@ void IsisMain() { } else if (ui.WasEntered("TO")) { if (append) { - pvl.Append(tofile.expanded()); + pvl.append(tofile.expanded()); } else { - pvl.Write(tofile.expanded()); + pvl.write(tofile.expanded()); } } else { @@ -58,10 +58,10 @@ void IsisMain() { text = new TextFile(tofile.expanded(),"overwrite"); } } - for(int i = 0; i < pvl.Objects(); ++i) { - QString all = pvl.Object(i).Name() + " "; - PvlGroup user = pvl.Object(i).FindGroup("UserParameters"); - for(int j = 0; j < user.Keywords(); ++j) { + for(int i = 0; i < pvl.objects(); ++i) { + QString all = pvl.object(i).name() + " "; + PvlGroup user = pvl.object(i).findGroup("UserParameters"); + for(int j = 0; j < user.keywords(); ++j) { ostringstream os; os << user[j]; QString temp = os.str().c_str(); diff --git a/isis/src/base/apps/catlab/catlab.cpp b/isis/src/base/apps/catlab/catlab.cpp index 76471331d89c3e1e2435e872ed4a7c1d0b093c8f..f66021ad3718e46cd61d06245835f3516df5d0de 100644 --- a/isis/src/base/apps/catlab/catlab.cpp +++ b/isis/src/base/apps/catlab/catlab.cpp @@ -22,10 +22,10 @@ void IsisMain() { // Output to file if entered if(ui.WasEntered("TO")) { if (ui.GetBoolean("APPEND")) { - label.Append(FileName(ui.GetFileName("TO")).expanded()); + label.append(FileName(ui.GetFileName("TO")).expanded()); } else { - label.Write(FileName(ui.GetFileName("TO")).expanded()); + label.write(FileName(ui.GetFileName("TO")).expanded()); } } diff --git a/isis/src/base/apps/catoriglab/catoriglab.cpp b/isis/src/base/apps/catoriglab/catoriglab.cpp index 5461860292b6a5aa5923f5d3827e90372510931a..c340ca6688725627f26dcbfd80cda5931b28efa3 100644 --- a/isis/src/base/apps/catoriglab/catoriglab.cpp +++ b/isis/src/base/apps/catoriglab/catoriglab.cpp @@ -19,10 +19,10 @@ void IsisMain() { } else if (ui.WasEntered("TO")) { if (ui.GetBoolean("APPEND")) { - pvl.Append(FileName(ui.GetFileName("TO")).expanded()); + pvl.append(FileName(ui.GetFileName("TO")).expanded()); } else { - pvl.Write(FileName(ui.GetFileName("TO")).expanded()); + pvl.write(FileName(ui.GetFileName("TO")).expanded()); } } else { diff --git a/isis/src/base/apps/ckwriter/SpiceSegment.cpp b/isis/src/base/apps/ckwriter/SpiceSegment.cpp index 9f21100205374a421e999c721ea7807078cc4795..b6f2a6588a3a09e2ccc9af3ee748dc40c0f3917b 100644 --- a/isis/src/base/apps/ckwriter/SpiceSegment.cpp +++ b/isis/src/base/apps/ckwriter/SpiceSegment.cpp @@ -154,8 +154,8 @@ SpiceSegment::SVector SpiceSegment::TickRate() const { QString SpiceSegment::getKeyValue(PvlObject &label, const QString &keyword) { QString value(""); - if ( label.HasKeyword(keyword,Pvl::Traverse) ) { - value = label.FindKeyword(keyword,Pvl::Traverse)[0]; + if ( label.hasKeyword(keyword,Pvl::Traverse) ) { + value = label.findKeyword(keyword,Pvl::Traverse)[0]; } return (value); } @@ -179,13 +179,13 @@ void SpiceSegment::import(Cube &cube, const QString &tblname) { // OriginalInstrument group to Instrument for the scope of this // application. Only label manipulation occurs and no change to the // pixels. - if (label->FindObject("IsisCube").HasGroup("OriginalInstrument")) { - label->FindObject("IsisCube").DeleteGroup("Instrument"); + if (label->findObject("IsisCube").hasGroup("OriginalInstrument")) { + label->findObject("IsisCube").deleteGroup("Instrument"); Isis::PvlGroup inst = - label->FindObject("IsisCube").FindGroup("OriginalInstrument", + label->findObject("IsisCube").findGroup("OriginalInstrument", Isis::Pvl::Traverse); - inst.SetName("Instrument"); - label->FindObject("IsisCube").AddGroup(inst); + inst.setName("Instrument"); + label->findObject("IsisCube").addGroup(inst); camera = CameraFactory::Create(*label); } else { @@ -312,9 +312,9 @@ SpiceSegment::SVector SpiceSegment::getTimes(const SMatrix &spice) const { bool SpiceSegment::getTimeDependentFrameIds(Table &table, int &toId, int &fromId) const { // Load the constant and time-based frame traces and mission frame ids std::vector tdfids; - if ( table.Label().HasKeyword("TimeDependentFrames") ) { + if ( table.Label().hasKeyword("TimeDependentFrames") ) { PvlKeyword labelTimeFrames = table.Label()["TimeDependentFrames"]; - for (int i=0; iHasObject("IsisCube") || !source->FindObject("IsisCube").HasObject("Core")) { + if (!source->hasObject("IsisCube") || !source->findObject("IsisCube").hasObject("Core")) { isACube = false; } else { @@ -219,8 +219,8 @@ void IsisMain() { if (!sameSize) { // Delete old AlphaCube group if it did exist, it'll just screw us up. - if (mergeTo->FindObject("IsisCube").HasGroup("AlphaCube")) - mergeTo->FindObject("IsisCube").DeleteGroup("AlphaCube"); + if (mergeTo->findObject("IsisCube").hasGroup("AlphaCube")) + mergeTo->findObject("IsisCube").deleteGroup("AlphaCube"); SubArea subarea; subarea.SetSubArea(sourceSamps, sourceLines, 1, 1, sourceSamps, sourceLines, lineScale, sampScale); @@ -229,9 +229,9 @@ void IsisMain() { // Add History bool found = false; - for (int i = 0; i < mergeTo->Objects() && !found; i++) { - if (mergeTo->Object(i).IsNamed("History")) { - History his((QString)mergeTo->Object(i)["Name"]); + for (int i = 0; i < mergeTo->objects() && !found; i++) { + if (mergeTo->object(i).isNamed("History")) { + History his((QString)mergeTo->object(i)["Name"]); inOut.read(his); his.AddEntry(); inOut.write(his); @@ -256,11 +256,11 @@ void IsisMain() { bool copyGroup(Pvl * source, Pvl * mergeTo, QString name) { try { // The call we're looking to get an exception on is the one just below. - PvlGroup & toCopy = source->FindGroup(name, Pvl::Traverse); - PvlObject & isiscube = mergeTo->FindObject("IsisCube"); - if (isiscube.HasGroup(name)) - isiscube.DeleteGroup(name); - isiscube.AddGroup(toCopy); + PvlGroup & toCopy = source->findGroup(name, Pvl::Traverse); + PvlObject & isiscube = mergeTo->findObject("IsisCube"); + if (isiscube.hasGroup(name)) + isiscube.deleteGroup(name); + isiscube.addGroup(toCopy); return true; } catch (IException &) { diff --git a/isis/src/base/apps/crop/crop.cpp b/isis/src/base/apps/crop/crop.cpp index eab3bcc0b4bc27be35060c42c56f26055f02ae22..5a5fb7714ff10372da12f1cd5e5b9aee08da0584 100644 --- a/isis/src/base/apps/crop/crop.cpp +++ b/isis/src/base/apps/crop/crop.cpp @@ -96,10 +96,10 @@ void IsisMain() { Pvl &inLabels = *cube.label(); // Loop through the labels looking for object = Table - for(int labelObj = 0; labelObj < inLabels.Objects(); labelObj++) { - PvlObject &obj = inLabels.Object(labelObj); + for(int labelObj = 0; labelObj < inLabels.objects(); labelObj++) { + PvlObject &obj = inLabels.object(labelObj); - if(obj.Name() != "Table") continue; + if(obj.name() != "Table") continue; // If we're not propagating spice data, dont propagate the following tables... if(!ui.GetBoolean("PROPSPICE")) { @@ -147,15 +147,15 @@ void IsisMain() { } Pvl &outLabels = *ocube->label(); - if(!ui.GetBoolean("PROPSPICE") && outLabels.FindObject("IsisCube").HasGroup("Kernels")) { - PvlGroup &kerns = outLabels.FindObject("IsisCube").FindGroup("Kernels"); + if(!ui.GetBoolean("PROPSPICE") && outLabels.findObject("IsisCube").hasGroup("Kernels")) { + PvlGroup &kerns = outLabels.findObject("IsisCube").findGroup("Kernels"); QString tryKey = "NaifIkCode"; - if(kerns.HasKeyword("NaifFrameCode")) { + if(kerns.hasKeyword("NaifFrameCode")) { tryKey = "NaifFrameCode"; } - if(kerns.HasKeyword(tryKey)) { + if(kerns.hasKeyword(tryKey)) { PvlKeyword ikCode = kerns[tryKey]; kerns = PvlGroup("Kernels"); kerns += ikCode; diff --git a/isis/src/base/apps/cropspecial/cropspecial.cpp b/isis/src/base/apps/cropspecial/cropspecial.cpp index 1c3a7dc2d49ed8abd1f7bd992d85668f394bf0bf..b333cf4a3729d5f255d8989f7ee123be99d3e611 100644 --- a/isis/src/base/apps/cropspecial/cropspecial.cpp +++ b/isis/src/base/apps/cropspecial/cropspecial.cpp @@ -76,10 +76,10 @@ void IsisMain() { Pvl &inLabels = *cube.label(); // Loop through the labels looking for object = Table - for(int labelObj = 0; labelObj < inLabels.Objects(); labelObj++) { - PvlObject &obj = inLabels.Object(labelObj); + for(int labelObj = 0; labelObj < inLabels.objects(); labelObj++) { + PvlObject &obj = inLabels.object(labelObj); - if(obj.Name() != "Table") continue; + if(obj.name() != "Table") continue; // Read the table into a table object Table table(obj["Name"], from); diff --git a/isis/src/base/apps/cubeavg/cubeavg.cpp b/isis/src/base/apps/cubeavg/cubeavg.cpp index 5298a557a824df5bd237d89117bb8c3bc73e90b6..20fb6d0a4cca34c1d484e4057a00bffe49e95e19 100644 --- a/isis/src/base/apps/cubeavg/cubeavg.cpp +++ b/isis/src/base/apps/cubeavg/cubeavg.cpp @@ -29,18 +29,18 @@ void IsisMain() { if(icube->hasGroup("BandBin")) { PvlGroup &pvlg = icube->group("BandBin"); removekeywords(pvlg); - if(pvlg.HasKeyword("Center")) { - bool hasWidth = pvlg.HasKeyword("Width"); - PvlKeyword &pvlCenter = pvlg.FindKeyword("Center"); + if(pvlg.hasKeyword("Center")) { + bool hasWidth = pvlg.hasKeyword("Width"); + PvlKeyword &pvlCenter = pvlg.findKeyword("Center"); PvlKeyword *pvlWidth = NULL; if(hasWidth) { - pvlWidth = & pvlg.FindKeyword("Width"); + pvlWidth = & pvlg.findKeyword("Width"); } std::vector centers; centers.resize(icube->bandCount()); std::vector widths; widths.resize(icube->bandCount()); - for(int i = 0; i < pvlCenter.Size(); i++) { + for(int i = 0; i < pvlCenter.size(); i++) { centers[i] = toDouble(pvlCenter[i]); if(hasWidth) widths[i] = toDouble((*pvlWidth)[i]); @@ -72,25 +72,25 @@ void IsisMain() { } QString Units = ""; PvlKeyword pvlCenter; - if(pvlg.HasKeyword("Center")) { - pvlCenter = pvlg.FindKeyword("Center"); - Units = pvlCenter.Unit(); - pvlg.DeleteKeyword("Center"); + if(pvlg.hasKeyword("Center")) { + pvlCenter = pvlg.findKeyword("Center"); + Units = pvlCenter.unit(); + pvlg.deleteKeyword("Center"); } pvlCenter = PvlKeyword("Center"); - pvlCenter.SetValue(ui.GetAsString("CENTER"), Units); - pvlg.AddKeyword(pvlCenter); + pvlCenter.setValue(ui.GetAsString("CENTER"), Units); + pvlg.addKeyword(pvlCenter); PvlKeyword pvlWidth; - if(pvlg.HasKeyword("Width")) { - pvlWidth = pvlg.FindKeyword("Width"); - Units = pvlWidth.Unit(); - pvlg.DeleteKeyword("Width"); + if(pvlg.hasKeyword("Width")) { + pvlWidth = pvlg.findKeyword("Width"); + Units = pvlWidth.unit(); + pvlg.deleteKeyword("Width"); } pvlWidth = PvlKeyword("Width"); - pvlWidth.SetValue(ui.GetAsString("WIDTH"), Units); - pvlg.AddKeyword(pvlWidth); + pvlWidth.setValue(ui.GetAsString("WIDTH"), Units); + pvlg.addKeyword(pvlWidth); //Destroys the old and adds the new BandBin Group if(ocube->hasGroup("BandBin")) { ocube->deleteGroup("BandBin"); @@ -121,11 +121,11 @@ void cubeavg(vector &in, vector &out) { * @param pvlg the group from which the keywords are removed */ void removekeywords(PvlGroup &pvlg) { - if(pvlg.HasKeyword("OriginalBand")) { - pvlg.DeleteKeyword("OriginalBand"); + if(pvlg.hasKeyword("OriginalBand")) { + pvlg.deleteKeyword("OriginalBand"); } - if(pvlg.HasKeyword("Name")) { - pvlg.DeleteKeyword("Name"); + if(pvlg.hasKeyword("Name")) { + pvlg.deleteKeyword("Name"); } } @@ -133,12 +133,12 @@ void removekeywords(PvlGroup &pvlg) { void compute(vector centers, vector widths, Cube *ocube) { PvlGroup &pvlg = ocube->group("BandBin"); - PvlKeyword &pvlCenter = pvlg.FindKeyword("Center"); - QString centerUnit = pvlCenter.Unit(); - bool hasWidth = pvlg.HasKeyword("Width"); + PvlKeyword &pvlCenter = pvlg.findKeyword("Center"); + QString centerUnit = pvlCenter.unit(); + bool hasWidth = pvlg.hasKeyword("Width"); double large = centers[0] + widths[0] / 2; double small = centers[0] - widths[0] / 2; - for(int i = 1; i < pvlCenter.Size(); i++) { + for(int i = 1; i < pvlCenter.size(); i++) { if(large < (double)centers[i] + (double)widths[i] / 2.0) { large = (double)centers[i] + (double)widths[i] / 2.0; } @@ -146,15 +146,15 @@ void compute(vector centers, vector widths, small = (double)centers[i] - (double)widths[i] / 2.0; } } - pvlCenter.SetValue(toString((large - small) / 2 + small), centerUnit); + pvlCenter.setValue(toString((large - small) / 2 + small), centerUnit); if(hasWidth) { - PvlKeyword &pvlWidth = pvlg.FindKeyword("Width"); - pvlWidth.SetValue(toString(large - small), pvlWidth.Unit()); + PvlKeyword &pvlWidth = pvlg.findKeyword("Width"); + pvlWidth.setValue(toString(large - small), pvlWidth.unit()); } else { PvlKeyword pvlWidth = PvlKeyword("Width"); - pvlWidth.SetValue(toString(large - small), centerUnit); - pvlg.AddKeyword(pvlWidth); + pvlWidth.setValue(toString(large - small), centerUnit); + pvlg.addKeyword(pvlWidth); } } diff --git a/isis/src/base/apps/cubediff/cubediff.cpp b/isis/src/base/apps/cubediff/cubediff.cpp index 559f6b10dc435ddb86b3b6742a1dc84c0f4e226a..eee1b65f0f29d5c4186bedc8267cb82987e81432 100644 --- a/isis/src/base/apps/cubediff/cubediff.cpp +++ b/isis/src/base/apps/cubediff/cubediff.cpp @@ -117,8 +117,8 @@ void IsisMain() { // Output a file if the user request it if(ui.WasEntered("TO")) { Pvl lab; - lab.AddGroup(results); - lab.Write(ui.GetFileName("TO", "txt")); + lab.addGroup(results); + lab.write(ui.GetFileName("TO", "txt")); } if(doTable) { QString filename = FileName(ui.GetFileName("TO", "txt")).expanded(); diff --git a/isis/src/base/apps/cubeit/cubeit.cpp b/isis/src/base/apps/cubeit/cubeit.cpp index c1d9e6ff30d97da7e798cfccaae54150c7309da8..29c513ad083535ab08147c29ca1840c8aaf23e8e 100644 --- a/isis/src/base/apps/cubeit/cubeit.cpp +++ b/isis/src/base/apps/cubeit/cubeit.cpp @@ -55,18 +55,18 @@ void IsisMain() { } // Build up the band bin group - PvlObject &isiscube = cube.label()->FindObject("IsisCube"); - if(isiscube.HasGroup("BandBin")) { - PvlGroup &inBandBin = isiscube.FindGroup("BandBin"); - for(int key = 0; key < inBandBin.Keywords(); key++) { + PvlObject &isiscube = cube.label()->findObject("IsisCube"); + if(isiscube.hasGroup("BandBin")) { + PvlGroup &inBandBin = isiscube.findGroup("BandBin"); + for(int key = 0; key < inBandBin.keywords(); key++) { PvlKeyword &inKey = inBandBin[key]; - if(!outBandBin.HasKeyword(inKey.Name())) { + if(!outBandBin.hasKeyword(inKey.name())) { outBandBin += inKey; } else { - PvlKeyword &outKey = outBandBin[inKey.Name()]; - for(int index = 0; index < (int)inKey.Size(); index++) { - outKey.AddValue(inKey[index], inKey.Unit(index)); + PvlKeyword &outKey = outBandBin[inKey.name()]; + for(int index = 0; index < (int)inKey.size(); index++) { + outKey.addValue(inKey[index], inKey.unit(index)); } } } @@ -112,7 +112,7 @@ void IsisMain() { p2.StartProcess(NullBand); // Add the band bin group if necessary - if(outBandBin.Keywords() > 0) { + if(outBandBin.keywords() > 0) { ocube->putGroup(outBandBin); } p2.EndProcess(); diff --git a/isis/src/base/apps/cubenorm/cubenorm.cpp b/isis/src/base/apps/cubenorm/cubenorm.cpp index 0c2fadfb2df550c47da1c5600e59136c40646daa..2391c6d9eb80627e070fa08bf7c52e03c117c815 100644 --- a/isis/src/base/apps/cubenorm/cubenorm.cpp +++ b/isis/src/base/apps/cubenorm/cubenorm.cpp @@ -239,8 +239,8 @@ void pvlOut(const QString &StatFile) { } Pvl t; - t.AddGroup(results); - t.Write(StatFile); + t.addGroup(results); + t.write(StatFile); } //******************************************************** @@ -298,11 +298,11 @@ void tableOut(const QString &StatFile) { //******************************************************* void PVLIn(const Isis::FileName &filename) { Pvl pvlFileIn; - pvlFileIn.Read(filename.name()); - PvlGroup results = pvlFileIn.FindGroup("Results"); - PvlObject::PvlKeywordIterator itr = results.Begin(); + pvlFileIn.read(filename.name()); + PvlGroup results = pvlFileIn.findGroup("Results"); + PvlObject::PvlKeywordIterator itr = results.begin(); - while(itr != results.End()) { + while(itr != results.end()) { StaticStats newStat; band.push_back(toInt((*itr)[0])); itr++; diff --git a/isis/src/base/apps/demprep/demprep.cpp b/isis/src/base/apps/demprep/demprep.cpp index e85fb88aaf9902f36388506d235f217aae6d5de8..e49c426b4e51b2d24b67ca50b0a3e386ec2f0ac4 100644 --- a/isis/src/base/apps/demprep/demprep.cpp +++ b/isis/src/base/apps/demprep/demprep.cpp @@ -37,12 +37,12 @@ void IsisMain() { int inb = icube->bandCount(); outCubeStats.Reset(); - PvlGroup mapgrp = icube->label()->FindGroup("Mapping", Pvl::Traverse); + PvlGroup mapgrp = icube->label()->findGroup("Mapping", Pvl::Traverse); bool hasExtents = false; bool isGlobal = false; double minLat,maxLat,minLon,maxLon; - if (mapgrp.HasKeyword("MinimumLatitude") && mapgrp.HasKeyword("MaximumLatitude") && - mapgrp.HasKeyword("MinimumLongitude") && mapgrp.HasKeyword("MaximumLongitude")) { + if (mapgrp.hasKeyword("MinimumLatitude") && mapgrp.hasKeyword("MaximumLatitude") && + mapgrp.hasKeyword("MinimumLongitude") && mapgrp.hasKeyword("MaximumLongitude")) { hasExtents = true; minLat = mapgrp["MinimumLatitude"]; maxLat = mapgrp["MaximumLatitude"]; @@ -234,12 +234,12 @@ void IsisMain() { double upperLeftCorner = mapgrp["UpperLeftCornerX"]; upperLeftCorner -= leftPad * proj->Resolution(); - mapgrp.AddKeyword(PvlKeyword("UpperLeftCornerX", toString(upperLeftCorner), "meters"), + mapgrp.addKeyword(PvlKeyword("UpperLeftCornerX", toString(upperLeftCorner), "meters"), Pvl::Replace); upperLeftCorner = mapgrp["UpperLeftCornerY"]; upperLeftCorner += topPad * proj->Resolution(); - mapgrp.AddKeyword(PvlKeyword("UpperLeftCornerY", toString(upperLeftCorner), "meters"), + mapgrp.addKeyword(PvlKeyword("UpperLeftCornerY", toString(upperLeftCorner), "meters"), Pvl::Replace); diff --git a/isis/src/base/apps/editlab/editlab.cpp b/isis/src/base/apps/editlab/editlab.cpp index d137012e1168550d712e8fcf2011e5f618cc7dfd..05ebe07b7efd1d1788c0cf08b4fed5f38e9a8c17 100644 --- a/isis/src/base/apps/editlab/editlab.cpp +++ b/isis/src/base/apps/editlab/editlab.cpp @@ -23,18 +23,18 @@ void IsisMain() { // Get user entered option & create IsisCube Object if needed Cube *cube = NULL; - if(label->HasObject("IsisCube")) { + if(label->hasObject("IsisCube")) { cube = new Cube(); cube->open(ui.GetFileName("FROM"), "rw"); - pvl = &(cube->label()->FindObject("IsisCube")); + pvl = &(cube->label()->findObject("IsisCube")); } // Add Template File if(option == "ADDTEMP") { QString tempfile = ui.GetFileName("TEMPFILE"); Pvl tempobj(tempfile); - for(int i = 0; i < tempobj.Groups(); ++i) { - pvl->AddGroup(tempobj.Group(i)); + for(int i = 0; i < tempobj.groups(); ++i) { + pvl->addGroup(tempobj.group(i)); } } @@ -45,53 +45,53 @@ void IsisMain() { if(option == "ADDG") { PvlGroup g(grpname); if(ui.WasEntered("COMMENT")) - g.AddComment(ui.GetString("COMMENT")); - pvl->AddGroup(g); + g.addComment(ui.GetString("COMMENT")); + pvl->addGroup(g); } // Delete Group else if(option == "DELG") { - pvl->DeleteGroup(grpname); + pvl->deleteGroup(grpname); } else { QString key = ui.GetString("KEYWORD"); - PvlGroup &grp = pvl->FindGroup(grpname, PvlObject::Traverse); + PvlGroup &grp = pvl->findGroup(grpname, PvlObject::Traverse); // Add Keyword if(option == "ADDKEY") { PvlKeyword keywrd(key); - grp.AddKeyword(modifyKeyword(ui, keywrd)); + grp.addKeyword(modifyKeyword(ui, keywrd)); } // Delete Keyword else if(option == "DELKEY") { - grp.DeleteKeyword(key); + grp.deleteKeyword(key); } // Modify Keyword else if(option == "MODKEY") { - modifyKeyword(ui, grp.FindKeyword(key)); + modifyKeyword(ui, grp.findKeyword(key)); } // Set Keyword else if(option == "SETKEY") { - if(grp.HasKeyword(key)) { + if(grp.hasKeyword(key)) { PvlKeyword *first = NULL; // Clean duplicate keywords of ONLY the provided keyword - for(int i = 0; i < grp.Keywords(); i++) { - if(grp[i].IsNamed(key)) { + for(int i = 0; i < grp.keywords(); i++) { + if(grp[i].isNamed(key)) { if(not first) first = &grp[i]; else - grp.DeleteKeyword(i); + grp.deleteKeyword(i); } } modifyKeyword(ui, *first); } else { PvlKeyword keywrd(key); - grp.AddKeyword(modifyKeyword(ui, keywrd)); + grp.addKeyword(modifyKeyword(ui, keywrd)); } } @@ -118,7 +118,7 @@ void IsisMain() { cube = NULL; } else { - label->Write(ui.GetFileName("FROM")); + label->write(ui.GetFileName("FROM")); } delete label; @@ -136,10 +136,10 @@ void IsisMain() { */ PvlKeyword &modifyKeyword(UserInterface &ui, PvlKeyword &keyword) { if(ui.WasEntered("UNITS")) - keyword.SetValue(ui.GetString("VALUE"), ui.GetString("UNITS")); + keyword.setValue(ui.GetString("VALUE"), ui.GetString("UNITS")); else - keyword.SetValue(ui.GetString("VALUE")); + keyword.setValue(ui.GetString("VALUE")); if(ui.WasEntered("COMMENT")) - keyword.AddComment(ui.GetString("COMMENT")); + keyword.addComment(ui.GetString("COMMENT")); return keyword; } diff --git a/isis/src/base/apps/errors/errors.cpp b/isis/src/base/apps/errors/errors.cpp index 082796cd60f3903e58a6c6790b7ca888c639996e..90c451f754ed8cbdf0322f504745713afbca43b3 100644 --- a/isis/src/base/apps/errors/errors.cpp +++ b/isis/src/base/apps/errors/errors.cpp @@ -22,21 +22,21 @@ void IsisMain() { int numErrors = 0; // Search for errors and add to output - for(int i = 0; i < input.Objects(); i++) { - PvlObject o = input.Object(i); - if(o.HasGroup("Error")) { - output.AddObject(o); + for(int i = 0; i < input.objects(); i++) { + PvlObject o = input.object(i); + if(o.hasGroup("Error")) { + output.addObject(o); numErrors++; } } PvlKeyword errors("TotalErrors", toString(numErrors)); - output.AddKeyword(errors); + output.addKeyword(errors); // write output to file if(!append) { - output.Write(outFile.expanded()); + output.write(outFile.expanded()); } else { - output.Append(outFile.expanded()); + output.append(outFile.expanded()); } cout << errors << endl; } diff --git a/isis/src/base/apps/findgaps/FindGapsFunctor.cpp b/isis/src/base/apps/findgaps/FindGapsFunctor.cpp index 063e9f7c878f4f4e8b0a9f2521eb58232c828069..690e77aa0d04d9181ad75b250a58d001822f4e88 100644 --- a/isis/src/base/apps/findgaps/FindGapsFunctor.cpp +++ b/isis/src/base/apps/findgaps/FindGapsFunctor.cpp @@ -54,7 +54,7 @@ namespace Isis { m_inGap = new bool(false); m_gap = new PvlGroup("Gap"); m_gaps = new Pvl; - m_gaps->AddKeyword(PvlKeyword("Modification", "None")); + m_gaps->addKeyword(PvlKeyword("Modification", "None")); m_lineCount = inputLineCount; m_bufferSizeBeforeGap = borderSizeBeforeGap; m_bufferSizeAfterGap = borderSizeAfterGap; @@ -115,7 +115,7 @@ namespace Isis { * @return Pvl group of gaps to be displayed */ void FindGapsFunctor::setModification(QString newModValue) { - m_gaps->FindKeyword("Modification").SetValue(newModValue); + m_gaps->findKeyword("Modification").setValue(newModValue); } @@ -151,18 +151,18 @@ namespace Isis { if( !(*m_inGap) ) { *m_inGap = true; - m_gap->AddKeyword(PvlKeyword("NewGapInBand", toString(in.Band()))); - m_gap->AddKeyword(PvlKeyword("StartLine", toString(in.Line()))); + m_gap->addKeyword(PvlKeyword("NewGapInBand", toString(in.Band()))); + m_gap->addKeyword(PvlKeyword("StartLine", toString(in.Line()))); if(correlation == Isis::Null) { correlation = 0.0; } - m_gap->AddKeyword(PvlKeyword("Correlation", toString(correlation))); + m_gap->addKeyword(PvlKeyword("Correlation", toString(correlation))); } if (in.Line() == m_lineCount) { - m_gap->AddKeyword(PvlKeyword("LastGapLine", toString(in.Line()))); - m_gap->AddKeyword(PvlKeyword("ToEndOfBand", toString(m_lineCount))); + m_gap->addKeyword(PvlKeyword("LastGapLine", toString(in.Line()))); + m_gap->addKeyword(PvlKeyword("ToEndOfBand", toString(m_lineCount))); addGapToGroup(); } @@ -174,7 +174,7 @@ namespace Isis { * correlate. Or this line is the last line and it is in the gap. */ - m_gap->AddKeyword(PvlKeyword("LastGapLine", toString(in.Line() - 2))); + m_gap->addKeyword(PvlKeyword("LastGapLine", toString(in.Line() - 2))); addGapToGroup(); } @@ -193,11 +193,11 @@ namespace Isis { bool nulledLine = false; - for (int i = 0; i < m_gaps->Groups(); i++) { + for (int i = 0; i < m_gaps->groups(); i++) { - int gapBand = toInt((*m_gaps).Group(i).FindKeyword(" NewGapInBand")[0]); - int gapStart = toInt((*m_gaps).Group(i).FindKeyword("StartLine")[0]); - int gapEnd = toInt((*m_gaps).Group(i).FindKeyword("LastGapLine")[0]); + int gapBand = toInt((*m_gaps).group(i).findKeyword(" NewGapInBand")[0]); + int gapStart = toInt((*m_gaps).group(i).findKeyword("StartLine")[0]); + int gapEnd = toInt((*m_gaps).group(i).findKeyword("LastGapLine")[0]); if ( (in.Line() >= gapStart - m_bufferSizeBeforeGap) && (in.Line() <= gapEnd + m_bufferSizeAfterGap) && @@ -239,10 +239,10 @@ namespace Isis { * In case the gap is a flase positive. The end of the gap will end up being the line * before the start of the gap. */ - if (toInt(m_gap->FindKeyword("StartLine")[0]) < - toInt(m_gap->FindKeyword("LastGapLine")[0])) { + if (toInt(m_gap->findKeyword("StartLine")[0]) < + toInt(m_gap->findKeyword("LastGapLine")[0])) { - m_gaps->AddGroup(*m_gap); + m_gaps->addGroup(*m_gap); } *m_gap = PvlGroup("Gap"); } diff --git a/isis/src/base/apps/findgaps/findgaps.cpp b/isis/src/base/apps/findgaps/findgaps.cpp index d3ae6932f1f0322d3b8bcf8dcd3a5ab5ace3eeec..ce7b53e77b0ce028802d5325fe1835b0767a530e 100644 --- a/isis/src/base/apps/findgaps/findgaps.cpp +++ b/isis/src/base/apps/findgaps/findgaps.cpp @@ -61,7 +61,7 @@ void IsisMain() { } if (logFileSpecified) { - gapsFunctor.gaps().Write(ui.GetFileName("LOG")); + gapsFunctor.gaps().write(ui.GetFileName("LOG")); } } else { diff --git a/isis/src/base/apps/findimageoverlaps/findimageoverlaps.cpp b/isis/src/base/apps/findimageoverlaps/findimageoverlaps.cpp index 06e47031541791fbfe6ce262316472a407fa26a6..63d41925a15c4ec2e4c14e16d1916c383109f637 100644 --- a/isis/src/base/apps/findimageoverlaps/findimageoverlaps.cpp +++ b/isis/src/base/apps/findimageoverlaps/findimageoverlaps.cpp @@ -56,12 +56,12 @@ void IsisMain() { if(!filenamesOnly) { outFile += errorList[err]; } - else if(errorList[err].HasKeyword("FileNames")) { + else if(errorList[err].hasKeyword("FileNames")) { PvlGroup origError = errorList[err]; PvlGroup err("ImageOverlapError"); - for(int keyword = 0; keyword < origError.Keywords(); keyword++) { - if(origError[keyword].Name() == "FileNames") { + for(int keyword = 0; keyword < origError.keywords(); keyword++) { + if(origError[keyword].name() == "FileNames") { err += origError[keyword]; } } @@ -70,7 +70,7 @@ void IsisMain() { } } - outFile.Write(FileName(ui.GetFileName("ERRORS")).expanded()); + outFile.write(FileName(ui.GetFileName("ERRORS")).expanded()); } PvlGroup results("Results"); diff --git a/isis/src/base/apps/findrx/findrx.cpp b/isis/src/base/apps/findrx/findrx.cpp index 03116671c7559679737dc7abe44e46348bd59230..5269596e3462443742895db43739257ad4fc3f65 100644 --- a/isis/src/base/apps/findrx/findrx.cpp +++ b/isis/src/base/apps/findrx/findrx.cpp @@ -25,26 +25,26 @@ void IsisMain() { else { regdef = new Pvl("$base/templates/autoreg/findrx.def"); } - PvlGroup &reseaus = cube.label()->FindGroup("Reseaus", Pvl::Traverse); + PvlGroup &reseaus = cube.label()->findGroup("Reseaus", Pvl::Traverse); // If the Keyword sizes don't match up, throw errors. - int nres = reseaus["Line"].Size(); - if(nres != reseaus["Sample"].Size()) { + 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()) + "]"; + toString(reseaus["Sample"].size()) + " != " + " Line size " + + toString(reseaus["Line"].size()) + "]"; throw IException(IException::Unknown, msg, _FILEINFO_); } - if(nres != reseaus["Type"].Size()) { + if(nres != reseaus["Type"].size()) { QString msg = "Type size incorrect [Type size " + - toString(reseaus["Type"].Size()) + " != " + " Line size " + - toString(reseaus["Line"].Size()) + "]"; + toString(reseaus["Type"].size()) + " != " + " Line size " + + toString(reseaus["Line"].size()) + "]"; throw IException(IException::Unknown, msg, _FILEINFO_); } - if(nres != reseaus["Valid"].Size()) { + if(nres != reseaus["Valid"].size()) { QString msg = "Valid size incorrect [Valid size " + - toString(reseaus["Valid"].Size()) + " != " + " Line size " + - toString(reseaus["Line"].Size()) + "]"; + toString(reseaus["Valid"].size()) + " != " + " Line size " + + toString(reseaus["Line"].size()) + "]"; throw IException(IException::Unknown, msg, _FILEINFO_); } diff --git a/isis/src/base/apps/fits2isis/fits2isis.cpp b/isis/src/base/apps/fits2isis/fits2isis.cpp index 8da27f3b44c69cfa32583fb37a68e9485e03ffc6..ca236d551b2b9dc936b09aa0874859b7d8b3f100 100644 --- a/isis/src/base/apps/fits2isis/fits2isis.cpp +++ b/isis/src/base/apps/fits2isis/fits2isis.cpp @@ -54,7 +54,7 @@ void IsisMain() { // Remove up to beginning of data line.TrimHead(" ='"); line.TrimTail(" "); - if(label.Name() == "COMMENT" || label.Name() == "HISTORY") { + if(label.name() == "COMMENT" || label.name() == "HISTORY") { label += line.ToQt(); } else { @@ -66,10 +66,10 @@ void IsisMain() { line.TrimHead(" "); // If the remaining line QString has anything, it is comments. if(line.size() > 0) { - label.AddComment(line.ToQt()); + label.addComment(line.ToQt()); // A possible format for units, other possiblites exist. if(line != line.Token("[")) { - label.SetUnits(line.Token("[").Token("]").ToQt()); + label.setUnits(line.Token("[").Token("]").ToQt()); } } } @@ -149,10 +149,10 @@ void IsisMain() { } // Base and multiplier - if(labels.HasKeyword("BZERO")) { + if(labels.hasKeyword("BZERO")) { pfits.SetBase(toDouble(labels["BZERO"][0])); } - if(labels.HasKeyword("BSCALE")) { + if(labels.hasKeyword("BSCALE")) { pfits.SetMultiplier(toDouble(labels["BSCALE"][0])); } @@ -162,19 +162,19 @@ void IsisMain() { // Limited section of standardized keywords that could exist bool instGrp = false; PvlGroup inst("Instrument"); - if(labels.HasKeyword("DATE-OBS")) { + if(labels.hasKeyword("DATE-OBS")) { instGrp = true; inst += PvlKeyword("StartTime", labels["DATE-OBS"][0]); } - if(labels.HasKeyword("OBJECT")) { + if(labels.hasKeyword("OBJECT")) { instGrp = true; inst += PvlKeyword("Target", labels["OBJECT"][0]); } - if(labels.HasKeyword("INSTRUME")) { + if(labels.hasKeyword("INSTRUME")) { instGrp = true; inst += PvlKeyword("InstrumentId", labels["INSTRUME"][0]); } - if(labels.HasKeyword("OBSERVER")) { + if(labels.hasKeyword("OBSERVER")) { instGrp = true; inst += PvlKeyword("SpacecraftName", labels["OBSERVER"][0]); } @@ -184,7 +184,7 @@ void IsisMain() { // Add instrument group if any relevant data exists Pvl *lbls = output->label(); if(instGrp) { - lbls->FindObject("IsisCube") += inst; + lbls->findObject("IsisCube") += inst; } // Save original labels diff --git a/isis/src/base/apps/footprintinit/footprintinit.cpp b/isis/src/base/apps/footprintinit/footprintinit.cpp index 759b5d319f7863b7de674360560f7785b7046fc2..6c417f111b2ff2accf519925214c63a4d5eccb3a 100644 --- a/isis/src/base/apps/footprintinit/footprintinit.cpp +++ b/isis/src/base/apps/footprintinit/footprintinit.cpp @@ -74,28 +74,28 @@ void IsisMain() { if(ui.GetBoolean("TESTXY")) { Pvl cubeLab(ui.GetFileName("FROM")); - PvlGroup inst = cubeLab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup inst = cubeLab.findGroup("Instrument", Pvl::Traverse); QString target = inst["TargetName"]; PvlGroup radii = Projection::TargetRadii(target); Pvl map(ui.GetFileName("MAP")); - PvlGroup &mapping = map.FindGroup("MAPPING"); + PvlGroup &mapping = map.findGroup("MAPPING"); - if(!mapping.HasKeyword("TargetName")) + if(!mapping.hasKeyword("TargetName")) mapping += Isis::PvlKeyword("TargetName", target); - if(!mapping.HasKeyword("EquatorialRadius")) + if(!mapping.hasKeyword("EquatorialRadius")) mapping += Isis::PvlKeyword("EquatorialRadius", (QString)radii["EquatorialRadius"]); - if(!mapping.HasKeyword("PolarRadius")) + if(!mapping.hasKeyword("PolarRadius")) mapping += Isis::PvlKeyword("PolarRadius", (QString)radii["PolarRadius"]); - if(!mapping.HasKeyword("LatitudeType")) + if(!mapping.hasKeyword("LatitudeType")) mapping += Isis::PvlKeyword("LatitudeType", "Planetocentric"); - if(!mapping.HasKeyword("LongitudeDirection")) + if(!mapping.hasKeyword("LongitudeDirection")) mapping += Isis::PvlKeyword("LongitudeDirection", "PositiveEast"); - if(!mapping.HasKeyword("LongitudeDomain")) + if(!mapping.hasKeyword("LongitudeDomain")) mapping += Isis::PvlKeyword("LongitudeDomain", "360"); - if(!mapping.HasKeyword("CenterLatitude")) + if(!mapping.hasKeyword("CenterLatitude")) mapping += Isis::PvlKeyword("CenterLatitude", "0"); - if(!mapping.HasKeyword("CenterLongitude")) + if(!mapping.hasKeyword("CenterLongitude")) mapping += Isis::PvlKeyword("CenterLongitude", "0"); sinc = poly.getSinc(); @@ -137,8 +137,8 @@ void IsisMain() { if(precision) { PvlGroup results("Results"); - results.AddKeyword(PvlKeyword("SINC", toString(sinc))); - results.AddKeyword(PvlKeyword("LINC", toString(linc))); + results.addKeyword(PvlKeyword("SINC", toString(sinc))); + results.addKeyword(PvlKeyword("LINC", toString(linc))); Application::Log(results); } diff --git a/isis/src/base/apps/footprintmerge/footprintmerge.cpp b/isis/src/base/apps/footprintmerge/footprintmerge.cpp index de055cac4f1d55bffaf52998c5fc81bf82292429..6086e6b9586722a87407a5bf695438d442a4e6b3 100644 --- a/isis/src/base/apps/footprintmerge/footprintmerge.cpp +++ b/isis/src/base/apps/footprintmerge/footprintmerge.cpp @@ -150,18 +150,18 @@ void IsisMain() { island += PvlKeyword("NumberFiles", toString(numFiles)); PvlKeyword files("Files"); for(int f = 0; f < numFiles; f++) { - files.AddValue(islands[p][f]); + files.addValue(islands[p][f]); } - island.AddKeyword(files); - results.AddGroup(island); + island.addKeyword(files); + results.addGroup(island); } Pvl temp; - temp.AddObject(results); + temp.addObject(results); if(FileName(out).fileExists()) { - temp.Append(out); + temp.append(out); } else { - temp.Write(out); + temp.write(out); } } diff --git a/isis/src/base/apps/getkey/getkey.cpp b/isis/src/base/apps/getkey/getkey.cpp index 7dc809791d0e133583e2f0c48c64d7d6211d41c0..14b8d59f627bfa172331d9c199c722baddafd372 100644 --- a/isis/src/base/apps/getkey/getkey.cpp +++ b/isis/src/base/apps/getkey/getkey.cpp @@ -23,8 +23,8 @@ map GuiHelpers() { void IsisMain() { // Set Preferences to always turn off Terminal Output - PvlGroup &grp = Isis::Preference::Preferences().FindGroup("SessionLog", Isis::Pvl::Traverse); - grp["TerminalOutput"].SetValue("Off"); + PvlGroup &grp = Isis::Preference::Preferences().findGroup("SessionLog", Isis::Pvl::Traverse); + grp["TerminalOutput"].setValue("Off"); // Use a regular Process Process p; @@ -35,7 +35,7 @@ void IsisMain() { // Open the file ... it must be a label-type file Pvl lab; - lab.Read(labelFile); + lab.read(labelFile); bool recursive = ui.GetBoolean("RECURSIVE"); // Set up the requested object @@ -45,17 +45,17 @@ void IsisMain() { // Get the keyword from the entered group if(ui.WasEntered("GRPNAME")) { - PvlObject object = lab.FindObject(obj, Pvl::Traverse); + PvlObject object = lab.findObject(obj, Pvl::Traverse); QString grp = ui.GetString("GRPNAME"); - key = object.FindGroup(grp, Pvl::Traverse)[ui.GetString("KEYWORD")]; + key = object.findGroup(grp, Pvl::Traverse)[ui.GetString("KEYWORD")]; } // Find the keyword in the object else { if(recursive) { - key = lab.FindObject(obj, Pvl::Traverse).FindKeyword(ui.GetString("KEYWORD"), Pvl::Traverse); + key = lab.findObject(obj, Pvl::Traverse).findKeyword(ui.GetString("KEYWORD"), Pvl::Traverse); } else { - key = lab.FindObject(obj, Pvl::Traverse)[ui.GetString("KEYWORD")]; + key = lab.findObject(obj, Pvl::Traverse)[ui.GetString("KEYWORD")]; } } } @@ -63,13 +63,13 @@ void IsisMain() { // Set up the requested group else if(ui.WasEntered("GRPNAME")) { QString grp = ui.GetString("GRPNAME"); - key = lab.FindGroup(grp, Pvl::Traverse)[ui.GetString("KEYWORD")]; + key = lab.findGroup(grp, Pvl::Traverse)[ui.GetString("KEYWORD")]; } // Find the keyword in the label, outside of any object or group else { if(recursive) { - key = lab.FindKeyword(ui.GetString("KEYWORD"), Pvl::Traverse); + key = lab.findKeyword(ui.GetString("KEYWORD"), Pvl::Traverse); } else { key = lab[ui.GetString("KEYWORD")]; @@ -81,7 +81,7 @@ void IsisMain() { int i = ui.GetInteger("KEYINDEX"); // Make sure they requested a value inside the range of the list - if(key.Size() < i) { + if(key.size() < i) { QString msg = "The value entered for [KEYINDEX] is out of the array "; msg += "bounds for the keyword [" + ui.GetString("KEYWORD") + "]"; throw IException(IException::User, msg, _FILEINFO_); @@ -91,11 +91,11 @@ void IsisMain() { } else { - if(key.Size() > 1) { + if(key.size() > 1) { QStringList values; - for (int i = 0; i < key.Size(); i++) { + for (int i = 0; i < key.size(); i++) { QString thisValue = key[i]; if (thisValue.contains (" ")) @@ -131,7 +131,7 @@ void helperButtonLog() { UserInterface &ui = Application::GetUserInterface(); QString file(ui.GetFileName("FROM")); Pvl p; - p.Read(file); + p.read(file); Application::GuiLog(p); } //...........end of helper function LogMap ........ diff --git a/isis/src/base/apps/getsn/getsn.cpp b/isis/src/base/apps/getsn/getsn.cpp index c41f6bb2e3a017a613124a68202fb6cc9733ca0b..0af1554c38324d449edf5e13d87d608e93ba752d 100644 --- a/isis/src/base/apps/getsn/getsn.cpp +++ b/isis/src/base/apps/getsn/getsn.cpp @@ -19,8 +19,8 @@ using namespace std; void IsisMain() { // Set Preferences to always turn off Terminal Output - PvlGroup &grp = Isis::Preference::Preferences().FindGroup("SessionLog", Isis::Pvl::Traverse); - grp["TerminalOutput"].SetValue("Off"); + PvlGroup &grp = Isis::Preference::Preferences().findGroup("SessionLog", Isis::Pvl::Traverse); + grp["TerminalOutput"].setValue("Off"); // Open the input cube UserInterface &ui = Application::GetUserInterface(); @@ -60,11 +60,11 @@ void IsisMain() { if (pvl) { // Create a serial number and observation number for this cube & put it in a pvlgroup for output Pvl pvl; - pvl.AddGroup(sn); + pvl.addGroup(sn); if(ui.GetBoolean("APPEND")) - pvl.Append(ui.GetFileName("TO")); + pvl.append(ui.GetFileName("TO")); else - pvl.Write(ui.GetFileName("TO")); + pvl.write(ui.GetFileName("TO")); } // FLAT option else { @@ -74,7 +74,7 @@ void IsisMain() { // Build QString QString line = ""; - for (int i = 0; i < sn.Keywords(); i++) { + for (int i = 0; i < sn.keywords(); i++) { if (i != 0) line += ","; line += sn[i][0]; @@ -88,7 +88,7 @@ void IsisMain() { } } else { - for (int i = 0; i < sn.Keywords(); i++) { + for (int i = 0; i < sn.keywords(); i++) { cout << sn[i][0] << endl; } } diff --git a/isis/src/base/apps/handmos/handmos.cpp b/isis/src/base/apps/handmos/handmos.cpp index 084dc880c560510d94cec59079ab7a61ad0ebf3b..83735718a74947e950bdb25d5725bb6187067721 100644 --- a/isis/src/base/apps/handmos/handmos.cpp +++ b/isis/src/base/apps/handmos/handmos.cpp @@ -132,11 +132,11 @@ void IsisMain() { // Log the changes to NBANDS and to TRACK if any PvlObject hist = Isis::iApp->History(); - Isis::iApp->Log(hist.FindGroup("UserParameters")); + Isis::iApp->Log(hist.findGroup("UserParameters")); // Logs the input file location in the mosaic - for (int i = 0; i < p.imagePositions().Groups(); i++) { - Application::Log(p.imagePositions().Group(i)); + for (int i = 0; i < p.imagePositions().groups(); i++) { + Application::Log(p.imagePositions().group(i)); } } diff --git a/isis/src/base/apps/ifft/ifft.cpp b/isis/src/base/apps/ifft/ifft.cpp index 183858800c5640f08807487a2231c850372c13aa..187b55c2ff597a93cdec5b6031b3b1351fc2f978 100644 --- a/isis/src/base/apps/ifft/ifft.cpp +++ b/isis/src/base/apps/ifft/ifft.cpp @@ -22,7 +22,7 @@ void IsisMain() { // Get the original cubes dimensions UserInterface &ui = Application::GetUserInterface(); Pvl lab; - lab.Read(ui.GetFileName("MAGNITUDE")); + lab.read(ui.GetFileName("MAGNITUDE")); AlphaCube acube(lab); int initSamples = acube.BetaSamples(); int initLines = acube.BetaLines(); diff --git a/isis/src/base/apps/interestcube/interestcube.cpp b/isis/src/base/apps/interestcube/interestcube.cpp index 04fc3f9d914e35f44a95628f96505bee45714eac..60ba9ddabbbe9a3c9a822cfd9396b2e09c5a99c9 100644 --- a/isis/src/base/apps/interestcube/interestcube.cpp +++ b/isis/src/base/apps/interestcube/interestcube.cpp @@ -33,7 +33,7 @@ void IsisMain() { try { // Get info from the operator group // Set the pvlkeywords that need to be set to zero - PvlGroup &op = pvl.FindGroup("Operator", Pvl::Traverse); + PvlGroup &op = pvl.findGroup("Operator", Pvl::Traverse); boxcarSamples = op["Samples"]; boxcarLines = op["Lines"]; op["DeltaLine"] = "0"; @@ -42,7 +42,7 @@ void IsisMain() { Application::Log(op); } catch(IException &e) { - QString msg = "Improper format for InterestOperator PVL [" + pvl.FileName() + "]"; + QString msg = "Improper format for InterestOperator PVL [" + pvl.fileName() + "]"; throw IException(e, IException::User, msg, _FILEINFO_); } diff --git a/isis/src/base/apps/isis2fits/isis2fits.cpp b/isis/src/base/apps/isis2fits/isis2fits.cpp index 54ba391704f45b1d1d4badf5cff7067646c6d810..26556fa14c1842dec6b1f3f80992cfca3da9cf2b 100644 --- a/isis/src/base/apps/isis2fits/isis2fits.cpp +++ b/isis/src/base/apps/isis2fits/isis2fits.cpp @@ -56,7 +56,7 @@ void IsisMain() { if(bitpix == "-32") p.SetOutputType(Isis::Real); // determine core base and multiplier, set up the stretch - PvlGroup pix = icube->label()->FindObject("IsisCube").FindObject("Core").FindGroup("Pixels"); + PvlGroup pix = icube->label()->findObject("IsisCube").findObject("Core").findGroup("Pixels"); double scale = toDouble(pix["Multiplier"][0]); double base = toDouble(pix["Base"][0]); @@ -152,10 +152,10 @@ void IsisMain() { // Some cameras don't have StopTime if(icube->hasGroup("Instrument")) { PvlGroup inst = icube->group("Instrument"); - if(inst.HasKeyword("StopTime")) { + if(inst.hasKeyword("StopTime")) { header += WritePvl("TIME_END", "Instrument", "StopTime", icube, true); } - if(inst.HasKeyword("ExposureDuration")) { + if(inst.hasKeyword("ExposureDuration")) { header += WritePvl("EXPTIME", "Instrument", "ExposureDuration", icube, false); } } @@ -241,7 +241,7 @@ QString WritePvl(QString fitsKey, QString group, IString key, Cube *icube, bool if(isString) { name = "'" + name + "'"; } - QString unit = theGroup[key].Unit(); + QString unit = theGroup[key].unit(); return FitsKeyword(fitsKey, true, name, unit); } return NULL; diff --git a/isis/src/base/apps/isis2raw/isis2raw.cpp b/isis/src/base/apps/isis2raw/isis2raw.cpp index 4a189aa382a806a855f01641b029d48a39f14b11..42ee2a63e708cf9b4717ec109f4320456171567b 100644 --- a/isis/src/base/apps/isis2raw/isis2raw.cpp +++ b/isis/src/base/apps/isis2raw/isis2raw.cpp @@ -85,10 +85,10 @@ void IsisMain() { // Set the Output Storage Format if(Isis::IString(ui.GetString("STORAGEORDER")).DownCase() == "bil") { - p.SetFormat(ProcessExport::BIL); + p.setFormat(ProcessExport::BIL); } else if(Isis::IString(ui.GetString("STORAGEORDER")).DownCase() == "bip") { - p.SetFormat(ProcessExport::BIP); + p.setFormat(ProcessExport::BIP); } // Write the raw cube data diff --git a/isis/src/base/apps/isisui/isisui.cpp b/isis/src/base/apps/isisui/isisui.cpp index 58e49189273551e5d009fc8b9e18aa5f7c64ccc6..27b7cad11162d5b8c894da4aa1f6e181b0f8d7e9 100644 --- a/isis/src/base/apps/isisui/isisui.cpp +++ b/isis/src/base/apps/isisui/isisui.cpp @@ -14,8 +14,8 @@ int main(int argc, char *argv[]) { void interface() { PvlObject hist = Isis::iApp->History(); - PvlGroup up = hist.FindGroup("UserParameters"); + PvlGroup up = hist.findGroup("UserParameters"); Pvl pvl; - pvl.AddGroup(up); + pvl.addGroup(up); cout << pvl << endl; } diff --git a/isis/src/base/apps/kernfilter/kernfilter.cpp b/isis/src/base/apps/kernfilter/kernfilter.cpp index e7b62de993704016a63f3ac229cba61b436d994d..f76e19ddfce69bb3ba6dfcfa413b5577150a27b5 100644 --- a/isis/src/base/apps/kernfilter/kernfilter.cpp +++ b/isis/src/base/apps/kernfilter/kernfilter.cpp @@ -23,7 +23,7 @@ void IsisMain() { Pvl pvl(ui.GetFileName("KERNEL")); // Access the Kernel group section of the input file - const PvlGroup &kern = pvl.FindGroup("KERNEL"); + const PvlGroup &kern = pvl.findGroup("KERNEL"); int lines = kern["lines"]; int samples = kern["samples"]; @@ -39,7 +39,7 @@ void IsisMain() { } // Error check kernel for proper amount of data - lines*samples - if(lines *samples != kern["data"].Size()) { + if(lines *samples != kern["data"].size()) { IString msg = "Your kernel does not specify the correct amount of data, must"; msg += " be equal to lines * samples ["; msg += IString(lines * samples); @@ -55,7 +55,7 @@ void IsisMain() { p.SetBoxcarSize(samples, lines); // Iterate through the input kernel's data values to fill the coefs array - for(int i = 0 ; i < kern["data"].Size() ; i ++) { + for(int i = 0 ; i < kern["data"].size() ; i ++) { coefs.push_back(toDouble(kern["data"][i])); } diff --git a/isis/src/base/apps/makeflat/makeflat.cpp b/isis/src/base/apps/makeflat/makeflat.cpp index 146d4e2dd9bea8fe2d7cd745b6a9239d824a9164..40e2f7147207a2f80ec899f0007cd80842db8492 100644 --- a/isis/src/base/apps/makeflat/makeflat.cpp +++ b/isis/src/base/apps/makeflat/makeflat.cpp @@ -373,7 +373,7 @@ void IsisMain() { */ ocube = new Cube(); ocube->setDimensions(numOutputSamples, tempFileLength, 2); - PvlGroup &prefs = Preference::Preferences().FindGroup("DataDirectory", Pvl::Traverse); + PvlGroup &prefs = Preference::Preferences().findGroup("DataDirectory", Pvl::Traverse); QString outTmpName = (QString)prefs["Temporary"][0] + "/"; outTmpName += FileName(ui.GetFileName("TO")).baseName() + ".tmp.cub"; ocube->create(outTmpName); @@ -430,7 +430,7 @@ void IsisMain() { p.EndProcess(); p.ClearInputCubes(); - if(excludedDetails[excludedDetails.size()-1].Groups() == 0) { + if(excludedDetails[excludedDetails.size()-1].groups() == 0) { excludedDetails.resize(excludedDetails.size() - 1); } } @@ -509,13 +509,13 @@ void IsisMain() { Pvl excludeFile; // Find excluded files - excludeFile.AddGroup(excludedFiles); + excludeFile.addGroup(excludedFiles); for(unsigned int i = 0; i < excludedDetails.size(); i++) { - excludeFile.AddObject(excludedDetails[i]); + excludeFile.addObject(excludedDetails[i]); } - excludeFile.Write(FileName(ui.GetFileName("EXCLUDE")).expanded()); + excludeFile.write(FileName(ui.GetFileName("EXCLUDE")).expanded()); } remove(outTmpName.toAscii().data()); @@ -673,7 +673,7 @@ void CreateTemporaryData(Buffer &in) { else currExclusion += PvlKeyword("StandardDeviation", "N/A"); - excludedDetails[excludedDetails.size()-1].AddGroup(currExclusion); + excludedDetails[excludedDetails.size()-1].addGroup(currExclusion); } // Let's write our data... CreateNullData took care of nulls for us @@ -725,7 +725,7 @@ void CreateTemporaryData(Buffer &in) { "N/A"); } - excludedDetails[excludedDetails.size()-1].AddGroup(currExclusion); + excludedDetails[excludedDetails.size()-1].addGroup(currExclusion); } // Since this is a line by line iterative process, we need to get the current diff --git a/isis/src/base/apps/map2map/map2map.cpp b/isis/src/base/apps/map2map/map2map.cpp index 172d7162c73f60e51fccf454281cd7c7cbc30fd1..12f1b02d3ebfa5f0c7a55a488c03a2bfff53cb92 100644 --- a/isis/src/base/apps/map2map/map2map.cpp +++ b/isis/src/base/apps/map2map/map2map.cpp @@ -26,7 +26,7 @@ void IsisMain() { // Get the map projection file provided by the user UserInterface &ui = Application::GetUserInterface(); Pvl userPvl(ui.GetFileName("MAP")); - PvlGroup &userMappingGrp = userPvl.FindGroup("Mapping", Pvl::Traverse); + PvlGroup &userMappingGrp = userPvl.findGroup("Mapping", Pvl::Traverse); // Open the input cube and get the projection Cube *icube = p.SetInputCube("FROM"); @@ -38,39 +38,39 @@ void IsisMain() { // If the default range is FROM, then wipe out any range data in user mapping file if(ui.GetString("DEFAULTRANGE").compare("FROM") == 0 && !ui.GetBoolean("MATCHMAP")) { - if(userMappingGrp.HasKeyword("MinimumLatitude")) { - userMappingGrp.DeleteKeyword("MinimumLatitude"); + if(userMappingGrp.hasKeyword("MinimumLatitude")) { + userMappingGrp.deleteKeyword("MinimumLatitude"); } - if(userMappingGrp.HasKeyword("MaximumLatitude")) { - userMappingGrp.DeleteKeyword("MaximumLatitude"); + if(userMappingGrp.hasKeyword("MaximumLatitude")) { + userMappingGrp.deleteKeyword("MaximumLatitude"); } - if(userMappingGrp.HasKeyword("MinimumLongitude")) { - userMappingGrp.DeleteKeyword("MinimumLongitude"); + if(userMappingGrp.hasKeyword("MinimumLongitude")) { + userMappingGrp.deleteKeyword("MinimumLongitude"); } - if(userMappingGrp.HasKeyword("MaximumLongitude")) { - userMappingGrp.DeleteKeyword("MaximumLongitude"); + if(userMappingGrp.hasKeyword("MaximumLongitude")) { + userMappingGrp.deleteKeyword("MaximumLongitude"); } } // Deal with user overrides entered in the GUI. Do this by changing the user's mapping group, which // will then overlay anything in the output mapping group. if(ui.WasEntered("MINLAT") && !ui.GetBoolean("MATCHMAP")) { - userMappingGrp.AddKeyword(PvlKeyword("MinimumLatitude", toString(ui.GetDouble("MINLAT"))), Pvl::Replace); + userMappingGrp.addKeyword(PvlKeyword("MinimumLatitude", toString(ui.GetDouble("MINLAT"))), Pvl::Replace); } if(ui.WasEntered("MAXLAT") && !ui.GetBoolean("MATCHMAP")) { - userMappingGrp.AddKeyword(PvlKeyword("MaximumLatitude", toString(ui.GetDouble("MAXLAT"))), Pvl::Replace); + userMappingGrp.addKeyword(PvlKeyword("MaximumLatitude", toString(ui.GetDouble("MAXLAT"))), Pvl::Replace); } if(ui.WasEntered("MINLON") && !ui.GetBoolean("MATCHMAP")) { - userMappingGrp.AddKeyword(PvlKeyword("MinimumLongitude", toString(ui.GetDouble("MINLON"))), Pvl::Replace); + userMappingGrp.addKeyword(PvlKeyword("MinimumLongitude", toString(ui.GetDouble("MINLON"))), Pvl::Replace); } if(ui.WasEntered("MAXLON") && !ui.GetBoolean("MATCHMAP")) { - userMappingGrp.AddKeyword(PvlKeyword("MaximumLongitude", toString(ui.GetDouble("MAXLON"))), Pvl::Replace); + userMappingGrp.addKeyword(PvlKeyword("MaximumLongitude", toString(ui.GetDouble("MAXLON"))), Pvl::Replace); } /** @@ -81,7 +81,7 @@ void IsisMain() { * the user mapping group into the output group a mimimum overrides a minimum and a maximum overrides a maximum. */ bool sameDirection = true; - if(userMappingGrp.HasKeyword("LongitudeDirection")) { + if(userMappingGrp.hasKeyword("LongitudeDirection")) { if(((QString)userMappingGrp["LongitudeDirection"]).compare(fromMappingGrp["LongitudeDirection"]) != 0) { sameDirection = false; } @@ -89,7 +89,7 @@ void IsisMain() { // Since the out mapping group came from the from mapping group, which came from a valid cube, // we can assume both min/max lon exists if min longitude exists. - if(!sameDirection && outMappingGrp.HasKeyword("MinimumLongitude")) { + if(!sameDirection && outMappingGrp.hasKeyword("MinimumLongitude")) { double minLon = outMappingGrp["MinimumLongitude"]; double maxLon = outMappingGrp["MaximumLongitude"]; @@ -100,93 +100,93 @@ void IsisMain() { if(ui.GetString("PIXRES").compare("FROM") == 0 && !ui.GetBoolean("MATCHMAP")) { // Resolution will be in fromMappingGrp and outMappingGrp at this time // delete from user mapping grp - if(userMappingGrp.HasKeyword("Scale")) { - userMappingGrp.DeleteKeyword("Scale"); + if(userMappingGrp.hasKeyword("Scale")) { + userMappingGrp.deleteKeyword("Scale"); } - if(userMappingGrp.HasKeyword("PixelResolution")) { - userMappingGrp.DeleteKeyword("PixelResolution"); + if(userMappingGrp.hasKeyword("PixelResolution")) { + userMappingGrp.deleteKeyword("PixelResolution"); } } else if(ui.GetString("PIXRES").compare("MAP") == 0 || ui.GetBoolean("MATCHMAP")) { // Resolution will be in userMappingGrp - delete all others - if(outMappingGrp.HasKeyword("Scale")) { - outMappingGrp.DeleteKeyword("Scale"); + if(outMappingGrp.hasKeyword("Scale")) { + outMappingGrp.deleteKeyword("Scale"); } - if(outMappingGrp.HasKeyword("PixelResolution")) { - outMappingGrp.DeleteKeyword("PixelResolution"); + if(outMappingGrp.hasKeyword("PixelResolution")) { + outMappingGrp.deleteKeyword("PixelResolution"); } - if(fromMappingGrp.HasKeyword("Scale")); + if(fromMappingGrp.hasKeyword("Scale")); { - fromMappingGrp.DeleteKeyword("Scale"); + fromMappingGrp.deleteKeyword("Scale"); } - if(fromMappingGrp.HasKeyword("PixelResolution")) { - fromMappingGrp.DeleteKeyword("PixelResolution"); + if(fromMappingGrp.hasKeyword("PixelResolution")) { + fromMappingGrp.deleteKeyword("PixelResolution"); } } else if(ui.GetString("PIXRES").compare("MPP") == 0) { // Resolution specified - delete all and add to outMappingGrp - if(outMappingGrp.HasKeyword("Scale")) { - outMappingGrp.DeleteKeyword("Scale"); + if(outMappingGrp.hasKeyword("Scale")) { + outMappingGrp.deleteKeyword("Scale"); } - if(outMappingGrp.HasKeyword("PixelResolution")) { - outMappingGrp.DeleteKeyword("PixelResolution"); + if(outMappingGrp.hasKeyword("PixelResolution")) { + outMappingGrp.deleteKeyword("PixelResolution"); } - if(fromMappingGrp.HasKeyword("Scale")) { - fromMappingGrp.DeleteKeyword("Scale"); + if(fromMappingGrp.hasKeyword("Scale")) { + fromMappingGrp.deleteKeyword("Scale"); } - if(fromMappingGrp.HasKeyword("PixelResolution")) { - fromMappingGrp.DeleteKeyword("PixelResolution"); + if(fromMappingGrp.hasKeyword("PixelResolution")) { + fromMappingGrp.deleteKeyword("PixelResolution"); } - if(userMappingGrp.HasKeyword("Scale")) { - userMappingGrp.DeleteKeyword("Scale"); + if(userMappingGrp.hasKeyword("Scale")) { + userMappingGrp.deleteKeyword("Scale"); } - if(userMappingGrp.HasKeyword("PixelResolution")) { - userMappingGrp.DeleteKeyword("PixelResolution"); + if(userMappingGrp.hasKeyword("PixelResolution")) { + userMappingGrp.deleteKeyword("PixelResolution"); } - outMappingGrp.AddKeyword(PvlKeyword("PixelResolution", toString(ui.GetDouble("RESOLUTION")), "meters/pixel"), Pvl::Replace); + outMappingGrp.addKeyword(PvlKeyword("PixelResolution", toString(ui.GetDouble("RESOLUTION")), "meters/pixel"), Pvl::Replace); } else if(ui.GetString("PIXRES").compare("PPD") == 0) { // Resolution specified - delete all and add to outMappingGrp - if(outMappingGrp.HasKeyword("Scale")) { - outMappingGrp.DeleteKeyword("Scale"); + if(outMappingGrp.hasKeyword("Scale")) { + outMappingGrp.deleteKeyword("Scale"); } - if(outMappingGrp.HasKeyword("PixelResolution")) { - outMappingGrp.DeleteKeyword("PixelResolution"); + if(outMappingGrp.hasKeyword("PixelResolution")) { + outMappingGrp.deleteKeyword("PixelResolution"); } - if(fromMappingGrp.HasKeyword("Scale")) { - fromMappingGrp.DeleteKeyword("Scale"); + if(fromMappingGrp.hasKeyword("Scale")) { + fromMappingGrp.deleteKeyword("Scale"); } - if(fromMappingGrp.HasKeyword("PixelResolution")) { - fromMappingGrp.DeleteKeyword("PixelResolution"); + if(fromMappingGrp.hasKeyword("PixelResolution")) { + fromMappingGrp.deleteKeyword("PixelResolution"); } - if(userMappingGrp.HasKeyword("Scale")) { - userMappingGrp.DeleteKeyword("Scale"); + if(userMappingGrp.hasKeyword("Scale")) { + userMappingGrp.deleteKeyword("Scale"); } - if(userMappingGrp.HasKeyword("PixelResolution")) { - userMappingGrp.DeleteKeyword("PixelResolution"); + if(userMappingGrp.hasKeyword("PixelResolution")) { + userMappingGrp.deleteKeyword("PixelResolution"); } - outMappingGrp.AddKeyword(PvlKeyword("Scale", toString(ui.GetDouble("RESOLUTION")), "pixels/degree"), Pvl::Replace); + outMappingGrp.addKeyword(PvlKeyword("Scale", toString(ui.GetDouble("RESOLUTION")), "pixels/degree"), Pvl::Replace); } // Rotation will NOT Propagate - if(outMappingGrp.HasKeyword("Rotation")) { - outMappingGrp.DeleteKeyword("Rotation"); + if(outMappingGrp.hasKeyword("Rotation")) { + outMappingGrp.deleteKeyword("Rotation"); } @@ -194,8 +194,8 @@ void IsisMain() { * The user specified map template file overrides what ever is in the * cube's mapping group. */ - for(int keyword = 0; keyword < userMappingGrp.Keywords(); keyword ++) { - outMappingGrp.AddKeyword(userMappingGrp[keyword], Pvl::Replace); + for(int keyword = 0; keyword < userMappingGrp.keywords(); keyword ++) { + outMappingGrp.addKeyword(userMappingGrp[keyword], Pvl::Replace); } /** @@ -215,33 +215,33 @@ void IsisMain() { if(!sameDirection) { PvlGroup longitudes = inproj->MappingLongitudes(); - for(int index = 0; index < longitudes.Keywords(); index ++) { - if(!userMappingGrp.HasKeyword(longitudes[index].Name())) { + for(int index = 0; index < longitudes.keywords(); index ++) { + if(!userMappingGrp.hasKeyword(longitudes[index].name())) { // use the from domain because that's where our values are coming from if(((QString)userMappingGrp["LongitudeDirection"]).compare("PositiveEast") == 0) { - outMappingGrp[longitudes[index].Name()] = toString( - Projection::ToPositiveEast(outMappingGrp[longitudes[index].Name()], outMappingGrp["LongitudeDomain"])); + outMappingGrp[longitudes[index].name()] = toString( + Projection::ToPositiveEast(outMappingGrp[longitudes[index].name()], outMappingGrp["LongitudeDomain"])); } else { - outMappingGrp[longitudes[index].Name()] = toString( - Projection::ToPositiveWest(outMappingGrp[longitudes[index].Name()], outMappingGrp["LongitudeDomain"])); + outMappingGrp[longitudes[index].name()] = toString( + Projection::ToPositiveWest(outMappingGrp[longitudes[index].name()], outMappingGrp["LongitudeDomain"])); } } } } // Second, longitude domain - if(userMappingGrp.HasKeyword("LongitudeDomain")) { // user set a new domain? + if(userMappingGrp.hasKeyword("LongitudeDomain")) { // user set a new domain? if((int)userMappingGrp["LongitudeDomain"] != (int)fromMappingGrp["LongitudeDomain"]) { // new domain different? PvlGroup longitudes = inproj->MappingLongitudes(); - for(int index = 0; index < longitudes.Keywords(); index ++) { - if(!userMappingGrp.HasKeyword(longitudes[index].Name())) { + for(int index = 0; index < longitudes.keywords(); index ++) { + if(!userMappingGrp.hasKeyword(longitudes[index].name())) { if((int)userMappingGrp["LongitudeDomain"] == 180) { - outMappingGrp[longitudes[index].Name()] = toString(Projection::To180Domain(outMappingGrp[longitudes[index].Name()])); + outMappingGrp[longitudes[index].name()] = toString(Projection::To180Domain(outMappingGrp[longitudes[index].name()])); } else { - outMappingGrp[longitudes[index].Name()] = toString(Projection::To360Domain(outMappingGrp[longitudes[index].Name()])); + outMappingGrp[longitudes[index].name()] = toString(Projection::To360Domain(outMappingGrp[longitudes[index].name()])); } } } @@ -250,22 +250,22 @@ void IsisMain() { } // Third, planetographic/planetocentric - if(userMappingGrp.HasKeyword("LatitudeType")) { // user set a new domain? + if(userMappingGrp.hasKeyword("LatitudeType")) { // user set a new domain? if(((QString)userMappingGrp["LatitudeType"]).compare(fromMappingGrp["LatitudeType"]) != 0) { // new lat type different? PvlGroup latitudes = inproj->MappingLatitudes(); - for(int index = 0; index < latitudes.Keywords(); index ++) { - if(!userMappingGrp.HasKeyword(latitudes[index].Name())) { + for(int index = 0; index < latitudes.keywords(); index ++) { + if(!userMappingGrp.hasKeyword(latitudes[index].name())) { if(((QString)userMappingGrp["LatitudeType"]).compare("Planetographic") == 0) { - outMappingGrp[latitudes[index].Name()] = toString(Projection::ToPlanetographic( - (double)fromMappingGrp[latitudes[index].Name()], + outMappingGrp[latitudes[index].name()] = toString(Projection::ToPlanetographic( + (double)fromMappingGrp[latitudes[index].name()], (double)fromMappingGrp["EquatorialRadius"], (double)fromMappingGrp["PolarRadius"])); } else { - outMappingGrp[latitudes[index].Name()] = toString(Projection::ToPlanetocentric( - (double)fromMappingGrp[latitudes[index].Name()], + outMappingGrp[latitudes[index].name()] = toString(Projection::ToPlanetocentric( + (double)fromMappingGrp[latitudes[index].name()], (double)fromMappingGrp["EquatorialRadius"], (double)fromMappingGrp["PolarRadius"])); } @@ -308,13 +308,13 @@ void IsisMain() { int samples, lines; Pvl mapData; // Copy to preserve cube labels so we can match cube size - if(userPvl.HasObject("IsisCube")) { + if(userPvl.hasObject("IsisCube")) { mapData = userPvl; - mapData.FindObject("IsisCube").DeleteGroup("Mapping"); - mapData.FindObject("IsisCube").AddGroup(outMappingGrp); + mapData.findObject("IsisCube").deleteGroup("Mapping"); + mapData.findObject("IsisCube").addGroup(outMappingGrp); } else { - mapData.AddGroup(outMappingGrp); + mapData.addGroup(outMappingGrp); } // *NOTE: The UpperLeftX,UpperLeftY keywords will not be used in the CreateForCube @@ -342,10 +342,10 @@ void IsisMain() { // ProjectionFactory::CreateForCube updated mapData to have the correct // upperleftcornerx, upperleftcornery, scale and resolution. Use these // updated numbers. - cleanOutGrp.AddKeyword(mapData.FindGroup("Mapping", Pvl::Traverse)["UpperLeftCornerX"], Pvl::Replace); - cleanOutGrp.AddKeyword(mapData.FindGroup("Mapping", Pvl::Traverse)["UpperLeftCornerY"], Pvl::Replace); - cleanOutGrp.AddKeyword(mapData.FindGroup("Mapping", Pvl::Traverse)["Scale"], Pvl::Replace); - cleanOutGrp.AddKeyword(mapData.FindGroup("Mapping", Pvl::Traverse)["PixelResolution"], Pvl::Replace); + cleanOutGrp.addKeyword(mapData.findGroup("Mapping", Pvl::Traverse)["UpperLeftCornerX"], Pvl::Replace); + cleanOutGrp.addKeyword(mapData.findGroup("Mapping", Pvl::Traverse)["UpperLeftCornerY"], Pvl::Replace); + cleanOutGrp.addKeyword(mapData.findGroup("Mapping", Pvl::Traverse)["Scale"], Pvl::Replace); + cleanOutGrp.addKeyword(mapData.findGroup("Mapping", Pvl::Traverse)["PixelResolution"], Pvl::Replace); ocube->putGroup(cleanOutGrp); @@ -465,8 +465,8 @@ void PrintMap() { // Get mapping group from map file Pvl userMap; - userMap.Read(ui.GetFileName("MAP")); - PvlGroup &userGrp = userMap.FindGroup("Mapping", Pvl::Traverse); + userMap.read(ui.GetFileName("MAP")); + PvlGroup &userGrp = userMap.findGroup("Mapping", Pvl::Traverse); //Write map file out to the log Isis::Application::GuiLog(userGrp); @@ -479,7 +479,7 @@ void LoadMapRange() { Pvl userMap; try { - userMap.Read(ui.GetFileName("MAP")); + userMap.read(ui.GetFileName("MAP")); } catch(IException &e) { } @@ -488,7 +488,7 @@ void LoadMapRange() { Pvl fromMap; try { - fromMap.Read(ui.GetFileName("FROM")); + fromMap.read(ui.GetFileName("FROM")); } catch(IException &e) { } @@ -497,7 +497,7 @@ void LoadMapRange() { PvlGroup fromMapping("Mapping"); try { - fromMapping = fromMap.FindGroup("Mapping", Pvl::Traverse); + fromMapping = fromMap.findGroup("Mapping", Pvl::Traverse); } catch(IException &e) { } @@ -505,7 +505,7 @@ void LoadMapRange() { PvlGroup userMapping("Mapping"); try { - userMapping = userMap.FindGroup("Mapping", Pvl::Traverse); + userMapping = userMap.findGroup("Mapping", Pvl::Traverse); } catch(IException &e) { } @@ -513,13 +513,13 @@ void LoadMapRange() { // Do conversions on from map // Longitude conversions first - if(userMapping.HasKeyword("LongitudeDirection")) { + if(userMapping.hasKeyword("LongitudeDirection")) { if(((QString)userMapping["LongitudeDirection"]).compare(fromMapping["LongitudeDirection"]) != 0) { double minLon = fromMapping["MinimumLongitude"]; double maxLon = fromMapping["MaximumLongitude"]; int domain = fromMapping["LongitudeDomain"]; - if(userMapping.HasKeyword("LongitudeDomain")) { + if(userMapping.hasKeyword("LongitudeDomain")) { domain = userMapping["LongitudeDomain"]; } @@ -535,7 +535,7 @@ void LoadMapRange() { } // Latitude conversions now - if(userMapping.HasKeyword("LatitudeType")) { // user set a new domain? + if(userMapping.hasKeyword("LatitudeType")) { // user set a new domain? if(((QString)userMapping["LatitudeType"]).compare(fromMapping["LatitudeType"]) != 0) { // new lat type different? if(((QString)userMapping["LatitudeType"]).compare("Planetographic") == 0) { fromMapping["MinimumLatitude"] = toString(Projection::ToPlanetographic( @@ -563,8 +563,8 @@ void LoadMapRange() { // Failed at longitudes, use our originals! if((double)fromMapping["MinimumLongitude"] >= (double)fromMapping["MaximumLongitude"]) { try { - fromMapping["MinimumLongitude"] = fromMap.FindGroup("Mapping", Pvl::Traverse)["MinimumLongitude"]; - fromMapping["MaximumLongitude"] = fromMap.FindGroup("Mapping", Pvl::Traverse)["MaximumLongitude"]; + fromMapping["MinimumLongitude"] = fromMap.findGroup("Mapping", Pvl::Traverse)["MinimumLongitude"]; + fromMapping["MaximumLongitude"] = fromMap.findGroup("Mapping", Pvl::Traverse)["MaximumLongitude"]; } catch(IException &e) { } @@ -572,19 +572,19 @@ void LoadMapRange() { // Overlay lat/lons in map file (if DEFAULTRANGE=MAP) if(ui.GetString("DEFAULTRANGE") == "MAP") { - if(userMapping.HasKeyword("MinimumLatitude")) { + if(userMapping.hasKeyword("MinimumLatitude")) { fromMapping["MinimumLatitude"] = userMapping["MinimumLatitude"]; } - if(userMapping.HasKeyword("MaximumLatitude")) { + if(userMapping.hasKeyword("MaximumLatitude")) { fromMapping["MaximumLatitude"] = userMapping["MaximumLatitude"]; } - if(userMapping.HasKeyword("MinimumLongitude")) { + if(userMapping.hasKeyword("MinimumLongitude")) { fromMapping["MinimumLongitude"] = userMapping["MinimumLongitude"]; } - if(userMapping.HasKeyword("MaximumLongitude")) { + if(userMapping.hasKeyword("MaximumLongitude")) { fromMapping["MaximumLongitude"] = userMapping["MaximumLongitude"]; } } diff --git a/isis/src/base/apps/mapgrid/mapgrid.cpp b/isis/src/base/apps/mapgrid/mapgrid.cpp index f0ba611832e4eced5546d773945585be3de66aa0..a0b88be0355691cb68ee084d1c5a3285318304d4 100644 --- a/isis/src/base/apps/mapgrid/mapgrid.cpp +++ b/isis/src/base/apps/mapgrid/mapgrid.cpp @@ -34,22 +34,22 @@ void IsisMain() { // Get mapfile, add values for range and create projection QString mapFile = ui.GetFileName("MAPFILE"); Pvl p(mapFile); - PvlGroup &mapping = p.FindGroup("Mapping", Pvl::Traverse); + PvlGroup &mapping = p.findGroup("Mapping", Pvl::Traverse); - if(mapping.HasKeyword("MinimumLatitude")) { - mapping.DeleteKeyword("MinimumLatitude"); + if(mapping.hasKeyword("MinimumLatitude")) { + mapping.deleteKeyword("MinimumLatitude"); } - if(mapping.HasKeyword("MaximumLatitude")) { - mapping.DeleteKeyword("MaximumLatitude"); + if(mapping.hasKeyword("MaximumLatitude")) { + mapping.deleteKeyword("MaximumLatitude"); } - if(mapping.HasKeyword("MinimumLongitude")) { - mapping.DeleteKeyword("MinimumLongitude"); + if(mapping.hasKeyword("MinimumLongitude")) { + mapping.deleteKeyword("MinimumLongitude"); } - if(mapping.HasKeyword("MaximumLongitude")) { - mapping.DeleteKeyword("MaximumLongitude"); + if(mapping.hasKeyword("MaximumLongitude")) { + mapping.deleteKeyword("MaximumLongitude"); } mapping += PvlKeyword("MinimumLatitude", toString(latStart)); diff --git a/isis/src/base/apps/maplab/maplab.cpp b/isis/src/base/apps/maplab/maplab.cpp index 9706826f6233ed22628d5c1b04f26d7003ecd777..42d10a3c472d3cc75d0ac08c37e1f363a1743493 100644 --- a/isis/src/base/apps/maplab/maplab.cpp +++ b/isis/src/base/apps/maplab/maplab.cpp @@ -21,24 +21,24 @@ void IsisMain() { //Get the map projection file provided by the user Pvl userMap; - userMap.Read(ui.GetFileName("MAP")); - PvlGroup &mapGrp = userMap.FindGroup("Mapping", Pvl::Traverse); + userMap.read(ui.GetFileName("MAP")); + PvlGroup &mapGrp = userMap.findGroup("Mapping", Pvl::Traverse); // Error checking to ensure the map projection file provided contains // information pertaining to a target, body radius, and longitude direction - if(!mapGrp.HasKeyword("TargetName")) { - QString msg = "The given MAP [" + userMap.Name() + + if(!mapGrp.hasKeyword("TargetName")) { + QString msg = "The given MAP [" + userMap.name() + "] does not have the TargetName keyword."; throw IException(IException::User, msg, _FILEINFO_); } - else if(!mapGrp.HasKeyword("EquatorialRadius") || - !mapGrp.HasKeyword("PolarRadius")) { - QString msg = "The given MAP [" + userMap.Name() + + else if(!mapGrp.hasKeyword("EquatorialRadius") || + !mapGrp.hasKeyword("PolarRadius")) { + QString msg = "The given MAP [" + userMap.name() + "] does not have the EquatorialRadius and PolarRadius keywords."; throw IException(IException::User, msg, _FILEINFO_); } - else if(!mapGrp.HasKeyword("LongitudeDomain")) { - QString msg = "The given MAP [" + userMap.Name() + + else if(!mapGrp.hasKeyword("LongitudeDomain")) { + QString msg = "The given MAP [" + userMap.name() + "] does not have the LongitudeDomain keyword."; throw IException(IException::User, msg, _FILEINFO_); } @@ -67,18 +67,18 @@ void IsisMain() { double res = 0.0; double scale = 0.0; - if(mapGrp.HasKeyword("PixelResolution")) { + if(mapGrp.hasKeyword("PixelResolution")) { double localRadius = proj->LocalRadius(proj->TrueScaleLatitude()); - res = mapGrp.FindKeyword("PixelResolution"); + res = mapGrp.findKeyword("PixelResolution"); scale = (2.0 * Isis::PI * localRadius) / (360.0 * res); } - else if(mapGrp.HasKeyword("Scale")) { + else if(mapGrp.hasKeyword("Scale")) { double localRadius = proj->LocalRadius(proj->TrueScaleLatitude()); - scale = mapGrp.FindKeyword("Scale"); + scale = mapGrp.findKeyword("Scale"); res = (2.0 * Isis::PI * localRadius) / (360.0 * scale); } else { - QString msg = "The given MAP[" + userMap.Name() + + QString msg = "The given MAP[" + userMap.name() + "] does not have the PixelResolution or Scale keywords."; throw IException(IException::User, msg, _FILEINFO_); } @@ -90,14 +90,14 @@ void IsisMain() { y = y + res * (line - 0.5); //add origen values to Mapping Group - mapGrp.AddKeyword(PvlKeyword("UpperLeftCornerX", toString(x), "meters"), Pvl::Replace); - mapGrp.AddKeyword(PvlKeyword("UpperLeftCornerY", toString(y), "meters"), Pvl::Replace); + mapGrp.addKeyword(PvlKeyword("UpperLeftCornerX", toString(x), "meters"), Pvl::Replace); + mapGrp.addKeyword(PvlKeyword("UpperLeftCornerY", toString(y), "meters"), Pvl::Replace); - if(!mapGrp.HasKeyword("PixelResolution")) { - mapGrp.AddKeyword(PvlKeyword("PixelResolution", toString(res), "meters")); + if(!mapGrp.hasKeyword("PixelResolution")) { + mapGrp.addKeyword(PvlKeyword("PixelResolution", toString(res), "meters")); } - if(!mapGrp.HasKeyword("Scale")) { - mapGrp.AddKeyword(PvlKeyword("Scale", toString(scale), "pixels/degree")); + if(!mapGrp.hasKeyword("Scale")) { + mapGrp.addKeyword(PvlKeyword("Scale", toString(scale), "pixels/degree")); } @@ -105,12 +105,12 @@ void IsisMain() { Application::GuiLog(userMap); // Extract label from cube file Pvl *label = cube.label(); - PvlObject &o = label->FindObject("IsisCube"); + PvlObject &o = label->findObject("IsisCube"); // Add Mapping Group to input cube - if(o.HasGroup("Mapping")) { - o.DeleteGroup("Mapping"); + if(o.hasGroup("Mapping")) { + o.deleteGroup("Mapping"); } - o.AddGroup(mapGrp); + o.addGroup(mapGrp); // keep track of change to labels in history History hist = History("IsisCube"); diff --git a/isis/src/base/apps/mapmos/mapmos.cpp b/isis/src/base/apps/mapmos/mapmos.cpp index 719c008e869423902b9a9aa94b281d06e93cab5a..4bad11009478d17727a57bd054b45855472f3b47 100644 --- a/isis/src/base/apps/mapmos/mapmos.cpp +++ b/isis/src/base/apps/mapmos/mapmos.cpp @@ -51,13 +51,13 @@ void IsisMain() { m.SetCreateFlag(true); // Use the input projection as a starting point for the mosaic - PvlGroup mapGroup = inCube.label()->FindGroup("Mapping", Pvl::Traverse); + PvlGroup mapGroup = inCube.label()->findGroup("Mapping", Pvl::Traverse); inCube.close(); - mapGroup.AddKeyword(PvlKeyword("MinimumLatitude", toString(ui.GetDouble("MINLAT"))), Pvl::Replace); - mapGroup.AddKeyword(PvlKeyword("MaximumLatitude", toString(ui.GetDouble("MAXLAT"))), Pvl::Replace); - mapGroup.AddKeyword(PvlKeyword("MinimumLongitude", toString(ui.GetDouble("MINLON"))), Pvl::Replace); - mapGroup.AddKeyword(PvlKeyword("MaximumLongitude", toString(ui.GetDouble("MAXLON"))), Pvl::Replace); + mapGroup.addKeyword(PvlKeyword("MinimumLatitude", toString(ui.GetDouble("MINLAT"))), Pvl::Replace); + mapGroup.addKeyword(PvlKeyword("MaximumLatitude", toString(ui.GetDouble("MAXLAT"))), Pvl::Replace); + mapGroup.addKeyword(PvlKeyword("MinimumLongitude", toString(ui.GetDouble("MINLON"))), Pvl::Replace); + mapGroup.addKeyword(PvlKeyword("MaximumLongitude", toString(ui.GetDouble("MAXLON"))), Pvl::Replace); CubeAttributeOutput oAtt = ui.GetOutputAttribute("MOSAIC"); @@ -81,8 +81,8 @@ void IsisMain() { } else { // Logs the input file location in the mosaic - for (int i = 0; i < m.imagePositions().Groups(); i++) { - Application::Log(m.imagePositions().Group(i)); + for (int i = 0; i < m.imagePositions().groups(); i++) { + Application::Log(m.imagePositions().group(i)); } } diff --git a/isis/src/base/apps/mappt/mappt.cpp b/isis/src/base/apps/mappt/mappt.cpp index 248844b53d451584dbd8d6ed9a1e405e5d57afab..c06f180dad69243eb6d95eb04278eec251fc0a1c 100644 --- a/isis/src/base/apps/mappt/mappt.cpp +++ b/isis/src/base/apps/mappt/mappt.cpp @@ -85,7 +85,7 @@ void IsisMain() { // Load it up into a new projection Pvl mapPvl; - mapPvl.Read(mapFile.expanded()); + mapPvl.read(mapFile.expanded()); Projection *altmap = ProjectionFactory::CreateFromCube(mapPvl); // Set lat and lon in its system @@ -177,11 +177,11 @@ void IsisMain() { // Input map coordinate system location // Latitude if(proj->IsPlanetocentric()) { - centLat.AddComment("Input map coordinate system"); + centLat.addComment("Input map coordinate system"); results += centLat; } else { - graphLat.AddComment("Input map coordinate system"); + graphLat.addComment("Input map coordinate system"); results += graphLat; } @@ -206,11 +206,11 @@ void IsisMain() { // Non input corrdinate system locations // Latitude if(proj->IsPlanetocentric()) { - graphLat.AddComment("Location in other coordinate systems"); + graphLat.addComment("Location in other coordinate systems"); results += graphLat; } else { - centLat.AddComment("Location in other coordinate systems"); + centLat.addComment("Location in other coordinate systems"); results += centLat; } @@ -252,12 +252,12 @@ void IsisMain() { // Write the pvl group out to the file if(ui.GetString("FORMAT") == "PVL") { Pvl temp; - temp.AddGroup(results); + temp.addGroup(results); if(append) { - temp.Append(outFile); + temp.append(outFile); } else { - temp.Write(outFile); + temp.write(outFile); } } @@ -278,20 +278,20 @@ void IsisMain() { } if(writeHeader) { - for(int i = 0; i < results.Keywords(); i++) { - os << results[i].Name(); + for(int i = 0; i < results.keywords(); i++) { + os << results[i].name(); - if(i < results.Keywords() - 1) { + if(i < results.keywords() - 1) { os << ","; } } os << endl; } - for(int i = 0; i < results.Keywords(); i++) { + for(int i = 0; i < results.keywords(); i++) { os << (QString)results[i]; - if(i < results.Keywords() - 1) { + if(i < results.keywords() - 1) { os << ","; } } @@ -315,8 +315,8 @@ void PrintMap() { // Get mapping group from map file Pvl userMap; - userMap.Read(ui.GetFileName("MAP")); - PvlGroup &userGrp = userMap.FindGroup("Mapping", Pvl::Traverse); + userMap.read(ui.GetFileName("MAP")); + PvlGroup &userGrp = userMap.findGroup("Mapping", Pvl::Traverse); //Write map file out to the log Isis::Application::GuiLog(userGrp); diff --git a/isis/src/base/apps/mapsize/mapsize.cpp b/isis/src/base/apps/mapsize/mapsize.cpp index 5d1121df2f73d900b0b745ba20ef6f7d9be9127b..c541deeeb1c4a07b0ffb65f802adc73f3bc7583f 100644 --- a/isis/src/base/apps/mapsize/mapsize.cpp +++ b/isis/src/base/apps/mapsize/mapsize.cpp @@ -12,7 +12,7 @@ void IsisMain() { // Get the output map projection file and create an output projection object UserInterface &ui = Application::GetUserInterface(); Pvl lab; - lab.Read(ui.GetFileName("MAP")); + lab.read(ui.GetFileName("MAP")); int samples, lines; Projection *outmap = ProjectionFactory::CreateForCube(lab, samples, lines); @@ -58,12 +58,12 @@ void IsisMain() { // Write the output file if requested if(ui.WasEntered("TO")) { Pvl temp; - temp.AddGroup(results); - temp.AddGroup(lab.FindGroup("Mapping", Pvl::Traverse)); - temp.Write(ui.GetFileName("TO", "txt")); + temp.addGroup(results); + temp.addGroup(lab.findGroup("Mapping", Pvl::Traverse)); + temp.write(ui.GetFileName("TO", "txt")); } - Application::Log(lab.FindGroup("Mapping", Pvl::Traverse)); + Application::Log(lab.findGroup("Mapping", Pvl::Traverse)); p.EndProcess(); } diff --git a/isis/src/base/apps/maptemplate/maptemplate.cpp b/isis/src/base/apps/maptemplate/maptemplate.cpp index ce8ccad9ccd39692d26e5156e4bba2677a737109..7e43fee40f9ba2f9e6c5cdb22f4de17059dc867b 100644 --- a/isis/src/base/apps/maptemplate/maptemplate.cpp +++ b/isis/src/base/apps/maptemplate/maptemplate.cpp @@ -69,8 +69,8 @@ void IsisMain() { output += ".map"; } Pvl p; - p.AddGroup(mapping); - p.Write(output); + p.addGroup(mapping); + p.write(output); } //Helper function to output map file to log. @@ -78,8 +78,8 @@ void helperButtonLogMap() { UserInterface &ui = Application::GetUserInterface(); QString mapFile(ui.GetFileName("MAP")); Pvl p; - p.Read(mapFile); - PvlGroup t = p.FindGroup("mapping", Pvl::Traverse); + p.read(mapFile); + PvlGroup t = p.findGroup("mapping", Pvl::Traverse); QString OQString = "***** Output of [" + mapFile + "] *****"; Application::GuiLog(OQString); Application::GuiLog(t); @@ -91,8 +91,8 @@ void helperButtonLoadMap() { UserInterface &ui = Application::GetUserInterface(); QString mapFile(ui.GetFileName("MAP")); Pvl p; - p.Read(mapFile); - PvlGroup t = p.FindGroup("mapping", Pvl::Traverse); + p.read(mapFile); + PvlGroup t = p.findGroup("mapping", Pvl::Traverse); //Projection Stuff ui.Clear("CLON"); ui.Clear("CLAT"); @@ -103,48 +103,48 @@ void helperButtonLoadMap() { ui.Clear("PLON"); ui.Clear("PROT"); - if(t.HasKeyword("ProjectionName")) { + if(t.hasKeyword("ProjectionName")) { QString projIn = (QString)t["ProjectionName"]; projIn = projIn.toUpper(); ui.Clear("PROJECTION"); ui.PutAsString("PROJECTION", projIn); } - if(t.HasKeyword("CenterLongitude")) { + if(t.hasKeyword("CenterLongitude")) { double clonIn = t["CenterLongitude"]; ui.Clear("CLON"); ui.PutDouble("CLON", clonIn); } - if(t.HasKeyword("CenterLatitude")) { + if(t.hasKeyword("CenterLatitude")) { double clatIn = t["CenterLatitude"]; ui.Clear("CLAT"); ui.PutDouble("CLAT", clatIn); } - if(t.HasKeyword("ScaleFactor")) { + if(t.hasKeyword("ScaleFactor")) { double scaleFactorIn = t["ScaleFactor"]; ui.Clear("SCALEFACTOR"); ui.PutDouble("SCALEFACTOR", scaleFactorIn); } - if(t.HasKeyword("FirstStandardParallel")) { + if(t.hasKeyword("FirstStandardParallel")) { double par1In = t["FirstStandardParallel"]; ui.Clear("PAR1"); ui.PutDouble("PAR1", par1In); } - if(t.HasKeyword("SecondStandardParallel")) { + if(t.hasKeyword("SecondStandardParallel")) { double par2In = t["SecondStandardParallel"]; ui.Clear("PAR2"); ui.PutDouble("PAR2", par2In); } - if(t.HasKeyword("PoleLatitude")) { + if(t.hasKeyword("PoleLatitude")) { double pLatIn = t["PoleLatitude"]; ui.Clear("PLAT"); ui.PutDouble("PLAT", pLatIn); } - if(t.HasKeyword("PoleLongitude")) { + if(t.hasKeyword("PoleLongitude")) { double pLonIn = t["PoleLongitude"]; ui.Clear("PLON"); ui.PutDouble("PLON", pLonIn); } - if(t.HasKeyword("PoleRotation")) { + if(t.hasKeyword("PoleRotation")) { double pRotIn = t["PoleRotation"]; ui.Clear("PROT"); ui.PutDouble("PROT", pRotIn); @@ -161,7 +161,7 @@ void helperButtonLoadMap() { ui.Clear("EQRADIUS"); ui.Clear("POLRADIUS"); - if(t.HasKeyword("TargetName")) { + if(t.hasKeyword("TargetName")) { QString use = "USER"; ui.Clear("TARGOPT"); ui.PutAsString("TARGOPT", use); @@ -199,7 +199,7 @@ void helperButtonLoadMap() { ui.Clear("RNGOPT"); ui.PutAsString("RNGOPT", useR); - if(t.HasKeyword("MinimumLatitude")) { + if(t.hasKeyword("MinimumLatitude")) { double minlatIn = t["MinimumLatitude"]; QString useR = "USER"; ui.Clear("RNGOPT"); @@ -217,7 +217,7 @@ void helperButtonLoadMap() { ui.PutDouble("MAXLON", maxlonIn); } //Resolution Parameter stuff - if(t.HasKeyword("PixelResolution")) { + if(t.hasKeyword("PixelResolution")) { QString useM = "MPP"; ui.Clear("RESOPT"); ui.PutAsString("RESOPT", useM); @@ -225,7 +225,7 @@ void helperButtonLoadMap() { ui.Clear("RESOLUTION"); ui.PutDouble("RESOLUTION", pixresIn); } - if(t.HasKeyword("Scale")) { + if(t.hasKeyword("Scale")) { QString useM = "PPD"; ui.Clear("RESOPT"); ui.PutAsString("RESOPT", useM); @@ -241,8 +241,8 @@ void helperButtonLogTargDef() { UserInterface &ui = Application::GetUserInterface(); QString targetFile(ui.GetFileName("TARGDEF")); Pvl p; - p.Read(targetFile); - PvlGroup t = p.FindGroup("mapping", Pvl::Traverse); + p.read(targetFile); + PvlGroup t = p.findGroup("mapping", Pvl::Traverse); QString OQString = "***** Output of [" + targetFile + "] *****"; Application::GuiLog(OQString); Application::GuiLog(t); @@ -256,40 +256,40 @@ void helperButtonLoadTargDef() { // test if targdef was entered Pvl p; - p.Read(targetFile); - PvlGroup t = p.FindGroup("mapping", Pvl::Traverse); + p.read(targetFile); + PvlGroup t = p.findGroup("mapping", Pvl::Traverse); //Load the targdef values into the GUI QString tOpt = "USER"; ui.Clear("TARGOPT"); ui.PutAsString("TARGOPT", tOpt); - if(t.HasKeyword("TargetName")) { + if(t.hasKeyword("TargetName")) { QString tNameIn = t["TargetName"]; ui.Clear("TARGETNAME"); ui.PutAsString("TARGETNAME", tNameIn); } - if(t.HasKeyword("LatitudeType")) { + if(t.hasKeyword("LatitudeType")) { QString LTIn = (QString)t["LatitudeType"]; LTIn = LTIn.toUpper(); ui.Clear("LATTYPE"); ui.PutAsString("LATTYPE", LTIn); } - if(t.HasKeyword("LongitudeDirection")) { + if(t.hasKeyword("LongitudeDirection")) { QString LDIn = (QString)t["LongitudeDirection"]; LDIn = LDIn.toUpper(); ui.Clear("LONDIR"); ui.PutAsString("LONDIR", LDIn); } - if(t.HasKeyword("LongitudeDomain")) { + if(t.hasKeyword("LongitudeDomain")) { QString LDomIn = t["LongitudeDomain"]; ui.Clear("LONDOM"); ui.PutAsString("LONDOM", LDomIn); } - if(t.HasKeyword("EquatorialRadius")) { + if(t.hasKeyword("EquatorialRadius")) { QString EQIn = t["EquatorialRadius"]; ui.Clear("EQRADIUS"); ui.PutAsString("EQRADIUS", EQIn); } - if(t.HasKeyword("PolarRadius")) { + if(t.hasKeyword("PolarRadius")) { QString PRIn = t["PolarRadius"]; ui.Clear("POLRADIUS"); ui.PutAsString("POLRADIUS", PRIn); @@ -304,7 +304,7 @@ void helperButtonLogRadius() { Pvl tMap; //call function to get system radius PvlGroup tGrp = Projection::TargetRadii(targetName); - tMap.AddGroup(tGrp); + tMap.addGroup(tGrp); QString OQString = "***** System radii for " + targetName + "*****"; //writh to log QString(OQString and mapping group Application::GuiLog(OQString); @@ -409,21 +409,21 @@ void addTarget(PvlGroup &mapping) { if(ui.GetString("TARGOPT") == "SYSTEM") { QString targetFile(ui.GetFileName("TARGDEF")); Pvl p; - p.Read(targetFile); - PvlGroup t = p.FindGroup("mapping"); - if(t.HasKeyword("TargetName")) { + p.read(targetFile); + PvlGroup t = p.findGroup("mapping"); + if(t.hasKeyword("TargetName")) { mapping += t["TargetName"]; } - if(t.HasKeyword("EquatorialRadius")) { + if(t.hasKeyword("EquatorialRadius")) { mapping += t["EquatorialRadius"]; } - if(t.HasKeyword("PolarRadius")) { + if(t.hasKeyword("PolarRadius")) { mapping += t["PolarRadius"]; } - if(t.HasKeyword("LatitudeType")) { + if(t.hasKeyword("LatitudeType")) { mapping += t["LatitudeType"]; } - if(t.HasKeyword("LongitudeDirection")) { + if(t.hasKeyword("LongitudeDirection")) { mapping += t["LongitudeDirection"]; } } @@ -528,7 +528,7 @@ void calcRange(double &minLat, double &maxLat, Pvl userMap; PvlGroup userGrp("Mapping"); if(ui.GetString("TARGOPT") == "SYSTEM") { - userMap.Read(ui.GetFileName("TARGDEF")); + userMap.read(ui.GetFileName("TARGDEF")); } else if(ui.GetString("TARGOPT") == "USER") { userGrp += PvlKeyword("TargetName", ui.GetString("TARGETNAME")); @@ -563,7 +563,7 @@ void calcRange(double &minLat, double &maxLat, userGrp += PvlKeyword("LongitudeDomain", ui.GetString("LONDOM")); userGrp += PvlKeyword("EquatorialRadius", toString(equatorialRad)); userGrp += PvlKeyword("PolarRadius", toString(polarRad)); - userMap.AddGroup(userGrp); + userMap.addGroup(userGrp); } for(int i = 0; i < flist.size(); i++) { @@ -577,14 +577,14 @@ void calcRange(double &minLat, double &maxLat, Camera *cam = c.camera(); Pvl defaultMap; cam->BasicMapping(defaultMap); - PvlGroup &defaultGrp = defaultMap.FindGroup("Mapping"); + PvlGroup &defaultGrp = defaultMap.findGroup("Mapping"); //Move any defaults that are not in the user map - for(int k = 0; k < defaultGrp.Keywords(); k++) { - if(!userGrp.HasKeyword(defaultGrp[k].Name())) { + for(int k = 0; k < defaultGrp.keywords(); k++) { + if(!userGrp.hasKeyword(defaultGrp[k].name())) { userGrp += defaultGrp[k]; } } - userMap.AddGroup(userGrp); + userMap.addGroup(userGrp); //get the camera ground range min and max and solve for range cam->GroundRange(camMinLat, camMaxLat, camMinLon, camMaxLon, userMap); if(camMinLat < minLat) { diff --git a/isis/src/base/apps/mosrange/mosrange.cpp b/isis/src/base/apps/mosrange/mosrange.cpp index c8ec8e2450066fd05dedbc2c14931e7c34366140..9e19a5c526a40334fd1084b94ac32ef26af5efed 100644 --- a/isis/src/base/apps/mosrange/mosrange.cpp +++ b/isis/src/base/apps/mosrange/mosrange.cpp @@ -75,7 +75,7 @@ void IsisMain() { QString projection("Equirectangular"); if(ui.WasEntered("MAP")) { Pvl mapfile(ui.GetFileName("MAP")); - projection = (QString) mapfile.FindGroup("Mapping")["ProjectionName"]; + projection = (QString) mapfile.findGroup("Mapping")["ProjectionName"]; } if(ui.WasEntered("PROJECTION")) { @@ -127,11 +127,11 @@ void IsisMain() { Camera *cam = cube.camera(); Pvl mapping; cam->BasicMapping(mapping); - PvlGroup &mapgrp = mapping.FindGroup("Mapping"); - mapgrp.AddKeyword(PvlKeyword("ProjectionName", projection), Pvl::Replace); - mapgrp.AddKeyword(PvlKeyword("LatitudeType", lattype), Pvl::Replace); - mapgrp.AddKeyword(PvlKeyword("LongitudeDirection", londir), Pvl::Replace); - mapgrp.AddKeyword(PvlKeyword("LongitudeDomain", londom), Pvl::Replace); + PvlGroup &mapgrp = mapping.findGroup("Mapping"); + mapgrp.addKeyword(PvlKeyword("ProjectionName", projection), Pvl::Replace); + mapgrp.addKeyword(PvlKeyword("LatitudeType", lattype), Pvl::Replace); + mapgrp.addKeyword(PvlKeyword("LongitudeDirection", londir), Pvl::Replace); + mapgrp.addKeyword(PvlKeyword("LongitudeDomain", londom), Pvl::Replace); // Get the radii Distance radii[3]; @@ -152,21 +152,21 @@ void IsisMain() { double pixres = (lowres + hires) / 2.0; double scale = Scale(pixres, poleRad, eqRad); - mapgrp.AddKeyword(PvlKeyword("PixelResolution", toString(pixres)), Pvl::Replace); - mapgrp.AddKeyword(PvlKeyword("Scale", toString(scale), "pixels/degree"), Pvl::Replace); + mapgrp.addKeyword(PvlKeyword("PixelResolution", toString(pixres)), Pvl::Replace); + mapgrp.addKeyword(PvlKeyword("Scale", toString(scale), "pixels/degree"), Pvl::Replace); mapgrp += PvlKeyword("MinPixelResolution", toString(lowres), "meters"); mapgrp += PvlKeyword("MaxPixelResolution", toString(hires), "meters"); // Get the universal ground range double minlat, maxlat, minlon, maxlon; cam->GroundRange(minlat, maxlat, minlon, maxlon, mapping); - mapgrp.AddKeyword(PvlKeyword("MinimumLatitude", toString(minlat)), Pvl::Replace); - mapgrp.AddKeyword(PvlKeyword("MaximumLatitude", toString(maxlat)), Pvl::Replace); - mapgrp.AddKeyword(PvlKeyword("MinimumLongitude", toString(minlon)), Pvl::Replace); - mapgrp.AddKeyword(PvlKeyword("MaximumLongitude", toString(maxlon)), Pvl::Replace); + mapgrp.addKeyword(PvlKeyword("MinimumLatitude", toString(minlat)), Pvl::Replace); + mapgrp.addKeyword(PvlKeyword("MaximumLatitude", toString(maxlat)), Pvl::Replace); + mapgrp.addKeyword(PvlKeyword("MinimumLongitude", toString(minlon)), Pvl::Replace); + mapgrp.addKeyword(PvlKeyword("MaximumLongitude", toString(maxlon)), Pvl::Replace); - fmap.AddGroup(mapgrp); - fileset.AddObject(fmap); + fmap.addGroup(mapgrp); + fileset.addObject(fmap); longitudeStat.AddData(&minlon, 1); longitudeStat.AddData(&maxlon, 1); @@ -211,7 +211,7 @@ void IsisMain() { mapping += PvlKeyword("MaximumLongitude", toString(MIN(SetCeil(longitudeStat.Maximum(), digits), 360.0))); PvlKeyword clat("PreciseCenterLongitude", toString(avgLon)); - clat.AddComment("Actual Parameters without precision applied"); + clat.addComment("Actual Parameters without precision applied"); mapping += clat; mapping += PvlKeyword("PreciseCenterLatitude", toString(avgLat)); mapping += PvlKeyword("PreciseMinimumLatitude", toString(latitudeStat.Minimum())); @@ -225,14 +225,14 @@ void IsisMain() { // Write the output file if requested if(ui.WasEntered("TO")) { Pvl temp; - temp.AddGroup(mapping); - temp.Write(ui.GetFileName("TO", "map")); + temp.addGroup(mapping); + temp.write(ui.GetFileName("TO", "map")); } if(ui.WasEntered("LOG")) { Pvl temp; - temp.AddObject(fileset); - temp.Write(ui.GetFileName("LOG", "log")); + temp.addObject(fileset); + temp.write(ui.GetFileName("LOG", "log")); } p.EndProcess(); diff --git a/isis/src/base/apps/nocam2map/nocam2map.cpp b/isis/src/base/apps/nocam2map/nocam2map.cpp index bd3e227404829406b1194051ee37a7efc6780cb5..286be888f111f3df5137dd7e8acfd737ad2751c9 100644 --- a/isis/src/base/apps/nocam2map/nocam2map.cpp +++ b/isis/src/base/apps/nocam2map/nocam2map.cpp @@ -185,8 +185,8 @@ void IsisMain() { if(!ui.GetBoolean("NOWARP")) { //Creates the mapping group Pvl mapFile; - mapFile.Read(ui.GetFileName("MAP")); - PvlGroup &mapGrp = mapFile.FindGroup("Mapping", Pvl::Traverse); + mapFile.read(ui.GetFileName("MAP")); + PvlGroup &mapGrp = mapFile.findGroup("Mapping", Pvl::Traverse); //Reopen the lat and long cubes latCube = new Cube(); @@ -206,11 +206,11 @@ void IsisMain() { //Else read the target name from the input cube else { Pvl fromFile; - fromFile.Read(ui.GetFileName("FROM")); - targetName = fromFile.FindKeyword("TargetName", Pvl::Traverse); + fromFile.read(ui.GetFileName("FROM")); + targetName = fromFile.findKeyword("TargetName", Pvl::Traverse); } - mapGrp.AddKeyword(targetName, Pvl::Replace); + mapGrp.addKeyword(targetName, Pvl::Replace); PvlKeyword equRadius; PvlKeyword polRadius; @@ -251,33 +251,33 @@ void IsisMain() { polRadius = PvlKeyword("PolarRadius", toString(radii[2] * 1000)); } - mapGrp.AddKeyword(equRadius, Pvl::Replace); - mapGrp.AddKeyword(polRadius, Pvl::Replace); + mapGrp.addKeyword(equRadius, Pvl::Replace); + mapGrp.addKeyword(polRadius, Pvl::Replace); //If the latitude type is not in the mapping group, copy it from the input - if(!mapGrp.HasKeyword("LatitudeType")) { + if(!mapGrp.hasKeyword("LatitudeType")) { if(ui.GetString("LATTYPE") == "PLANETOCENTRIC") { - mapGrp.AddKeyword(PvlKeyword("LatitudeType", "Planetocentric"), Pvl::Replace); + mapGrp.addKeyword(PvlKeyword("LatitudeType", "Planetocentric"), Pvl::Replace); } else { - mapGrp.AddKeyword(PvlKeyword("LatitudeType", "Planetographic"), Pvl::Replace); + mapGrp.addKeyword(PvlKeyword("LatitudeType", "Planetographic"), Pvl::Replace); } } //If the longitude direction is not in the mapping group, copy it from the input - if(!mapGrp.HasKeyword("LongitudeDirection")) { + if(!mapGrp.hasKeyword("LongitudeDirection")) { if(ui.GetString("LONDIR") == "POSITIVEEAST") { - mapGrp.AddKeyword(PvlKeyword("LongitudeDirection", "PositiveEast"), Pvl::Replace); + mapGrp.addKeyword(PvlKeyword("LongitudeDirection", "PositiveEast"), Pvl::Replace); } else { - mapGrp.AddKeyword(PvlKeyword("LongitudeDirection", "PositiveWest"), Pvl::Replace); + mapGrp.addKeyword(PvlKeyword("LongitudeDirection", "PositiveWest"), Pvl::Replace); } } //If the longitude domain is not in the mapping group, assume it is 360 - if(!mapGrp.HasKeyword("LongitudeDomain")) { - mapGrp.AddKeyword(PvlKeyword("LongitudeDomain", "360"), Pvl::Replace); + if(!mapGrp.hasKeyword("LongitudeDomain")) { + mapGrp.addKeyword(PvlKeyword("LongitudeDomain", "360"), Pvl::Replace); } //If the default range is to be computed, use the input lat/long cubes to determine the range @@ -293,7 +293,7 @@ void IsisMain() { double minLat = latStats->Minimum(); double maxLat = latStats->Maximum(); - bool isOcentric = ((QString)mapGrp.FindKeyword("LatitudeType")) == "Planetocentric"; + bool isOcentric = ((QString)mapGrp.findKeyword("LatitudeType")) == "Planetocentric"; if(isOcentric) { if(ui.GetString("LATTYPE") != "PLANETOCENTRIC") { @@ -308,11 +308,11 @@ void IsisMain() { } } - int lonDomain = (int)mapGrp.FindKeyword("LongitudeDomain"); + int lonDomain = (int)mapGrp.findKeyword("LongitudeDomain"); double minLon = lonDomain == 360 ? Projection::To360Domain(lonStats->Minimum()) : Projection::To180Domain(lonStats->Minimum()); double maxLon = lonDomain == 360 ? Projection::To360Domain(lonStats->Maximum()) : Projection::To180Domain(lonStats->Maximum()); - bool isPosEast = ((QString)mapGrp.FindKeyword("LongitudeDirection")) == "PositiveEast"; + bool isPosEast = ((QString)mapGrp.findKeyword("LongitudeDirection")) == "PositiveEast"; if(isPosEast) { if(ui.GetString("LONDIR") != "POSITIVEEAST") { @@ -333,30 +333,30 @@ void IsisMain() { maxLon = temp; } - mapGrp.AddKeyword(PvlKeyword("MinimumLatitude", toString(minLat)), Pvl::Replace); - mapGrp.AddKeyword(PvlKeyword("MaximumLatitude", toString(maxLat)), Pvl::Replace); - mapGrp.AddKeyword(PvlKeyword("MinimumLongitude", toString(minLon)), Pvl::Replace); - mapGrp.AddKeyword(PvlKeyword("MaximumLongitude", toString(maxLon)), Pvl::Replace); + mapGrp.addKeyword(PvlKeyword("MinimumLatitude", toString(minLat)), Pvl::Replace); + mapGrp.addKeyword(PvlKeyword("MaximumLatitude", toString(maxLat)), Pvl::Replace); + mapGrp.addKeyword(PvlKeyword("MinimumLongitude", toString(minLon)), Pvl::Replace); + mapGrp.addKeyword(PvlKeyword("MaximumLongitude", toString(maxLon)), Pvl::Replace); } //If the user decided to enter a ground range then override if(ui.WasEntered("MINLAT")) { - mapGrp.AddKeyword(PvlKeyword("MinimumLatitude", + mapGrp.addKeyword(PvlKeyword("MinimumLatitude", toString(ui.GetDouble("MINLAT"))), Pvl::Replace); } if(ui.WasEntered("MAXLAT")) { - mapGrp.AddKeyword(PvlKeyword("MaximumLatitude", + mapGrp.addKeyword(PvlKeyword("MaximumLatitude", toString(ui.GetDouble("MAXLAT"))), Pvl::Replace); } if(ui.WasEntered("MINLON")) { - mapGrp.AddKeyword(PvlKeyword("MinimumLongitude", + mapGrp.addKeyword(PvlKeyword("MinimumLongitude", toString(ui.GetDouble("MINLON"))), Pvl::Replace); } if(ui.WasEntered("MAXLON")) { - mapGrp.AddKeyword(PvlKeyword("MaximumLongitude", + mapGrp.addKeyword(PvlKeyword("MaximumLongitude", toString(ui.GetDouble("MAXLON"))), Pvl::Replace); } @@ -391,30 +391,30 @@ void IsisMain() { double pixels = sqrt(pow(latCube->sampleCount() - 1.0, 2.0) + pow(latCube->lineCount() - 1.0, 2.0)); //Add the scale in pixels/degree to the mapping group - mapGrp.AddKeyword(PvlKeyword("Scale", + mapGrp.addKeyword(PvlKeyword("Scale", toString(pixels / angle), "pixels/degree"), Pvl::Replace); - if(mapGrp.HasKeyword("PixelResolution")) { - mapGrp.DeleteKeyword("PixelResolution"); + if(mapGrp.hasKeyword("PixelResolution")) { + mapGrp.deleteKeyword("PixelResolution"); } } // If the user decided to enter a resolution then override if(ui.GetString("PIXRES") == "MPP") { - mapGrp.AddKeyword(PvlKeyword("PixelResolution", + mapGrp.addKeyword(PvlKeyword("PixelResolution", toString(ui.GetDouble("RESOLUTION")), "meters/pixel"), Pvl::Replace); - if(mapGrp.HasKeyword("Scale")) { - mapGrp.DeleteKeyword("Scale"); + if(mapGrp.hasKeyword("Scale")) { + mapGrp.deleteKeyword("Scale"); } } else if(ui.GetString("PIXRES") == "PPD") { - mapGrp.AddKeyword(PvlKeyword("Scale", + mapGrp.addKeyword(PvlKeyword("Scale", toString(ui.GetDouble("RESOLUTION")), "pixels/degree"), Pvl::Replace); - if(mapGrp.HasKeyword("PixelResolution")) { - mapGrp.DeleteKeyword("PixelResolution"); + if(mapGrp.hasKeyword("PixelResolution")) { + mapGrp.deleteKeyword("PixelResolution"); } } @@ -704,8 +704,8 @@ void PrintMap() { // Get mapping group from map file Pvl userMap; - userMap.Read(ui.GetFileName("MAP")); - PvlGroup &userGrp = userMap.FindGroup("Mapping", Pvl::Traverse); + userMap.read(ui.GetFileName("MAP")); + PvlGroup &userGrp = userMap.findGroup("Mapping", Pvl::Traverse); //Write map file out to the log Isis::Application::GuiLog(userGrp); @@ -757,17 +757,17 @@ void LoadMapRes() { // Get mapping group from map file Pvl userMap; - userMap.Read(ui.GetFileName("MAP")); - PvlGroup &userGrp = userMap.FindGroup("Mapping", Pvl::Traverse); + userMap.read(ui.GetFileName("MAP")); + PvlGroup &userGrp = userMap.findGroup("Mapping", Pvl::Traverse); // Set resolution - if(userGrp.HasKeyword("Scale")) { + if(userGrp.hasKeyword("Scale")) { ui.Clear("RESOLUTION"); ui.PutDouble("RESOLUTION", userGrp["Scale"]); ui.Clear("PIXRES"); ui.PutAsString("PIXRES", "PPD"); } - else if(userGrp.HasKeyword("PixelResolution")) { + else if(userGrp.hasKeyword("PixelResolution")) { ui.Clear("RESOLUTION"); ui.PutDouble("RESOLUTION", userGrp["PixelResolution"]); ui.Clear("PIXRES"); @@ -787,8 +787,8 @@ void ComputeInputRange() { UserInterface &ui = Application::GetUserInterface(); Pvl userMap; - userMap.Read(ui.GetFileName("MAP")); - PvlGroup &userGrp = userMap.FindGroup("Mapping", Pvl::Traverse); + userMap.read(ui.GetFileName("MAP")); + PvlGroup &userGrp = userMap.findGroup("Mapping", Pvl::Traverse); Statistics *latStats = latCub->statistics(); Statistics *lonStats = lonCub->statistics(); @@ -796,12 +796,12 @@ void ComputeInputRange() { double minLat = latStats->Minimum(); double maxLat = latStats->Maximum(); - int lonDomain = userGrp.HasKeyword("LongitudeDomain") ? (int)userGrp.FindKeyword("LongitudeDomain") : 360; + int lonDomain = userGrp.hasKeyword("LongitudeDomain") ? (int)userGrp.findKeyword("LongitudeDomain") : 360; double minLon = lonDomain == 360 ? Projection::To360Domain(lonStats->Minimum()) : Projection::To180Domain(lonStats->Minimum()); double maxLon = lonDomain == 360 ? Projection::To360Domain(lonStats->Maximum()) : Projection::To180Domain(lonStats->Maximum()); - if(userGrp.HasKeyword("LatitudeType")) { - bool isOcentric = ((QString)userGrp.FindKeyword("LatitudeType")) == "Planetocentric"; + if(userGrp.hasKeyword("LatitudeType")) { + bool isOcentric = ((QString)userGrp.findKeyword("LatitudeType")) == "Planetocentric"; double equRadius; double polRadius; @@ -829,8 +829,8 @@ void ComputeInputRange() { //Else read the target name from the input cube else { Pvl fromFile; - fromFile.Read(ui.GetFileName("FROM")); - target = (QString)fromFile.FindKeyword("TargetName", Pvl::Traverse); + fromFile.read(ui.GetFileName("FROM")); + target = (QString)fromFile.findKeyword("TargetName", Pvl::Traverse); } SpiceInt code; @@ -867,8 +867,8 @@ void ComputeInputRange() { } } - if(userGrp.HasKeyword("LongitudeDirection")) { - bool isPosEast = ((QString)userGrp.FindKeyword("LongitudeDirection")) == "PositiveEast"; + if(userGrp.hasKeyword("LongitudeDirection")) { + bool isPosEast = ((QString)userGrp.findKeyword("LongitudeDirection")) == "PositiveEast"; if(isPosEast) { if(ui.GetString("LONDIR") != "POSITIVEEAST") { @@ -919,8 +919,8 @@ void LoadMapRange() { // Get map file Pvl userMap; - userMap.Read(ui.GetFileName("MAP")); - PvlGroup &userGrp = userMap.FindGroup("Mapping", Pvl::Traverse); + userMap.read(ui.GetFileName("MAP")); + PvlGroup &userGrp = userMap.findGroup("Mapping", Pvl::Traverse); // Set ground range keywords that are found in mapfile int count = 0; @@ -928,19 +928,19 @@ void LoadMapRange() { ui.Clear("MAXLAT"); ui.Clear("MINLON"); ui.Clear("MAXLON"); - if(userGrp.HasKeyword("MinimumLatitude")) { + if(userGrp.hasKeyword("MinimumLatitude")) { ui.PutDouble("MINLAT", userGrp["MinimumLatitude"]); count++; } - if(userGrp.HasKeyword("MaximumLatitude")) { + if(userGrp.hasKeyword("MaximumLatitude")) { ui.PutDouble("MAXLAT", userGrp["MaximumLatitude"]); count++; } - if(userGrp.HasKeyword("MinimumLongitude")) { + if(userGrp.hasKeyword("MinimumLongitude")) { ui.PutDouble("MINLON", userGrp["MinimumLongitude"]); count++; } - if(userGrp.HasKeyword("MaximumLongitude")) { + if(userGrp.hasKeyword("MaximumLongitude")) { ui.PutDouble("MAXLON", userGrp["MaximumLongitude"]); count++; } diff --git a/isis/src/base/apps/noproj/noproj.cpp b/isis/src/base/apps/noproj/noproj.cpp index 43f4432fb35b30744a11f635639ad5c308e4737e..966f429b67965e775e690ba1d86ffeff32515188 100644 --- a/isis/src/base/apps/noproj/noproj.cpp +++ b/isis/src/base/apps/noproj/noproj.cpp @@ -64,7 +64,7 @@ void IsisMain() { PvlGroup inst = mcube->group("Instrument"); PvlGroup fromInst = icube->group("Instrument"); QString groupName = (QString) inst["SpacecraftName"] + "/"; - groupName += (QString) inst.FindKeyword("InstrumentId"); + groupName += (QString) inst.findKeyword("InstrumentId"); // Get Ideal camera specifications FileName specs; @@ -76,21 +76,21 @@ void IsisMain() { specs = specs.highestVersion(); } Pvl idealSpecs(specs.expanded()); - PvlObject obSpecs = idealSpecs.FindObject("IdealInstrumentsSpecifications"); + PvlObject obSpecs = idealSpecs.findObject("IdealInstrumentsSpecifications"); - PvlGroup idealGp = obSpecs.FindGroup(groupName); + PvlGroup idealGp = obSpecs.findGroup(groupName); double transx, transy, transl, transs; transx = transy = transl = transs = 0.; - if(idealGp.HasKeyword("TransX")) transx = idealGp["TransX"]; - if(idealGp.HasKeyword("TransY")) transy = idealGp["TransY"]; - if(idealGp.HasKeyword("ItransL")) transl = idealGp["ItransL"]; - if(idealGp.HasKeyword("ItransS")) transs = idealGp["ItransS"]; + if(idealGp.hasKeyword("TransX")) transx = idealGp["TransX"]; + if(idealGp.hasKeyword("TransY")) transy = idealGp["TransY"]; + if(idealGp.hasKeyword("ItransL")) transl = idealGp["ItransL"]; + if(idealGp.hasKeyword("ItransS")) transs = idealGp["ItransS"]; int detectorSamples = mcube->sampleCount(); - if(idealGp.HasKeyword("DetectorSamples")) detectorSamples = idealGp["DetectorSamples"]; + if(idealGp.hasKeyword("DetectorSamples")) detectorSamples = idealGp["DetectorSamples"]; int numberLines = mcube->lineCount(); int numberBands = mcube->bandCount(); - if(idealGp.HasKeyword("DetectorLines")) numberLines = idealGp["DetectorLines"]; + if(idealGp.hasKeyword("DetectorLines")) numberLines = idealGp["DetectorLines"]; int xDepend = incam->FocalPlaneMap()->FocalPlaneXDependency(); @@ -169,13 +169,13 @@ void IsisMain() { // Extract the times and the target from the instrument group QString startTime = inst["StartTime"]; QString stopTime; - if(inst.HasKeyword("StopTime")) stopTime = (QString) inst["StopTime"]; + if(inst.hasKeyword("StopTime")) stopTime = (QString) inst["StopTime"]; QString target = inst["TargetName"]; // rename the instrument groups - inst.SetName("OriginalInstrument"); - fromInst.SetName("OriginalInstrument"); + inst.setName("OriginalInstrument"); + fromInst.setName("OriginalInstrument"); // add it back to the IsisCube object under a new group name ocube->putGroup(inst); @@ -184,113 +184,113 @@ void IsisMain() { ocube->deleteGroup("Instrument"); // Now rename the group back to the Instrument group and clear out old keywords - inst.SetName("Instrument"); - inst.Clear(); + inst.setName("Instrument"); + inst.clear(); // Add keywords for the "Ideal" instrument Isis::PvlKeyword key("SpacecraftName", "IdealSpacecraft"); - inst.AddKeyword(key); + inst.addKeyword(key); - key.SetName("InstrumentId"); - key.SetValue("IdealCamera"); - inst.AddKeyword(key); + key.setName("InstrumentId"); + key.setValue("IdealCamera"); + inst.addKeyword(key); - key.SetName("TargetName"); - key.SetValue(target); - inst.AddKeyword(key); + key.setName("TargetName"); + key.setValue(target); + inst.addKeyword(key); - key.SetName("SampleDetectors"); - key.SetValue(Isis::toString(detectorSamples)); - inst.AddKeyword(key); + key.setName("SampleDetectors"); + key.setValue(Isis::toString(detectorSamples)); + inst.addKeyword(key); - key.SetName("LineDetectors"); - key.SetValue(Isis::toString(detectorLines)); - inst.AddKeyword(key); + key.setName("LineDetectors"); + key.setValue(Isis::toString(detectorLines)); + inst.addKeyword(key); - key.SetName("InstrumentType"); - key.SetValue(instType); - inst.AddKeyword(key); + key.setName("InstrumentType"); + key.setValue(instType); + inst.addKeyword(key); Pvl &ocubeLabel = *ocube->label(); PvlObject *naifKeywordsObject = NULL; - if (ocubeLabel.HasObject("NaifKeywords")) { - naifKeywordsObject = &ocubeLabel.FindObject("NaifKeywords"); + if (ocubeLabel.hasObject("NaifKeywords")) { + naifKeywordsObject = &ocubeLabel.findObject("NaifKeywords"); // Clean up the naif keywords object... delete everything that isn't a radii - for (int keyIndex = naifKeywordsObject->Keywords() - 1; keyIndex >= 0; keyIndex--) { - QString keyName = (*naifKeywordsObject)[keyIndex].Name(); + for (int keyIndex = naifKeywordsObject->keywords() - 1; keyIndex >= 0; keyIndex--) { + QString keyName = (*naifKeywordsObject)[keyIndex].name(); if (!keyName.contains("RADII")) { - naifKeywordsObject->DeleteKeyword(keyIndex); + naifKeywordsObject->deleteKeyword(keyIndex); } } // Clean up the kernels group... delete everything that isn't internalized or the orig frame // code PvlGroup &kernelsGroup = ocube->group("Kernels"); - for (int keyIndex = kernelsGroup.Keywords() - 1; keyIndex >= 0; keyIndex--) { + for (int keyIndex = kernelsGroup.keywords() - 1; keyIndex >= 0; keyIndex--) { PvlKeyword &kernelsKeyword = kernelsGroup[keyIndex]; bool isTable = false; - bool isFrameCode = kernelsKeyword.IsNamed("NaifFrameCode") || - kernelsKeyword.IsNamed("NaifIkCode"); - bool isShapeModel = kernelsKeyword.IsNamed("ShapeModel"); + bool isFrameCode = kernelsKeyword.isNamed("NaifFrameCode") || + kernelsKeyword.isNamed("NaifIkCode"); + bool isShapeModel = kernelsKeyword.isNamed("ShapeModel"); - for (int keyValueIndex = 0; keyValueIndex < kernelsKeyword.Size(); keyValueIndex++) { + for (int keyValueIndex = 0; keyValueIndex < kernelsKeyword.size(); keyValueIndex++) { if (kernelsKeyword[keyValueIndex] == "Table") { isTable = true; } } if (!isTable && !isFrameCode && !isShapeModel) { - kernelsGroup.DeleteKeyword(keyIndex); + kernelsGroup.deleteKeyword(keyIndex); } } } if (naifKeywordsObject) { - naifKeywordsObject->AddKeyword(PvlKeyword("IDEAL_FOCAL_LENGTH", toString(incam->FocalLength())), + naifKeywordsObject->addKeyword(PvlKeyword("IDEAL_FOCAL_LENGTH", toString(incam->FocalLength())), Pvl::Replace); } else { - inst.AddKeyword(PvlKeyword("FocalLength", toString(incam->FocalLength()), "millimeters")); + inst.addKeyword(PvlKeyword("FocalLength", toString(incam->FocalLength()), "millimeters")); } double newPixelPitch = incam->PixelPitch() * ui.GetDouble("SUMMINGMODE"); if (naifKeywordsObject) { - naifKeywordsObject->AddKeyword(PvlKeyword("IDEAL_PIXEL_PITCH", toString(newPixelPitch)), + naifKeywordsObject->addKeyword(PvlKeyword("IDEAL_PIXEL_PITCH", toString(newPixelPitch)), Pvl::Replace); } else { - inst.AddKeyword(PvlKeyword("PixelPitch", toString(newPixelPitch), "millimeters")); + inst.addKeyword(PvlKeyword("PixelPitch", toString(newPixelPitch), "millimeters")); } - key.SetName("EphemerisTime"); - key.SetValue(Isis::toString(et), "seconds"); - inst.AddKeyword(key); + key.setName("EphemerisTime"); + key.setValue(Isis::toString(et), "seconds"); + inst.addKeyword(key); - key.SetName("StartTime"); - key.SetValue(startTime); - inst.AddKeyword(key); + key.setName("StartTime"); + key.setValue(startTime); + inst.addKeyword(key); if(stopTime != "") { - key.SetName("StopTime"); - key.SetValue(stopTime); - inst.AddKeyword(key); + key.setName("StopTime"); + key.setValue(stopTime); + inst.addKeyword(key); } - key.SetName("FocalPlaneXDependency"); - key.SetValue(toString((int)incam->FocalPlaneMap()->FocalPlaneXDependency())); - inst.AddKeyword(key); + key.setName("FocalPlaneXDependency"); + key.setValue(toString((int)incam->FocalPlaneMap()->FocalPlaneXDependency())); + inst.addKeyword(key); int xDependency = incam->FocalPlaneMap()->FocalPlaneXDependency(); double newInstrumentTransX = incam->FocalPlaneMap()->SignMostSigX(); - inst.AddKeyword(PvlKeyword("TransX", toString(newInstrumentTransX))); + inst.addKeyword(PvlKeyword("TransX", toString(newInstrumentTransX))); double newInstrumentTransY = incam->FocalPlaneMap()->SignMostSigY(); - inst.AddKeyword(PvlKeyword("TransY", toString(newInstrumentTransY))); + inst.addKeyword(PvlKeyword("TransY", toString(newInstrumentTransY))); storeSpice(&inst, naifKeywordsObject, "TransX0", "IDEAL_TRANSX", transx, newPixelPitch * newInstrumentTransX, (xDependency == CameraFocalPlaneMap::Sample)); @@ -311,14 +311,14 @@ void IsisMain() { transl, transLXCoefficient, (xDependency == CameraFocalPlaneMap::Line)); if(instType == "LINESCAN") { - key.SetName("ExposureDuration"); - key.SetValue(Isis::toString(incam->DetectorMap()->LineRate() * 1000.), "milliseconds"); - inst.AddKeyword(key); + key.setName("ExposureDuration"); + key.setValue(Isis::toString(incam->DetectorMap()->LineRate() * 1000.), "milliseconds"); + inst.addKeyword(key); } - key.SetName("MatchedCube"); - key.SetValue(mcube->fileName()); - inst.AddKeyword(key); + key.setName("MatchedCube"); + key.setValue(mcube->fileName()); + inst.addKeyword(key); ocube->putGroup(inst); @@ -327,12 +327,12 @@ void IsisMain() { // Now adjust the label to fake the true size of the image to match without // taking all the space it would require for the image data Pvl label; - label.Read("match.lbl"); - PvlGroup &dims = label.FindGroup("Dimensions", Pvl::Traverse); + label.read("match.lbl"); + PvlGroup &dims = label.findGroup("Dimensions", Pvl::Traverse); dims["Lines"] = toString(numberLines); dims["Samples"] = toString(detectorSamples); dims["Bands"] = toString(numberBands); - label.Write("match.lbl"); + label.write("match.lbl"); // And run cam2cam to apply the transformation QString parameters; @@ -360,9 +360,9 @@ void IsisMain() { toCube.open(ui.GetFileName("TO"), "rw"); // Extract label and create cube object Pvl *toLabel = toCube.label(); - PvlObject &o = toLabel->FindObject("IsisCube"); - o.DeleteGroup("OriginalInstrument"); - o.AddGroup(fromInst); + PvlObject &o = toLabel->findObject("IsisCube"); + o.deleteGroup("OriginalInstrument"); + o.addGroup(fromInst); toCube.close(); } @@ -396,7 +396,7 @@ void storeSpice(PvlGroup *instrumentGroup, PvlObject *naifKeywordsObject, QString oldName, QString spiceName, double constantCoeff, double multiplierCoeff, bool putMultiplierInX) { if(constantCoeff != 0 && !naifKeywordsObject && instrumentGroup) { - instrumentGroup->AddKeyword(PvlKeyword(oldName, toString(constantCoeff))); + instrumentGroup->addKeyword(PvlKeyword(oldName, toString(constantCoeff))); } else if (naifKeywordsObject) { PvlKeyword spiceKeyword(spiceName); @@ -411,7 +411,7 @@ void storeSpice(PvlGroup *instrumentGroup, PvlObject *naifKeywordsObject, spiceKeyword += toString(multiplierCoeff); } - naifKeywordsObject->AddKeyword(spiceKeyword, Pvl::Replace); + naifKeywordsObject->addKeyword(spiceKeyword, Pvl::Replace); } } diff --git a/isis/src/base/apps/noseam/noseam.cpp b/isis/src/base/apps/noseam/noseam.cpp index 5d7e44b2f723e4c3fa40c68243a6052aa6174346..3a1a7ebec9a4e9373468d1f1a3aab66450a4c41c 100644 --- a/isis/src/base/apps/noseam/noseam.cpp +++ b/isis/src/base/apps/noseam/noseam.cpp @@ -28,7 +28,7 @@ void IsisMain() { FileName inFile = cubes[0]; Pvl &pref = Preference::Preferences(); - QString pathName = (QString)pref.FindGroup("DataDirectory")["Temporary"] + "/"; + QString pathName = (QString)pref.findGroup("DataDirectory")["Temporary"] + "/"; /** * Creates a mosaic from the original images. It is placed here diff --git a/isis/src/base/apps/overlapstats/overlapstats.cpp b/isis/src/base/apps/overlapstats/overlapstats.cpp index b0c662a5671c3047d1094a0a101c56f40d7cfcee..b22d58ced02dbc9480bb1f15341d44d467892cd4 100644 --- a/isis/src/base/apps/overlapstats/overlapstats.cpp +++ b/isis/src/base/apps/overlapstats/overlapstats.cpp @@ -114,12 +114,12 @@ void IsisMain() { // Construct a Projection for converting between Lon/Lat and X/Y Pvl cubeLab(serialNumbers.FileName(0)); - PvlGroup inst = cubeLab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup inst = cubeLab.findGroup("Instrument", Pvl::Traverse); QString target = inst["TargetName"]; PvlGroup radii = Projection::TargetRadii(target); Isis::Pvl maplab; - maplab.AddGroup(Isis::PvlGroup("Mapping")); - Isis::PvlGroup &mapGroup = maplab.FindGroup("Mapping"); + maplab.addGroup(Isis::PvlGroup("Mapping")); + Isis::PvlGroup &mapGroup = maplab.findGroup("Mapping"); mapGroup += Isis::PvlKeyword("EquatorialRadius", (QString)radii["EquatorialRadius"]); mapGroup += Isis::PvlKeyword("PolarRadius", (QString)radii["PolarRadius"]); mapGroup += Isis::PvlKeyword("LatitudeType", "Planetocentric"); @@ -181,7 +181,7 @@ void IsisMain() { errorNum++; if(ui.WasEntered("ERRORS")) { - errors << e.toPvl().Group(0).FindKeyword("Message")[0]; + errors << e.toPvl().group(0).findKeyword("Message")[0]; for(int serNum = 0; serNum < overlaps[index]->Size(); serNum++) { if(serNum == 0) { @@ -260,7 +260,7 @@ void IsisMain() { if(errorNum > 0) { PvlGroup grp("OverlapStats"); PvlKeyword key("ErrorNumber", toString(errorNum)); - grp.AddKeyword(key); + grp.addKeyword(key); Application::Log(grp); } diff --git a/isis/src/base/apps/pca/pca.cpp b/isis/src/base/apps/pca/pca.cpp index 4076af5303d1d1053c2f94d767abee48096d25cd..e51dc01981427ff29e0a87c1209bf788e2dc2940 100644 --- a/isis/src/base/apps/pca/pca.cpp +++ b/isis/src/base/apps/pca/pca.cpp @@ -83,9 +83,9 @@ void IsisMain() { Cube *ocube = p.SetOutputCube(ui.GetAsString("TO"), cao, icube->sampleCount(), icube->lineCount(), numDimensions); Pvl *label = ocube->label(); // remove the transform matrix table from the cube - for(int i = 0; i < label->Objects(); i++) { - if(label->Object(i).HasKeyword("Name") - && label->Object(i)["Name"].IsEquivalent("Transform Matrix")) label->DeleteObject(i); + for(int i = 0; i < label->objects(); i++) { + if(label->object(i).hasKeyword("Name") + && label->object(i)["Name"].isEquivalent("Transform Matrix")) label->deleteObject(i); } p.Progress()->SetText("Inverting Cube"); p.StartProcess(Inverse); diff --git a/isis/src/base/apps/pds2isis/pds2isis.cpp b/isis/src/base/apps/pds2isis/pds2isis.cpp index 68c7ad7397eb8826fd8c275ea3afb40736733e0f..0cbc916ba869d4f969a164e83b203d521e881f44 100644 --- a/isis/src/base/apps/pds2isis/pds2isis.cpp +++ b/isis/src/base/apps/pds2isis/pds2isis.cpp @@ -51,21 +51,21 @@ void IsisMain() { p.TranslatePdsLabels(otherLabels); } - if(otherLabels.HasGroup("Mapping") && - (otherLabels.FindGroup("Mapping").Keywords() > 0)) { - ocube->putGroup(otherLabels.FindGroup("Mapping")); + if(otherLabels.hasGroup("Mapping") && + (otherLabels.findGroup("Mapping").keywords() > 0)) { + ocube->putGroup(otherLabels.findGroup("Mapping")); } - if(otherLabels.HasGroup("Instrument") && - (otherLabels.FindGroup("Instrument").Keywords() > 0)) { - ocube->putGroup(otherLabels.FindGroup("Instrument")); + if(otherLabels.hasGroup("Instrument") && + (otherLabels.findGroup("Instrument").keywords() > 0)) { + ocube->putGroup(otherLabels.findGroup("Instrument")); } - if(otherLabels.HasGroup("BandBin") && - (otherLabels.FindGroup("BandBin").Keywords() > 0)) { - ocube->putGroup(otherLabels.FindGroup("BandBin")); + if(otherLabels.hasGroup("BandBin") && + (otherLabels.findGroup("BandBin").keywords() > 0)) { + ocube->putGroup(otherLabels.findGroup("BandBin")); } - if(otherLabels.HasGroup("Archive") && - (otherLabels.FindGroup("Archive").Keywords() > 0)) { - ocube->putGroup(otherLabels.FindGroup("Archive")); + if(otherLabels.hasGroup("Archive") && + (otherLabels.findGroup("Archive").keywords() > 0)) { + ocube->putGroup(otherLabels.findGroup("Archive")); } p.EndProcess(); diff --git a/isis/src/base/apps/percent/percent.cpp b/isis/src/base/apps/percent/percent.cpp index cab3c08dacc13bba8948e48ff42c2fffb4e8fd64..378c2713b4c361b739157dc108a76b5cd07de306 100644 --- a/isis/src/base/apps/percent/percent.cpp +++ b/isis/src/base/apps/percent/percent.cpp @@ -45,7 +45,7 @@ void IsisMain() { // Write an output file if requested if(ui.WasEntered("TO")) { Pvl temp; - temp.AddGroup(results); - temp.Write(ui.GetFileName("TO", "txt")); + temp.addGroup(results); + temp.write(ui.GetFileName("TO", "txt")); } } diff --git a/isis/src/base/apps/phocube/phocube.cpp b/isis/src/base/apps/phocube/phocube.cpp index 0b74940a47307bbd3271efbfd14c316a178b0687..cd461231df0b3ea165da40ab2ae35a91c27d1da0 100644 --- a/isis/src/base/apps/phocube/phocube.cpp +++ b/isis/src/base/apps/phocube/phocube.cpp @@ -155,10 +155,10 @@ void IsisMain() { QString bname = "DN"; if ( dn && icube->hasGroup("BandBin") ) { PvlGroup &mybb = icube->group("BandBin"); - if ( mybb.HasKeyword("Name") ) { + if ( mybb.hasKeyword("Name") ) { bname = mybb["Name"][0]; } - else if ( mybb.HasKeyword("FilterName") ) { + else if ( mybb.hasKeyword("FilterName") ) { bname = mybb["FilterName"][0]; } } @@ -212,21 +212,21 @@ void IsisMain() { // Add the bandbin group to the output label. If a BandBin group already // exists, remove all existing keywords and add the keywords for this app. // Otherwise, just put the group in. - PvlObject &cobj = ocube->label()->FindObject("IsisCube"); - if(!cobj.HasGroup("BandBin")) { - cobj.AddGroup(PvlGroup("BandBin")); + PvlObject &cobj = ocube->label()->findObject("IsisCube"); + if(!cobj.hasGroup("BandBin")) { + cobj.addGroup(PvlGroup("BandBin")); } - PvlGroup &bb = cobj.FindGroup("BandBin"); - bb.AddKeyword(name, PvlContainer::Replace); - int nvals = name.Size(); + PvlGroup &bb = cobj.findGroup("BandBin"); + bb.addKeyword(name, PvlContainer::Replace); + int nvals = name.size(); UpdateBandKey("Center", bb, nvals, "1.0"); - if ( bb.HasKeyword("OriginalBand") ) { + if ( bb.hasKeyword("OriginalBand") ) { UpdateBandKey("OriginalBand", bb, nvals, "1.0"); } - if ( bb.HasKeyword("Number") ) { + if ( bb.hasKeyword("Number") ) { UpdateBandKey("Number", bb, nvals, "1.0"); } @@ -469,11 +469,11 @@ void UpdateBandKey(const QString &keyname, PvlGroup &bb, const int &nvals, const QString &default_value) { QString defVal(default_value); - if ( bb.HasKeyword(keyname) ) { + if ( bb.hasKeyword(keyname) ) { defVal = bb[keyname][0]; } - bb.AddKeyword(makeKey(keyname, nvals, defVal), PvlContainer::Replace); + bb.addKeyword(makeKey(keyname, nvals, defVal), PvlContainer::Replace); return; } diff --git a/isis/src/base/apps/phoempglobal/phoempglobal.cpp b/isis/src/base/apps/phoempglobal/phoempglobal.cpp index 1998359478bf912773e055fb0583144009e0c4a5..1c343dab8407e02a5b53a4a5a971cdbee85cc0dc 100644 --- a/isis/src/base/apps/phoempglobal/phoempglobal.cpp +++ b/isis/src/base/apps/phoempglobal/phoempglobal.cpp @@ -94,7 +94,7 @@ void IsisMain() { ui.CreatePVL(hapkePvl, "HAPKE", "PhotometricModel", "Algorithm", inclusion); // Log the Hapke Def File - PvlGroup hapkeGrp = hapkePvl.FindObject("PhotometricModel").FindGroup("Algorithm"); + PvlGroup hapkeGrp = hapkePvl.findObject("PhotometricModel").findGroup("Algorithm"); Application::Log(hapkeGrp); PhotoModel *hapkeModel = PhotoModelFactory::Create(hapkePvl); @@ -105,19 +105,19 @@ void IsisMain() { PvlKeyword limbValue; if (sEmpirical == "MINNAERT") { - limbValue.SetName("KList"); + limbValue.setName("KList"); } else if (sEmpirical == "LUNARLAMBERT") { - limbValue.SetName("LList"); + limbValue.setName("LList"); } else { QString sErrMsg = "Invalid Photometric Model\n"; throw IException(IException::User, sErrMsg, _FILEINFO_); } Pvl empPvl; - empPvl.AddObject(PvlObject("PhotometricModel")); - empPvl.FindObject("PhotometricModel").AddGroup(PvlGroup("Algorithm")); - empPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("PhtName", sEmpirical), Pvl::Replace); + empPvl.addObject(PvlObject("PhotometricModel")); + empPvl.findObject("PhotometricModel").addGroup(PvlGroup("Algorithm")); + empPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("PhtName", sEmpirical), Pvl::Replace); PhotoModel *empModel = PhotoModelFactory::Create(empPvl); // Order of approximation in atmospheric scatter model @@ -148,7 +148,7 @@ void IsisMain() { ui.CreatePVL(asmPvl, "Atmospheric Scattering Model(ATM)", "AtmosphericModel", "Algorithm", inclusion); // Log the AtmosphericModel Def File - PvlGroup asmGrp = asmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"); + PvlGroup asmGrp = asmPvl.findObject("AtmosphericModel").findGroup("Algorithm"); Application::Log(asmGrp); if(!ui.IsInteractive()) { cerr << asmGrp << endl; @@ -247,16 +247,16 @@ void IsisMain() { if (!iord) { // Fit with no additive offset: output multiplier normalized to // zero phase, which is the desired phase curve B, and unnormalized - phaseAngle.AddValue(toString(lFitParams.phase)); - limbValue.AddValue(toString(rmsmin)); - phaseCurve.AddValue(toString(c1/c1_0)); + phaseAngle.addValue(toString(lFitParams.phase)); + limbValue.addValue(toString(rmsmin)); + phaseCurve.addValue(toString(c1/c1_0)); } else { // Fit with additive offset: normalizing would make no sense, just // output additive offset and multiplier from fit - phaseAngle.AddValue(toString(lFitParams.phase)); - limbValue.AddValue(toString(rmsmin)); - phaseCurve.AddValue(toString(c1)); + phaseAngle.addValue(toString(lFitParams.phase)); + limbValue.addValue(toString(rmsmin)); + phaseCurve.addValue(toString(c1)); } } @@ -275,13 +275,13 @@ void IsisMain() { photoGrp += phaseCurve; if (ui.WasEntered("NOTE")) { PvlGroup note("Note"); - note.AddComment("NOTE DESCRIBING THE FOLLOWING PHOTOMETRIC MODEL"); + note.addComment("NOTE DESCRIBING THE FOLLOWING PHOTOMETRIC MODEL"); note += PvlKeyword("NOTE", ui.GetString("NOTE")); photoObj += note; } photoObj += photoGrp; - mainPvl.AddObject(photoObj); - mainPvl.Write(sOutfile); + mainPvl.addObject(photoObj); + mainPvl.write(sOutfile); } for (int r=0; r> results; if (ui.WasEntered("NOTE")) { - note.AddComment("NOTE DESCRIBING DATA IN THE FOLLOWING RESULTS SECTION"); + note.addComment("NOTE DESCRIBING DATA IN THE FOLLOWING RESULTS SECTION"); note += PvlKeyword("NOTE", ui.GetString("NOTE")); } @@ -325,16 +325,16 @@ void IsisMain() { if (ui.WasEntered("TO")) { Pvl mainpvl; if (ui.WasEntered("NOTE")) { - mainpvl.AddGroup(note); + mainpvl.addGroup(note); } - mainpvl.AddGroup(results); + mainpvl.addGroup(results); QString sOutFile = ui.GetFileName("TO"); bool append = ui.GetBoolean("APPEND"); ofstream os; if (append) { - mainpvl.Append(sOutFile); + mainpvl.append(sOutFile); } else { - mainpvl.Write(sOutFile); + mainpvl.write(sOutFile); } } diff --git a/isis/src/base/apps/phohillier/Hillier.cpp b/isis/src/base/apps/phohillier/Hillier.cpp index 70b9ef0358335c27e592a985319df8e5d50b686c..a3745c5b6e2d77e41f076f4fbd355a5ddc4bdfbd 100644 --- a/isis/src/base/apps/phohillier/Hillier.cpp +++ b/isis/src/base/apps/phohillier/Hillier.cpp @@ -187,18 +187,18 @@ namespace Isis { PvlKeyword a4("A4"); for(unsigned int i = 0 ; i < _bandpho.size() ; i++) { Parameters &p = _bandpho[i]; - units.AddValue(p.units); - phostd.AddValue(toString(p.phoStd)); - bbc.AddValue(toString(p.wavelength)); - bbct.AddValue(toString(p.tolerance)); - bbn.AddValue(toString(p.band)); - b0.AddValue(toString(p.b0)); - b1.AddValue(toString(p.b1)); - a0.AddValue(toString(p.a0)); - a1.AddValue(toString(p.a1)); - a2.AddValue(toString(p.a2)); - a3.AddValue(toString(p.a3)); - a4.AddValue(toString(p.a4)); + units.addValue(p.units); + phostd.addValue(toString(p.phoStd)); + bbc.addValue(toString(p.wavelength)); + bbct.addValue(toString(p.tolerance)); + bbn.addValue(toString(p.band)); + b0.addValue(toString(p.b0)); + b1.addValue(toString(p.b1)); + a0.addValue(toString(p.a0)); + a1.addValue(toString(p.a1)); + a2.addValue(toString(p.a2)); + a3.addValue(toString(p.a3)); + a4.addValue(toString(p.a4)); } pvl += units; pvl += phostd; @@ -307,7 +307,7 @@ namespace Isis { _bandpho.clear(); // Interate over all Photometric groups - _normProf = DbProfile(pvl.FindObject("NormalizationModel").FindGroup("Algorithm", Pvl::Traverse)); + _normProf = DbProfile(pvl.findObject("NormalizationModel").findGroup("Algorithm", Pvl::Traverse)); _iRef = toDouble(ConfKey(_normProf, "IncRef", toString(30.0))); _eRef = toDouble(ConfKey(_normProf, "EmaRef", toString(0.0))); _gRef = toDouble(ConfKey(_normProf, "PhaRef", toString(_iRef))); @@ -316,23 +316,23 @@ namespace Isis { if(_iRef > fabs(90.0)) { ostringstream mess; mess << "Invalid incidence angle (" << _iRef - << " >= 90.0) provided in PVL config file " << pvl.FileName(); + << " >= 90.0) provided in PVL config file " << pvl.fileName(); throw IException(IException::User, mess.str(), _FILEINFO_); } - PvlObject &phoObj = pvl.FindObject("PhotometricModel"); + PvlObject &phoObj = pvl.findObject("PhotometricModel"); DbProfile phoProf = DbProfile(phoObj); - PvlObject::PvlGroupIterator algo = phoObj.BeginGroup(); - while(algo != phoObj.EndGroup()) { - if(algo->Name().toLower() == "algorithm") { + PvlObject::PvlGroupIterator algo = phoObj.beginGroup(); + while(algo != phoObj.endGroup()) { + if(algo->name().toLower() == "algorithm") { _profiles.push_back(DbProfile(phoProf, DbProfile(*algo))); } ++algo; } Pvl *label = cube.label(); - PvlKeyword center = label->FindGroup("BandBin", Pvl::Traverse)["Center"]; + PvlKeyword center = label->findGroup("BandBin", Pvl::Traverse)["Center"]; QString errs(""); for(int i = 0; i < cube.bandCount() ; i++) { Parameters parms = findParameters(toDouble(center[i])); @@ -353,7 +353,7 @@ namespace Isis { // Check for errors and throw them all at the same time if(!errs.isEmpty()) { - errs += " --> Errors in the input PVL file \"" + pvl.FileName() + "\""; + errs += " --> Errors in the input PVL file \"" + pvl.fileName() + "\""; throw IException(IException::User, errs, _FILEINFO_); } diff --git a/isis/src/base/apps/photemplate/photemplate.cpp b/isis/src/base/apps/photemplate/photemplate.cpp index ae57c15b818e6ffe4cc6b7b9171a3d6ce830d72c..ea61fd4c6051e8342ec89081df0bbd0c8ac80b02 100644 --- a/isis/src/base/apps/photemplate/photemplate.cpp +++ b/isis/src/base/apps/photemplate/photemplate.cpp @@ -31,7 +31,7 @@ void PrintPvl() { // Write file out to log QString inFile(ui.GetFileName("FROMPVL")); Pvl inPvl; - inPvl.Read(ui.GetFileName("FROMPVL")); + inPvl.read(ui.GetFileName("FROMPVL")); QString OQString = "***** Output of [" + inFile + "] *****"; Application::GuiLog(OQString); Application::GuiLog(inPvl); @@ -40,7 +40,7 @@ void PrintPvl() { // Load the values from the input PVL to a QString to be displayed // onto the UI. void LoadKeyValue(const PvlKeyword & key, QString & val){ - int size = key.Size(); + int size = key.size(); val = ""; for (int i=0; i 0) { @@ -53,7 +53,7 @@ void LoadKeyValue(const PvlKeyword & key, QString & val){ // Data from the UI is output to a PVL // Converts the QString into double value void OutputKeyValue(PvlKeyword & key, QString val){ - key.Clear(); + key.clear(); int found = val.indexOf(","); while(found != -1) { key += toString(toDouble(val.mid(0, found))); @@ -70,27 +70,27 @@ void LoadPvl() { UserInterface &ui = Application::GetUserInterface(); QString inFile(ui.GetFileName("FROMPVL")); Pvl inPvl; - inPvl.Read(inFile); + inPvl.read(inFile); QString phtName = ui.GetAsString("PHTNAME"); phtName = phtName.toUpper(); QString atmName = ui.GetAsString("ATMNAME"); atmName = atmName.toUpper(); QString phtVal; - if (inPvl.HasObject("PhotometricModel")) { - PvlObject phtObj = inPvl.FindObject("PhotometricModel"); - if (!phtObj.HasGroup("Algorithm")) { + if (inPvl.hasObject("PhotometricModel")) { + PvlObject phtObj = inPvl.findObject("PhotometricModel"); + if (!phtObj.hasGroup("Algorithm")) { QString message = "The input PVL does not contain a valid photometric model so you must specify one "; message += "- the [Algorithm] group is missing in your [PhotometricModel]"; throw IException(IException::User, message, _FILEINFO_); } else { - PvlObject::PvlGroupIterator phtGrp = phtObj.BeginGroup(); + PvlObject::PvlGroupIterator phtGrp = phtObj.beginGroup(); bool wasFound = false; - if (phtGrp->HasKeyword("PHTNAME")) { - phtVal = (QString)phtGrp->FindKeyword("PHTNAME"); - } else if (phtGrp->HasKeyword("NAME")) { - phtVal = (QString)phtGrp->FindKeyword("NAME"); + if (phtGrp->hasKeyword("PHTNAME")) { + phtVal = (QString)phtGrp->findKeyword("PHTNAME"); + } else if (phtGrp->hasKeyword("NAME")) { + phtVal = (QString)phtGrp->findKeyword("NAME"); } else { QString message = "The input PVL does not contain a valid photometric model so you must specify one "; message += "- the [Phtname] keyword is missing in your [Algorithm] group"; @@ -101,12 +101,12 @@ void LoadPvl() { wasFound = true; } if (!wasFound) { - while (phtGrp != phtObj.EndGroup()) { - if (phtGrp->HasKeyword("PHTNAME") || phtGrp->HasKeyword("NAME")) { - if (phtGrp->HasKeyword("PHTNAME")) { - phtVal = (QString)phtGrp->FindKeyword("PHTNAME"); - } else if (phtGrp->HasKeyword("NAME")) { - phtVal = (QString)phtGrp->FindKeyword("NAME"); + while (phtGrp != phtObj.endGroup()) { + if (phtGrp->hasKeyword("PHTNAME") || phtGrp->hasKeyword("NAME")) { + if (phtGrp->hasKeyword("PHTNAME")) { + phtVal = (QString)phtGrp->findKeyword("PHTNAME"); + } else if (phtGrp->hasKeyword("NAME")) { + phtVal = (QString)phtGrp->findKeyword("NAME"); } else { QString message = "The input PVL does not contain a valid photometric model so you must specify one "; message += "- the [Phtname] keyword is missing in your [Algorithm] group"; @@ -139,28 +139,28 @@ void LoadPvl() { ui.Clear("LLIST"); ui.Clear("PHASECURVELIST"); if (phtVal == "HAPKEHEN" || phtVal == "HAPKELEG") { - if (phtGrp->HasKeyword("THETA")) { - PvlKeyword thetaKey = phtGrp->FindKeyword("THETA"); + if (phtGrp->hasKeyword("THETA")) { + PvlKeyword thetaKey = phtGrp->findKeyword("THETA"); LoadKeyValue(thetaKey, keyVal); ui.PutAsString("THETA", keyVal); } - if (phtGrp->HasKeyword("WH")) { - PvlKeyword whKey = phtGrp->FindKeyword("WH"); + if (phtGrp->hasKeyword("WH")) { + PvlKeyword whKey = phtGrp->findKeyword("WH"); LoadKeyValue(whKey, keyVal); ui.PutAsString("WH", keyVal); } - if (phtGrp->HasKeyword("HH")) { - PvlKeyword hhKey = phtGrp->FindKeyword("HH"); + if (phtGrp->hasKeyword("HH")) { + PvlKeyword hhKey = phtGrp->findKeyword("HH"); LoadKeyValue(hhKey, keyVal); ui.PutAsString("HH", keyVal); } - if (phtGrp->HasKeyword("B0")) { - PvlKeyword b0Key = phtGrp->FindKeyword("B0"); + if (phtGrp->hasKeyword("B0")) { + PvlKeyword b0Key = phtGrp->findKeyword("B0"); LoadKeyValue(b0Key, keyVal); ui.PutAsString("B0", keyVal); } - if (phtGrp->HasKeyword("ZEROB0STANDARD")) { - QString zerob0 = (QString)phtGrp->FindKeyword("ZEROB0STANDARD"); + if (phtGrp->hasKeyword("ZEROB0STANDARD")) { + QString zerob0 = (QString)phtGrp->findKeyword("ZEROB0STANDARD"); QString izerob0 = zerob0; izerob0 = izerob0.toUpper(); if (izerob0 == "TRUE") { @@ -173,63 +173,63 @@ void LoadPvl() { } } if (phtVal == "HAPKEHEN") { - if (phtGrp->HasKeyword("HG1")) { - PvlKeyword hg1Key = phtGrp->FindKeyword("HG1"); + if (phtGrp->hasKeyword("HG1")) { + PvlKeyword hg1Key = phtGrp->findKeyword("HG1"); LoadKeyValue(hg1Key, keyVal); ui.PutAsString("HG1", keyVal); } - if (phtGrp->HasKeyword("HG2")) { - PvlKeyword hg2Key = phtGrp->FindKeyword("HG2"); + if (phtGrp->hasKeyword("HG2")) { + PvlKeyword hg2Key = phtGrp->findKeyword("HG2"); LoadKeyValue(hg2Key, keyVal); ui.PutAsString("HG2", keyVal); } } if (phtVal == "HAPKELEG") { - if (phtGrp->HasKeyword("BH")) { - PvlKeyword bhKey = phtGrp->FindKeyword("BH"); + if (phtGrp->hasKeyword("BH")) { + PvlKeyword bhKey = phtGrp->findKeyword("BH"); LoadKeyValue(bhKey, keyVal); ui.PutAsString("BH", keyVal); } - if (phtGrp->HasKeyword("CH")) { - PvlKeyword chKey = phtGrp->FindKeyword("CH"); + if (phtGrp->hasKeyword("CH")) { + PvlKeyword chKey = phtGrp->findKeyword("CH"); LoadKeyValue(chKey, keyVal); ui.PutAsString("CH", keyVal); } } } else if (phtVal == "MINNAERT") { - if (phtGrp->HasKeyword("K")) { - PvlKeyword k = phtGrp->FindKeyword("K"); + if (phtGrp->hasKeyword("K")) { + PvlKeyword k = phtGrp->findKeyword("K"); LoadKeyValue(k, keyVal); ui.PutAsString("K", keyVal); } } else if (phtVal == "LUNARLAMBERTEMPIRICAL" || phtVal == "MINNAERTEMPIRICAL") { - if (phtGrp->HasKeyword("PHASELIST")) { - PvlKeyword phaselist = phtGrp->FindKeyword("PHASELIST"); + if (phtGrp->hasKeyword("PHASELIST")) { + PvlKeyword phaselist = phtGrp->findKeyword("PHASELIST"); LoadKeyValue(phaselist, keyVal); ui.PutAsString("PHASELIST", keyVal); } - if (phtGrp->HasKeyword("PHASECURVELIST")) { - PvlKeyword phasecurvelist = phtGrp->FindKeyword("PHASECURVELIST"); + if (phtGrp->hasKeyword("PHASECURVELIST")) { + PvlKeyword phasecurvelist = phtGrp->findKeyword("PHASECURVELIST"); LoadKeyValue(phasecurvelist, keyVal); ui.PutAsString("PHASECURVELIST", keyVal); } if (phtVal == "LUNARLAMBERTEMPIRICAL") { - if (phtGrp->HasKeyword("LLIST")) { - PvlKeyword llist = phtGrp->FindKeyword("LLIST"); + if (phtGrp->hasKeyword("LLIST")) { + PvlKeyword llist = phtGrp->findKeyword("LLIST"); LoadKeyValue(llist, keyVal); ui.PutAsString("LLIST", keyVal); } } if (phtVal == "MINNAERTEMPIRICAL") { - if (phtGrp->HasKeyword("KLIST")) { - PvlKeyword kList = phtGrp->FindKeyword("KLIST"); + if (phtGrp->hasKeyword("KLIST")) { + PvlKeyword kList = phtGrp->findKeyword("KLIST"); LoadKeyValue(kList, keyVal); ui.PutAsString("KLIST", keyVal); } } } else if (phtVal == "LUNARLAMBERT") { - if (phtGrp->HasKeyword("L")) { - PvlKeyword l = phtGrp->FindKeyword("L"); + if (phtGrp->hasKeyword("L")) { + PvlKeyword l = phtGrp->findKeyword("L"); LoadKeyValue(l, keyVal); ui.PutAsString("L", keyVal); } @@ -244,20 +244,20 @@ void LoadPvl() { } QString atmVal; - if (inPvl.HasObject("AtmosphericModel")) { - PvlObject atmObj = inPvl.FindObject("AtmosphericModel"); - if (!atmObj.HasGroup("Algorithm")) { + if (inPvl.hasObject("AtmosphericModel")) { + PvlObject atmObj = inPvl.findObject("AtmosphericModel"); + if (!atmObj.hasGroup("Algorithm")) { QString message = "The input PVL does not contain a valid atmospheric model so you must specify one "; message += "- the [Algorithm] group is missing in your [AtmosphericModel]"; throw IException(IException::User, message, _FILEINFO_); } else { - PvlObject::PvlGroupIterator atmGrp = atmObj.BeginGroup(); + PvlObject::PvlGroupIterator atmGrp = atmObj.beginGroup(); bool wasFound = false; - if (atmGrp->HasKeyword("ATMNAME")) { - atmVal = (QString)atmGrp->FindKeyword("ATMNAME"); - } else if (atmGrp->HasKeyword("NAME")) { - atmVal = (QString)atmGrp->FindKeyword("NAME"); + if (atmGrp->hasKeyword("ATMNAME")) { + atmVal = (QString)atmGrp->findKeyword("ATMNAME"); + } else if (atmGrp->hasKeyword("NAME")) { + atmVal = (QString)atmGrp->findKeyword("NAME"); } else { QString message = "The input PVL does not contain a valid atmospheric model so you must specify one "; message += "- the [Atmname] keyword is missing in your [Algorithm] group"; @@ -268,12 +268,12 @@ void LoadPvl() { wasFound = true; } if (!wasFound) { - while (atmGrp != atmObj.EndGroup()) { - if (atmGrp->HasKeyword("ATMNAME") || atmGrp->HasKeyword("NAME")) { - if (atmGrp->HasKeyword("ATMNAME")) { - atmVal = (QString)atmGrp->FindKeyword("ATMNAME"); - } else if (atmGrp->HasKeyword("NAME")) { - atmVal = (QString)atmGrp->FindKeyword("NAME"); + while (atmGrp != atmObj.endGroup()) { + if (atmGrp->hasKeyword("ATMNAME") || atmGrp->hasKeyword("NAME")) { + if (atmGrp->hasKeyword("ATMNAME")) { + atmVal = (QString)atmGrp->findKeyword("ATMNAME"); + } else if (atmGrp->hasKeyword("NAME")) { + atmVal = (QString)atmGrp->findKeyword("NAME"); } else { QString message = "The input PVL does not contain a valid atmospheric model so you must specify one "; message += "- the [Atmname] keyword is missing in your [Algorithm] group"; @@ -299,32 +299,32 @@ void LoadPvl() { if (atmVal == "ANISOTROPIC1" || atmVal == "ANISOTROPIC2" || atmVal == "HAPKEATM1" || atmVal == "HAPKEATM2" || atmVal == "ISOTROPIC1" || atmVal == "ISOTROPIC2") { - if (atmGrp->HasKeyword("HNORM")) { - double hnorm = atmGrp->FindKeyword("HNORM"); + if (atmGrp->hasKeyword("HNORM")) { + double hnorm = atmGrp->findKeyword("HNORM"); os.str(""); os << hnorm; ui.PutAsString("HNORM", os.str().c_str()); } - if (atmGrp->HasKeyword("TAU")) { - double tau = atmGrp->FindKeyword("TAU"); + if (atmGrp->hasKeyword("TAU")) { + double tau = atmGrp->findKeyword("TAU"); os.str(""); os << tau; ui.PutAsString("TAU", os.str().c_str()); } - if (atmGrp->HasKeyword("TAUREF")) { - double tauref = atmGrp->FindKeyword("TAUREF"); + if (atmGrp->hasKeyword("TAUREF")) { + double tauref = atmGrp->findKeyword("TAUREF"); os.str(""); os << tauref; ui.PutAsString("TAUREF", os.str().c_str()); } - if (atmGrp->HasKeyword("WHA")) { - double wha = atmGrp->FindKeyword("WHA"); + if (atmGrp->hasKeyword("WHA")) { + double wha = atmGrp->findKeyword("WHA"); os.str(""); os << wha; ui.PutAsString("WHA", os.str().c_str()); } - if (atmGrp->HasKeyword("NULNEG")) { - QString nulneg = (QString)atmGrp->FindKeyword("NULNEG"); + if (atmGrp->hasKeyword("NULNEG")) { + QString nulneg = (QString)atmGrp->findKeyword("NULNEG"); if (nulneg.compare("YES")) { ui.PutString("NULNEG", "YES"); } else if (nulneg.compare("NO")) { @@ -336,16 +336,16 @@ void LoadPvl() { } } if (atmVal == "ANISOTROPIC1" || atmVal == "ANISOTROPIC2") { - if (atmGrp->HasKeyword("BHA")) { - double bha = atmGrp->FindKeyword("BHA"); + if (atmGrp->hasKeyword("BHA")) { + double bha = atmGrp->findKeyword("BHA"); os.str(""); os << bha; ui.PutAsString("BHA", os.str().c_str()); } } if (atmVal == "HAPKEATM1" || atmVal == "HAPKEATM2") { - if (atmGrp->HasKeyword("HGA")) { - double hga = atmGrp->FindKeyword("HGA"); + if (atmGrp->hasKeyword("HGA")) { + double hga = atmGrp->findKeyword("HGA"); os.str(""); os << hga; ui.PutAsString("HGA", os.str().c_str()); @@ -380,7 +380,7 @@ void IsisMain() { if (ui.WasEntered("FROMPVL")) { QString input = ui.GetFileName("FROMPVL"); - p.Read(input); + p.read(input); } //Check to make sure that a model was specified @@ -398,7 +398,7 @@ void IsisMain() { addAtmosModel(p, op); } - op.Write(output); + op.write(output); } //Function to add photometric model to the PVL @@ -411,14 +411,14 @@ void addPhoModel(Pvl &pvl, Pvl &outPvl) { QString phtVal; PvlObject pvlObj; PvlGroup pvlGrp; - if (pvl.HasObject("PhotometricModel")) { - pvlObj = pvl.FindObject("PhotometricModel"); - if (pvlObj.HasGroup("Algorithm")) { - PvlObject::PvlGroupIterator pvlGrp = pvlObj.BeginGroup(); - if (pvlGrp->HasKeyword("PHTNAME")) { - phtVal = (QString)pvlGrp->FindKeyword("PHTNAME"); - } else if (pvlGrp->HasKeyword("NAME")) { - phtVal = (QString)pvlGrp->FindKeyword("NAME"); + if (pvl.hasObject("PhotometricModel")) { + pvlObj = pvl.findObject("PhotometricModel"); + if (pvlObj.hasGroup("Algorithm")) { + PvlObject::PvlGroupIterator pvlGrp = pvlObj.beginGroup(); + if (pvlGrp->hasKeyword("PHTNAME")) { + phtVal = (QString)pvlGrp->findKeyword("PHTNAME"); + } else if (pvlGrp->hasKeyword("NAME")) { + phtVal = (QString)pvlGrp->findKeyword("NAME"); } else { phtVal = "NONE"; } @@ -427,12 +427,12 @@ void addPhoModel(Pvl &pvl, Pvl &outPvl) { wasFound = true; } if (!wasFound) { - while (pvlGrp != pvlObj.EndGroup()) { - if (pvlGrp->HasKeyword("PHTNAME") || pvlGrp->HasKeyword("NAME")) { - if (pvlGrp->HasKeyword("PHTNAME")) { - phtVal = (QString)pvlGrp->FindKeyword("PHTNAME"); - } else if (pvlGrp->HasKeyword("NAME")) { - phtVal = (QString)pvlGrp->FindKeyword("NAME"); + while (pvlGrp != pvlObj.endGroup()) { + if (pvlGrp->hasKeyword("PHTNAME") || pvlGrp->hasKeyword("NAME")) { + if (pvlGrp->hasKeyword("PHTNAME")) { + phtVal = (QString)pvlGrp->findKeyword("PHTNAME"); + } else if (pvlGrp->hasKeyword("NAME")) { + phtVal = (QString)pvlGrp->findKeyword("NAME"); } else { phtVal = "NONE"; } @@ -447,18 +447,18 @@ void addPhoModel(Pvl &pvl, Pvl &outPvl) { } } if (wasFound) { - outPvl.AddObject(pvlObj); + outPvl.addObject(pvlObj); } else { - outPvl.AddObject(PvlObject("PhotometricModel")); - outPvl.FindObject("PhotometricModel").AddGroup(PvlGroup("Algorithm")); - outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("PHTNAME",phtName),Pvl::Replace); + outPvl.addObject(PvlObject("PhotometricModel")); + outPvl.findObject("PhotometricModel").addGroup(PvlGroup("Algorithm")); + outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("PHTNAME",phtName),Pvl::Replace); } } else { - outPvl.AddObject(PvlObject("PhotometricModel")); - outPvl.FindObject("PhotometricModel").AddGroup(PvlGroup("Algorithm")); - outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("PHTNAME",phtName),Pvl::Replace); + outPvl.addObject(PvlObject("PhotometricModel")); + outPvl.findObject("PhotometricModel").addGroup(PvlGroup("Algorithm")); + outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("PHTNAME",phtName),Pvl::Replace); } //Get the photometric model and any parameters specific to that @@ -469,11 +469,11 @@ void addPhoModel(Pvl &pvl, Pvl &outPvl) { if (ui.WasEntered("THETA")) { PvlKeyword thetaKey("THETA"); OutputKeyValue(thetaKey, ui.GetString("THETA")); - outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(thetaKey,Pvl::Replace); + outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(thetaKey,Pvl::Replace); } else { - if (!outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - HasKeyword("THETA")) { + if (!outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + hasKeyword("THETA")) { QString message = "The " + phtName + " Photometric model requires a value for the THETA parameter."; message += "The normal range for THETA is: 0 <= THETA <= 90"; throw IException(IException::User, message, _FILEINFO_); @@ -482,11 +482,11 @@ void addPhoModel(Pvl &pvl, Pvl &outPvl) { if (ui.WasEntered("WH")) { PvlKeyword whKey("WH"); OutputKeyValue(whKey, ui.GetString("WH")); - outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(whKey, Pvl::Replace); + outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(whKey, Pvl::Replace); } else { - if (!outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - HasKeyword("WH")) { + if (!outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + hasKeyword("WH")) { QString message = "The " + phtName + " Photometric model requires a value for the WH parameter."; message += "The normal range for WH is: 0 < WH <= 1"; throw IException(IException::User, message, _FILEINFO_); @@ -495,11 +495,11 @@ void addPhoModel(Pvl &pvl, Pvl &outPvl) { if (ui.WasEntered("HH")) { PvlKeyword hhKey("HH"); OutputKeyValue(hhKey, ui.GetString("HH")); - outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(hhKey, Pvl::Replace); + outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(hhKey, Pvl::Replace); } else { - if (!outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - HasKeyword("HH")) { + if (!outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + hasKeyword("HH")) { QString message = "The " + phtName + " Photometric model requires a value for the HH parameter."; message += "The normal range for HH is: 0 <= HH"; throw IException(IException::User, message, _FILEINFO_); @@ -508,11 +508,11 @@ void addPhoModel(Pvl &pvl, Pvl &outPvl) { if (ui.WasEntered("B0")) { PvlKeyword b0Key("B0"); OutputKeyValue(b0Key, ui.GetString("B0")); - outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(b0Key, Pvl::Replace); + outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(b0Key, Pvl::Replace); } else { - if (!outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - HasKeyword("B0")) { + if (!outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + hasKeyword("B0")) { QString message = "The " + phtName + " Photometric model requires a value for the B0 parameter."; message += "The normal range for B0 is: 0 <= B0"; throw IException(IException::User, message, _FILEINFO_); @@ -520,14 +520,14 @@ void addPhoModel(Pvl &pvl, Pvl &outPvl) { } if (ui.GetString("ZEROB0STANDARD") != "READFROMPVL") { if (ui.GetString("ZEROB0STANDARD") == "TRUE") { - outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("ZEROB0STANDARD","TRUE"),Pvl::Replace); + outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("ZEROB0STANDARD","TRUE"),Pvl::Replace); } else if (ui.GetString("ZEROB0STANDARD") == "FALSE") { - outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("ZEROB0STANDARD","FALSE"),Pvl::Replace); + outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("ZEROB0STANDARD","FALSE"),Pvl::Replace); } - } else if (!outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - HasKeyword("ZEROB0STANDARD")) { + } else if (!outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + hasKeyword("ZEROB0STANDARD")) { if (ui.IsInteractive()) { QMessageBox msgbox; QString message = "You requested that the ZEROB0STANDARD value come from the input PVL file, but there is not one, so the "; @@ -535,18 +535,18 @@ void addPhoModel(Pvl &pvl, Pvl &outPvl) { msgbox.setText(message); msgbox.exec(); } - outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("ZEROB0STANDARD","TRUE"),Pvl::Replace); + outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("ZEROB0STANDARD","TRUE"),Pvl::Replace); } if (phtName == "HAPKEHEN") { if (ui.WasEntered("HG1")) { PvlKeyword hg1Key("HG1"); OutputKeyValue(hg1Key, ui.GetString("HG1")); - outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(hg1Key, Pvl::Replace); + outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(hg1Key, Pvl::Replace); } else { - if (!outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - HasKeyword("HG1")) { + if (!outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + hasKeyword("HG1")) { QString message = "The " + phtName + " Photometric model requires a value for the HG1 parameter."; message += "The normal range for HG1 is: -1 < HG1 < 1"; throw IException(IException::User, message, _FILEINFO_); @@ -555,11 +555,11 @@ void addPhoModel(Pvl &pvl, Pvl &outPvl) { if (ui.WasEntered("HG2")) { PvlKeyword hg2Key("HG2"); OutputKeyValue(hg2Key, ui.GetString("HG2")); - outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(hg2Key, Pvl::Replace); + outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(hg2Key, Pvl::Replace); } else { - if (!outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - HasKeyword("HG2")) { + if (!outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + hasKeyword("HG2")) { QString message = "The " + phtName + " Photometric model requires a value for the HG2 parameter."; message += "The normal range for HG2 is: 0 <= HG2 <= 1"; throw IException(IException::User, message, _FILEINFO_); @@ -569,11 +569,11 @@ void addPhoModel(Pvl &pvl, Pvl &outPvl) { if (ui.WasEntered("BH")) { PvlKeyword bhKey("BH"); OutputKeyValue(bhKey, ui.GetString("BH")); - outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(bhKey, Pvl::Replace); + outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(bhKey, Pvl::Replace); } else { - if (!outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - HasKeyword("BH")) { + if (!outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + hasKeyword("BH")) { QString message = "The " + phtName + " Photometric model requires a value for the BH parameter."; message += "The normal range for BH is: -1 <= BH <= 1"; throw IException(IException::User, message, _FILEINFO_); @@ -582,11 +582,11 @@ void addPhoModel(Pvl &pvl, Pvl &outPvl) { if (ui.WasEntered("CH")) { PvlKeyword chKey("CH"); OutputKeyValue(chKey, ui.GetString("CH")); - outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(chKey, Pvl::Replace); + outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(chKey, Pvl::Replace); } else { - if (!outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - HasKeyword("CH")) { + if (!outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + hasKeyword("CH")) { QString message = "The " + phtName + " Photometric model requires a value for the CH parameter."; message += "The normal range for CH is: -1 <= CH <= 1"; throw IException(IException::User, message, _FILEINFO_); @@ -604,48 +604,48 @@ void addPhoModel(Pvl &pvl, Pvl &outPvl) { if (ui.WasEntered("PHASELIST")) { PvlKeyword phaseListKey("PHASELIST"); OutputKeyValue(phaseListKey, ui.GetString("PHASELIST")); - outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(phaseListKey, Pvl::Replace); - phaselistsize = phaseListKey.Size(); + outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(phaseListKey, Pvl::Replace); + phaselistsize = phaseListKey.size(); } else { - if (!outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - HasKeyword("PHASELIST")) { + if (!outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + hasKeyword("PHASELIST")) { QString message = "The " + phtName + " Photometric model requires a value for the PHASELIST parameter."; throw IException(IException::User, message, _FILEINFO_); } - phaselistsize = outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - FindKeyword("PHASELIST").Size(); + phaselistsize = outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + findKeyword("PHASELIST").size(); } if (ui.WasEntered("PHASECURVELIST")) { PvlKeyword phCurveListKey("PHASECURVELIST"); OutputKeyValue(phCurveListKey, ui.GetString("PHASECURVELIST")); - outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(phCurveListKey, Pvl::Replace); - phasecurvelistsize = phCurveListKey.Size(); + outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(phCurveListKey, Pvl::Replace); + phasecurvelistsize = phCurveListKey.size(); } else { - if (!outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - HasKeyword("PHASECURVELIST")) { + if (!outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + hasKeyword("PHASECURVELIST")) { QString message = "The " + phtName + " Photometric model requires a value for the PHASECURVELIST parameter."; throw IException(IException::User, message, _FILEINFO_); } - phasecurvelistsize = outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - FindKeyword("PHASECURVELIST").Size(); + phasecurvelistsize = outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + findKeyword("PHASECURVELIST").size(); } if (phtName == "LUNARLAMBERTEMPIRICAL") { if (ui.WasEntered("LLIST")) { PvlKeyword lListKey("LLIST"); OutputKeyValue(lListKey, ui.GetString("LLIST")); - outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(lListKey, Pvl::Replace); - llistsize = lListKey.Size(); + outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(lListKey, Pvl::Replace); + llistsize = lListKey.size(); } else { - if (!outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - HasKeyword("LLIST")) { + if (!outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + hasKeyword("LLIST")) { QString message = "The " + phtName + " Photometric model requires a value for the LLIST parameter."; throw IException(IException::User, message, _FILEINFO_); } - llistsize = outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - FindKeyword("LLIST").Size(); + llistsize = outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + findKeyword("LLIST").size(); } if (llistsize != phaselistsize || llistsize != phasecurvelistsize) { QString message = "The " + phtName + " Photometric model requires that the LLIST, "; @@ -657,17 +657,17 @@ void addPhoModel(Pvl &pvl, Pvl &outPvl) { if (ui.WasEntered("KLIST")) { PvlKeyword kListKey("KLIST"); OutputKeyValue(kListKey, ui.GetString("KLIST")); - outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(kListKey, Pvl::Replace); - klistsize = kListKey.Size(); + outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(kListKey, Pvl::Replace); + klistsize = kListKey.size(); } else { - if (!outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - HasKeyword("KLIST")) { + if (!outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + hasKeyword("KLIST")) { QString message = "The " + phtName + " Photometric model requires a value for the KLIST parameter."; throw IException(IException::User, message, _FILEINFO_); } - klistsize = outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - FindKeyword("KLIST").Size(); + klistsize = outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + findKeyword("KLIST").size(); } if (klistsize != phaselistsize || klistsize != phasecurvelistsize) { QString message = "The " + phtName + " Photometric model requires that the KLIST, "; @@ -682,11 +682,11 @@ void addPhoModel(Pvl &pvl, Pvl &outPvl) { if (ui.WasEntered("L")) { PvlKeyword lKey("L"); OutputKeyValue(lKey, ui.GetString("L")); - outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(lKey,Pvl::Replace); + outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(lKey,Pvl::Replace); } else { - if (!outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - HasKeyword("L")) { + if (!outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + hasKeyword("L")) { QString message = "The " + phtName + " Photometric model requires a value for the L parameter."; message += "The L parameter has no limited range"; throw IException(IException::User, message, _FILEINFO_); @@ -698,11 +698,11 @@ void addPhoModel(Pvl &pvl, Pvl &outPvl) { if (ui.WasEntered("K")) { PvlKeyword kKey("K"); OutputKeyValue(kKey, ui.GetString("K")); - outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(kKey, Pvl::Replace); + outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(kKey, Pvl::Replace); } else { - if (!outPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - HasKeyword("K")) { + if (!outPvl.findObject("PhotometricModel").findGroup("Algorithm"). + hasKeyword("K")) { QString message = "The " + phtName + " Photometric model requires a value for the K parameter."; message += "The normal range for K is: 0 <= K"; throw IException(IException::User, message, _FILEINFO_); @@ -721,14 +721,14 @@ void addAtmosModel(Pvl &pvl, Pvl &outPvl) { QString atmVal; PvlObject pvlObj; PvlGroup pvlGrp; - if (pvl.HasObject("AtmosphericModel")) { - pvlObj = pvl.FindObject("AtmosphericModel"); - if (pvlObj.HasGroup("Algorithm")) { - PvlObject::PvlGroupIterator pvlGrp = pvlObj.BeginGroup(); - if (pvlGrp->HasKeyword("ATMNAME")) { - atmVal = (QString)pvlGrp->FindKeyword("ATMNAME"); - } else if (pvlGrp->HasKeyword("NAME")) { - atmVal = (QString)pvlGrp->FindKeyword("NAME"); + if (pvl.hasObject("AtmosphericModel")) { + pvlObj = pvl.findObject("AtmosphericModel"); + if (pvlObj.hasGroup("Algorithm")) { + PvlObject::PvlGroupIterator pvlGrp = pvlObj.beginGroup(); + if (pvlGrp->hasKeyword("ATMNAME")) { + atmVal = (QString)pvlGrp->findKeyword("ATMNAME"); + } else if (pvlGrp->hasKeyword("NAME")) { + atmVal = (QString)pvlGrp->findKeyword("NAME"); } else { atmVal = "NONE"; } @@ -737,12 +737,12 @@ void addAtmosModel(Pvl &pvl, Pvl &outPvl) { wasFound = true; } if (!wasFound) { - while (pvlGrp != pvlObj.EndGroup()) { - if (pvlGrp->HasKeyword("ATMNAME") || pvlGrp->HasKeyword("NAME")) { - if (pvlGrp->HasKeyword("ATMNAME")) { - atmVal = (QString)pvlGrp->FindKeyword("ATMNAME"); - } else if (pvlGrp->HasKeyword("NAME")) { - atmVal = (QString)pvlGrp->FindKeyword("NAME"); + while (pvlGrp != pvlObj.endGroup()) { + if (pvlGrp->hasKeyword("ATMNAME") || pvlGrp->hasKeyword("NAME")) { + if (pvlGrp->hasKeyword("ATMNAME")) { + atmVal = (QString)pvlGrp->findKeyword("ATMNAME"); + } else if (pvlGrp->hasKeyword("NAME")) { + atmVal = (QString)pvlGrp->findKeyword("NAME"); } else { atmVal = "NONE"; } @@ -757,18 +757,18 @@ void addAtmosModel(Pvl &pvl, Pvl &outPvl) { } } if (wasFound) { - outPvl.AddObject(pvlObj); + outPvl.addObject(pvlObj); } else { - outPvl.AddObject(PvlObject("AtmosphericModel")); - outPvl.FindObject("AtmosphericModel").AddGroup(PvlGroup("Algorithm")); - outPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("ATMNAME",atmName),Pvl::Replace); + outPvl.addObject(PvlObject("AtmosphericModel")); + outPvl.findObject("AtmosphericModel").addGroup(PvlGroup("Algorithm")); + outPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("ATMNAME",atmName),Pvl::Replace); } } else { - outPvl.AddObject(PvlObject("AtmosphericModel")); - outPvl.FindObject("AtmosphericModel").AddGroup(PvlGroup("Algorithm")); - outPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("ATMNAME",atmName),Pvl::Replace); + outPvl.addObject(PvlObject("AtmosphericModel")); + outPvl.findObject("AtmosphericModel").addGroup(PvlGroup("Algorithm")); + outPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("ATMNAME",atmName),Pvl::Replace); } //Get the atmospheric model and any parameters specific to that @@ -780,11 +780,11 @@ void addAtmosModel(Pvl &pvl, Pvl &outPvl) { if (ui.WasEntered("HNORM")) { PvlKeyword hnormKey("HNORM"); OutputKeyValue(hnormKey, ui.GetString("HNORM")); - outPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(hnormKey, Pvl::Replace); + outPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(hnormKey, Pvl::Replace); } else { - if (!outPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - HasKeyword("HNORM")) { + if (!outPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + hasKeyword("HNORM")) { QString message = "The " + atmName + " Atmospheric model requires a value for the HNORM parameter."; message += "The normal range for HNORM is: 0 <= HNORM"; throw IException(IException::User, message, _FILEINFO_); @@ -793,11 +793,11 @@ void addAtmosModel(Pvl &pvl, Pvl &outPvl) { if (ui.WasEntered("TAU")) { PvlKeyword tauKey("TAU"); OutputKeyValue(tauKey, ui.GetString("TAU")); - outPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(tauKey, Pvl::Replace); + outPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(tauKey, Pvl::Replace); } else { - if (!outPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - HasKeyword("TAU")) { + if (!outPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + hasKeyword("TAU")) { QString message = "The " + atmName + " Atmospheric model requires a value for the TAU parameter."; message += "The normal range for TAU is: 0 <= TAU"; throw IException(IException::User, message, _FILEINFO_); @@ -806,11 +806,11 @@ void addAtmosModel(Pvl &pvl, Pvl &outPvl) { if (ui.WasEntered("TAUREF")) { PvlKeyword taurefKey("TAUREF"); OutputKeyValue(taurefKey, ui.GetString("TAUREF")); - outPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(taurefKey,Pvl::Replace); + outPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(taurefKey,Pvl::Replace); } else { - if (!outPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - HasKeyword("TAUREF")) { + if (!outPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + hasKeyword("TAUREF")) { QString message = "The " + atmName + " Atmospheric model requires a value for the TAUREF parameter."; message += "The normal range for TAUREF is: 0 <= TAUREF"; throw IException(IException::User, message, _FILEINFO_); @@ -819,11 +819,11 @@ void addAtmosModel(Pvl &pvl, Pvl &outPvl) { if (ui.WasEntered("WHA")) { PvlKeyword whaKey("WHA"); OutputKeyValue(whaKey, ui.GetString("WHA")); - outPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(whaKey, Pvl::Replace); + outPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(whaKey, Pvl::Replace); } else { - if (!outPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - HasKeyword("WHA")) { + if (!outPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + hasKeyword("WHA")) { QString message = "The " + atmName + " Atmospheric model requires a value for the WHA parameter."; message += "The normal range for WHA is: 0 < WHA < 1"; throw IException(IException::User, message, _FILEINFO_); @@ -831,13 +831,13 @@ void addAtmosModel(Pvl &pvl, Pvl &outPvl) { } if (ui.GetString("NULNEG") != "READFROMPVL") { if (ui.GetString("NULNEG") == "YES") { - outPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("NULNEG","YES"),Pvl::Replace); + outPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("NULNEG","YES"),Pvl::Replace); } else if (ui.GetString("NULNEG") == "NO") { - outPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("NULNEG","NO"),Pvl::Replace); - } else if (!outPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - HasKeyword("NULNEG")) { + outPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("NULNEG","NO"),Pvl::Replace); + } else if (!outPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + hasKeyword("NULNEG")) { QString message = "The " + atmName + " Atmospheric model requires a value for the NULNEG parameter."; message += "The valid values for NULNEG are: YES, NO"; throw IException(IException::User, message, _FILEINFO_); @@ -848,11 +848,11 @@ void addAtmosModel(Pvl &pvl, Pvl &outPvl) { if (ui.WasEntered("BHA")) { PvlKeyword bhaKey("BHA"); OutputKeyValue(bhaKey, ui.GetString("BHA")); - outPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(bhaKey, Pvl::Replace); + outPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(bhaKey, Pvl::Replace); } else { - if (!outPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - HasKeyword("BHA")) { + if (!outPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + hasKeyword("BHA")) { QString message = "The " + atmName + " Atmospheric model requires a value for the BHA parameter."; message += "The normal range for BHA is: -1 <= BHA <= 1"; throw IException(IException::User, message, _FILEINFO_); @@ -863,11 +863,11 @@ void addAtmosModel(Pvl &pvl, Pvl &outPvl) { if (ui.WasEntered("HGA")) { PvlKeyword hgaKey("HGA"); OutputKeyValue(hgaKey, ui.GetString("HGA")); - outPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(hgaKey, Pvl::Replace); + outPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(hgaKey, Pvl::Replace); } else { - if (!outPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - HasKeyword("HGA")) { + if (!outPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + hasKeyword("HGA")) { QString message = "The " + atmName + " Atmospheric model requires a value for the HGA parameter."; message += "The normal range for HGA is: -1 < HGA < 1"; throw IException(IException::User, message, _FILEINFO_); diff --git a/isis/src/base/apps/photomet/photomet.cpp b/isis/src/base/apps/photomet/photomet.cpp index 7f4673aa41ff2618486b81c10a873565e3c1cfaf..8470c3a2ab0b0582ea0a28647ad1693fa1a088f8 100644 --- a/isis/src/base/apps/photomet/photomet.cpp +++ b/isis/src/base/apps/photomet/photomet.cpp @@ -60,7 +60,7 @@ void PrintPvl() { // Write file out to log QString inFile(ui.GetFileName("FROMPVL")); Pvl inPvl; - inPvl.Read(ui.GetFileName("FROMPVL")); + inPvl.read(ui.GetFileName("FROMPVL")); QString OQString = "***** Output of [" + inFile + "] *****"; Application::GuiLog(OQString); Application::GuiLog(inPvl); @@ -72,7 +72,7 @@ void LoadPvl() { UserInterface &ui = Application::GetUserInterface(); QString inFile(ui.GetFileName("FROMPVL")); Pvl inPvl; - inPvl.Read(inFile); + inPvl.read(inFile); QString phtName = ui.GetAsString("PHTNAME"); phtName = phtName.toUpper(); QString atmName = ui.GetAsString("ATMNAME"); @@ -81,20 +81,20 @@ void LoadPvl() { nrmName = nrmName.toUpper(); QString phtVal; - if (inPvl.HasObject("PhotometricModel")) { - PvlObject phtObj = inPvl.FindObject("PhotometricModel"); - if (!phtObj.HasGroup("Algorithm")) { + if (inPvl.hasObject("PhotometricModel")) { + PvlObject phtObj = inPvl.findObject("PhotometricModel"); + if (!phtObj.hasGroup("Algorithm")) { QString message = "The input PVL does not contain a valid photometric model so you must specify one "; message += "- the [Algorithm] group is missing in your [PhotometricModel]"; throw IException(IException::User, message, _FILEINFO_); } else { - PvlObject::PvlGroupIterator phtGrp = phtObj.BeginGroup(); + PvlObject::PvlGroupIterator phtGrp = phtObj.beginGroup(); bool wasFound = false; - if (phtGrp->HasKeyword("PHTNAME")) { - phtVal = (QString)phtGrp->FindKeyword("PHTNAME"); - } else if (phtGrp->HasKeyword("NAME")) { - phtVal = (QString)phtGrp->FindKeyword("NAME"); + if (phtGrp->hasKeyword("PHTNAME")) { + phtVal = (QString)phtGrp->findKeyword("PHTNAME"); + } else if (phtGrp->hasKeyword("NAME")) { + phtVal = (QString)phtGrp->findKeyword("NAME"); } else { QString message = "The input PVL does not contain a valid photometric model so you must specify one "; message += "- the [Phtname] keyword is missing in your [Algorithm] group"; @@ -105,12 +105,12 @@ void LoadPvl() { wasFound = true; } if (!wasFound) { - while (phtGrp != phtObj.EndGroup()) { - if (phtGrp->HasKeyword("PHTNAME") || phtGrp->HasKeyword("NAME")) { - if (phtGrp->HasKeyword("PHTNAME")) { - phtVal = (QString)phtGrp->FindKeyword("PHTNAME"); - } else if (phtGrp->HasKeyword("NAME")) { - phtVal = (QString)phtGrp->FindKeyword("NAME"); + while (phtGrp != phtObj.endGroup()) { + if (phtGrp->hasKeyword("PHTNAME") || phtGrp->hasKeyword("NAME")) { + if (phtGrp->hasKeyword("PHTNAME")) { + phtVal = (QString)phtGrp->findKeyword("PHTNAME"); + } else if (phtGrp->hasKeyword("NAME")) { + phtVal = (QString)phtGrp->findKeyword("NAME"); } else { QString message = "The input PVL does not contain a valid photometric model so you must specify one "; message += "- the [Phtname] keyword is missing in your [Algorithm] group"; @@ -143,32 +143,32 @@ void LoadPvl() { ui.Clear("LLIST"); ui.Clear("PHASECURVELIST"); if (phtVal == "HAPKEHEN" || phtVal == "HAPKELEG") { - if (phtGrp->HasKeyword("THETA")) { - double theta = phtGrp->FindKeyword("THETA"); + if (phtGrp->hasKeyword("THETA")) { + double theta = phtGrp->findKeyword("THETA"); os.str(""); os << theta; ui.PutAsString("THETA", os.str().c_str()); } - if (phtGrp->HasKeyword("WH")) { - double wh = phtGrp->FindKeyword("WH"); + if (phtGrp->hasKeyword("WH")) { + double wh = phtGrp->findKeyword("WH"); os.str(""); os << wh; ui.PutAsString("WH", os.str().c_str()); } - if (phtGrp->HasKeyword("HH")) { - double hh = phtGrp->FindKeyword("HH"); + if (phtGrp->hasKeyword("HH")) { + double hh = phtGrp->findKeyword("HH"); os.str(""); os << hh; ui.PutAsString("HH", os.str().c_str()); } - if (phtGrp->HasKeyword("B0")) { - double b0 = phtGrp->FindKeyword("B0"); + if (phtGrp->hasKeyword("B0")) { + double b0 = phtGrp->findKeyword("B0"); os.str(""); os << b0; ui.PutAsString("B0", os.str().c_str()); } - if (phtGrp->HasKeyword("ZEROB0STANDARD")) { - QString zerob0 = (QString)phtGrp->FindKeyword("ZEROB0STANDARD"); + if (phtGrp->hasKeyword("ZEROB0STANDARD")) { + QString zerob0 = (QString)phtGrp->findKeyword("ZEROB0STANDARD"); QString izerob0 = zerob0; izerob0 = izerob0.toUpper(); if (izerob0 == "TRUE") { @@ -181,64 +181,64 @@ void LoadPvl() { } } if (phtVal == "HAPKEHEN") { - if (phtGrp->HasKeyword("HG1")) { - double hg1 = phtGrp->FindKeyword("HG1"); + if (phtGrp->hasKeyword("HG1")) { + double hg1 = phtGrp->findKeyword("HG1"); os.str(""); os << hg1; ui.PutAsString("HG1", os.str().c_str()); } - if (phtGrp->HasKeyword("HG2")) { - double hg2 = phtGrp->FindKeyword("HG2"); + if (phtGrp->hasKeyword("HG2")) { + double hg2 = phtGrp->findKeyword("HG2"); os.str(""); os << hg2; ui.PutAsString("HG2", os.str().c_str()); } } if (phtVal == "HAPKELEG") { - if (phtGrp->HasKeyword("BH")) { - double bh = phtGrp->FindKeyword("BH"); + if (phtGrp->hasKeyword("BH")) { + double bh = phtGrp->findKeyword("BH"); os.str(""); os << bh; ui.PutAsString("BH", os.str().c_str()); } - if (phtGrp->HasKeyword("CH")) { - double ch = phtGrp->FindKeyword("CH"); + if (phtGrp->hasKeyword("CH")) { + double ch = phtGrp->findKeyword("CH"); os.str(""); os << ch; ui.PutAsString("CH", os.str().c_str()); } } } else if (phtVal == "LUNARLAMBERTEMPIRICAL" || phtVal == "MINNAERTEMPIRICAL") { - if (phtGrp->HasKeyword("PHASELIST")) { - QString phaselist = (QString)phtGrp->FindKeyword("PHASELIST"); + if (phtGrp->hasKeyword("PHASELIST")) { + QString phaselist = (QString)phtGrp->findKeyword("PHASELIST"); ui.PutAsString("PHASELIST", phaselist); } - if (phtGrp->HasKeyword("PHASECURVELIST")) { - QString phasecurvelist = (QString)phtGrp->FindKeyword("PHASECURVELIST"); + if (phtGrp->hasKeyword("PHASECURVELIST")) { + QString phasecurvelist = (QString)phtGrp->findKeyword("PHASECURVELIST"); ui.PutAsString("PHASECURVELIST", phasecurvelist); } if (phtVal == "LUNARLAMBERTEMPIRICAL") { - if (phtGrp->HasKeyword("LLIST")) { - QString llist = (QString)phtGrp->FindKeyword("LLIST"); + if (phtGrp->hasKeyword("LLIST")) { + QString llist = (QString)phtGrp->findKeyword("LLIST"); ui.PutAsString("LLIST", llist); } } if (phtVal == "MINNAERTEMPIRICAL") { - if (phtGrp->HasKeyword("KLIST")) { - QString klist = (QString)phtGrp->FindKeyword("KLIST"); + if (phtGrp->hasKeyword("KLIST")) { + QString klist = (QString)phtGrp->findKeyword("KLIST"); ui.PutAsString("KLIST", klist); } } } else if (phtVal == "LUNARLAMBERT") { - if (phtGrp->HasKeyword("L")) { - double l = phtGrp->FindKeyword("L"); + if (phtGrp->hasKeyword("L")) { + double l = phtGrp->findKeyword("L"); os.str(""); os << l; ui.PutAsString("L", os.str().c_str()); } } else if (phtVal == "MINNAERT") { - if (phtGrp->HasKeyword("K")) { - double k = phtGrp->FindKeyword("K"); + if (phtGrp->hasKeyword("K")) { + double k = phtGrp->findKeyword("K"); os.str(""); os << k; ui.PutAsString("K", os.str().c_str()); @@ -254,20 +254,20 @@ void LoadPvl() { } QString nrmVal; - if (inPvl.HasObject("NormalizationModel")) { - PvlObject nrmObj = inPvl.FindObject("NormalizationModel"); - if (!nrmObj.HasGroup("Algorithm")) { + if (inPvl.hasObject("NormalizationModel")) { + PvlObject nrmObj = inPvl.findObject("NormalizationModel"); + if (!nrmObj.hasGroup("Algorithm")) { QString message = "The input PVL does not contain a valid normalization model so you must specify one "; message += "- the [Algorithm] group is missing in your [NormalizationModel]"; throw IException(IException::User, message, _FILEINFO_); } else { - PvlObject::PvlGroupIterator nrmGrp = nrmObj.BeginGroup(); + PvlObject::PvlGroupIterator nrmGrp = nrmObj.beginGroup(); bool wasFound = false; - if (nrmGrp->HasKeyword("NORMNAME")) { - nrmVal = (QString)nrmGrp->FindKeyword("NORMNAME"); - } else if (nrmGrp->HasKeyword("NAME")) { - nrmVal = (QString)nrmGrp->FindKeyword("NAME"); + if (nrmGrp->hasKeyword("NORMNAME")) { + nrmVal = (QString)nrmGrp->findKeyword("NORMNAME"); + } else if (nrmGrp->hasKeyword("NAME")) { + nrmVal = (QString)nrmGrp->findKeyword("NAME"); } else { QString message = "The input PVL does not contain a valid normalization model so you must specify one "; message += "- the [Normname] keyword is missing in your [Algorithm] group"; @@ -278,12 +278,12 @@ void LoadPvl() { wasFound = true; } if (!wasFound) { - while (nrmGrp != nrmObj.EndGroup()) { - if (nrmGrp->HasKeyword("NORMNAME") || nrmGrp->HasKeyword("NAME")) { - if (nrmGrp->HasKeyword("NORMNAME")) { - nrmVal = (QString)nrmGrp->FindKeyword("NORMNAME"); - } else if (nrmGrp->HasKeyword("NAME")) { - nrmVal = (QString)nrmGrp->FindKeyword("NAME"); + while (nrmGrp != nrmObj.endGroup()) { + if (nrmGrp->hasKeyword("NORMNAME") || nrmGrp->hasKeyword("NAME")) { + if (nrmGrp->hasKeyword("NORMNAME")) { + nrmVal = (QString)nrmGrp->findKeyword("NORMNAME"); + } else if (nrmGrp->hasKeyword("NAME")) { + nrmVal = (QString)nrmGrp->findKeyword("NAME"); } else { QString message = "The input PVL does not contain a valid normalization model so you must specify one "; message += "- the [Normname] keyword is missing in your [Algorithm] group"; @@ -319,91 +319,91 @@ void LoadPvl() { ui.Clear("XB2"); if (nrmVal != "MOONALBEDO") { if (nrmVal == "ALBEDO" || nrmVal == "MIXED") { - if (nrmGrp->HasKeyword("INCREF")) { - double incref = nrmGrp->FindKeyword("INCREF"); + if (nrmGrp->hasKeyword("INCREF")) { + double incref = nrmGrp->findKeyword("INCREF"); os.str(""); os << incref; ui.PutAsString("INCREF", os.str().c_str()); } - if (nrmGrp->HasKeyword("INCMAT") && nrmVal == "MIXED") { - double incmat = nrmGrp->FindKeyword("INCMAT"); + if (nrmGrp->hasKeyword("INCMAT") && nrmVal == "MIXED") { + double incmat = nrmGrp->findKeyword("INCMAT"); os.str(""); os << incmat; ui.PutAsString("INCMAT", os.str().c_str()); } - if (nrmGrp->HasKeyword("THRESH")) { - double thresh = nrmGrp->FindKeyword("THRESH"); + if (nrmGrp->hasKeyword("THRESH")) { + double thresh = nrmGrp->findKeyword("THRESH"); os.str(""); os << thresh; ui.PutAsString("THRESH", os.str().c_str()); } - if (nrmGrp->HasKeyword("ALBEDO")) { - double albedo = nrmGrp->FindKeyword("ALBEDO"); + if (nrmGrp->hasKeyword("ALBEDO")) { + double albedo = nrmGrp->findKeyword("ALBEDO"); os.str(""); os << albedo; ui.PutAsString("ALBEDO", os.str().c_str()); } } else if (nrmVal == "SHADE") { - if (nrmGrp->HasKeyword("INCREF")) { - double incref = nrmGrp->FindKeyword("INCREF"); + if (nrmGrp->hasKeyword("INCREF")) { + double incref = nrmGrp->findKeyword("INCREF"); os.str(""); os << incref; ui.PutAsString("INCREF", os.str().c_str()); } - if (nrmGrp->HasKeyword("ALBEDO")) { - double albedo = nrmGrp->FindKeyword("ALBEDO"); + if (nrmGrp->hasKeyword("ALBEDO")) { + double albedo = nrmGrp->findKeyword("ALBEDO"); os.str(""); os << albedo; ui.PutAsString("ALBEDO", os.str().c_str()); } } else if (nrmVal == "TOPO") { - if (nrmGrp->HasKeyword("INCREF")) { - double incref = nrmGrp->FindKeyword("INCREF"); + if (nrmGrp->hasKeyword("INCREF")) { + double incref = nrmGrp->findKeyword("INCREF"); os.str(""); os << incref; ui.PutAsString("INCREF", os.str().c_str()); } - if (nrmGrp->HasKeyword("ALBEDO")) { - double albedo = nrmGrp->FindKeyword("ALBEDO"); + if (nrmGrp->hasKeyword("ALBEDO")) { + double albedo = nrmGrp->findKeyword("ALBEDO"); os.str(""); os << albedo; ui.PutAsString("ALBEDO", os.str().c_str()); } - if (nrmGrp->HasKeyword("THRESH")) { - double thresh = nrmGrp->FindKeyword("THRESH"); + if (nrmGrp->hasKeyword("THRESH")) { + double thresh = nrmGrp->findKeyword("THRESH"); os.str(""); os << thresh; ui.PutAsString("THRESH", os.str().c_str()); } } else if (nrmVal == "ALBEDOATM") { - if (nrmGrp->HasKeyword("INCREF")) { - double incref = nrmGrp->FindKeyword("INCREF"); + if (nrmGrp->hasKeyword("INCREF")) { + double incref = nrmGrp->findKeyword("INCREF"); os.str(""); os << incref; ui.PutAsString("INCREF", os.str().c_str()); } } else if (nrmVal == "SHADEATM") { - if (nrmGrp->HasKeyword("INCREF")) { - double incref = nrmGrp->FindKeyword("INCREF"); + if (nrmGrp->hasKeyword("INCREF")) { + double incref = nrmGrp->findKeyword("INCREF"); os.str(""); os << incref; ui.PutAsString("INCREF", os.str().c_str()); } - if (nrmGrp->HasKeyword("ALBEDO")) { - double albedo = nrmGrp->FindKeyword("ALBEDO"); + if (nrmGrp->hasKeyword("ALBEDO")) { + double albedo = nrmGrp->findKeyword("ALBEDO"); os.str(""); os << albedo; ui.PutAsString("ALBEDO", os.str().c_str()); } } else if (nrmVal == "TOPOATM") { - if (nrmGrp->HasKeyword("INCREF")) { - double incref = nrmGrp->FindKeyword("INCREF"); + if (nrmGrp->hasKeyword("INCREF")) { + double incref = nrmGrp->findKeyword("INCREF"); os.str(""); os << incref; ui.PutAsString("INCREF", os.str().c_str()); } - if (nrmGrp->HasKeyword("ALBEDO")) { - double albedo = nrmGrp->FindKeyword("ALBEDO"); + if (nrmGrp->hasKeyword("ALBEDO")) { + double albedo = nrmGrp->findKeyword("ALBEDO"); os.str(""); os << albedo; ui.PutAsString("ALBEDO", os.str().c_str()); @@ -413,62 +413,62 @@ void LoadPvl() { throw IException(IException::User, message, _FILEINFO_); } } else { - if (nrmGrp->HasKeyword("D")) { - double d = nrmGrp->FindKeyword("D"); + if (nrmGrp->hasKeyword("D")) { + double d = nrmGrp->findKeyword("D"); os.str(""); os << d; ui.PutAsString("D", os.str().c_str()); } - if (nrmGrp->HasKeyword("E")) { - double e = nrmGrp->FindKeyword("E"); + if (nrmGrp->hasKeyword("E")) { + double e = nrmGrp->findKeyword("E"); os.str(""); os << e; ui.PutAsString("E", os.str().c_str()); } - if (nrmGrp->HasKeyword("F")) { - double f = nrmGrp->FindKeyword("F"); + if (nrmGrp->hasKeyword("F")) { + double f = nrmGrp->findKeyword("F"); os.str(""); os << f; ui.PutAsString("F", os.str().c_str()); } - if (nrmGrp->HasKeyword("G2")) { - double g2 = nrmGrp->FindKeyword("G2"); + if (nrmGrp->hasKeyword("G2")) { + double g2 = nrmGrp->findKeyword("G2"); os.str(""); os << g2; ui.PutAsString("G2", os.str().c_str()); } - if (nrmGrp->HasKeyword("XMUL")) { - double xmul = nrmGrp->FindKeyword("XMUL"); + if (nrmGrp->hasKeyword("XMUL")) { + double xmul = nrmGrp->findKeyword("XMUL"); os.str(""); os << xmul; ui.PutAsString("XMUL", os.str().c_str()); } - if (nrmGrp->HasKeyword("WL")) { - double wl = nrmGrp->FindKeyword("WL"); + if (nrmGrp->hasKeyword("WL")) { + double wl = nrmGrp->findKeyword("WL"); os.str(""); os << wl; ui.PutAsString("WL", os.str().c_str()); } - if (nrmGrp->HasKeyword("H")) { - double h = nrmGrp->FindKeyword("H"); + if (nrmGrp->hasKeyword("H")) { + double h = nrmGrp->findKeyword("H"); os.str(""); os << h; ui.PutAsString("H", os.str().c_str()); } - if (nrmGrp->HasKeyword("BSH1")) { - double bsh1 = nrmGrp->FindKeyword("BSH1"); + if (nrmGrp->hasKeyword("BSH1")) { + double bsh1 = nrmGrp->findKeyword("BSH1"); os.str(""); os << bsh1; ui.PutAsString("BSH1", os.str().c_str()); } - if (nrmGrp->HasKeyword("XB1")) { - double xb1 = nrmGrp->FindKeyword("XB1"); + if (nrmGrp->hasKeyword("XB1")) { + double xb1 = nrmGrp->findKeyword("XB1"); os.str(""); os << xb1; ui.PutAsString("XB1", os.str().c_str()); } - if (nrmGrp->HasKeyword("XB2")) { - double xb2 = nrmGrp->FindKeyword("XB2"); + if (nrmGrp->hasKeyword("XB2")) { + double xb2 = nrmGrp->findKeyword("XB2"); os.str(""); os << xb2; ui.PutAsString("XB2", os.str().c_str()); @@ -488,20 +488,20 @@ void LoadPvl() { return; } QString atmVal; - if (inPvl.HasObject("AtmosphericModel")) { - PvlObject atmObj = inPvl.FindObject("AtmosphericModel"); - if (!atmObj.HasGroup("Algorithm")) { + if (inPvl.hasObject("AtmosphericModel")) { + PvlObject atmObj = inPvl.findObject("AtmosphericModel"); + if (!atmObj.hasGroup("Algorithm")) { QString message = "The input PVL does not contain a valid atmospheric model so you must specify one "; message += "- the [Algorithm] group is missing in your [AtmosphericModel]"; throw IException(IException::User, message, _FILEINFO_); } else { - PvlObject::PvlGroupIterator atmGrp = atmObj.BeginGroup(); + PvlObject::PvlGroupIterator atmGrp = atmObj.beginGroup(); bool wasFound = false; - if (atmGrp->HasKeyword("ATMNAME")) { - atmVal = (QString)atmGrp->FindKeyword("ATMNAME"); - } else if (atmGrp->HasKeyword("NAME")) { - atmVal = (QString)atmGrp->FindKeyword("NAME"); + if (atmGrp->hasKeyword("ATMNAME")) { + atmVal = (QString)atmGrp->findKeyword("ATMNAME"); + } else if (atmGrp->hasKeyword("NAME")) { + atmVal = (QString)atmGrp->findKeyword("NAME"); } else { QString message = "The input PVL does not contain a valid atmospheric model so you must specify one "; message += "- the [Atmname] keyword is missing in your [Algorithm] group"; @@ -512,12 +512,12 @@ void LoadPvl() { wasFound = true; } if (!wasFound) { - while (atmGrp != atmObj.EndGroup()) { - if (atmGrp->HasKeyword("ATMNAME") || atmGrp->HasKeyword("NAME")) { - if (atmGrp->HasKeyword("ATMNAME")) { - atmVal = (QString)atmGrp->FindKeyword("ATMNAME"); - } else if (atmGrp->HasKeyword("NAME")) { - atmVal = (QString)atmGrp->FindKeyword("NAME"); + while (atmGrp != atmObj.endGroup()) { + if (atmGrp->hasKeyword("ATMNAME") || atmGrp->hasKeyword("NAME")) { + if (atmGrp->hasKeyword("ATMNAME")) { + atmVal = (QString)atmGrp->findKeyword("ATMNAME"); + } else if (atmGrp->hasKeyword("NAME")) { + atmVal = (QString)atmGrp->findKeyword("NAME"); } else { QString message = "The input PVL does not contain a valid atmospheric model so you must specify one "; message += "- the [Atmname] keyword is missing in your [Algorithm] group"; @@ -544,32 +544,32 @@ void LoadPvl() { if (atmVal == "ANISOTROPIC1" || atmVal == "ANISOTROPIC2" || atmVal == "HAPKEATM1" || atmVal == "HAPKEATM2" || atmVal == "ISOTROPIC1" || atmVal == "ISOTROPIC2") { - if (atmGrp->HasKeyword("HNORM")) { - double hnorm = atmGrp->FindKeyword("HNORM"); + if (atmGrp->hasKeyword("HNORM")) { + double hnorm = atmGrp->findKeyword("HNORM"); os.str(""); os << hnorm; ui.PutAsString("HNORM", os.str().c_str()); } - if (atmGrp->HasKeyword("TAU")) { - double tau = atmGrp->FindKeyword("TAU"); + if (atmGrp->hasKeyword("TAU")) { + double tau = atmGrp->findKeyword("TAU"); os.str(""); os << tau; ui.PutAsString("TAU", os.str().c_str()); } - if (atmGrp->HasKeyword("TAUREF")) { - double tauref = atmGrp->FindKeyword("TAUREF"); + if (atmGrp->hasKeyword("TAUREF")) { + double tauref = atmGrp->findKeyword("TAUREF"); os.str(""); os << tauref; ui.PutAsString("TAUREF", os.str().c_str()); } - if (atmGrp->HasKeyword("WHA")) { - double wha = atmGrp->FindKeyword("WHA"); + if (atmGrp->hasKeyword("WHA")) { + double wha = atmGrp->findKeyword("WHA"); os.str(""); os << wha; ui.PutAsString("WHA", os.str().c_str()); } - if (atmGrp->HasKeyword("NULNEG")) { - QString nulneg = (QString)atmGrp->FindKeyword("NULNEG"); + if (atmGrp->hasKeyword("NULNEG")) { + QString nulneg = (QString)atmGrp->findKeyword("NULNEG"); QString inulneg = nulneg; inulneg = inulneg.toUpper(); if (inulneg == "YES") { @@ -583,16 +583,16 @@ void LoadPvl() { } } if (atmVal == "ANISOTROPIC1" || atmVal == "ANISOTROPIC2") { - if (atmGrp->HasKeyword("BHA")) { - double bha = atmGrp->FindKeyword("BHA"); + if (atmGrp->hasKeyword("BHA")) { + double bha = atmGrp->findKeyword("BHA"); os.str(""); os << bha; ui.PutAsString("BHA", os.str().c_str()); } } if (atmVal == "HAPKEATM1" || atmVal == "HAPKEATM2") { - if (atmGrp->HasKeyword("HGA")) { - double hga = atmGrp->FindKeyword("HGA"); + if (atmGrp->hasKeyword("HGA")) { + double hga = atmGrp->findKeyword("HGA"); os.str(""); os << hga; ui.PutAsString("HGA", os.str().c_str()); @@ -656,15 +656,15 @@ void IsisMain() { PvlObject fromNormObj; PvlGroup fromNormGrp; QString input = ui.GetFileName("FROMPVL"); - fromNormPvl.Read(input); - if (fromNormPvl.HasObject("NormalizationModel")) { - fromNormObj = fromNormPvl.FindObject("NormalizationModel"); - if (fromNormObj.HasGroup("Algorithm")) { - PvlObject::PvlGroupIterator fromNormGrp = fromNormObj.BeginGroup(); - if (fromNormGrp->HasKeyword("NORMNAME")) { - normVal = (QString)fromNormGrp->FindKeyword("NORMNAME"); - } else if (fromNormGrp->HasKeyword("NAME")) { - normVal = (QString)fromNormGrp->FindKeyword("NAME"); + fromNormPvl.read(input); + if (fromNormPvl.hasObject("NormalizationModel")) { + fromNormObj = fromNormPvl.findObject("NormalizationModel"); + if (fromNormObj.hasGroup("Algorithm")) { + PvlObject::PvlGroupIterator fromNormGrp = fromNormObj.beginGroup(); + if (fromNormGrp->hasKeyword("NORMNAME")) { + normVal = (QString)fromNormGrp->findKeyword("NORMNAME"); + } else if (fromNormGrp->hasKeyword("NAME")) { + normVal = (QString)fromNormGrp->findKeyword("NAME"); } else { normVal = "NONE"; } @@ -677,12 +677,12 @@ void IsisMain() { wasFound = true; } if (!wasFound) { - while (fromNormGrp != fromNormObj.EndGroup()) { - if (fromNormGrp->HasKeyword("NORMNAME") || fromNormGrp->HasKeyword("NAME")) { - if (fromNormGrp->HasKeyword("NORMNAME")) { - normVal = (QString)fromNormGrp->FindKeyword("NORMNAME"); - } else if (fromNormGrp->HasKeyword("NAME")) { - normVal = (QString)fromNormGrp->FindKeyword("NAME"); + while (fromNormGrp != fromNormObj.endGroup()) { + if (fromNormGrp->hasKeyword("NORMNAME") || fromNormGrp->hasKeyword("NAME")) { + if (fromNormGrp->hasKeyword("NORMNAME")) { + normVal = (QString)fromNormGrp->findKeyword("NORMNAME"); + } else if (fromNormGrp->hasKeyword("NAME")) { + normVal = (QString)fromNormGrp->findKeyword("NAME"); } else { normVal = "NONE"; } @@ -710,12 +710,12 @@ void IsisMain() { throw IException(IException::User, message, _FILEINFO_); } if (wasFound) { - toNormPvl.AddObject(fromNormObj); + toNormPvl.addObject(fromNormObj); } else { - toNormPvl.AddObject(PvlObject("NormalizationModel")); - toNormPvl.FindObject("NormalizationModel").AddGroup(PvlGroup("Algorithm")); - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("NORMNAME",normName),Pvl::Replace); + toNormPvl.addObject(PvlObject("NormalizationModel")); + toNormPvl.findObject("NormalizationModel").addGroup(PvlGroup("Algorithm")); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("NORMNAME",normName),Pvl::Replace); } } else { // Check to make sure that a normalization model was specified @@ -725,420 +725,420 @@ void IsisMain() { message += "you need to specify a Normalization model through the program interface."; throw IException(IException::User, message, _FILEINFO_); } - toNormPvl.AddObject(PvlObject("NormalizationModel")); - toNormPvl.FindObject("NormalizationModel").AddGroup(PvlGroup("Algorithm")); - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("NORMNAME",normName),Pvl::Replace); + toNormPvl.addObject(PvlObject("NormalizationModel")); + toNormPvl.findObject("NormalizationModel").addGroup(PvlGroup("Algorithm")); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("NORMNAME",normName),Pvl::Replace); } normLog += PvlKeyword("NORMNAME", normName); if (normName == "ALBEDO" || normName == "MIXED") { if (parMap.contains("INCREF")) { - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("INCREF",toString(toDouble(parMap["INCREF"]))),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("INCREF",toString(toDouble(parMap["INCREF"]))),Pvl::Replace); } else if (ui.WasEntered("INCREF")) { QString keyval = ui.GetString("INCREF"); double incref = toDouble(keyval); - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("INCREF",toString(incref)),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("INCREF",toString(incref)),Pvl::Replace); } else { - if (!toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - HasKeyword("INCREF")) { + if (!toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + hasKeyword("INCREF")) { QString message = "The " + normName + " Normalization model requires a value for the INCREF parameter."; throw IException(IException::User, message, _FILEINFO_); } } - normLog += toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm").FindKeyword("INCREF"); + normLog += toNormPvl.findObject("NormalizationModel").findGroup("Algorithm").findKeyword("INCREF"); if (normName == "MIXED") { if (parMap.contains("INCMAT")) { - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("INCMAT",toString(toDouble(parMap["INCMAT"]))),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("INCMAT",toString(toDouble(parMap["INCMAT"]))),Pvl::Replace); } else if (ui.WasEntered("INCMAT")) { QString keyval = ui.GetString("INCMAT"); double incmat = toDouble(keyval); - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("INCMAT",toString(incmat)),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("INCMAT",toString(incmat)),Pvl::Replace); } else { - if (!toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - HasKeyword("INCMAT")) { + if (!toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + hasKeyword("INCMAT")) { QString message = "The " + normName + " Normalization model requires a value for the INCMAT parameter."; message += "The normal range for INCMAT is: 0 <= INCMAT < 90"; throw IException(IException::User, message, _FILEINFO_); } } - normLog += toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm").FindKeyword("INCMAT"); + normLog += toNormPvl.findObject("NormalizationModel").findGroup("Algorithm").findKeyword("INCMAT"); } if (parMap.contains("THRESH")) { - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("THRESH",toString(toDouble(parMap["THRESH"]))),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("THRESH",toString(toDouble(parMap["THRESH"]))),Pvl::Replace); } else if (ui.WasEntered("THRESH")) { QString keyval = ui.GetString("THRESH"); double thresh = toDouble(keyval); - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("THRESH",toString(thresh)),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("THRESH",toString(thresh)),Pvl::Replace); } else { - if (!toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - HasKeyword("THRESH")) { + if (!toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + hasKeyword("THRESH")) { QString message = "The " + normName + " Normalization model requires a value for the THRESH parameter."; throw IException(IException::User, message, _FILEINFO_); } } - normLog += toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm").FindKeyword("THRESH"); + normLog += toNormPvl.findObject("NormalizationModel").findGroup("Algorithm").findKeyword("THRESH"); if (parMap.contains("ALBEDO")) { - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("ALBEDO",toString(toDouble(parMap["ALBEDO"]))),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("ALBEDO",toString(toDouble(parMap["ALBEDO"]))),Pvl::Replace); } else if (ui.WasEntered("ALBEDO")) { QString keyval = ui.GetString("ALBEDO"); double albedo = toDouble(keyval); - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("ALBEDO",toString(albedo)),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("ALBEDO",toString(albedo)),Pvl::Replace); } else { - if (!toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - HasKeyword("ALBEDO")) { + if (!toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + hasKeyword("ALBEDO")) { QString message = "The " + normName + " Normalization model requires a value for the ALBEDO parameter."; message += "The ALBEDO parameter has no limited range"; throw IException(IException::User, message, _FILEINFO_); } } - normLog += toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm").FindKeyword("ALBEDO"); + normLog += toNormPvl.findObject("NormalizationModel").findGroup("Algorithm").findKeyword("ALBEDO"); } else if (normName == "MOONALBEDO") { if (parMap.contains("D")) { - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("D",toString(toDouble(parMap["D"]))),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("D",toString(toDouble(parMap["D"]))),Pvl::Replace); } else if (ui.WasEntered("D")) { QString keyval = ui.GetString("D"); double d = toDouble(keyval); - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("D",toString(d)),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("D",toString(d)),Pvl::Replace); } else { - if (!toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - HasKeyword("D")) { + if (!toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + hasKeyword("D")) { QString message = "The " + normName + " Normalization model requires a value for the D parameter."; message += "The D parameter has no limited range"; throw IException(IException::User, message, _FILEINFO_); } } - normLog += toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm").FindKeyword("D"); + normLog += toNormPvl.findObject("NormalizationModel").findGroup("Algorithm").findKeyword("D"); if (parMap.contains("E")) { - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("E",toString(toDouble(parMap["E"]))),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("E",toString(toDouble(parMap["E"]))),Pvl::Replace); } else if (ui.WasEntered("E")) { QString keyval = ui.GetString("E"); double e = toDouble(keyval); - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("E",toString(e)),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("E",toString(e)),Pvl::Replace); } else { - if (!toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - HasKeyword("E")) { + if (!toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + hasKeyword("E")) { QString message = "The " + normName + " Normalization model requires a value for the E parameter."; message += "The E parameter has no limited range"; throw IException(IException::User, message, _FILEINFO_); } } - normLog += toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm").FindKeyword("E"); + normLog += toNormPvl.findObject("NormalizationModel").findGroup("Algorithm").findKeyword("E"); if (parMap.contains("F")) { - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("F",toString(toDouble(parMap["F"]))),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("F",toString(toDouble(parMap["F"]))),Pvl::Replace); } else if (ui.WasEntered("F")) { QString keyval = ui.GetString("F"); double f = toDouble(keyval); - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("F",toString(f)),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("F",toString(f)),Pvl::Replace); } else { - if (!toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - HasKeyword("F")) { + if (!toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + hasKeyword("F")) { QString message = "The " + normName + " Normalization model requires a value for the F parameter."; message += "The F parameter has no limited range"; throw IException(IException::User, message, _FILEINFO_); } } - normLog += toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm").FindKeyword("F"); + normLog += toNormPvl.findObject("NormalizationModel").findGroup("Algorithm").findKeyword("F"); if (parMap.contains("G2")) { - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("G2",toString(toDouble(parMap["G2"]))),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("G2",toString(toDouble(parMap["G2"]))),Pvl::Replace); } else if (ui.WasEntered("G2")) { QString keyval = ui.GetString("G2"); double g2 = toDouble(keyval); - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("G2",toString(g2)),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("G2",toString(g2)),Pvl::Replace); } else { - if (!toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - HasKeyword("G2")) { + if (!toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + hasKeyword("G2")) { QString message = "The " + normName + " Normalization model requires a value for the G2 parameter."; message += "The G2 parameter has no limited range"; throw IException(IException::User, message, _FILEINFO_); } } - normLog += toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm").FindKeyword("G2"); + normLog += toNormPvl.findObject("NormalizationModel").findGroup("Algorithm").findKeyword("G2"); if (parMap.contains("XMUL")) { - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("XMUL",toString(toDouble(parMap["XMUL"]))),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("XMUL",toString(toDouble(parMap["XMUL"]))),Pvl::Replace); } else if (ui.WasEntered("XMUL")) { QString keyval = ui.GetString("XMUL"); double xmul = toDouble(keyval); - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("XMUL",toString(xmul)),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("XMUL",toString(xmul)),Pvl::Replace); } else { - if (!toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - HasKeyword("XMUL")) { + if (!toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + hasKeyword("XMUL")) { QString message = "The " + normName + " Normalization model requires a value for the XMUL parameter."; message += "The XMUL parameter has no range limit"; throw IException(IException::User, message, _FILEINFO_); } } - normLog += toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm").FindKeyword("XMUL"); + normLog += toNormPvl.findObject("NormalizationModel").findGroup("Algorithm").findKeyword("XMUL"); if (parMap.contains("WL")) { - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("WL",toString(toDouble(parMap["WL"]))),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("WL",toString(toDouble(parMap["WL"]))),Pvl::Replace); } else if (ui.WasEntered("WL")) { QString keyval = ui.GetString("WL"); double wl = toDouble(keyval); - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("WL",toString(wl)),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("WL",toString(wl)),Pvl::Replace); } else { - if (!toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - HasKeyword("WL")) { + if (!toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + hasKeyword("WL")) { QString message = "The " + normName + " Normalization model requires a value for the WL parameter."; message += "The WL parameter has no range limit"; throw IException(IException::User, message, _FILEINFO_); } } - normLog += toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm").FindKeyword("WL"); + normLog += toNormPvl.findObject("NormalizationModel").findGroup("Algorithm").findKeyword("WL"); if (parMap.contains("H")) { - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("H",toString(toDouble(parMap["H"]))),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("H",toString(toDouble(parMap["H"]))),Pvl::Replace); } else if (ui.WasEntered("H")) { QString keyval = ui.GetString("H"); double h = toDouble(keyval); - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("H",toString(h)),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("H",toString(h)),Pvl::Replace); } else { - if (!toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - HasKeyword("H")) { + if (!toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + hasKeyword("H")) { QString message = "The " + normName + " Normalization model requires a value for the H parameter."; message += "The H parameter has no limited range"; throw IException(IException::User, message, _FILEINFO_); } } - normLog += toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm").FindKeyword("H"); + normLog += toNormPvl.findObject("NormalizationModel").findGroup("Algorithm").findKeyword("H"); if (parMap.contains("BSH1")) { - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("BSH1",toString(toDouble(parMap["BSH1"]))),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("BSH1",toString(toDouble(parMap["BSH1"]))),Pvl::Replace); } else if (ui.WasEntered("BSH1")) { QString keyval = ui.GetString("BSH1"); double bsh1 = toDouble(keyval); - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("BSH1",toString(bsh1)),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("BSH1",toString(bsh1)),Pvl::Replace); } else { - if (!toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - HasKeyword("BSH1")) { + if (!toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + hasKeyword("BSH1")) { QString message = "The " + normName + " Normalization model requires a value for the BSH1 parameter."; message += "The normal range for BSH1 is: 0 <= BSH1"; throw IException(IException::User, message, _FILEINFO_); } } - normLog += toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm").FindKeyword("BSH1"); + normLog += toNormPvl.findObject("NormalizationModel").findGroup("Algorithm").findKeyword("BSH1"); if (parMap.contains("XB1")) { - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("XB1",toString(toDouble(parMap["XB1"]))),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("XB1",toString(toDouble(parMap["XB1"]))),Pvl::Replace); } else if (ui.WasEntered("XB1")) { QString keyval = ui.GetString("XB1"); double xb1 = toDouble(keyval); - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("XB1",toString(xb1)),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("XB1",toString(xb1)),Pvl::Replace); } else { - if (!toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - HasKeyword("XB1")) { + if (!toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + hasKeyword("XB1")) { QString message = "The " + normName + " Normalization model requires a value for the XB1 parameter."; message += "The XB1 parameter has no range limit"; throw IException(IException::User, message, _FILEINFO_); } } - normLog += toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm").FindKeyword("XB1"); + normLog += toNormPvl.findObject("NormalizationModel").findGroup("Algorithm").findKeyword("XB1"); if (parMap.contains("XB2")) { - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("XB2",toString(toDouble(parMap["XB2"]))),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("XB2",toString(toDouble(parMap["XB2"]))),Pvl::Replace); } else if (ui.WasEntered("XB2")) { QString keyval = ui.GetString("XB2"); double xb2 = toDouble(keyval); - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("XB2",toString(xb2)),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("XB2",toString(xb2)),Pvl::Replace); } else { - if (!toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - HasKeyword("XB2")) { + if (!toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + hasKeyword("XB2")) { QString message = "The " + normName + " Normalization model requires a value for the XB2 parameter."; message += "The XB2 parameter has no range limit"; throw IException(IException::User, message, _FILEINFO_); } } - normLog += toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm").FindKeyword("XB2"); + normLog += toNormPvl.findObject("NormalizationModel").findGroup("Algorithm").findKeyword("XB2"); } else if (normName == "SHADE") { if (parMap.contains("INCREF")) { - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("INCREF",toString(toDouble(parMap["INCREF"]))),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("INCREF",toString(toDouble(parMap["INCREF"]))),Pvl::Replace); } else if (ui.WasEntered("INCREF")) { QString keyval = ui.GetString("INCREF"); double incref = toDouble(keyval); - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("INCREF",toString(incref)),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("INCREF",toString(incref)),Pvl::Replace); } else { - if (!toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - HasKeyword("INCREF")) { + if (!toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + hasKeyword("INCREF")) { QString message = "The " + normName + " Normalization model requires a value for the INCREF parameter."; message += "The normal range for INCREF is: 0 <= INCREF < 90"; throw IException(IException::User, message, _FILEINFO_); } } - normLog += toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm").FindKeyword("INCREF"); + normLog += toNormPvl.findObject("NormalizationModel").findGroup("Algorithm").findKeyword("INCREF"); if (parMap.contains("ALBEDO")) { - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("ALBEDO",toString(toDouble(parMap["ALBEDO"]))),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("ALBEDO",toString(toDouble(parMap["ALBEDO"]))),Pvl::Replace); } else if (ui.WasEntered("ALBEDO")) { QString keyval = ui.GetString("ALBEDO"); double albedo = toDouble(keyval); - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("ALBEDO",toString(albedo)),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("ALBEDO",toString(albedo)),Pvl::Replace); } else { - if (!toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - HasKeyword("ALBEDO")) { + if (!toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + hasKeyword("ALBEDO")) { QString message = "The " + normName + " Normalization model requires a value for the ALBEDO parameter."; throw IException(IException::User, message, _FILEINFO_); } } - normLog += toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm").FindKeyword("ALBEDO"); + normLog += toNormPvl.findObject("NormalizationModel").findGroup("Algorithm").findKeyword("ALBEDO"); } else if (normName == "TOPO") { if (parMap.contains("INCREF")) { - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("INCREF",toString(toDouble(parMap["INCREF"]))),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("INCREF",toString(toDouble(parMap["INCREF"]))),Pvl::Replace); } else if (ui.WasEntered("INCREF")) { QString keyval = ui.GetString("INCREF"); double incref = toDouble(keyval); - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("INCREF",toString(incref)),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("INCREF",toString(incref)),Pvl::Replace); } else { - if (!toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - HasKeyword("INCREF")) { + if (!toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + hasKeyword("INCREF")) { QString message = "The " + normName + " Normalization model requires a value for the INCREF parameter."; throw IException(IException::User, message, _FILEINFO_); } } - normLog += toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm").FindKeyword("INCREF"); + normLog += toNormPvl.findObject("NormalizationModel").findGroup("Algorithm").findKeyword("INCREF"); if (parMap.contains("THRESH")) { - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("THRESH",toString(toDouble(parMap["THRESH"]))),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("THRESH",toString(toDouble(parMap["THRESH"]))),Pvl::Replace); } else if (ui.WasEntered("THRESH")) { QString keyval = ui.GetString("THRESH"); double thresh = toDouble(keyval); - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("THRESH",toString(thresh)),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("THRESH",toString(thresh)),Pvl::Replace); } else { - if (!toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - HasKeyword("THRESH")) { + if (!toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + hasKeyword("THRESH")) { QString message = "The " + normName + " Normalization model requires a value for the THRESH parameter."; message += "The THRESH parameter has no range limit"; throw IException(IException::User, message, _FILEINFO_); } } - normLog += toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm").FindKeyword("THRESH"); + normLog += toNormPvl.findObject("NormalizationModel").findGroup("Algorithm").findKeyword("THRESH"); if (parMap.contains("ALBEDO")) { - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("ALBEDO",toString(toDouble(parMap["ALBEDO"]))),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("ALBEDO",toString(toDouble(parMap["ALBEDO"]))),Pvl::Replace); } else if (ui.WasEntered("ALBEDO")) { QString keyval = ui.GetString("ALBEDO"); double albedo = toDouble(keyval); - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("ALBEDO",toString(albedo)),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("ALBEDO",toString(albedo)),Pvl::Replace); } else { - if (!toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - HasKeyword("ALBEDO")) { + if (!toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + hasKeyword("ALBEDO")) { QString message = "The " + normName + " Normalization model requires a value for the ALBEDO parameter."; throw IException(IException::User, message, _FILEINFO_); } } - normLog += toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm").FindKeyword("ALBEDO"); + normLog += toNormPvl.findObject("NormalizationModel").findGroup("Algorithm").findKeyword("ALBEDO"); } else if (normName == "ALBEDOATM") { if (parMap.contains("INCREF")) { - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("INCREF",toString(toDouble(parMap["INCREF"]))),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("INCREF",toString(toDouble(parMap["INCREF"]))),Pvl::Replace); } else if (ui.WasEntered("INCREF")) { QString keyval = ui.GetString("INCREF"); double incref = toDouble(keyval); - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("INCREF",toString(incref)),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("INCREF",toString(incref)),Pvl::Replace); } else { - if (!toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - HasKeyword("INCREF")) { + if (!toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + hasKeyword("INCREF")) { QString message = "The " + normName + " Normalization model requires a value for the INCREF parameter."; throw IException(IException::User, message, _FILEINFO_); } } - normLog += toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm").FindKeyword("INCREF"); + normLog += toNormPvl.findObject("NormalizationModel").findGroup("Algorithm").findKeyword("INCREF"); } else if (normName == "SHADEATM") { if (parMap.contains("INCREF")) { - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("INCREF",toString(toDouble(parMap["INCREF"]))),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("INCREF",toString(toDouble(parMap["INCREF"]))),Pvl::Replace); } else if (ui.WasEntered("INCREF")) { QString keyval = ui.GetString("INCREF"); double incref = toDouble(keyval); - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("INCREF",toString(incref)),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("INCREF",toString(incref)),Pvl::Replace); } else { - if (!toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - HasKeyword("INCREF")) { + if (!toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + hasKeyword("INCREF")) { QString message = "The " + normName + " Normalization model requires a value for the INCREF parameter."; throw IException(IException::User, message, _FILEINFO_); } } - normLog += toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm").FindKeyword("INCREF"); + normLog += toNormPvl.findObject("NormalizationModel").findGroup("Algorithm").findKeyword("INCREF"); if (parMap.contains("ALBEDO")) { - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("ALBEDO",toString(toDouble(parMap["ALBEDO"]))),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("ALBEDO",toString(toDouble(parMap["ALBEDO"]))),Pvl::Replace); } else if (ui.WasEntered("ALBEDO")) { QString keyval = ui.GetString("ALBEDO"); double albedo = toDouble(keyval); - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("ALBEDO",toString(albedo)),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("ALBEDO",toString(albedo)),Pvl::Replace); } else { - if (!toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - HasKeyword("ALBEDO")) { + if (!toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + hasKeyword("ALBEDO")) { QString message = "The " + normName + " Normalization model requires a value for the ALBEDO parameter."; throw IException(IException::User, message, _FILEINFO_); } } - normLog += toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm").FindKeyword("ALBEDO"); + normLog += toNormPvl.findObject("NormalizationModel").findGroup("Algorithm").findKeyword("ALBEDO"); } else if (normName == "TOPOATM") { if (parMap.contains("INCREF")) { - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("INCREF",toString(toDouble(parMap["INCREF"]))),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("INCREF",toString(toDouble(parMap["INCREF"]))),Pvl::Replace); } else if (ui.WasEntered("INCREF")) { QString keyval = ui.GetString("INCREF"); double incref = toDouble(keyval); - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("INCREF",toString(incref)),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("INCREF",toString(incref)),Pvl::Replace); } else { - if (!toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - HasKeyword("INCREF")) { + if (!toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + hasKeyword("INCREF")) { QString message = "The " + normName + " Normalization model requires a value for the INCREF parameter."; throw IException(IException::User, message, _FILEINFO_); } } - normLog += toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm").FindKeyword("INCREF"); + normLog += toNormPvl.findObject("NormalizationModel").findGroup("Algorithm").findKeyword("INCREF"); if (parMap.contains("ALBEDO")) { - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("ALBEDO",toString(toDouble(parMap["ALBEDO"]))),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("ALBEDO",toString(toDouble(parMap["ALBEDO"]))),Pvl::Replace); } else if (ui.WasEntered("ALBEDO")) { QString keyval = ui.GetString("ALBEDO"); double albedo = toDouble(keyval); - toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("ALBEDO",toString(albedo)),Pvl::Replace); + toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("ALBEDO",toString(albedo)),Pvl::Replace); } else { - if (!toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm"). - HasKeyword("ALBEDO")) { + if (!toNormPvl.findObject("NormalizationModel").findGroup("Algorithm"). + hasKeyword("ALBEDO")) { QString message = "The " + normName + " Normalization model requires a value for the ALBEDO parameter."; throw IException(IException::User, message, _FILEINFO_); } } - normLog += toNormPvl.FindObject("NormalizationModel").FindGroup("Algorithm").FindKeyword("ALBEDO"); + normLog += toNormPvl.findObject("NormalizationModel").findGroup("Algorithm").findKeyword("ALBEDO"); } Application::Log(normLog); @@ -1156,15 +1156,15 @@ void IsisMain() { PvlObject fromAtmObj; PvlGroup fromAtmGrp; QString input = ui.GetFileName("FROMPVL"); - fromAtmPvl.Read(input); - if (fromAtmPvl.HasObject("AtmosphericModel")) { - fromAtmObj = fromAtmPvl.FindObject("AtmosphericModel"); - if (fromAtmObj.HasGroup("Algorithm")) { - PvlObject::PvlGroupIterator fromAtmGrp = fromAtmObj.BeginGroup(); - if (fromAtmGrp->HasKeyword("ATMNAME")) { - atmVal = (QString)fromAtmGrp->FindKeyword("ATMNAME"); - } else if (fromAtmGrp->HasKeyword("NAME")) { - atmVal = (QString)fromAtmGrp->FindKeyword("NAME"); + fromAtmPvl.read(input); + if (fromAtmPvl.hasObject("AtmosphericModel")) { + fromAtmObj = fromAtmPvl.findObject("AtmosphericModel"); + if (fromAtmObj.hasGroup("Algorithm")) { + PvlObject::PvlGroupIterator fromAtmGrp = fromAtmObj.beginGroup(); + if (fromAtmGrp->hasKeyword("ATMNAME")) { + atmVal = (QString)fromAtmGrp->findKeyword("ATMNAME"); + } else if (fromAtmGrp->hasKeyword("NAME")) { + atmVal = (QString)fromAtmGrp->findKeyword("NAME"); } else { atmVal = "NONE"; } @@ -1177,12 +1177,12 @@ void IsisMain() { wasFound = true; } if (!wasFound) { - while (fromAtmGrp != fromAtmObj.EndGroup()) { - if (fromAtmGrp->HasKeyword("ATMNAME") || fromAtmGrp->HasKeyword("NAME")) { - if (fromAtmGrp->HasKeyword("ATMNAME")) { - atmVal = (QString)fromAtmGrp->FindKeyword("ATMNAME"); - } else if (fromAtmGrp->HasKeyword("NAME")) { - atmVal = (QString)fromAtmGrp->FindKeyword("NAME"); + while (fromAtmGrp != fromAtmObj.endGroup()) { + if (fromAtmGrp->hasKeyword("ATMNAME") || fromAtmGrp->hasKeyword("NAME")) { + if (fromAtmGrp->hasKeyword("ATMNAME")) { + atmVal = (QString)fromAtmGrp->findKeyword("ATMNAME"); + } else if (fromAtmGrp->hasKeyword("NAME")) { + atmVal = (QString)fromAtmGrp->findKeyword("NAME"); } else { atmVal = "NONE"; } @@ -1209,12 +1209,12 @@ void IsisMain() { throw IException(IException::User, message, _FILEINFO_); } if (wasFound) { - toAtmPvl.AddObject(fromAtmObj); + toAtmPvl.addObject(fromAtmObj); } else { - toAtmPvl.AddObject(PvlObject("AtmosphericModel")); - toAtmPvl.FindObject("AtmosphericModel").AddGroup(PvlGroup("Algorithm")); - toAtmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("ATMNAME",atmName),Pvl::Replace); + toAtmPvl.addObject(PvlObject("AtmosphericModel")); + toAtmPvl.findObject("AtmosphericModel").addGroup(PvlGroup("Algorithm")); + toAtmPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("ATMNAME",atmName),Pvl::Replace); } } else { if (atmName == "NONE" || atmName == "FROMPVL") { @@ -1223,10 +1223,10 @@ void IsisMain() { message += "you need to specify an Atmospheric model through the program interface."; throw IException(IException::User, message, _FILEINFO_); } - toAtmPvl.AddObject(PvlObject("AtmosphericModel")); - toAtmPvl.FindObject("AtmosphericModel").AddGroup(PvlGroup("Algorithm")); - toAtmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("ATMNAME",atmName),Pvl::Replace); + toAtmPvl.addObject(PvlObject("AtmosphericModel")); + toAtmPvl.findObject("AtmosphericModel").addGroup(PvlGroup("Algorithm")); + toAtmPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("ATMNAME",atmName),Pvl::Replace); } atmLog += PvlKeyword("ATMNAME", atmName); @@ -1234,139 +1234,139 @@ void IsisMain() { atmName == "HAPKEATM1" || atmName == "HAPKEATM2" || atmName == "ISOTROPIC1" || atmName == "ISOTROPIC2") { if (parMap.contains("HNORM")) { - toAtmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("HNORM",toString(toDouble(parMap["HNORM"]))),Pvl::Replace); + toAtmPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("HNORM",toString(toDouble(parMap["HNORM"]))),Pvl::Replace); } else if (ui.WasEntered("HNORM")) { QString keyval = ui.GetString("HNORM"); double hnorm = toDouble(keyval); - toAtmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("HNORM",toString(hnorm)),Pvl::Replace); + toAtmPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("HNORM",toString(hnorm)),Pvl::Replace); } else { - if (!toAtmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - HasKeyword("HNORM")) { + if (!toAtmPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + hasKeyword("HNORM")) { QString message = "The " + atmName + " Atmospheric model requires a value for the HNORM parameter."; message += "The normal range for HNORM is: 0 <= HNORM"; throw IException(IException::User, message, _FILEINFO_); } } - atmLog += toAtmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm").FindKeyword("HNORM"); + atmLog += toAtmPvl.findObject("AtmosphericModel").findGroup("Algorithm").findKeyword("HNORM"); if (parMap.contains("TAU")) { - toAtmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("TAU",toString(toDouble(parMap["TAU"]))),Pvl::Replace); + toAtmPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("TAU",toString(toDouble(parMap["TAU"]))),Pvl::Replace); } else if (ui.WasEntered("TAU")) { QString keyval = ui.GetString("TAU"); double tau = toDouble(keyval); - toAtmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("TAU",toString(tau)),Pvl::Replace); + toAtmPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("TAU",toString(tau)),Pvl::Replace); } else { - if (!toAtmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - HasKeyword("TAU")) { + if (!toAtmPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + hasKeyword("TAU")) { QString message = "The " + atmName + " Atmospheric model requires a value for the TAU parameter."; message += "The normal range for TAU is: 0 <= TAU"; throw IException(IException::User, message, _FILEINFO_); } } - atmLog += toAtmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm").FindKeyword("TAU"); + atmLog += toAtmPvl.findObject("AtmosphericModel").findGroup("Algorithm").findKeyword("TAU"); if (parMap.contains("TAUREF")) { - toAtmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("TAUREF",toString(toDouble(parMap["TAUREF"]))),Pvl::Replace); + toAtmPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("TAUREF",toString(toDouble(parMap["TAUREF"]))),Pvl::Replace); } else if (ui.WasEntered("TAUREF")) { QString keyval = ui.GetString("TAUREF"); double tauref = toDouble(keyval); - toAtmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("TAUREF",toString(tauref)),Pvl::Replace); + toAtmPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("TAUREF",toString(tauref)),Pvl::Replace); } else { - if (!toAtmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - HasKeyword("TAUREF")) { + if (!toAtmPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + hasKeyword("TAUREF")) { QString message = "The " + atmName + " Atmospheric model requires a value for the TAUREF parameter."; message += "The normal range for TAUREF is: 0 <= TAUREF"; throw IException(IException::User, message, _FILEINFO_); } } - atmLog += toAtmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm").FindKeyword("TAUREF"); + atmLog += toAtmPvl.findObject("AtmosphericModel").findGroup("Algorithm").findKeyword("TAUREF"); if (parMap.contains("WHA")) { - toAtmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("WHA",toString(toDouble(parMap["WHA"]))),Pvl::Replace); + toAtmPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("WHA",toString(toDouble(parMap["WHA"]))),Pvl::Replace); } else if (ui.WasEntered("WHA")) { QString keyval = ui.GetString("WHA"); double wha = toDouble(keyval); - toAtmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("WHA",toString(wha)),Pvl::Replace); + toAtmPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("WHA",toString(wha)),Pvl::Replace); } else { - if (!toAtmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - HasKeyword("WHA")) { + if (!toAtmPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + hasKeyword("WHA")) { QString message = "The " + atmName + " Atmospheric model requires a value for the WHA parameter."; message += "The normal range for WHA is: 0 < WHA < 1"; throw IException(IException::User, message, _FILEINFO_); } } - atmLog += toAtmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm").FindKeyword("WHA"); + atmLog += toAtmPvl.findObject("AtmosphericModel").findGroup("Algorithm").findKeyword("WHA"); if (parMap.contains("NULNEG")) { if (parMap["NULNEG"].toStdString() == "YES") { - toAtmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("NULNEG","YES"),Pvl::Replace); + toAtmPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("NULNEG","YES"),Pvl::Replace); } else if (parMap["NULNEG"].toStdString() == "NO") { - toAtmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("NULNEG","NO"),Pvl::Replace); + toAtmPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("NULNEG","NO"),Pvl::Replace); } else { QString message = "The " + atmName + " Atmospheric model requires a value for the NULNEG parameter."; message += "The valid values for NULNEG are: YES, NO"; throw IException(IException::User, message, _FILEINFO_); } - } else if (!toAtmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - HasKeyword("NULNEG")) { + } else if (!toAtmPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + hasKeyword("NULNEG")) { if (ui.GetString("NULNEG") == "YES") { - toAtmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("NULNEG","YES"),Pvl::Replace); + toAtmPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("NULNEG","YES"),Pvl::Replace); } else if (ui.GetString("NULNEG") == "NO") { - toAtmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("NULNEG","NO"),Pvl::Replace); + toAtmPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("NULNEG","NO"),Pvl::Replace); } else { QString message = "The " + atmName + " Atmospheric model requires a value for the NULNEG parameter."; message += "The valid values for NULNEG are: YES, NO"; throw IException(IException::User, message, _FILEINFO_); } } - atmLog += toAtmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm").FindKeyword("NULNEG"); + atmLog += toAtmPvl.findObject("AtmosphericModel").findGroup("Algorithm").findKeyword("NULNEG"); } if (atmName == "ANISOTROPIC1" || atmName == "ANISOTROPIC2") { if (parMap.contains("BHA")) { - toAtmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("BHA",toString(toDouble(parMap["BHA"]))),Pvl::Replace); + toAtmPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("BHA",toString(toDouble(parMap["BHA"]))),Pvl::Replace); } else if (ui.WasEntered("BHA")) { QString keyval = ui.GetString("BHA"); double bha = toDouble(keyval); - toAtmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("BHA",toString(bha)),Pvl::Replace); + toAtmPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("BHA",toString(bha)),Pvl::Replace); } else { - if (!toAtmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - HasKeyword("BHA")) { + if (!toAtmPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + hasKeyword("BHA")) { QString message = "The " + atmName + " Atmospheric model requires a value for the BHA parameter."; message += "The normal range for BHA is: -1 <= BHA <= 1"; throw IException(IException::User, message, _FILEINFO_); } } - atmLog += toAtmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm").FindKeyword("BHA"); + atmLog += toAtmPvl.findObject("AtmosphericModel").findGroup("Algorithm").findKeyword("BHA"); } if (atmName == "HAPKEATM1" || atmName == "HAPKEATM2") { if (parMap.contains("HGA")) { - toAtmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("HGA",toString(toDouble(parMap["HGA"]))),Pvl::Replace); + toAtmPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("HGA",toString(toDouble(parMap["HGA"]))),Pvl::Replace); } else if (ui.WasEntered("HGA")) { QString keyval = ui.GetString("HGA"); double hga = toDouble(keyval); - toAtmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("HGA",toString(hga)),Pvl::Replace); + toAtmPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("HGA",toString(hga)),Pvl::Replace); } else { - if (!toAtmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - HasKeyword("HGA")) { + if (!toAtmPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + hasKeyword("HGA")) { QString message = "The " + atmName + " Atmospheric model requires a value for the HGA parameter."; message += "The normal range for HGA is: -1 < HGA < 1"; throw IException(IException::User, message, _FILEINFO_); } } - atmLog += toAtmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm").FindKeyword("HGA"); + atmLog += toAtmPvl.findObject("AtmosphericModel").findGroup("Algorithm").findKeyword("HGA"); } } Application::Log(atmLog); @@ -1383,15 +1383,15 @@ void IsisMain() { PvlObject fromPhtObj; PvlGroup fromPhtGrp; QString input = ui.GetFileName("FROMPVL"); - fromPhtPvl.Read(input); - if (fromPhtPvl.HasObject("PhotometricModel")) { - fromPhtObj = fromPhtPvl.FindObject("PhotometricModel"); - if (fromPhtObj.HasGroup("Algorithm")) { - PvlObject::PvlGroupIterator fromPhtGrp = fromPhtObj.BeginGroup(); - if (fromPhtGrp->HasKeyword("PHTNAME")) { - phtVal = (QString)fromPhtGrp->FindKeyword("PHTNAME"); - } else if (fromPhtGrp->HasKeyword("NAME")) { - phtVal = (QString)fromPhtGrp->FindKeyword("NAME"); + fromPhtPvl.read(input); + if (fromPhtPvl.hasObject("PhotometricModel")) { + fromPhtObj = fromPhtPvl.findObject("PhotometricModel"); + if (fromPhtObj.hasGroup("Algorithm")) { + PvlObject::PvlGroupIterator fromPhtGrp = fromPhtObj.beginGroup(); + if (fromPhtGrp->hasKeyword("PHTNAME")) { + phtVal = (QString)fromPhtGrp->findKeyword("PHTNAME"); + } else if (fromPhtGrp->hasKeyword("NAME")) { + phtVal = (QString)fromPhtGrp->findKeyword("NAME"); } else { phtVal = "NONE"; } @@ -1404,12 +1404,12 @@ void IsisMain() { wasFound = true; } if (!wasFound) { - while (fromPhtGrp != fromPhtObj.EndGroup()) { - if (fromPhtGrp->HasKeyword("PHTNAME") || fromPhtGrp->HasKeyword("NAME")) { - if (fromPhtGrp->HasKeyword("PHTNAME")) { - phtVal = (QString)fromPhtGrp->FindKeyword("PHTNAME"); - } else if (fromPhtGrp->HasKeyword("NAME")) { - phtVal = (QString)fromPhtGrp->FindKeyword("NAME"); + while (fromPhtGrp != fromPhtObj.endGroup()) { + if (fromPhtGrp->hasKeyword("PHTNAME") || fromPhtGrp->hasKeyword("NAME")) { + if (fromPhtGrp->hasKeyword("PHTNAME")) { + phtVal = (QString)fromPhtGrp->findKeyword("PHTNAME"); + } else if (fromPhtGrp->hasKeyword("NAME")) { + phtVal = (QString)fromPhtGrp->findKeyword("NAME"); } else { phtVal = "NONE"; } @@ -1437,12 +1437,12 @@ void IsisMain() { throw IException(IException::User, message, _FILEINFO_); } if (wasFound) { - toPhtPvl.AddObject(fromPhtObj); + toPhtPvl.addObject(fromPhtObj); } else { - toPhtPvl.AddObject(PvlObject("PhotometricModel")); - toPhtPvl.FindObject("PhotometricModel").AddGroup(PvlGroup("Algorithm")); - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("PHTNAME",phtName),Pvl::Replace); + toPhtPvl.addObject(PvlObject("PhotometricModel")); + toPhtPvl.findObject("PhotometricModel").addGroup(PvlGroup("Algorithm")); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("PHTNAME",phtName),Pvl::Replace); } } else { // Check to make sure that a photometric model was specified @@ -1452,89 +1452,89 @@ void IsisMain() { message += "you need to specify a Photometric model through the program interface."; throw IException(IException::User, message, _FILEINFO_); } - toPhtPvl.AddObject(PvlObject("PhotometricModel")); - toPhtPvl.FindObject("PhotometricModel").AddGroup(PvlGroup("Algorithm")); - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("PHTNAME",phtName),Pvl::Replace); + toPhtPvl.addObject(PvlObject("PhotometricModel")); + toPhtPvl.findObject("PhotometricModel").addGroup(PvlGroup("Algorithm")); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("PHTNAME",phtName),Pvl::Replace); } phtLog += PvlKeyword("PHTNAME", phtName); if (phtName == "HAPKEHEN" || phtName == "HAPKELEG") { if (parMap.contains("THETA")) { - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("THETA",toString(toDouble(parMap["THETA"]))),Pvl::Replace); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("THETA",toString(toDouble(parMap["THETA"]))),Pvl::Replace); } else if (ui.WasEntered("THETA")) { QString keyval = ui.GetString("THETA"); double theta = toDouble(keyval); - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("THETA",toString(theta)),Pvl::Replace); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("THETA",toString(theta)),Pvl::Replace); } else { - if (!toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - HasKeyword("THETA")) { + if (!toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + hasKeyword("THETA")) { QString message = "The " + phtName + " Photometric model requires a value for the THETA parameter."; message += "The normal range for THETA is: 0 <= THETA <= 90"; throw IException(IException::User, message, _FILEINFO_); } } - phtLog += toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm").FindKeyword("THETA"); + phtLog += toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm").findKeyword("THETA"); if (parMap.contains("WH")) { - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("WH",toString(toDouble(parMap["WH"]))),Pvl::Replace); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("WH",toString(toDouble(parMap["WH"]))),Pvl::Replace); } else if (ui.WasEntered("WH")) { QString keyval = ui.GetString("WH"); double wh = toDouble(keyval); - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("WH",toString(wh)),Pvl::Replace); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("WH",toString(wh)),Pvl::Replace); } else { - if (!toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - HasKeyword("WH")) { + if (!toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + hasKeyword("WH")) { QString message = "The " + phtName + " Photometric model requires a value for the WH parameter."; message += "The normal range for WH is: 0 < WH <= 1"; throw IException(IException::User, message, _FILEINFO_); } } - phtLog += toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm").FindKeyword("WH"); + phtLog += toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm").findKeyword("WH"); if (parMap.contains("HH")) { - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("HH",toString(toDouble(parMap["HH"]))),Pvl::Replace); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("HH",toString(toDouble(parMap["HH"]))),Pvl::Replace); } else if (ui.WasEntered("HH")) { QString keyval = ui.GetString("HH"); double hh = toDouble(keyval); - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("HH",toString(hh)),Pvl::Replace); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("HH",toString(hh)),Pvl::Replace); } else { - if (!toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - HasKeyword("HH")) { + if (!toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + hasKeyword("HH")) { QString message = "The " + phtName + " Photometric model requires a value for the HH parameter."; message += "The normal range for HH is: 0 <= HH"; throw IException(IException::User, message, _FILEINFO_); } } - phtLog += toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm").FindKeyword("HH"); + phtLog += toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm").findKeyword("HH"); if (parMap.contains("B0")) { - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("B0",toString(toDouble(parMap["B0"]))),Pvl::Replace); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("B0",toString(toDouble(parMap["B0"]))),Pvl::Replace); } else if (ui.WasEntered("B0")) { QString keyval = ui.GetString("B0"); double b0 = toDouble(keyval); - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("B0",toString(b0)),Pvl::Replace); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("B0",toString(b0)),Pvl::Replace); } else { - if (!toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - HasKeyword("B0")) { + if (!toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + hasKeyword("B0")) { QString message = "The " + phtName + " Photometric model requires a value for the B0 parameter."; message += "The normal range for B0 is: 0 <= B0"; throw IException(IException::User, message, _FILEINFO_); } } - phtLog += toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm").FindKeyword("B0"); + phtLog += toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm").findKeyword("B0"); if (parMap.contains("ZEROB0STANDARD")) { if (parMap["ZEROB0STANDARD"].toStdString() == "TRUE") { - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("ZEROB0STANDARD","TRUE"),Pvl::Replace); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("ZEROB0STANDARD","TRUE"),Pvl::Replace); } else if (parMap["ZEROB0STANDARD"].toStdString() == "FALSE") { - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("ZEROB0STANDARD","FALSE"),Pvl::Replace); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("ZEROB0STANDARD","FALSE"),Pvl::Replace); } else { QString message = "The " + phtName + " Photometric model requires a value for the ZEROB0STANDARD parameter."; message += "The valid values for ZEROB0STANDARD are: TRUE, FALSE"; @@ -1542,18 +1542,18 @@ void IsisMain() { } } else if (ui.GetString("ZEROB0STANDARD") != "READFROMPVL") { if (ui.GetString("ZEROB0STANDARD") == "TRUE") { - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("ZEROB0STANDARD","TRUE"),Pvl::Replace); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("ZEROB0STANDARD","TRUE"),Pvl::Replace); } else if (ui.GetString("ZEROB0STANDARD") == "FALSE") { - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("ZEROB0STANDARD","FALSE"),Pvl::Replace); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("ZEROB0STANDARD","FALSE"),Pvl::Replace); } - } else if (!toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - HasKeyword("ZEROB0STANDARD")) { - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("ZEROB0STANDARD","TRUE"),Pvl::Replace); + } else if (!toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + hasKeyword("ZEROB0STANDARD")) { + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("ZEROB0STANDARD","TRUE"),Pvl::Replace); } - QString zerob0 = (QString)toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm").FindKeyword("ZEROB0STANDARD"); + QString zerob0 = (QString)toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm").findKeyword("ZEROB0STANDARD"); QString izerob0 = zerob0; izerob0 = izerob0.toUpper(); if (izerob0 != "TRUE" && izerob0 != "FALSE") { @@ -1561,193 +1561,193 @@ void IsisMain() { message += "The valid values for ZEROB0STANDARD are: TRUE, FALSE"; throw IException(IException::User, message, _FILEINFO_); } - phtLog += toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm").FindKeyword("ZEROB0STANDARD"); + phtLog += toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm").findKeyword("ZEROB0STANDARD"); if (phtName == "HAPKEHEN") { if (parMap.contains("HG1")) { - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("HG1",toString(toDouble(parMap["HG1"]))),Pvl::Replace); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("HG1",toString(toDouble(parMap["HG1"]))),Pvl::Replace); } else if (ui.WasEntered("HG1")) { QString keyval = ui.GetString("HG1"); double hg1 = toDouble(keyval); - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("HG1",toString(hg1)),Pvl::Replace); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("HG1",toString(hg1)),Pvl::Replace); } else { - if (!toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - HasKeyword("HG1")) { + if (!toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + hasKeyword("HG1")) { QString message = "The " + phtName + " Photometric model requires a value for the HG1 parameter."; message += "The normal range for HG1 is: -1 < HG1 < 1"; throw IException(IException::User, message, _FILEINFO_); } } - phtLog += toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm").FindKeyword("HG1"); + phtLog += toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm").findKeyword("HG1"); if (parMap.contains("HG2")) { - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("HG2",toString(toDouble(parMap["HG2"]))),Pvl::Replace); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("HG2",toString(toDouble(parMap["HG2"]))),Pvl::Replace); } else if (ui.WasEntered("HG2")) { QString keyval = ui.GetString("HG2"); double hg2 = toDouble(keyval); - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("HG2",toString(hg2)),Pvl::Replace); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("HG2",toString(hg2)),Pvl::Replace); } else { - if (!toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - HasKeyword("HG2")) { + if (!toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + hasKeyword("HG2")) { QString message = "The " + phtName + " Photometric model requires a value for the HG2 parameter."; message += "The normal range for HG2 is: 0 <= HG2 <= 1"; throw IException(IException::User, message, _FILEINFO_); } } - phtLog += toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm").FindKeyword("HG2"); + phtLog += toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm").findKeyword("HG2"); } else { if (parMap.contains("BH")) { - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("BH",toString(toDouble(parMap["BH"]))),Pvl::Replace); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("BH",toString(toDouble(parMap["BH"]))),Pvl::Replace); } else if (ui.WasEntered("BH")) { QString keyval = ui.GetString("BH"); double bh = toDouble(keyval); - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("BH",toString(bh)),Pvl::Replace); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("BH",toString(bh)),Pvl::Replace); } else { - if (!toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - HasKeyword("BH")) { + if (!toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + hasKeyword("BH")) { QString message = "The " + phtName + " Photometric model requires a value for the BH parameter."; message += "The normal range for BH is: -1 <= BH <= 1"; throw IException(IException::User, message, _FILEINFO_); } } - phtLog += toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm").FindKeyword("BH"); + phtLog += toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm").findKeyword("BH"); if (parMap.contains("CH")) { - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("CH",toString(toDouble(parMap["CH"]))),Pvl::Replace); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("CH",toString(toDouble(parMap["CH"]))),Pvl::Replace); } else if (ui.WasEntered("CH")) { QString keyval = ui.GetString("CH"); double ch = toDouble(keyval); - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("CH",toString(ch)),Pvl::Replace); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("CH",toString(ch)),Pvl::Replace); } else { - if (!toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - HasKeyword("CH")) { + if (!toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + hasKeyword("CH")) { QString message = "The " + phtName + " Photometric model requires a value for the CH parameter."; message += "The normal range for CH is: -1 <= CH <= 1"; throw IException(IException::User, message, _FILEINFO_); } } - phtLog += toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm").FindKeyword("CH"); + phtLog += toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm").findKeyword("CH"); } } else if (phtName == "LUNARLAMBERTEMPIRICAL" || phtName == "MINNAERTEMPIRICAL") { if (parMap.contains("PHASELIST")) { - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("PHASELIST",parMap["PHASELIST"]),Pvl::Replace); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("PHASELIST",parMap["PHASELIST"]),Pvl::Replace); } else if (ui.WasEntered("PHASELIST")) { QString keyval = ui.GetString("PHASELIST"); - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("PHASELIST",keyval),Pvl::Replace); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("PHASELIST",keyval),Pvl::Replace); } else { - if (!toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - HasKeyword("PHASELIST")) { + if (!toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + hasKeyword("PHASELIST")) { QString message = "The " + phtName + " Photometric model requires a value for the PHASELIST parameter."; throw IException(IException::User, message, _FILEINFO_); } } - phtLog += toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm").FindKeyword("PHASELIST"); + phtLog += toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm").findKeyword("PHASELIST"); if (parMap.contains("PHASECURVELIST")) { - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("PHASECURVELIST",parMap["PHASECURVELIST"]),Pvl::Replace); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("PHASECURVELIST",parMap["PHASECURVELIST"]),Pvl::Replace); } else if (ui.WasEntered("PHASECURVELIST")) { QString keyval = ui.GetString("PHASECURVELIST"); - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("PHASECURVELIST",keyval),Pvl::Replace); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("PHASECURVELIST",keyval),Pvl::Replace); } else { - if (!toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - HasKeyword("PHASECURVELIST")) { + if (!toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + hasKeyword("PHASECURVELIST")) { QString message = "The " + phtName + " Photometric model requires a value for the PHASECURVELIST parameter."; throw IException(IException::User, message, _FILEINFO_); } } - phtLog += toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm").FindKeyword("PHASECURVELIST"); + phtLog += toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm").findKeyword("PHASECURVELIST"); if (phtName == "LUNARLAMBERTEMPIRICAL") { if (parMap.contains("LLIST")) { - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("LLIST",parMap["LLIST"]),Pvl::Replace); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("LLIST",parMap["LLIST"]),Pvl::Replace); } else if (ui.WasEntered("LLIST")) { QString keyval = ui.GetString("LLIST"); - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("LLIST",keyval),Pvl::Replace); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("LLIST",keyval),Pvl::Replace); } else { - if (!toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - HasKeyword("LLIST")) { + if (!toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + hasKeyword("LLIST")) { QString message = "The " + phtName + " Photometric model requires a value for the LLIST parameter."; throw IException(IException::User, message, _FILEINFO_); } } - phtLog += toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm").FindKeyword("LLIST"); + phtLog += toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm").findKeyword("LLIST"); } else { if (parMap.contains("KLIST")) { - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("KLIST",parMap["KLIST"]),Pvl::Replace); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("KLIST",parMap["KLIST"]),Pvl::Replace); } else if (ui.WasEntered("KLIST")) { QString keyval = ui.GetString("KLIST"); - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("KLIST",keyval),Pvl::Replace); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("KLIST",keyval),Pvl::Replace); } else { - if (!toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - HasKeyword("KLIST")) { + if (!toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + hasKeyword("KLIST")) { QString message = "The " + phtName + " Photometric model requires a value for the KLIST parameter."; throw IException(IException::User, message, _FILEINFO_); } } - phtLog += toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm").FindKeyword("KLIST"); + phtLog += toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm").findKeyword("KLIST"); } } else if (phtName == "LUNARLAMBERT") { if (parMap.contains("L")) { - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("L",toString(toDouble(parMap["L"]))),Pvl::Replace); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("L",toString(toDouble(parMap["L"]))),Pvl::Replace); } else if (ui.WasEntered("L")) { QString keyval = ui.GetString("L"); double l = toDouble(keyval); - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("L",toString(l)),Pvl::Replace); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("L",toString(l)),Pvl::Replace); } else { - if (!toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - HasKeyword("L")) { + if (!toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + hasKeyword("L")) { QString message = "The " + phtName + " Photometric model requires a value for the L parameter."; message += "The L parameter has no limited range"; throw IException(IException::User, message, _FILEINFO_); } } - phtLog += toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm").FindKeyword("L"); + phtLog += toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm").findKeyword("L"); } else if (phtName == "MINNAERT") { if (parMap.contains("K")) { - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("K",toString(toDouble(parMap["K"]))),Pvl::Replace); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("K",toString(toDouble(parMap["K"]))),Pvl::Replace); } else if (ui.WasEntered("K")) { QString keyval = ui.GetString("K"); double k = toDouble(keyval); - toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("K",toString(k)),Pvl::Replace); + toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("K",toString(k)),Pvl::Replace); } else { - if (!toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - HasKeyword("K")) { + if (!toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm"). + hasKeyword("K")) { QString message = "The " + phtName + " Photometric model requires a value for the K parameter."; message += "The normal range for K is: 0 <= K"; throw IException(IException::User, message, _FILEINFO_); } } - phtLog += toPhtPvl.FindObject("PhotometricModel").FindGroup("Algorithm").FindKeyword("K"); + phtLog += toPhtPvl.findObject("PhotometricModel").findGroup("Algorithm").findKeyword("K"); } Application::Log(phtLog); - PvlObject normObj = toNormPvl.FindObject("NormalizationModel"); - PvlObject phtObj = toPhtPvl.FindObject("PhotometricModel"); + PvlObject normObj = toNormPvl.findObject("NormalizationModel"); + PvlObject phtObj = toPhtPvl.findObject("PhotometricModel"); PvlObject atmObj; if (normName == "ALBEDOATM" || normName == "SHADEATM" || normName == "TOPOATM") { - atmObj = toAtmPvl.FindObject("AtmosphericModel"); + atmObj = toAtmPvl.findObject("AtmosphericModel"); } Pvl par; - par.AddObject(normObj); - par.AddObject(phtObj); + par.addObject(normObj); + par.addObject(phtObj); if (normName == "ALBEDOATM" || normName == "SHADEATM" || normName == "TOPOATM") { - par.AddObject(atmObj); + par.addObject(atmObj); } // Set value for maximum emission/incidence angles chosen by user @@ -1773,7 +1773,7 @@ void IsisMain() { p.SetOutputCube("TO"); Pvl inLabel; - inLabel.Read(ui.GetFileName("FROM")); + inLabel.read(ui.GetFileName("FROM")); // If the source of photometric angles is the center of the image, // then get the angles at the center of the image. @@ -1784,9 +1784,9 @@ void IsisMain() { centerEmission = cam->EmissionAngle(); } else if (angleSource == "CENTER_FROM_LABEL") { - centerPhase = inLabel.FindKeyword("PhaseAngle", Pvl::Traverse); - centerIncidence = inLabel.FindKeyword("IncidenceAngle", Pvl::Traverse); - centerEmission = inLabel.FindKeyword("EmissionAngle", Pvl::Traverse); + centerPhase = inLabel.findKeyword("PhaseAngle", Pvl::Traverse); + centerIncidence = inLabel.findKeyword("IncidenceAngle", Pvl::Traverse); + centerEmission = inLabel.findKeyword("EmissionAngle", Pvl::Traverse); } else if (angleSource == "CENTER_FROM_USER") { centerPhase = ui.GetDouble("PHASE_ANGLE"); @@ -1826,10 +1826,10 @@ void IsisMain() { } // Get the BandBin Center from the image - PvlGroup pvlg = inLabel.FindGroup("BandBin", Pvl::Traverse); + PvlGroup pvlg = inLabel.findGroup("BandBin", Pvl::Traverse); double wl; - if(pvlg.HasKeyword("Center")) { - PvlKeyword &wavelength = pvlg.FindKeyword("Center"); + if(pvlg.hasKeyword("Center")) { + PvlKeyword &wavelength = pvlg.findKeyword("Center"); wl = toDouble(wavelength[0]); } else { @@ -1837,9 +1837,9 @@ void IsisMain() { } // Create the photometry object and set the wavelength - PvlGroup &algo = par.FindObject("NormalizationModel").FindGroup("Algorithm", Pvl::Traverse); - if(!algo.HasKeyword("Wl")) { - algo.AddKeyword(Isis::PvlKeyword("Wl", toString(wl))); + PvlGroup &algo = par.findObject("NormalizationModel").findGroup("Algorithm", Pvl::Traverse); + if(!algo.hasKeyword("Wl")) { + algo.addKeyword(Isis::PvlKeyword("Wl", toString(wl))); } pho = new Photometry(par); pho->SetPhotomWl(wl); diff --git a/isis/src/base/apps/pvldiff/pvldiff.cpp b/isis/src/base/apps/pvldiff/pvldiff.cpp index e4a773abc8d328b11bfe3fd81ab74ece514d805f..05f6ddd3f8957fc6eaa517e398f9a2c052f5deee 100644 --- a/isis/src/base/apps/pvldiff/pvldiff.cpp +++ b/isis/src/base/apps/pvldiff/pvldiff.cpp @@ -34,12 +34,12 @@ void IsisMain() { if(ui.WasEntered("DIFF")) { Pvl diffFile(ui.GetFileName("DIFF")); - if(diffFile.HasGroup("Tolerances")) { - tolerances = diffFile.FindGroup("Tolerances"); + if(diffFile.hasGroup("Tolerances")) { + tolerances = diffFile.findGroup("Tolerances"); } - if(diffFile.HasGroup("IgnoreKeys")) { - ignorekeys = diffFile.FindGroup("IgnoreKeys"); + if(diffFile.hasGroup("IgnoreKeys")) { + ignorekeys = diffFile.findGroup("IgnoreKeys"); } } @@ -58,79 +58,79 @@ void IsisMain() { if(ui.WasEntered("TO")) { Pvl out; - out.AddGroup(differences); - out.Write(ui.GetFileName("TO")); + out.addGroup(differences); + out.write(ui.GetFileName("TO")); } differenceReason = ""; } void CompareKeywords(const PvlKeyword &pvl1, const PvlKeyword &pvl2) { - if(pvl1.Name().compare(pvl2.Name()) != 0) { + if(pvl1.name().compare(pvl2.name()) != 0) { filesMatch = false; - differenceReason = "Keyword '" + pvl1.Name() + "' does not match keyword '" + pvl2.Name() + "'"; + differenceReason = "Keyword '" + pvl1.name() + "' does not match keyword '" + pvl2.name() + "'"; } - if(pvl1.Size() != pvl2.Size()) { + if(pvl1.size() != pvl2.size()) { filesMatch = false; - differenceReason = "Keyword '" + pvl1.Name() + "' size does not match."; + differenceReason = "Keyword '" + pvl1.name() + "' size does not match."; return; } - if(tolerances.HasKeyword(pvl1.Name()) && - tolerances[pvl1.Name()].Size() > 1 && - pvl1.Size() != tolerances[pvl1.Name()].Size()) { - QString msg = "Size of keyword '" + pvl1.Name() + "' does not match with "; + if(tolerances.hasKeyword(pvl1.name()) && + tolerances[pvl1.name()].size() > 1 && + pvl1.size() != tolerances[pvl1.name()].size()) { + QString msg = "Size of keyword '" + pvl1.name() + "' does not match with "; msg += "its number of tolerances in the DIFF file."; throw IException(IException::User, msg, _FILEINFO_); } - if(ignorekeys.HasKeyword(pvl1.Name()) && - ignorekeys[pvl1.Name()].Size() > 1 && - pvl1.Size() != ignorekeys[pvl1.Name()].Size()) { - QString msg = "Size of keyword '" + pvl1.Name() + "' does not match with "; + if(ignorekeys.hasKeyword(pvl1.name()) && + ignorekeys[pvl1.name()].size() > 1 && + pvl1.size() != ignorekeys[pvl1.name()].size()) { + QString msg = "Size of keyword '" + pvl1.name() + "' does not match with "; msg += "its number of ignore keys in the DIFF file."; throw IException(IException::User, msg, _FILEINFO_); } - for(int i = 0; i < pvl1.Size() && filesMatch; i++) { + for(int i = 0; i < pvl1.size() && filesMatch; i++) { QString val1 = pvl1[i]; QString val2 = pvl2[i]; - QString unit1 = pvl1.Unit(i); - QString unit2 = pvl2.Unit(i); + QString unit1 = pvl1.unit(i); + QString unit2 = pvl2.unit(i); int ignoreIndex = 0; - if(ignorekeys.HasKeyword(pvl1.Name()) && ignorekeys[pvl1.Name()].Size() > 1) { + if(ignorekeys.hasKeyword(pvl1.name()) && ignorekeys[pvl1.name()].size() > 1) { ignoreIndex = i; } try { - if(!ignorekeys.HasKeyword(pvl1.Name()) || - ignorekeys[pvl1.Name()][ignoreIndex] == "false") { + if(!ignorekeys.hasKeyword(pvl1.name()) || + ignorekeys[pvl1.name()][ignoreIndex] == "false") { if(unit1.toLower() != unit2.toLower()) { filesMatch = false; - differenceReason = "Keyword '" + pvl1.Name() + "': units do not match."; + differenceReason = "Keyword '" + pvl1.name() + "': units do not match."; return; } double tolerance = 0.0; double difference = abs(toDouble(val1) - toDouble(val2)); - if(tolerances.HasKeyword(pvl1.Name())) { + if(tolerances.hasKeyword(pvl1.name())) { tolerance = toDouble( - (tolerances[pvl1.Name()].Size() == 1) ? - tolerances[pvl1.Name()][0] : tolerances[pvl1.Name()][i]); + (tolerances[pvl1.name()].size() == 1) ? + tolerances[pvl1.name()][0] : tolerances[pvl1.name()][i]); } if(difference > tolerance) { filesMatch = false; - if(pvl1.Size() == 1) { - differenceReason = "Keyword '" + pvl1.Name() + "': difference is " + + if(pvl1.size() == 1) { + differenceReason = "Keyword '" + pvl1.name() + "': difference is " + toString(difference); } else { - differenceReason = "Keyword '" + pvl1.Name() + "' at index " + + differenceReason = "Keyword '" + pvl1.name() + "' at index " + toString(i) + ": difference is " + toString(difference); } differenceReason += " (tolerance is " + toString(tolerance) + ")"; @@ -140,7 +140,7 @@ void CompareKeywords(const PvlKeyword &pvl1, const PvlKeyword &pvl2) { catch(IException &) { if(val1.toLower() != val2.toLower()) { filesMatch = false; - differenceReason = "Keyword '" + pvl1.Name() + "': values do not " + differenceReason = "Keyword '" + pvl1.name() + "': values do not " "match."; } } @@ -148,59 +148,59 @@ void CompareKeywords(const PvlKeyword &pvl1, const PvlKeyword &pvl2) { } void CompareObjects(const PvlObject &pvl1, const PvlObject &pvl2) { - if(pvl1.Name().compare(pvl2.Name()) != 0) { + if(pvl1.name().compare(pvl2.name()) != 0) { filesMatch = false; - differenceReason = "Object " + pvl1.Name() + " does not match " + - pvl2.Name(); + differenceReason = "Object " + pvl1.name() + " does not match " + + pvl2.name(); } - if(pvl1.Keywords() != pvl2.Keywords()) { + if(pvl1.keywords() != pvl2.keywords()) { filesMatch = false; - differenceReason = "Object " + pvl1.Name() + " has varying keyword counts."; + differenceReason = "Object " + pvl1.name() + " has varying keyword counts."; } - if(pvl1.Groups() != pvl2.Groups()) { + if(pvl1.groups() != pvl2.groups()) { filesMatch = false; - differenceReason = "Object " + pvl1.Name() + " has varying group counts."; + differenceReason = "Object " + pvl1.name() + " has varying group counts."; } - if(pvl1.Objects() != pvl2.Objects()) { + if(pvl1.objects() != pvl2.objects()) { filesMatch = false; - differenceReason = "Object " + pvl1.Name() + " has varying object counts."; + differenceReason = "Object " + pvl1.name() + " has varying object counts."; } if(!filesMatch) { return; } - for(int keyword = 0; keyword < pvl1.Keywords() && filesMatch; keyword++) { + for(int keyword = 0; keyword < pvl1.keywords() && filesMatch; keyword++) { CompareKeywords(pvl1[keyword], pvl2[keyword]); } - for(int object = 0; object < pvl1.Objects() && filesMatch; object++) { - CompareObjects(pvl1.Object(object), pvl2.Object(object)); + for(int object = 0; object < pvl1.objects() && filesMatch; object++) { + CompareObjects(pvl1.object(object), pvl2.object(object)); } - for(int group = 0; group < pvl1.Groups() && filesMatch; group++) { - CompareGroups(pvl1.Group(group), pvl2.Group(group)); + for(int group = 0; group < pvl1.groups() && filesMatch; group++) { + CompareGroups(pvl1.group(group), pvl2.group(group)); } - if(!filesMatch && pvl1.Name().compare("Root") != 0) { - differenceReason = "Object " + pvl1.Name() + ": " + differenceReason; + if(!filesMatch && pvl1.name().compare("Root") != 0) { + differenceReason = "Object " + pvl1.name() + ": " + differenceReason; } } void CompareGroups(const PvlGroup &pvl1, const PvlGroup &pvl2) { - if(pvl1.Keywords() != pvl2.Keywords()) { + if(pvl1.keywords() != pvl2.keywords()) { filesMatch = false; return; } - for(int keyword = 0; keyword < pvl1.Keywords() && filesMatch; keyword++) { + for(int keyword = 0; keyword < pvl1.keywords() && filesMatch; keyword++) { CompareKeywords(pvl1[keyword], pvl2[keyword]); } if(!filesMatch) { - differenceReason = "Group " + pvl1.Name() + ": " + differenceReason; + differenceReason = "Group " + pvl1.name() + ": " + differenceReason; } } diff --git a/isis/src/base/apps/remrx/remrx.cpp b/isis/src/base/apps/remrx/remrx.cpp index 8a78544a36986e8acb03f50b90677b9059af2ec4..f3b53c49875e5bb61d48e4cb996702944430c4f3 100644 --- a/isis/src/base/apps/remrx/remrx.cpp +++ b/isis/src/base/apps/remrx/remrx.cpp @@ -62,14 +62,14 @@ void IsisMain() { Cube cube; cube.open(out, "rw"); - PvlGroup &res = cube.label()->FindGroup("RESEAUS", Pvl::Traverse); + PvlGroup &res = cube.label()->findGroup("RESEAUS", Pvl::Traverse); // Get reseau line, sample, type, and valid Keywords - PvlKeyword lines = res.FindKeyword("LINE"); - PvlKeyword samps = res.FindKeyword("SAMPLE"); - PvlKeyword type = res.FindKeyword("TYPE"); - PvlKeyword valid = res.FindKeyword("VALID"); - int numres = lines.Size(); + PvlKeyword lines = res.findKeyword("LINE"); + PvlKeyword samps = res.findKeyword("SAMPLE"); + PvlKeyword type = res.findKeyword("TYPE"); + PvlKeyword valid = res.findKeyword("VALID"); + int numres = lines.size(); Brick brick(sdim, ldim, 1, cube.pixelType()); for(int res = 0; res < numres; res++) { diff --git a/isis/src/base/apps/shade/shade.cpp b/isis/src/base/apps/shade/shade.cpp index cad86f918e29d1eed6abf183f77adea375b6f36a..8afa4da542862cc05568931018d716484c94f97d 100644 --- a/isis/src/base/apps/shade/shade.cpp +++ b/isis/src/base/apps/shade/shade.cpp @@ -37,9 +37,9 @@ void IsisMain() { hillshade.setResolution(ui.GetDouble("PIXELRESOL")); } else { - if(inCube->label()->FindObject("IsisCube").HasGroup("Mapping")) { + if(inCube->label()->findObject("IsisCube").hasGroup("Mapping")) { hillshade.setResolution( - inCube->label()->FindObject("IsisCube").FindGroup("Mapping")["PixelResolution"]); + inCube->label()->findObject("IsisCube").findGroup("Mapping")["PixelResolution"]); } else { QString msg = "The file [" + ui.GetFileName("FROM") + "] does not have a mapping group," diff --git a/isis/src/base/apps/shadow/ShadowFunctor.cpp b/isis/src/base/apps/shadow/ShadowFunctor.cpp index 20855a11e80878cc3bdb73ad7d8a199e2fa36a60..1d1d747dc843292fa3c1c3928780b6c8926d7f1f 100644 --- a/isis/src/base/apps/shadow/ShadowFunctor.cpp +++ b/isis/src/base/apps/shadow/ShadowFunctor.cpp @@ -144,7 +144,7 @@ namespace Isis { if (m_azimuthStats->ValidPixels() > 0) { PvlKeyword averageAzimuth("AverageAzimuth", toString(m_azimuthStats->Average())); - averageAzimuth.AddCommentWrapped("The azimuth is measured from three o'clock, going " + averageAzimuth.addCommentWrapped("The azimuth is measured from three o'clock, going " "clockwise, in degrees"); shadowStats += averageAzimuth; @@ -152,7 +152,7 @@ namespace Isis { shadowStats += PvlKeyword("MaximumAzimuth", toString(m_azimuthStats->Maximum())); PvlKeyword averageElevation("AverageElevation", toString(m_elevationStats->Average())); - averageElevation.AddCommentWrapped("The elevation is measured from the normal, with directly " + averageElevation.addCommentWrapped("The elevation is measured from the normal, with directly " "overhead being 0 degrees and the horizon 90 degrees. Elevations are prevented from " "going below the horizon."); shadowStats += averageElevation; @@ -162,7 +162,7 @@ namespace Isis { } PvlKeyword numRays("NumRays", toString(m_rayLengthStats->ValidPixels())); - numRays.AddCommentWrapped("This is the total number of rays traced from the surface towards " + numRays.addCommentWrapped("This is the total number of rays traced from the surface towards " "the sun in order to detect if any given pixel is in shadow"); shadowStats += numRays; diff --git a/isis/src/base/apps/shadow/shadow.cpp b/isis/src/base/apps/shadow/shadow.cpp index f0d724ec065d28add0404c371d843b1409afefb9..c1fe0df9e67ba6b62dc9dc5476a09b92bfbef099 100644 --- a/isis/src/base/apps/shadow/shadow.cpp +++ b/isis/src/base/apps/shadow/shadow.cpp @@ -27,7 +27,7 @@ void IsisMain() { ShadowFunctor functor(demCube); PvlKeyword kernelsUsed("Kernels"); - kernelsUsed.AddCommentWrapped("These NAIF kernels were furnished in order to compute the " + kernelsUsed.addCommentWrapped("These NAIF kernels were furnished in order to compute the " "position of the sun relative to the DEM's target body, in the " "target body's reference frame. For more information, please see " "http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/" @@ -50,7 +50,7 @@ void IsisMain() { } // Find the NAIF target code for the DEM's target - QString name = demCube->label()->FindGroup("Mapping", Pvl::Traverse)["TargetName"]; + QString name = demCube->label()->findGroup("Mapping", Pvl::Traverse)["TargetName"]; SpiceDouble sunPosition[3]; SpiceDouble lightTime; @@ -114,7 +114,7 @@ void IsisMain() { PvlGroup functorLogData = functor.report(); - if (kernelsUsed.Size()) { + if (kernelsUsed.size()) { functorLogData += kernelsUsed; } @@ -122,12 +122,12 @@ void IsisMain() { // Look for shape model object and remove it from output Pvl &outputCubeLabel = *outputCube->label(); - for (int objectIndex = 0; objectIndex < outputCubeLabel.Objects(); objectIndex++) { - PvlObject &object = outputCubeLabel.Object(objectIndex); + for (int objectIndex = 0; objectIndex < outputCubeLabel.objects(); objectIndex++) { + PvlObject &object = outputCubeLabel.object(objectIndex); - if (object.IsNamed("Table") && object.HasKeyword("Name") && + if (object.isNamed("Table") && object.hasKeyword("Name") && object["Name"][0] == "ShapeModelStatistics") { - outputCubeLabel.DeleteObject(objectIndex); + outputCubeLabel.deleteObject(objectIndex); } } } diff --git a/isis/src/base/apps/shadowtau/shadowtau.cpp b/isis/src/base/apps/shadowtau/shadowtau.cpp index 8392a2be13840a65a0c6a185b80ddb2c8c268444..27498b30f621238871d3bf5afeaebf459142de92 100644 --- a/isis/src/base/apps/shadowtau/shadowtau.cpp +++ b/isis/src/base/apps/shadowtau/shadowtau.cpp @@ -84,68 +84,68 @@ void IsisMain() { // Should contains parameter names matching GUI not to be inclusiond // in the Pvl defFile Pvl photoPvl; - photoPvl.AddObject(PvlObject("PhotometricModel")); - photoPvl.FindObject("PhotometricModel").AddGroup(PvlGroup("Algorithm")); - photoPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("PHTNAME",sPhotoFunc),Pvl::Replace); + photoPvl.addObject(PvlObject("PhotometricModel")); + photoPvl.findObject("PhotometricModel").addGroup(PvlGroup("Algorithm")); + photoPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("PHTNAME",sPhotoFunc),Pvl::Replace); if (sPhotoFunc == "HAPKEHEN" || sPhotoFunc == "HAPKELEG") { // Single Particle Phase Function HENYEY-GREENSTEIN if (ui.WasEntered("WH")) { QString keyval = ui.GetString("WH"); double wh = toDouble(keyval); - photoPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("WH",toString(wh)),Pvl::Replace); + photoPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("WH",toString(wh)),Pvl::Replace); } if (ui.WasEntered("HH")) { QString keyval = ui.GetString("HH"); double hh = toDouble(keyval); - photoPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("HH",toString(hh)),Pvl::Replace); + photoPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("HH",toString(hh)),Pvl::Replace); } if (ui.WasEntered("B0")) { QString keyval = ui.GetString("B0"); double b0 = toDouble(keyval); - photoPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("B0",toString(b0)),Pvl::Replace); + photoPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("B0",toString(b0)),Pvl::Replace); } if (ui.WasEntered("THETA")) { QString keyval = ui.GetString("THETA"); double theta = toDouble(keyval); - photoPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("THETA",toString(theta)),Pvl::Replace); + photoPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("THETA",toString(theta)),Pvl::Replace); } if (ui.WasEntered("ZEROB0STANDARD")) { QString keyval = ui.GetString("ZEROB0STANDARD"); keyval = keyval.toUpper(); - photoPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("ZEROB0STANDARD",keyval),Pvl::Replace); + photoPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("ZEROB0STANDARD",keyval),Pvl::Replace); } if (sPhotoFunc == "HAPKEHEN") { if (ui.WasEntered("HG1")) { QString keyval = ui.GetString("HG1"); double hg1 = toDouble(keyval); - photoPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("HG1",toString(hg1)),Pvl::Replace); + photoPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("HG1",toString(hg1)),Pvl::Replace); } if (ui.WasEntered("HG2")) { QString keyval = ui.GetString("HG2"); double hg2 = toDouble(keyval); - photoPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("HG2",toString(hg2)),Pvl::Replace); + photoPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("HG2",toString(hg2)),Pvl::Replace); } } else { if (ui.WasEntered("BH")) { QString keyval = ui.GetString("BH"); double bh = toDouble(keyval); - photoPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("BH",toString(bh)),Pvl::Replace); + photoPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("BH",toString(bh)),Pvl::Replace); } if (ui.WasEntered("CH")) { QString keyval = ui.GetString("CH"); double ch = toDouble(keyval); - photoPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("CH",toString(ch)),Pvl::Replace); + photoPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("CH",toString(ch)),Pvl::Replace); } } } @@ -153,16 +153,16 @@ void IsisMain() { if (ui.WasEntered("L")) { QString keyval = ui.GetString("L"); double l = toDouble(keyval); - photoPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("L",toString(l)),Pvl::Replace); + photoPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("L",toString(l)),Pvl::Replace); } } else if (sPhotoFunc == "MINNAERT") { if (ui.WasEntered("K")) { QString keyval = ui.GetString("K"); double k = toDouble(keyval); - photoPvl.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("K",toString(k)),Pvl::Replace); + photoPvl.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("K",toString(k)),Pvl::Replace); } } @@ -170,7 +170,7 @@ void IsisMain() { photoModel = PhotoModelFactory::Create(photoPvl); // Log the Hapke Def File - PvlGroup hapkeGrp = photoPvl.FindObject("PhotometricModel").FindGroup("Algorithm"); + PvlGroup hapkeGrp = photoPvl.findObject("PhotometricModel").findGroup("Algorithm"); Application::Log(hapkeGrp); //datafile':get data file only for photometric functions that need it @@ -184,48 +184,48 @@ void IsisMain() { sAsmType = sAsmType.toUpper(); Pvl asmPvl; - asmPvl.AddObject(PvlObject("AtmosphericModel")); - asmPvl.FindObject("AtmosphericModel").AddGroup(PvlGroup("Algorithm")); - asmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("ATMNAME",sAsmType),Pvl::Replace); + asmPvl.addObject(PvlObject("AtmosphericModel")); + asmPvl.findObject("AtmosphericModel").addGroup(PvlGroup("Algorithm")); + asmPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("ATMNAME",sAsmType),Pvl::Replace); if (ui.WasEntered("WHA")) { QString keyval = ui.GetString("WHA"); double wha = toDouble(keyval); - asmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("WHA",toString(wha)),Pvl::Replace); + asmPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("WHA",toString(wha)),Pvl::Replace); } if (ui.WasEntered("HNORM")) { QString keyval = ui.GetString("HNORM"); double hnorm = toDouble(keyval); - asmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("HNORM",toString(hnorm)),Pvl::Replace); + asmPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("HNORM",toString(hnorm)),Pvl::Replace); } if (sAsmType=="ANISOTROPIC1" || sAsmType=="ANISOTROPIC2" ){ if (ui.WasEntered("BHA")) { QString keyval = ui.GetString("BHA"); double bha = toDouble(keyval); - asmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("BHA",toString(bha)),Pvl::Replace); + asmPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("BHA",toString(bha)),Pvl::Replace); } } else if (sAsmType=="HAPKEATM1" || sAsmType=="HAPKEATM2" ) { if (ui.WasEntered("HGA")) { QString keyval = ui.GetString("HGA"); double hga = toDouble(keyval); - asmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("HGA",toString(hga)),Pvl::Replace); + asmPvl.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("HGA",toString(hga)),Pvl::Replace); } } AtmosModel *asmModel=NULL; // Make sure that optical depth estimation is turned on - asmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm").AddKeyword(PvlKeyword("EstTau", "YES"), Pvl::Replace); + asmPvl.findObject("AtmosphericModel").findGroup("Algorithm").addKeyword(PvlKeyword("EstTau", "YES"), Pvl::Replace); // Log the AtmosphericModel Def File - PvlGroup asmGrp = asmPvl.FindObject("AtmosphericModel").FindGroup("Algorithm"); + PvlGroup asmGrp = asmPvl.findObject("AtmosphericModel").findGroup("Algorithm"); Application::Log(asmGrp); asmModel = AtmosModelFactory::Create(asmPvl, *photoModel); diff --git a/isis/src/base/apps/skymap/skymap.cpp b/isis/src/base/apps/skymap/skymap.cpp index 63de2161dc7501b351dd693b8d5857c113335648..161b6c8e00cea471f3b3cdd97c89178ed9a55955 100644 --- a/isis/src/base/apps/skymap/skymap.cpp +++ b/isis/src/base/apps/skymap/skymap.cpp @@ -71,8 +71,8 @@ void IsisMain() { UserInterface &ui = Application::GetUserInterface(); Pvl userMap; - userMap.Read(ui.GetFileName("MAP")); - PvlGroup &userGrp = userMap.FindGroup("Mapping", Pvl::Traverse); + userMap.read(ui.GetFileName("MAP")); + PvlGroup &userGrp = userMap.findGroup("Mapping", Pvl::Traverse); // Open the input cube, get the camera object, and the cam map projection // Note: The default target info is positive west, planetocentric, 360 @@ -80,51 +80,51 @@ void IsisMain() { incam = icube->camera(); // Pvl lab(ui.GetFileName("FROM")); -// PvlGroup &inst = lab.FindGroup("Instrument",Pvl::Traverse); +// PvlGroup &inst = lab.findGroup("Instrument",Pvl::Traverse); //inst["TargetName"] = "Sky"; // Add the default mapping info to the user entered mapping group - userGrp.AddKeyword(PvlKeyword("TargetName", "Sky"), Pvl::Replace); - userGrp.AddKeyword(PvlKeyword("EquatorialRadius", toString(1.0)), Pvl::Replace); - userGrp.AddKeyword(PvlKeyword("PolarRadius", toString(1.0)), Pvl::Replace); - userGrp.AddKeyword(PvlKeyword("LatitudeType", "Planetocentric"), Pvl::Replace); - userGrp.AddKeyword(PvlKeyword("LongitudeDirection", "PositiveWest"), Pvl::Replace); - userGrp.AddKeyword(PvlKeyword("LongitudeDomain", "360"), Pvl::Replace); - if(userGrp.HasKeyword("PixelResolution")) { - userGrp.DeleteKeyword("PixelResolution"); + userGrp.addKeyword(PvlKeyword("TargetName", "Sky"), Pvl::Replace); + userGrp.addKeyword(PvlKeyword("EquatorialRadius", toString(1.0)), Pvl::Replace); + userGrp.addKeyword(PvlKeyword("PolarRadius", toString(1.0)), Pvl::Replace); + userGrp.addKeyword(PvlKeyword("LatitudeType", "Planetocentric"), Pvl::Replace); + userGrp.addKeyword(PvlKeyword("LongitudeDirection", "PositiveWest"), Pvl::Replace); + userGrp.addKeyword(PvlKeyword("LongitudeDomain", "360"), Pvl::Replace); + if(userGrp.hasKeyword("PixelResolution")) { + userGrp.deleteKeyword("PixelResolution"); } if(ui.GetString("DEFAULTRANGE") == "CAMERA") { // Get the default ra/dec range double minRa, maxRa, minDec, maxDec; incam->RaDecRange(minRa, maxRa, minDec, maxDec); - userGrp.AddKeyword(PvlKeyword("MinimumLongitude", toString(minRa)), Pvl::Replace); - userGrp.AddKeyword(PvlKeyword("MaximumLongitude", toString(maxRa)), Pvl::Replace); - userGrp.AddKeyword(PvlKeyword("MinimumLatitude", toString(minDec)), Pvl::Replace); - userGrp.AddKeyword(PvlKeyword("MaximumLatitude", toString(maxDec)), Pvl::Replace); + userGrp.addKeyword(PvlKeyword("MinimumLongitude", toString(minRa)), Pvl::Replace); + userGrp.addKeyword(PvlKeyword("MaximumLongitude", toString(maxRa)), Pvl::Replace); + userGrp.addKeyword(PvlKeyword("MinimumLatitude", toString(minDec)), Pvl::Replace); + userGrp.addKeyword(PvlKeyword("MaximumLatitude", toString(maxDec)), Pvl::Replace); } if(ui.GetString("DEFAULTSCALE") == "CAMERA") { double res = incam->RaDecResolution(); - userGrp.AddKeyword(PvlKeyword("Scale", toString(1.0 / res)), Pvl::Replace); + userGrp.addKeyword(PvlKeyword("Scale", toString(1.0 / res)), Pvl::Replace); } // Override computed range with the users request if(ui.WasEntered("SRA")) { - userGrp.AddKeyword(PvlKeyword("MinimumLongitude", toString(ui.GetDouble("SRA"))), Pvl::Replace); + userGrp.addKeyword(PvlKeyword("MinimumLongitude", toString(ui.GetDouble("SRA"))), Pvl::Replace); } if(ui.WasEntered("ERA")) { - userGrp.AddKeyword(PvlKeyword("MaximumLongitude", toString(ui.GetDouble("ERA"))), Pvl::Replace); + userGrp.addKeyword(PvlKeyword("MaximumLongitude", toString(ui.GetDouble("ERA"))), Pvl::Replace); } if(ui.WasEntered("SDEC")) { - userGrp.AddKeyword(PvlKeyword("MinimumLatitude", toString(ui.GetDouble("SDEC"))), Pvl::Replace); + userGrp.addKeyword(PvlKeyword("MinimumLatitude", toString(ui.GetDouble("SDEC"))), Pvl::Replace); } if(ui.WasEntered("EDEC")) { - userGrp.AddKeyword(PvlKeyword("MaximumLatitude", toString(ui.GetDouble("EDEC"))), Pvl::Replace); + userGrp.addKeyword(PvlKeyword("MaximumLatitude", toString(ui.GetDouble("EDEC"))), Pvl::Replace); } // Get the resolution from the user if they decided to enter it if(ui.GetString("DEFAULTSCALE") == "USER") { - userGrp.AddKeyword(PvlKeyword("Scale", toString(ui.GetDouble("SCALE"))), Pvl::Replace); + userGrp.addKeyword(PvlKeyword("Scale", toString(ui.GetDouble("SCALE"))), Pvl::Replace); } // Create the projection @@ -267,8 +267,8 @@ void PrintMap() { // Get mapping group from map file Pvl userMap; - userMap.Read(ui.GetFileName("MAP")); - PvlGroup &userGrp = userMap.FindGroup("Mapping", Pvl::Traverse); + userMap.read(ui.GetFileName("MAP")); + PvlGroup &userGrp = userMap.findGroup("Mapping", Pvl::Traverse); //Write map file out to the log Isis::Application::GuiLog(userGrp); @@ -280,11 +280,11 @@ void LoadMapRes() { // Get mapping group from map file Pvl userMap; - userMap.Read(ui.GetFileName("MAP")); - PvlGroup &userGrp = userMap.FindGroup("Mapping", Pvl::Traverse); + userMap.read(ui.GetFileName("MAP")); + PvlGroup &userGrp = userMap.findGroup("Mapping", Pvl::Traverse); // Set resolution - if(userGrp.HasKeyword("Scale")) { + if(userGrp.hasKeyword("Scale")) { ui.Clear("SCALE"); ui.PutDouble("SCALE", userGrp["Scale"]); } @@ -320,24 +320,24 @@ void LoadMapRange() { // Get map file Pvl userMap; - userMap.Read(ui.GetFileName("MAP")); - PvlGroup &userGrp = userMap.FindGroup("Mapping", Pvl::Traverse); + userMap.read(ui.GetFileName("MAP")); + PvlGroup &userGrp = userMap.findGroup("Mapping", Pvl::Traverse); // Set ground range keywords that are found in mapfile int count = 0; - if(userGrp.HasKeyword("MinimumLongitude")) { + if(userGrp.hasKeyword("MinimumLongitude")) { ui.PutDouble("SRA", userGrp["MinimumLongitude"]); count++; } - if(userGrp.HasKeyword("MaximumLongitude")) { + if(userGrp.hasKeyword("MaximumLongitude")) { ui.PutDouble("ERA", userGrp["MaximumLongitude"]); count++; } - if(userGrp.HasKeyword("MinimumLatitude")) { + if(userGrp.hasKeyword("MinimumLatitude")) { ui.PutDouble("SDEC", userGrp["MinimumLatitude"]); count++; } - if(userGrp.HasKeyword("MaximumLatitude")) { + if(userGrp.hasKeyword("MaximumLatitude")) { ui.PutDouble("EDEC", userGrp["MaximumLatitude"]); count++; } diff --git a/isis/src/base/apps/skypt/skypt.cpp b/isis/src/base/apps/skypt/skypt.cpp index 7767e052fba73686cfbee598f3197ed2b5f4f84c..befee86b14b3e42d04417d45773becd444ca1c52 100644 --- a/isis/src/base/apps/skypt/skypt.cpp +++ b/isis/src/base/apps/skypt/skypt.cpp @@ -72,13 +72,13 @@ void IsisMain() { // Write the pvl group out to the file if(ui.GetString("FORMAT") == "PVL") { Pvl temp; - temp.SetTerminator(""); - temp.AddGroup(sp); + temp.setTerminator(""); + temp.addGroup(sp); if(append) { - temp.Append(ui.GetAsString("TO")); + temp.append(ui.GetAsString("TO")); } else { - temp.Write(ui.GetAsString("TO")); + temp.write(ui.GetAsString("TO")); } } // Create a flatfile of the same data @@ -98,20 +98,20 @@ void IsisMain() { } if(writeHeader) { - for(int i = 0; i < sp.Keywords(); i++) { - os << sp[i].Name(); + for(int i = 0; i < sp.keywords(); i++) { + os << sp[i].name(); - if(i < sp.Keywords() - 1) { + if(i < sp.keywords() - 1) { os << ","; } } os << endl; } - for(int i = 0; i < sp.Keywords(); i++) { + for(int i = 0; i < sp.keywords(); i++) { os << (QString)sp[i]; - if(i < sp.Keywords() - 1) { + if(i < sp.keywords() - 1) { os << ","; } } diff --git a/isis/src/base/apps/skyrange/skyrange.cpp b/isis/src/base/apps/skyrange/skyrange.cpp index 4186d3692257922b776698b8eb48b98137f269d6..8c661a4e3ca9e549ad3390803be937f873e9b620 100644 --- a/isis/src/base/apps/skyrange/skyrange.cpp +++ b/isis/src/base/apps/skyrange/skyrange.cpp @@ -59,9 +59,9 @@ void IsisMain() { UserInterface ui = Application::GetUserInterface(); if(ui.WasEntered("TO")) { Pvl temp; - temp.AddGroup(results); - temp.AddGroup(orient); - temp.Write(ui.GetFileName("TO", "txt")); + temp.addGroup(results); + temp.addGroup(orient); + temp.write(ui.GetFileName("TO", "txt")); } p.EndProcess(); diff --git a/isis/src/base/apps/slpmap/slpmap.cpp b/isis/src/base/apps/slpmap/slpmap.cpp index 6267cee0334e9ca20309ac8e60531cd2803cdfa3..d11ad05df172a257560abc32331fb64fa7cdea1c 100644 --- a/isis/src/base/apps/slpmap/slpmap.cpp +++ b/isis/src/base/apps/slpmap/slpmap.cpp @@ -68,14 +68,14 @@ void IsisMain() { Cube *ocube = p.SetOutputCube("TO"); - PvlObject &lblCubeObj = ocube->label()->FindObject("IsisCube"); - lblCubeObj.AddGroup(PvlGroup("BandBin")); - PvlGroup &bbGroup = lblCubeObj.FindGroup("BandBin"); + PvlObject &lblCubeObj = ocube->label()->findObject("IsisCube"); + lblCubeObj.addGroup(PvlGroup("BandBin")); + PvlGroup &bbGroup = lblCubeObj.findGroup("BandBin"); g_groundMap = 0; if(g_outputType == Aspect) { p.StartProcess(createAspectCube); - bbGroup.AddKeyword(PvlKeyword("Name", "Aspect", ui.GetString("UNITS").toLower())); + bbGroup.addKeyword(PvlKeyword("Name", "Aspect", ui.GetString("UNITS").toLower())); } else { if (ui.GetString("PIXRES") == "AUTOMATIC") { @@ -90,10 +90,10 @@ void IsisMain() { } if (g_outputType == PercentSlope) { - bbGroup.AddKeyword(PvlKeyword("Name", "Slope", "percent")); + bbGroup.addKeyword(PvlKeyword("Name", "Slope", "percent")); } else { - bbGroup.AddKeyword(PvlKeyword("Name", "Slope", ui.GetString("UNITS").toLower())); + bbGroup.addKeyword(PvlKeyword("Name", "Slope", ui.GetString("UNITS").toLower())); } } diff --git a/isis/src/base/apps/smtk/smtk.cpp b/isis/src/base/apps/smtk/smtk.cpp index 05a6d4bd87884f3a7eb68007f637e73e17fdc257..afa19d44614a1784feeea88d24838ebe092c870f 100644 --- a/isis/src/base/apps/smtk/smtk.cpp +++ b/isis/src/base/apps/smtk/smtk.cpp @@ -457,17 +457,17 @@ void IsisMain() { // Update the label with BandBin keywords PvlKeyword filter("FilterName", "Elevation", "meters"); - filter.AddValue("ElevationError", "meters"); - filter.AddValue("GoodnessOfFit", "unitless"); + filter.addValue("ElevationError", "meters"); + filter.addValue("GoodnessOfFit", "unitless"); PvlKeyword center("Center", "1.0"); - center.AddValue("1.0"); - center.AddValue("1.0"); + center.addValue("1.0"); + center.addValue("1.0"); - PvlGroup &bandbin = ocube->label()->FindGroup("BandBin", PvlObject::Traverse); - bandbin.AddKeyword(filter, PvlContainer::Replace); - bandbin.AddKeyword(center, PvlContainer::Replace); - center.SetName("Width"); - bandbin.AddKeyword(center, PvlContainer::Replace); + PvlGroup &bandbin = ocube->label()->findGroup("BandBin", PvlObject::Traverse); + bandbin.addKeyword(filter, PvlContainer::Replace); + bandbin.addKeyword(center, PvlContainer::Replace); + center.setName("Width"); + bandbin.addKeyword(center, PvlContainer::Replace); p.EndProcess(); @@ -492,10 +492,10 @@ void IsisMain() { PvlGroup smtkresultsPvl("SmtkResults"); smtkresultsPvl += PvlKeyword("SpiceOffImage", toString(matcher.OffImageErrorCount())); smtkresultsPvl += PvlKeyword("SpiceDistanceError", toString(matcher.SpiceErrorCount())); - arPvl.AddGroup(smtkresultsPvl); + arPvl.addGroup(smtkresultsPvl); - for(int i = 0; i < arPvl.Groups(); i++) { - Application::Log(arPvl.Group(i)); + for(int i = 0; i < arPvl.groups(); i++) { + Application::Log(arPvl.group(i)); } // add the auto registration information to print.prt @@ -513,7 +513,7 @@ void helperButtonLog () { UserInterface &ui = Application::GetUserInterface(); QString file(ui.GetFileName("REGDEF")); Pvl p; - p.Read(file); + p.read(file); Application::GuiLog(p); } //...........end of helper function ........ diff --git a/isis/src/base/apps/specpix/specpix.cpp b/isis/src/base/apps/specpix/specpix.cpp index e8833f6dac7f169be0cca3d8f72357b403b0928e..22c34ebe4bcc7313cdc7fa4a002b4e180cb9aed2 100644 --- a/isis/src/base/apps/specpix/specpix.cpp +++ b/isis/src/base/apps/specpix/specpix.cpp @@ -90,7 +90,7 @@ void IsisMain() { // Print out number of values changed PvlGroup results("Results"); - results.AddComment("The number and type of pixels created"); + results.addComment("The number and type of pixels created"); results += PvlKeyword("Null", toString(nnull)); results += PvlKeyword("Lrs", toString(nlrs)); results += PvlKeyword("Lis", toString(nlis)); diff --git a/isis/src/base/apps/spicefit/spicefit.cpp b/isis/src/base/apps/spicefit/spicefit.cpp index b09f111100bf02d63fbc573c04a9291aa433aabd..64e94556f01b8b109718c27710576443f601f068 100644 --- a/isis/src/base/apps/spicefit/spicefit.cpp +++ b/isis/src/base/apps/spicefit/spicefit.cpp @@ -16,8 +16,8 @@ void IsisMain() { cube.open(ui.GetFileName("FROM"), "rw"); //check for existing polygon, if exists delete it - if(cube.label()->HasObject("Polygon")) { - cube.label()->DeleteObject("Polygon"); + if(cube.label()->hasObject("Polygon")) { + cube.label()->deleteObject("Polygon"); } // Get the camera, interpolate to a parabola @@ -31,7 +31,7 @@ void IsisMain() { // Get the instrument pointing keyword from the kernels group and update // its value to table. Isis::PvlGroup kernels = - cube.label()->FindGroup("Kernels", Isis::Pvl::Traverse); + cube.label()->findGroup("Kernels", Isis::Pvl::Traverse); // Save original kernels in keyword before changing to "Table" in the kernels group PvlKeyword origCk = kernels["InstrumentPointing"]; @@ -40,15 +40,15 @@ void IsisMain() { kernels["InstrumentPointing"] = "Table"; // And finally write out the original kernels after Table - for (int i = 0; i < origCk.Size(); i++) { - kernels["InstrumentPointing"].AddValue(origCk[i]); + for (int i = 0; i < origCk.size(); i++) { + kernels["InstrumentPointing"].addValue(origCk[i]); } cube.putGroup(kernels); // Pull out the pointing cache as a table and write it Table cmatrix = cam->instrumentRotation()->Cache("InstrumentPointing"); - cmatrix.Label().AddComment("Smoothed using spicefit"); + cmatrix.Label().addComment("Smoothed using spicefit"); cube.write(cmatrix); cube.close(); } diff --git a/isis/src/base/apps/spiceinit/SpiceClient.cpp b/isis/src/base/apps/spiceinit/SpiceClient.cpp index 00f2a39be95fa41472f3b8e242bd7bb1adf2c24d..87c8c73a947481c9a458887f5578ad531532cf19 100644 --- a/isis/src/base/apps/spiceinit/SpiceClient.cpp +++ b/isis/src/base/apps/spiceinit/SpiceClient.cpp @@ -177,13 +177,13 @@ namespace Isis { s << *p_rawResponse; s >> pvlTest; - PvlGroup &err = pvlTest.FindGroup("Error", Pvl::Traverse); + PvlGroup &err = pvlTest.findGroup("Error", Pvl::Traverse); *p_error = "The Spice Server was unable to initialize the cube."; - if (err.FindKeyword("Message")[0] != "") { + if (err.findKeyword("Message")[0] != "") { *p_error += " The error reported was: "; - *p_error += err.FindKeyword("Message")[0]; + *p_error += err.findKeyword("Message")[0]; } } catch(IException &) { @@ -431,7 +431,7 @@ namespace Isis { Pvl labels; pvlStream >> labels; - return labels.FindGroup("Kernels", Pvl::Traverse); + return labels.findGroup("Kernels", Pvl::Traverse); } @@ -455,7 +455,7 @@ namespace Isis { Pvl labels; pvlStream >> labels; - return labels.FindGroup("Kernels", Pvl::Traverse); + return labels.findGroup("Kernels", Pvl::Traverse); } @@ -551,7 +551,7 @@ namespace Isis { Pvl labels; pvlStream >> labels; - return labels.FindObject("NaifKeywords"); + return labels.findObject("NaifKeywords"); } diff --git a/isis/src/base/apps/spiceinit/spiceinit.cpp b/isis/src/base/apps/spiceinit/spiceinit.cpp index 72f197750b93113ebad6bf9bf5a1db4bc470eb50..905666268012cf58d84bd3aef79dd59738e1b791 100644 --- a/isis/src/base/apps/spiceinit/spiceinit.cpp +++ b/isis/src/base/apps/spiceinit/spiceinit.cpp @@ -70,8 +70,8 @@ void IsisMain() { Pvl lab = *icube->label(); // if cube has existing polygon delete it - if (icube->label()->HasObject("Polygon")) { - icube->label()->DeleteObject("Polygon"); + if (icube->label()->hasObject("Polygon")) { + icube->label()->deleteObject("Polygon"); } // Set up for getting the mission name @@ -285,96 +285,96 @@ bool tryKernels(Cube *icube, Process &p, PvlKeyword exkKeyword("Extra"); for (int i = 0; i < lk.size(); i++) { - lkKeyword.AddValue(lk[i]); + lkKeyword.addValue(lk[i]); } for (int i = 0; i < pck.size(); i++) { - pckKeyword.AddValue(pck[i]); + pckKeyword.addValue(pck[i]); } for (int i = 0; i < targetSpk.size(); i++) { - targetSpkKeyword.AddValue(targetSpk[i]); + targetSpkKeyword.addValue(targetSpk[i]); } for (int i = 0; i < ck.size(); i++) { - ckKeyword.AddValue(ck[i]); + ckKeyword.addValue(ck[i]); } for (int i = 0; i < ik.size(); i++) { - ikKeyword.AddValue(ik[i]); + ikKeyword.addValue(ik[i]); } for (int i = 0; i < sclk.size(); i++) { - sclkKeyword.AddValue(sclk[i]); + sclkKeyword.addValue(sclk[i]); } for (int i = 0; i < spk.size(); i++) { - spkKeyword.AddValue(spk[i]); + spkKeyword.addValue(spk[i]); } for (int i = 0; i < iak.size(); i++) { - iakKeyword.AddValue(iak[i]); + iakKeyword.addValue(iak[i]); } for (int i = 0; i < dem.size(); i++) { - demKeyword.AddValue(dem[i]); + demKeyword.addValue(dem[i]); } for (int i = 0; i < exk.size(); i++) { - exkKeyword.AddValue(exk[i]); + exkKeyword.addValue(exk[i]); } PvlGroup originalKernels = icube->group("Kernels"); PvlGroup currentKernels = originalKernels; - currentKernels.AddKeyword(lkKeyword, Pvl::Replace); - currentKernels.AddKeyword(pckKeyword, Pvl::Replace); - currentKernels.AddKeyword(targetSpkKeyword, Pvl::Replace); - currentKernels.AddKeyword(ckKeyword, Pvl::Replace); - currentKernels.AddKeyword(ikKeyword, Pvl::Replace); - currentKernels.AddKeyword(sclkKeyword, Pvl::Replace); - currentKernels.AddKeyword(spkKeyword, Pvl::Replace); - currentKernels.AddKeyword(iakKeyword, Pvl::Replace); - currentKernels.AddKeyword(demKeyword, Pvl::Replace); + currentKernels.addKeyword(lkKeyword, Pvl::Replace); + currentKernels.addKeyword(pckKeyword, Pvl::Replace); + currentKernels.addKeyword(targetSpkKeyword, Pvl::Replace); + currentKernels.addKeyword(ckKeyword, Pvl::Replace); + currentKernels.addKeyword(ikKeyword, Pvl::Replace); + currentKernels.addKeyword(sclkKeyword, Pvl::Replace); + currentKernels.addKeyword(spkKeyword, Pvl::Replace); + currentKernels.addKeyword(iakKeyword, Pvl::Replace); + currentKernels.addKeyword(demKeyword, Pvl::Replace); // report qualities PvlKeyword spkQuality("InstrumentPositionQuality"); - spkQuality.AddValue(Kernel::typeEnum(spk.type())); - currentKernels.AddKeyword(spkQuality, Pvl::Replace); + spkQuality.addValue(Kernel::typeEnum(spk.type())); + currentKernels.addKeyword(spkQuality, Pvl::Replace); PvlKeyword ckQuality("InstrumentPointingQuality"); - ckQuality.AddValue(Kernel::typeEnum(ck.type())); - currentKernels.AddKeyword(ckQuality, Pvl::Replace); + ckQuality.addValue(Kernel::typeEnum(ck.type())); + currentKernels.addKeyword(ckQuality, Pvl::Replace); - if (!exkKeyword.IsNull()) { - currentKernels.AddKeyword(exkKeyword, Pvl::Replace); + if (!exkKeyword.isNull()) { + currentKernels.addKeyword(exkKeyword, Pvl::Replace); } - else if (currentKernels.HasKeyword("EXTRA")) { - currentKernels.DeleteKeyword("EXTRA"); + else if (currentKernels.hasKeyword("EXTRA")) { + currentKernels.deleteKeyword("EXTRA"); } // Get rid of old keywords from previously inited cubes - if (currentKernels.HasKeyword("SpacecraftPointing")) - currentKernels.DeleteKeyword("SpacecraftPointing"); + if (currentKernels.hasKeyword("SpacecraftPointing")) + currentKernels.deleteKeyword("SpacecraftPointing"); - if (currentKernels.HasKeyword("SpacecraftPosition")) - currentKernels.DeleteKeyword("SpacecraftPosition"); + if (currentKernels.hasKeyword("SpacecraftPosition")) + currentKernels.deleteKeyword("SpacecraftPosition"); - if (currentKernels.HasKeyword("ElevationModel")) - currentKernels.DeleteKeyword("ElevationModel"); + if (currentKernels.hasKeyword("ElevationModel")) + currentKernels.deleteKeyword("ElevationModel"); - if (currentKernels.HasKeyword("Frame")) - currentKernels.DeleteKeyword("Frame"); + if (currentKernels.hasKeyword("Frame")) + currentKernels.deleteKeyword("Frame"); - if (currentKernels.HasKeyword("StartPadding")) - currentKernels.DeleteKeyword("StartPadding"); + if (currentKernels.hasKeyword("StartPadding")) + currentKernels.deleteKeyword("StartPadding"); - if (currentKernels.HasKeyword("EndPadding")) - currentKernels.DeleteKeyword("EndPadding"); + if (currentKernels.hasKeyword("EndPadding")) + currentKernels.deleteKeyword("EndPadding"); UserInterface &ui = Application::GetUserInterface(); // Add any time padding the user specified to the spice group if (ui.GetDouble("STARTPAD") > DBL_EPSILON) { - currentKernels.AddKeyword(PvlKeyword("StartPadding", + currentKernels.addKeyword(PvlKeyword("StartPadding", toString(ui.GetDouble("STARTPAD")), "seconds")); } if (ui.GetDouble("ENDPAD") > DBL_EPSILON) { - currentKernels.AddKeyword(PvlKeyword("EndPadding", + currentKernels.addKeyword(PvlKeyword("EndPadding", toString(ui.GetDouble("ENDPAD")), "seconds")); } - currentKernels.AddKeyword( + currentKernels.addKeyword( PvlKeyword("CameraVersion", toString(CameraFactory::CameraVersion(lab))), Pvl::Replace); @@ -391,8 +391,8 @@ bool tryKernels(Cube *icube, Process &p, catch(IException &e) { Pvl errPvl = e.toPvl(); - if (errPvl.Groups() > 0) { - currentKernels += PvlKeyword("Error", errPvl.Group(errPvl.Groups() - 1)["Message"][0]); + if (errPvl.groups() > 0) { + currentKernels += PvlKeyword("Error", errPvl.group(errPvl.groups() - 1)["Message"][0]); } Application::Log(currentKernels); @@ -405,27 +405,27 @@ bool tryKernels(Cube *icube, Process &p, ckTable.Label() += PvlKeyword("Description", "Created by spiceinit"); ckTable.Label() += PvlKeyword("Kernels"); - for (int i = 0; i < ckKeyword.Size(); i++) - ckTable.Label()["Kernels"].AddValue(ckKeyword[i]); + for (int i = 0; i < ckKeyword.size(); i++) + ckTable.Label()["Kernels"].addValue(ckKeyword[i]); icube->write(ckTable); Table spkTable = cam->instrumentPosition()->Cache("InstrumentPosition"); spkTable.Label() += PvlKeyword("Description", "Created by spiceinit"); spkTable.Label() += PvlKeyword("Kernels"); - for (int i = 0; i < spkKeyword.Size(); i++) - spkTable.Label()["Kernels"].AddValue(spkKeyword[i]); + for (int i = 0; i < spkKeyword.size(); i++) + spkTable.Label()["Kernels"].addValue(spkKeyword[i]); icube->write(spkTable); Table bodyTable = cam->bodyRotation()->Cache("BodyRotation"); bodyTable.Label() += PvlKeyword("Description", "Created by spiceinit"); bodyTable.Label() += PvlKeyword("Kernels"); - for (int i = 0; i < targetSpkKeyword.Size(); i++) - bodyTable.Label()["Kernels"].AddValue(targetSpkKeyword[i]); + for (int i = 0; i < targetSpkKeyword.size(); i++) + bodyTable.Label()["Kernels"].addValue(targetSpkKeyword[i]); - for (int i = 0; i < pckKeyword.Size(); i++) - bodyTable.Label()["Kernels"].AddValue(pckKeyword[i]); + for (int i = 0; i < pckKeyword.size(); i++) + bodyTable.Label()["Kernels"].addValue(pckKeyword[i]); bodyTable.Label() += PvlKeyword("SolarLongitude", toString(cam->solarLongitude().degrees())); @@ -434,8 +434,8 @@ bool tryKernels(Cube *icube, Process &p, Table sunTable = cam->sunPosition()->Cache("SunPosition"); sunTable.Label() += PvlKeyword("Description", "Created by spiceinit"); sunTable.Label() += PvlKeyword("Kernels"); - for (int i = 0; i < targetSpkKeyword.Size(); i++) - sunTable.Label()["Kernels"].AddValue(targetSpkKeyword[i]); + for (int i = 0; i < targetSpkKeyword.size(); i++) + sunTable.Label()["Kernels"].addValue(targetSpkKeyword[i]); icube->write(sunTable); @@ -445,25 +445,25 @@ bool tryKernels(Cube *icube, Process &p, PvlKeyword origTargPos = currentKernels["TargetPosition"]; currentKernels["InstrumentPointing"] = "Table"; - for (int i = 0; i < origCk.Size(); i++) - currentKernels["InstrumentPointing"].AddValue(origCk[i]); + for (int i = 0; i < origCk.size(); i++) + currentKernels["InstrumentPointing"].addValue(origCk[i]); currentKernels["InstrumentPosition"] = "Table"; - for (int i = 0; i < origSpk.Size(); i++) - currentKernels["InstrumentPosition"].AddValue(origSpk[i]); + for (int i = 0; i < origSpk.size(); i++) + currentKernels["InstrumentPosition"].addValue(origSpk[i]); currentKernels["TargetPosition"] = "Table"; - for (int i = 0; i < origTargPos.Size(); i++) - currentKernels["TargetPosition"].AddValue(origTargPos[i]); + for (int i = 0; i < origTargPos.size(); i++) + currentKernels["TargetPosition"].addValue(origTargPos[i]); icube->putGroup(currentKernels); Pvl *label = icube->label(); int i = 0; - while (i < label->Objects()) { - PvlObject currObj = label->Object(i); - if (currObj.IsNamed("NaifKeywords")) { - label->DeleteObject(i); + while (i < label->objects()) { + PvlObject currObj = label->object(i); + if (currObj.isNamed("NaifKeywords")) { + label->deleteObject(i); } else { i ++; @@ -476,21 +476,21 @@ bool tryKernels(Cube *icube, Process &p, else { Pvl *label = icube->label(); int i = 0; - while (i < label->Objects()) { - PvlObject currObj = label->Object(i); - if (currObj.IsNamed("Table")) { + while (i < label->objects()) { + PvlObject currObj = label->object(i); + if (currObj.isNamed("Table")) { if (currObj["Name"][0] == QString("InstrumentPointing") || currObj["Name"][0] == QString("InstrumentPosition") || currObj["Name"][0] == QString("BodyRotation") || currObj["Name"][0] == QString("SunPosition")) { - label->DeleteObject(i); + label->deleteObject(i); } else { i++; } } - else if (currObj.IsNamed("NaifKeywords")) { - label->DeleteObject(i); + else if (currObj.isNamed("NaifKeywords")) { + label->deleteObject(i); } else { i++; @@ -512,7 +512,7 @@ void requestSpice(Cube *icube, Pvl &labels, QString missionName) { UserInterface &ui = Application::GetUserInterface(); QString instrumentId = - labels.FindGroup("Instrument", Pvl::Traverse)["InstrumentId"][0]; + labels.findGroup("Instrument", Pvl::Traverse)["InstrumentId"][0]; QString url = ui.GetString("URL") + "?mission=" + missionName + "&instrument=" + instrumentId; @@ -531,7 +531,7 @@ void requestSpice(Cube *icube, Pvl &labels, QString missionName) { // Test for valid labels with mapping group at least Pvl shapeTest(shape); - shapeTest.FindGroup("Mapping", Pvl::Traverse); + shapeTest.findGroup("Mapping", Pvl::Traverse); } double startPad = ui.GetDouble("STARTPAD"); @@ -562,18 +562,18 @@ void requestSpice(Cube *icube, Pvl &labels, QString missionName) { // Verify everything in the kernels group exists, if not then our kernels are // out of date. for (int keywordIndex = 0; - keywordIndex < kernelsGroup.Keywords(); + keywordIndex < kernelsGroup.keywords(); keywordIndex++) { PvlKeyword &curKeyword = kernelsGroup[keywordIndex]; - if (curKeyword.Name() == "NaifFrameCode" || - curKeyword.Name() == "InstrumentPointingQuality" || - curKeyword.Name() == "InstrumentPositionQuality" || - curKeyword.Name() == "CameraVersion" || - curKeyword.Name() == "TargetPosition" || - curKeyword.Name() == "InstrumentPointing" || - curKeyword.Name() == "InstrumentPosition" || - curKeyword.Name() == "TargetAttitudeShape") { + if (curKeyword.name() == "NaifFrameCode" || + curKeyword.name() == "InstrumentPointingQuality" || + curKeyword.name() == "InstrumentPositionQuality" || + curKeyword.name() == "CameraVersion" || + curKeyword.name() == "TargetPosition" || + curKeyword.name() == "InstrumentPointing" || + curKeyword.name() == "InstrumentPosition" || + curKeyword.name() == "TargetAttitudeShape") { continue; } @@ -597,7 +597,7 @@ void requestSpice(Cube *icube, Pvl &labels, QString missionName) { Application::Log(logGrp); icube->putGroup(kernelsGroup); - icube->label()->AddObject(naifKeywords); + icube->label()->addObject(naifKeywords); icube->write(*pointingTable); icube->write(*positionTable); diff --git a/isis/src/base/apps/spiceserver/spiceserver.cpp b/isis/src/base/apps/spiceserver/spiceserver.cpp index e613ebdd6ed9d7df55997c29fdb4501eb8270081..1429f5db0b4a29b6f21653476233f6bed6805705 100644 --- a/isis/src/base/apps/spiceserver/spiceserver.cpp +++ b/isis/src/base/apps/spiceserver/spiceserver.cpp @@ -211,7 +211,7 @@ void IsisMain() { PvlKeyword key; demPvlKeyStream >> key; - for (int value = 0; value < key.Size(); value++) { + for (int value = 0; value < key.size(); value++) { dem.push_back(key[value]); } } @@ -317,89 +317,89 @@ bool tryKernels(Pvl &label, Process &p, PvlKeyword exkKeyword("Extra"); for (int i = 0; i < lk.size(); i++) { - lkKeyword.AddValue(lk[i]); + lkKeyword.addValue(lk[i]); } for (int i = 0; i < pck.size(); i++) { - pckKeyword.AddValue(pck[i]); + pckKeyword.addValue(pck[i]); } for (int i = 0; i < targetSpk.size(); i++) { - targetSpkKeyword.AddValue(targetSpk[i]); + targetSpkKeyword.addValue(targetSpk[i]); } for (int i = 0; i < ck.size(); i++) { - ckKeyword.AddValue(ck[i]); + ckKeyword.addValue(ck[i]); } for (int i = 0; i < ik.size(); i++) { - ikKeyword.AddValue(ik[i]); + ikKeyword.addValue(ik[i]); } for (int i = 0; i < sclk.size(); i++) { - sclkKeyword.AddValue(sclk[i]); + sclkKeyword.addValue(sclk[i]); } for (int i = 0; i < spk.size(); i++) { - spkKeyword.AddValue(spk[i]); + spkKeyword.addValue(spk[i]); } for (int i = 0; i < iak.size(); i++) { - iakKeyword.AddValue(iak[i]); + iakKeyword.addValue(iak[i]); } for (int i = 0; i < dem.size(); i++) { - demKeyword.AddValue(dem[i]); + demKeyword.addValue(dem[i]); } for (int i = 0; i < exk.size(); i++) { - exkKeyword.AddValue(exk[i]); + exkKeyword.addValue(exk[i]); } - PvlGroup originalKernels = lab.FindGroup("Kernels", Pvl::Traverse); - PvlGroup ¤tKernels = lab.FindGroup("Kernels", Pvl::Traverse); - currentKernels.AddKeyword(lkKeyword, Pvl::Replace); - currentKernels.AddKeyword(pckKeyword, Pvl::Replace); - currentKernels.AddKeyword(targetSpkKeyword, Pvl::Replace); - currentKernels.AddKeyword(ckKeyword, Pvl::Replace); - currentKernels.AddKeyword(ikKeyword, Pvl::Replace); - currentKernels.AddKeyword(sclkKeyword, Pvl::Replace); - currentKernels.AddKeyword(spkKeyword, Pvl::Replace); - currentKernels.AddKeyword(iakKeyword, Pvl::Replace); - currentKernels.AddKeyword(emptyDemKeyword, Pvl::Replace); + PvlGroup originalKernels = lab.findGroup("Kernels", Pvl::Traverse); + PvlGroup ¤tKernels = lab.findGroup("Kernels", Pvl::Traverse); + currentKernels.addKeyword(lkKeyword, Pvl::Replace); + currentKernels.addKeyword(pckKeyword, Pvl::Replace); + currentKernels.addKeyword(targetSpkKeyword, Pvl::Replace); + currentKernels.addKeyword(ckKeyword, Pvl::Replace); + currentKernels.addKeyword(ikKeyword, Pvl::Replace); + currentKernels.addKeyword(sclkKeyword, Pvl::Replace); + currentKernels.addKeyword(spkKeyword, Pvl::Replace); + currentKernels.addKeyword(iakKeyword, Pvl::Replace); + currentKernels.addKeyword(emptyDemKeyword, Pvl::Replace); // report qualities PvlKeyword spkQuality("InstrumentPositionQuality"); - spkQuality.AddValue(Kernel::typeEnum(spk.type())); - currentKernels.AddKeyword(spkQuality, Pvl::Replace); + spkQuality.addValue(Kernel::typeEnum(spk.type())); + currentKernels.addKeyword(spkQuality, Pvl::Replace); PvlKeyword ckQuality("InstrumentPointingQuality"); - ckQuality.AddValue(Kernel::typeEnum(ck.type())); - currentKernels.AddKeyword(ckQuality, Pvl::Replace); + ckQuality.addValue(Kernel::typeEnum(ck.type())); + currentKernels.addKeyword(ckQuality, Pvl::Replace); - if (!exkKeyword.IsNull()) - currentKernels.AddKeyword(exkKeyword, Pvl::Replace); - else if (currentKernels.HasKeyword("EXTRA")) - currentKernels.DeleteKeyword("EXTRA"); + if (!exkKeyword.isNull()) + currentKernels.addKeyword(exkKeyword, Pvl::Replace); + else if (currentKernels.hasKeyword("EXTRA")) + currentKernels.deleteKeyword("EXTRA"); // Get rid of old keywords from previously inited cubes - if (currentKernels.HasKeyword("SpacecraftPointing")) - currentKernels.DeleteKeyword("SpacecraftPointing"); + if (currentKernels.hasKeyword("SpacecraftPointing")) + currentKernels.deleteKeyword("SpacecraftPointing"); - if (currentKernels.HasKeyword("SpacecraftPosition")) - currentKernels.DeleteKeyword("SpacecraftPosition"); + if (currentKernels.hasKeyword("SpacecraftPosition")) + currentKernels.deleteKeyword("SpacecraftPosition"); - if (currentKernels.HasKeyword("ElevationModel")) - currentKernels.DeleteKeyword("ElevationModel"); + if (currentKernels.hasKeyword("ElevationModel")) + currentKernels.deleteKeyword("ElevationModel"); - if (currentKernels.HasKeyword("Frame")) - currentKernels.DeleteKeyword("Frame"); + if (currentKernels.hasKeyword("Frame")) + currentKernels.deleteKeyword("Frame"); - if (currentKernels.HasKeyword("StartPadding")) - currentKernels.DeleteKeyword("StartPadding"); + if (currentKernels.hasKeyword("StartPadding")) + currentKernels.deleteKeyword("StartPadding"); - if (currentKernels.HasKeyword("EndPadding")) - currentKernels.DeleteKeyword("EndPadding"); + if (currentKernels.hasKeyword("EndPadding")) + currentKernels.deleteKeyword("EndPadding"); // Add any time padding the user specified to the spice group if (g_startPad > DBL_EPSILON) - currentKernels.AddKeyword(PvlKeyword("StartPadding", toString(g_startPad), "seconds")); + currentKernels.addKeyword(PvlKeyword("StartPadding", toString(g_startPad), "seconds")); if (g_endPad > DBL_EPSILON) - currentKernels.AddKeyword(PvlKeyword("EndPadding", toString(g_endPad), "seconds")); + currentKernels.addKeyword(PvlKeyword("EndPadding", toString(g_endPad), "seconds")); - currentKernels.AddKeyword( + currentKernels.addKeyword( PvlKeyword("CameraVersion", toString(CameraFactory::CameraVersion(lab))), Pvl::Replace); @@ -411,17 +411,17 @@ bool tryKernels(Pvl &label, Process &p, // If success then pretend we had the shape model keyword in there... // this doesn't actually effect the blobs that we care about - currentKernels.AddKeyword(demKeyword, Pvl::Replace); + currentKernels.addKeyword(demKeyword, Pvl::Replace); Pvl applicationLog; - applicationLog += lab.FindGroup("Kernels", Pvl::Traverse); - applicationLog.Write(ui.GetFileName("TO") + ".print"); + applicationLog += lab.findGroup("Kernels", Pvl::Traverse); + applicationLog.write(ui.GetFileName("TO") + ".print"); } catch (IException &e) { Pvl errPvl = e.toPvl(); - if (errPvl.Groups() > 0) + if (errPvl.groups() > 0) currentKernels += PvlKeyword("Error", - errPvl.Group(errPvl.Groups() - 1)["Message"][0]); + errPvl.group(errPvl.groups() - 1)["Message"][0]); Application::Log(currentKernels); throw e; @@ -431,27 +431,27 @@ bool tryKernels(Pvl &label, Process &p, ckTable.Label() += PvlKeyword("Description", "Created by spiceinit"); ckTable.Label() += PvlKeyword("Kernels"); - for (int i = 0; i < ckKeyword.Size(); i++) - ckTable.Label()["Kernels"].AddValue(ckKeyword[i]); + for (int i = 0; i < ckKeyword.size(); i++) + ckTable.Label()["Kernels"].addValue(ckKeyword[i]); ckTable.Write(ui.GetFileName("TO") + ".pointing"); Table spkTable = cam->instrumentPosition()->Cache("InstrumentPosition"); spkTable.Label() += PvlKeyword("Description", "Created by spiceinit"); spkTable.Label() += PvlKeyword("Kernels"); - for (int i = 0; i < spkKeyword.Size(); i++) - spkTable.Label()["Kernels"].AddValue(spkKeyword[i]); + for (int i = 0; i < spkKeyword.size(); i++) + spkTable.Label()["Kernels"].addValue(spkKeyword[i]); spkTable.Write(ui.GetFileName("TO") + ".position"); Table bodyTable = cam->bodyRotation()->Cache("BodyRotation"); bodyTable.Label() += PvlKeyword("Description", "Created by spiceinit"); bodyTable.Label() += PvlKeyword("Kernels"); - for (int i = 0; i < targetSpkKeyword.Size(); i++) - bodyTable.Label()["Kernels"].AddValue(targetSpkKeyword[i]); + for (int i = 0; i < targetSpkKeyword.size(); i++) + bodyTable.Label()["Kernels"].addValue(targetSpkKeyword[i]); - for (int i = 0; i < pckKeyword.Size(); i++) - bodyTable.Label()["Kernels"].AddValue(pckKeyword[i]); + for (int i = 0; i < pckKeyword.size(); i++) + bodyTable.Label()["Kernels"].addValue(pckKeyword[i]); bodyTable.Label() += PvlKeyword("SolarLongitude", toString(cam->solarLongitude().degrees())); @@ -460,8 +460,8 @@ bool tryKernels(Pvl &label, Process &p, Table sunTable = cam->sunPosition()->Cache("SunPosition"); sunTable.Label() += PvlKeyword("Description", "Created by spiceinit"); sunTable.Label() += PvlKeyword("Kernels"); - for (int i = 0; i < targetSpkKeyword.Size(); i++) - sunTable.Label()["Kernels"].AddValue(targetSpkKeyword[i]); + for (int i = 0; i < targetSpkKeyword.size(); i++) + sunTable.Label()["Kernels"].addValue(targetSpkKeyword[i]); sunTable.Write(ui.GetFileName("TO") + ".sun"); @@ -471,21 +471,21 @@ bool tryKernels(Pvl &label, Process &p, PvlKeyword origTargPos = currentKernels["TargetPosition"]; currentKernels["InstrumentPointing"] = "Table"; - for (int i = 0; i < origCk.Size(); i++) - currentKernels["InstrumentPointing"].AddValue(origCk[i]); + for (int i = 0; i < origCk.size(); i++) + currentKernels["InstrumentPointing"].addValue(origCk[i]); currentKernels["InstrumentPosition"] = "Table"; - for (int i = 0; i < origSpk.Size(); i++) - currentKernels["InstrumentPosition"].AddValue(origSpk[i]); + for (int i = 0; i < origSpk.size(); i++) + currentKernels["InstrumentPosition"].addValue(origSpk[i]); currentKernels["TargetPosition"] = "Table"; - for (int i = 0; i < origTargPos.Size(); i++) - currentKernels["TargetPosition"].AddValue(origTargPos[i]); + for (int i = 0; i < origTargPos.size(); i++) + currentKernels["TargetPosition"].addValue(origTargPos[i]); Pvl kernelsLabels; - kernelsLabels += lab.FindGroup("Kernels", Pvl::Traverse); + kernelsLabels += lab.findGroup("Kernels", Pvl::Traverse); kernelsLabels += cam->getStoredNaifKeywords(); - kernelsLabels.Write(ui.GetFileName("TO") + ".lab"); + kernelsLabels.write(ui.GetFileName("TO") + ".lab"); } catch (IException &) { return false; diff --git a/isis/src/base/apps/spkwriter/Commentor.h b/isis/src/base/apps/spkwriter/Commentor.h index 951756270439db512af80f73ccc97df8b537f40f..aa056e4f868c24c045444f64f4acd1930fd7675d 100644 --- a/isis/src/base/apps/spkwriter/Commentor.h +++ b/isis/src/base/apps/spkwriter/Commentor.h @@ -100,7 +100,7 @@ template } /** Returns the current contents of the collected comments */ - QString Comments() const { + QString comments() const { return (_comComment + _comSetComments); } diff --git a/isis/src/base/apps/spkwriter/KernelWriter.h b/isis/src/base/apps/spkwriter/KernelWriter.h index 984ba8eb6be2b8c0eb3fe1bc3cc2b19b8c2d5f0f..e65719c0a5aa72a681f6e470f86496f0d74895c3 100644 --- a/isis/src/base/apps/spkwriter/KernelWriter.h +++ b/isis/src/base/apps/spkwriter/KernelWriter.h @@ -121,7 +121,7 @@ class KernelWriter { Commentor commentor(comfile); if (comfile.isEmpty()) { commentor.setCommentHeader(k_header()); } kernels.Accept(commentor); - return (commentor.Comments()); + return (commentor.comments()); } protected: diff --git a/isis/src/base/apps/spkwriter/SpiceSegment.cpp b/isis/src/base/apps/spkwriter/SpiceSegment.cpp index 50e4b5b6c21649ff20f5a545d2d837871caa9846..05032b3271f0c8d27511411ebc21f7c59f22b988 100644 --- a/isis/src/base/apps/spkwriter/SpiceSegment.cpp +++ b/isis/src/base/apps/spkwriter/SpiceSegment.cpp @@ -167,8 +167,8 @@ void SpiceSegment::init(Cube &cube) { QString SpiceSegment::getKeyValue(PvlObject &label, const QString &keyword) { QString value(""); - if ( label.HasKeyword(keyword,Pvl::Traverse) ) { - value = label.FindKeyword(keyword,Pvl::Traverse)[0]; + if ( label.hasKeyword(keyword,Pvl::Traverse) ) { + value = label.findKeyword(keyword,Pvl::Traverse)[0]; } return (value); } @@ -206,14 +206,14 @@ void SpiceSegment::init() { bool SpiceSegment::getImageTimes(Pvl &lab, double &start, double &end) const { _kernels.Load("LSK,SCLK"); - PvlObject &cube = lab.FindObject("IsisCube"); + PvlObject &cube = lab.findObject("IsisCube"); // Get the start and end time for the cube - start = UTCtoET((QString) cube.FindGroup("Instrument")["StartTime"]); - if(cube.FindGroup("Instrument").HasKeyword("StopTime")) { - end = UTCtoET((QString) cube.FindGroup("Instrument")["StopTime"]); + start = UTCtoET((QString) cube.findGroup("Instrument")["StartTime"]); + if(cube.findGroup("Instrument").hasKeyword("StopTime")) { + end = UTCtoET((QString) cube.findGroup("Instrument")["StopTime"]); } else { - end = UTCtoET (cube.FindGroup("Instrument")["StartTime"]); + end = UTCtoET (cube.findGroup("Instrument")["StartTime"]); } return (true); diff --git a/isis/src/base/apps/stats/stats.cpp b/isis/src/base/apps/stats/stats.cpp index 1f96ddfe241437b79e6359f2b9777fc2f948be96..bd67fbfc8fde3754d05c01a3d683bf7993543226 100644 --- a/isis/src/base/apps/stats/stats.cpp +++ b/isis/src/base/apps/stats/stats.cpp @@ -65,7 +65,7 @@ void IsisMain() { results += PvlKeyword("HisPixels", toString(stats->HisPixels())); results += PvlKeyword("HrsPixels", toString(stats->HrsPixels())); - mainpvl.AddGroup(results); + mainpvl.addGroup(results); delete stats; // Write the results to the log @@ -82,10 +82,10 @@ void IsisMain() { //write the results in the requested format. if(ui.GetString("FORMAT") == "PVL") { if(append) { - mainpvl.Append(outFile); + mainpvl.append(outFile); } else { - mainpvl.Write(outFile); + mainpvl.write(outFile); } } else { @@ -102,19 +102,19 @@ void IsisMain() { } if(writeHeader) { - for(int i = 0; i < mainpvl.Group(0).Keywords(); i++) { - os << mainpvl.Group(0)[i].Name(); - if( i < mainpvl.Group(0).Keywords() - 1 ) { + for(int i = 0; i < mainpvl.group(0).keywords(); i++) { + os << mainpvl.group(0)[i].name(); + if( i < mainpvl.group(0).keywords() - 1 ) { os << ","; } } os << endl; } - for(int i = 0; i < mainpvl.Groups(); i++) { - for (int j = 0; j < mainpvl.Group(i).Keywords(); j++) { - os << (QString)mainpvl.Group(i)[j]; - if(j < mainpvl.Group(i).Keywords() - 1) { + for(int i = 0; i < mainpvl.groups(); i++) { + for (int j = 0; j < mainpvl.group(i).keywords(); j++) { + os << (QString)mainpvl.group(i)[j]; + if(j < mainpvl.group(i).keywords() - 1) { os << ","; } } diff --git a/isis/src/base/apps/stretch/stretch.cpp b/isis/src/base/apps/stretch/stretch.cpp index b22219f6bd9c4d539f2c076e963ccb931b237068..564d5680e5823d5cd656c2fb7391ab1cc45a87f5 100644 --- a/isis/src/base/apps/stretch/stretch.cpp +++ b/isis/src/base/apps/stretch/stretch.cpp @@ -66,10 +66,10 @@ void IsisMain() { p.EndProcess(); PvlKeyword dnPairs = PvlKeyword("StretchPairs"); - dnPairs.AddValue(str.Text()); + dnPairs.addValue(str.Text()); PvlGroup results = PvlGroup("Results"); - results.AddKeyword(dnPairs); + results.addKeyword(dnPairs); Application::Log(results); diff --git a/isis/src/base/apps/tabledump/tabledump.cpp b/isis/src/base/apps/tabledump/tabledump.cpp index f74d403a18c3d6dda4d04efd40d5c44b921e560e..e2ace14c2e7ff4f87e443f1255a7e9b149e7ef69 100644 --- a/isis/src/base/apps/tabledump/tabledump.cpp +++ b/isis/src/base/apps/tabledump/tabledump.cpp @@ -160,20 +160,20 @@ void helperButtonGetTableList() { int cnt = 0; while (!match) { // If we've gone through all objects and found nothing, throw an exception - if (cnt >= label.Objects()) { + if (cnt >= label.objects()) { g_pos = 0; QString msg = "Parameter [FROM] has no tables."; throw IException(IException::User, msg, _FILEINFO_); } // When the end of the objects is hit, display "NAME" parameter as blank - if (g_pos >= label.Objects()) { + if (g_pos >= label.objects()) { list = ""; match = true; g_pos = 0; // Prepare to start over again } // When we find a table, fetch its name to stick in the "NAME" parameter - else if (label.Object(g_pos).Name() == "Table") { - list = label.Object(g_pos)["Name"][0]; + else if (label.object(g_pos).name() == "Table") { + list = label.object(g_pos)["Name"][0]; match = true; g_pos++; } diff --git a/isis/src/base/apps/uncrop/uncrop.cpp b/isis/src/base/apps/uncrop/uncrop.cpp index df025506e5ab8b0656d992397316c070980a4317..4fcd6debad654a4d517130a2258d6d757c788dbb 100644 --- a/isis/src/base/apps/uncrop/uncrop.cpp +++ b/isis/src/base/apps/uncrop/uncrop.cpp @@ -25,7 +25,7 @@ void IsisMain() { // Get the extraction label from the input file Pvl lab; - lab.Read(ui.GetFileName("FROM")); + lab.read(ui.GetFileName("FROM")); AlphaCube acube(lab); int outSample = (int)(acube.AlphaSample(0.5) + 0.5); int outLine = (int)(acube.AlphaLine(0.5) + 0.5); diff --git a/isis/src/base/objs/AdaptiveGruen/unitTest.cpp b/isis/src/base/objs/AdaptiveGruen/unitTest.cpp index fe56fe6593a1d833385491c576d1c212d0eecfbe..4d8337abc53f0f7e5127fdb17b96a7af1ce0fcad 100644 --- a/isis/src/base/objs/AdaptiveGruen/unitTest.cpp +++ b/isis/src/base/objs/AdaptiveGruen/unitTest.cpp @@ -32,12 +32,12 @@ int main() { schip += PvlKeyword("Lines", "30"); PvlObject o("AutoRegistration"); - o.AddGroup(alg); - o.AddGroup(pchip); - o.AddGroup(schip); + o.addGroup(alg); + o.addGroup(pchip); + o.addGroup(schip); Pvl pvl; - pvl.AddObject(o); + pvl.addObject(o); std::cout << pvl << std::endl; AutoReg *ar = AutoRegFactory::Create(pvl); diff --git a/isis/src/base/objs/Albedo/Albedo.cpp b/isis/src/base/objs/Albedo/Albedo.cpp index 93b140548142064c0e5aaeb717d18119bf88d4e2..d0c910dec9677909c75d42a80095e0278470ad16 100644 --- a/isis/src/base/objs/Albedo/Albedo.cpp +++ b/isis/src/base/objs/Albedo/Albedo.cpp @@ -8,7 +8,7 @@ namespace Isis { Albedo::Albedo(Pvl &pvl, PhotoModel &pmodel) : NormModel(pvl, pmodel) { - PvlGroup &algorithm = pvl.FindObject("NormalizationModel").FindGroup("Algorithm", Pvl::Traverse); + PvlGroup &algorithm = pvl.findObject("NormalizationModel").findGroup("Algorithm", Pvl::Traverse); SetNormPharef(0.0); SetNormIncref(0.0); @@ -18,29 +18,29 @@ namespace Isis { SetNormAlbedo(1.0); // Get value from user - if(algorithm.HasKeyword("Incref")) { + if(algorithm.hasKeyword("Incref")) { SetNormIncref(algorithm["Incref"]); } - if(algorithm.HasKeyword("Pharef")) { + if(algorithm.hasKeyword("Pharef")) { SetNormPharef(algorithm["Pharef"]); } else { p_normPharef = p_normIncref; } - if(algorithm.HasKeyword("Emaref")) { + if(algorithm.hasKeyword("Emaref")) { SetNormEmaref(algorithm["Emaref"]); } - if(algorithm.HasKeyword("Incmat")) { + if(algorithm.hasKeyword("Incmat")) { SetNormIncmat(algorithm["Incmat"]); } - if(algorithm.HasKeyword("Thresh")) { + if(algorithm.hasKeyword("Thresh")) { SetNormThresh(algorithm["Thresh"]); } - if(algorithm.HasKeyword("Albedo")) { + if(algorithm.hasKeyword("Albedo")) { SetNormAlbedo(algorithm["Albedo"]); } diff --git a/isis/src/base/objs/Albedo/unitTest.cpp b/isis/src/base/objs/Albedo/unitTest.cpp index 3ba6fff58a0cb9c639a272f26978705d5f248d63..90b85e387196d3943255de1fad86428f5afd138a 100644 --- a/isis/src/base/objs/Albedo/unitTest.cpp +++ b/isis/src/base/objs/Albedo/unitTest.cpp @@ -23,17 +23,17 @@ int main() { algp += PvlKeyword("Name", "Lambert"); PvlObject op("PhotometricModel"); - op.AddGroup(algp); + op.addGroup(algp); PvlGroup algn("Algorithm"); algn += PvlKeyword("Name", "Albedo"); PvlObject on("NormalizationModel"); - on.AddGroup(algn); + on.addGroup(algn); Pvl pvl; - pvl.AddObject(op); - pvl.AddObject(on); + pvl.addObject(op); + pvl.addObject(on); std::cout << pvl << std::endl << std::endl; try { diff --git a/isis/src/base/objs/AlbedoAtm/AlbedoAtm.cpp b/isis/src/base/objs/AlbedoAtm/AlbedoAtm.cpp index dfe090fb7158d75868a11d96312af93418a3589d..bf1e60512b1ab6c4328bd14c7daeda927490741c 100644 --- a/isis/src/base/objs/AlbedoAtm/AlbedoAtm.cpp +++ b/isis/src/base/objs/AlbedoAtm/AlbedoAtm.cpp @@ -22,25 +22,25 @@ namespace Isis { */ AlbedoAtm::AlbedoAtm(Pvl &pvl, PhotoModel &pmodel, AtmosModel &amodel) : NormModel(pvl, pmodel, amodel) { - PvlGroup &algo = pvl.FindObject("NormalizationModel") - .FindGroup("Algorithm", Pvl::Traverse); + PvlGroup &algo = pvl.findObject("NormalizationModel") + .findGroup("Algorithm", Pvl::Traverse); // Set default value SetNormPharef(0.0); SetNormIncref(0.0); SetNormEmaref(0.0); // Get value from user - if(algo.HasKeyword("Incref")) { + if(algo.hasKeyword("Incref")) { SetNormIncref(algo["Incref"]); } - if(algo.HasKeyword("Pharef")) { + if(algo.hasKeyword("Pharef")) { SetNormPharef(algo["Pharef"]); } else { p_normPharef = p_normIncref; } - if(algo.HasKeyword("Emaref")) { + if(algo.hasKeyword("Emaref")) { SetNormEmaref(algo["Emaref"]); } diff --git a/isis/src/base/objs/AlbedoAtm/unitTest.cpp b/isis/src/base/objs/AlbedoAtm/unitTest.cpp index 920bee4c22db79ce3c4ad9c888fc1cb75dcbbf6d..e078db1821cec9bf20fd2cd068cf32d191dd2241 100644 --- a/isis/src/base/objs/AlbedoAtm/unitTest.cpp +++ b/isis/src/base/objs/AlbedoAtm/unitTest.cpp @@ -27,7 +27,7 @@ int main() { algp += PvlKeyword("Name", "Lambert"); PvlObject op("PhotometricModel"); - op.AddGroup(algp); + op.addGroup(algp); PvlGroup alga("Algorithm"); alga += PvlKeyword("Name", "Anisotropic1"); @@ -39,7 +39,7 @@ int main() { alga += PvlKeyword("Hnorm", "0.003"); PvlObject oa("AtmosphericModel"); - oa.AddGroup(alga); + oa.addGroup(alga); PvlGroup algn("Algorithm"); algn += PvlKeyword("Name", "AlbedoAtm"); @@ -47,12 +47,12 @@ int main() { algn += PvlKeyword("Thresh", "30.0"); PvlObject on("NormalizationModel"); - on.AddGroup(algn); + on.addGroup(algn); Pvl pvl; - pvl.AddObject(op); - pvl.AddObject(oa); - pvl.AddObject(on); + pvl.addObject(op); + pvl.addObject(oa); + pvl.addObject(on); std::cout << pvl << std::endl << std::endl; diff --git a/isis/src/base/objs/AlphaCube/AlphaCube.cpp b/isis/src/base/objs/AlphaCube/AlphaCube.cpp index 445c17facf76a6464fca71208ccafcdc6ea87cf7..10f1416f72795f58c84be7931933880f5a9640c9 100644 --- a/isis/src/base/objs/AlphaCube/AlphaCube.cpp +++ b/isis/src/base/objs/AlphaCube/AlphaCube.cpp @@ -28,9 +28,9 @@ using namespace std; namespace Isis { //! Constructs an AlphaCube object using a PVL object. AlphaCube::AlphaCube(Isis::Pvl &pvl) { - Isis::PvlObject &isiscube = pvl.FindObject("IsisCube"); - if(isiscube.HasGroup("AlphaCube")) { - Isis::PvlGroup &alpha = isiscube.FindGroup("AlphaCube"); + Isis::PvlObject &isiscube = pvl.findObject("IsisCube"); + if(isiscube.hasGroup("AlphaCube")) { + Isis::PvlGroup &alpha = isiscube.findGroup("AlphaCube"); p_alphaSamples = alpha["AlphaSamples"]; p_alphaLines = alpha["AlphaLines"]; p_alphaStartingSample = alpha["AlphaStartingSample"]; @@ -41,7 +41,7 @@ namespace Isis { p_betaLines = alpha["BetaLines"]; } else { - Isis::PvlGroup &dims = isiscube.FindGroup("Dimensions", Isis::Pvl::Traverse); + Isis::PvlGroup &dims = isiscube.findGroup("Dimensions", Isis::Pvl::Traverse); p_alphaSamples = dims["Samples"]; p_alphaLines = dims["Lines"]; p_alphaStartingSample = 0.5; @@ -130,16 +130,16 @@ namespace Isis { // If we have a mapping group we do not want to update the alpha cube // group as it represents the dimensions and sub-area of the raw instrument // cube - Isis::PvlObject &cube = pvl.FindObject("IsisCube"); - if(cube.HasGroup("Mapping")) return; + Isis::PvlObject &cube = pvl.findObject("IsisCube"); + if(cube.hasGroup("Mapping")) return; // Add the labels to the pvl - if(cube.HasGroup("AlphaCube")) { + if(cube.hasGroup("AlphaCube")) { AlphaCube temp(pvl); temp.Rehash(*this); *this = temp; - Isis::PvlGroup &alpha = cube.FindGroup("AlphaCube"); + Isis::PvlGroup &alpha = cube.findGroup("AlphaCube"); alpha["AlphaSamples"] = toString(p_alphaSamples); alpha["AlphaLines"] = toString(p_alphaLines); alpha["AlphaStartingSample"] = toString(p_alphaStartingSample); @@ -159,7 +159,7 @@ namespace Isis { alpha += Isis::PvlKeyword("AlphaEndingLine", toString(p_alphaEndingLine)); alpha += Isis::PvlKeyword("BetaSamples", toString(p_betaSamples)); alpha += Isis::PvlKeyword("BetaLines", toString(p_betaLines)); - cube.AddGroup(alpha); + cube.addGroup(alpha); } } diff --git a/isis/src/base/objs/AlphaCube/unitTest.cpp b/isis/src/base/objs/AlphaCube/unitTest.cpp index 8619bff96437ded6401ecb71be7ea034dfc32633..a766fe7cbc4d1e5efd536c01ae5cfe95da3bf436 100644 --- a/isis/src/base/objs/AlphaCube/unitTest.cpp +++ b/isis/src/base/objs/AlphaCube/unitTest.cpp @@ -78,10 +78,10 @@ int main() { try { Isis::Pvl lab; - lab.AddObject(Isis::PvlObject("IsisCube")); - Isis::PvlObject &isiscube = lab.FindObject("IsisCube"); - isiscube.AddGroup(Isis::PvlGroup("Dimensions")); - Isis::PvlGroup &dims = isiscube.FindGroup("Dimensions"); + lab.addObject(Isis::PvlObject("IsisCube")); + Isis::PvlObject &isiscube = lab.findObject("IsisCube"); + isiscube.addGroup(Isis::PvlGroup("Dimensions")); + Isis::PvlGroup &dims = isiscube.findGroup("Dimensions"); dims += Isis::PvlKeyword("Samples", "4"); dims += Isis::PvlKeyword("Lines", "8"); c.UpdateGroup(lab); diff --git a/isis/src/base/objs/Anisotropic1/unitTest.cpp b/isis/src/base/objs/Anisotropic1/unitTest.cpp index ca46b769b7dfba64d01405b940e56330ecf03d84..2e9c596a9fdf13b4aff1e4e024f96f76de113e21 100644 --- a/isis/src/base/objs/Anisotropic1/unitTest.cpp +++ b/isis/src/base/objs/Anisotropic1/unitTest.cpp @@ -26,7 +26,7 @@ int main() { algp += PvlKeyword("Name", "Lambert"); PvlObject op("PhotometricModel"); - op.AddGroup(algp); + op.addGroup(algp); PvlGroup alga("Algorithm"); alga += PvlKeyword("Name", "Anisotropic1"); @@ -35,11 +35,11 @@ int main() { alga += PvlKeyword("Hnorm", "0.003"); PvlObject oa("AtmosphericModel"); - oa.AddGroup(alga); + oa.addGroup(alga); Pvl pvl; - pvl.AddObject(op); - pvl.AddObject(oa); + pvl.addObject(op); + pvl.addObject(oa); std::cout << pvl << std::endl << std::endl; try { diff --git a/isis/src/base/objs/Anisotropic2/unitTest.cpp b/isis/src/base/objs/Anisotropic2/unitTest.cpp index b19bd505b6c044eed561fa649dd7d7a6bf97c4df..6cfef45476adf6f5845b4dd03ab401d5f8693793 100644 --- a/isis/src/base/objs/Anisotropic2/unitTest.cpp +++ b/isis/src/base/objs/Anisotropic2/unitTest.cpp @@ -26,18 +26,18 @@ int main() { algp += PvlKeyword("Name", "Lambert"); PvlObject op("PhotometricModel"); - op.AddGroup(algp); + op.addGroup(algp); PvlGroup alga("Algorithm"); alga += PvlKeyword("Name", "Anisotropic2"); alga += PvlKeyword("Tau", "0.28"); PvlObject oa("AtmosphericModel"); - oa.AddGroup(alga); + oa.addGroup(alga); Pvl pvl; - pvl.AddObject(op); - pvl.AddObject(oa); + pvl.addObject(op); + pvl.addObject(oa); std::cout << pvl << std::endl << std::endl; try { diff --git a/isis/src/base/objs/Application/Application.cpp b/isis/src/base/objs/Application/Application.cpp index 1053ad2294bb35d8abe09e9de017007f46301022..6eb270a0a0f7bb6c0c15b298b3d51bad77dc0655 100644 --- a/isis/src/base/objs/Application/Application.cpp +++ b/isis/src/base/objs/Application/Application.cpp @@ -274,7 +274,7 @@ namespace Isis { // Add the user parameters Pvl pvl; p_ui->CommandLine(pvl); - history.AddGroup(pvl.FindGroup("UserParameters")); + history.addGroup(pvl.findGroup("UserParameters")); return history; } @@ -490,9 +490,9 @@ namespace Isis { void Application::SendParentErrors(Isis::PvlObject &errors) { if (!HasParent()) return; - for (int i = 0; i < errors.Groups(); i++) { + for (int i = 0; i < errors.groups(); i++) { ostringstream ostr; - ostr << errors.Group(i) << endl; + ostr << errors.group(i) << endl; QString data = ostr.str().c_str(); iApp->SendParentData("ERROR", data); } @@ -574,8 +574,8 @@ namespace Isis { ss >> log; PvlGroup uname = GetUnameInfo(); PvlGroup env = GetEnviromentInfo(); - log.AddGroup(uname); - log.AddGroup(env); + log.addGroup(uname); + log.addGroup(env); } // Write to file @@ -660,8 +660,8 @@ namespace Isis { ss >> log; PvlGroup uname = GetUnameInfo(); PvlGroup env = GetEnviromentInfo(); - log.AddGroup(uname); - log.AddGroup(env); + log.addGroup(uname); + log.addGroup(env); } // Write to file @@ -874,21 +874,21 @@ namespace Isis { char value[256]; readTemp.open(tempFile.toAscii().data(), ifstream::in); readTemp.getline(value, 256); - unameGroup.AddKeyword(PvlKeyword("MachineHardware", value)); + unameGroup.addKeyword(PvlKeyword("MachineHardware", value)); readTemp.getline(value, 256); - unameGroup.AddKeyword(PvlKeyword("Processor", value)); + unameGroup.addKeyword(PvlKeyword("Processor", value)); readTemp.getline(value, 256); - unameGroup.AddKeyword(PvlKeyword("HardwarePlatform", value)); + unameGroup.addKeyword(PvlKeyword("HardwarePlatform", value)); readTemp.getline(value, 256); - unameGroup.AddKeyword(PvlKeyword("OperatingSystem", value)); + unameGroup.addKeyword(PvlKeyword("OperatingSystem", value)); readTemp.getline(value, 256); - unameGroup.AddKeyword(PvlKeyword("KernelName", value)); + unameGroup.addKeyword(PvlKeyword("KernelName", value)); readTemp.getline(value, 256); - unameGroup.AddKeyword(PvlKeyword("KernelVersion", value)); + unameGroup.addKeyword(PvlKeyword("KernelVersion", value)); readTemp.getline(value, 256); - unameGroup.AddKeyword(PvlKeyword("KernelRelease", value)); + unameGroup.addKeyword(PvlKeyword("KernelRelease", value)); readTemp.getline(value, 256); - unameGroup.AddKeyword(PvlKeyword("FullUnameString", value)); + unameGroup.addKeyword(PvlKeyword("FullUnameString", value)); #elif defined(__APPLE__) // Write uname outputs to temp file @@ -903,17 +903,17 @@ namespace Isis { char value[256]; readTemp.open(tempFile.toAscii().data(), ifstream::in); readTemp.getline(value, 256); - unameGroup.AddKeyword(PvlKeyword("MachineHardware", value)); + unameGroup.addKeyword(PvlKeyword("MachineHardware", value)); readTemp.getline(value, 256); - unameGroup.AddKeyword(PvlKeyword("Processor", value)); + unameGroup.addKeyword(PvlKeyword("Processor", value)); readTemp.getline(value, 256); - unameGroup.AddKeyword(PvlKeyword("OperatingSystem", value)); + unameGroup.addKeyword(PvlKeyword("OperatingSystem", value)); readTemp.getline(value, 256); - unameGroup.AddKeyword(PvlKeyword("OperatingSystemVersion", value)); + unameGroup.addKeyword(PvlKeyword("OperatingSystemVersion", value)); readTemp.getline(value, 256); - unameGroup.AddKeyword(PvlKeyword("OperatingSystemRelease", value)); + unameGroup.addKeyword(PvlKeyword("OperatingSystemRelease", value)); readTemp.getline(value, 256); - unameGroup.AddKeyword(PvlKeyword("FullUnameString", value)); + unameGroup.addKeyword(PvlKeyword("FullUnameString", value)); #endif // remove temp file and return @@ -949,15 +949,15 @@ namespace Isis { char value[511]; readTemp.open(tempFile.toAscii().data(), ifstream::in); readTemp.getline(value, 255); - envGroup.AddKeyword(PvlKeyword("Shell", value)); + envGroup.addKeyword(PvlKeyword("Shell", value)); readTemp.getline(value, 255); - envGroup.AddKeyword(PvlKeyword("Home", value)); + envGroup.addKeyword(PvlKeyword("Home", value)); readTemp.getline(value, 255); - envGroup.AddKeyword(PvlKeyword("Pwd", value)); + envGroup.addKeyword(PvlKeyword("Pwd", value)); readTemp.getline(value, 255); - envGroup.AddKeyword(PvlKeyword("ISISROOT", value)); + envGroup.addKeyword(PvlKeyword("ISISROOT", value)); readTemp.getline(value, 255); - envGroup.AddKeyword(PvlKeyword("ISIS3DATA", value)); + envGroup.addKeyword(PvlKeyword("ISIS3DATA", value)); // remove temp file and return QString cleanup = "rm -f " + tempFile; diff --git a/isis/src/base/objs/AtmosModel/AtmosModel.cpp b/isis/src/base/objs/AtmosModel/AtmosModel.cpp index e14185b534e7572c132a9d3e8e23e9ced482eb33..008d2e65523b0e0ce2c858816541bfcc956539f0 100644 --- a/isis/src/base/objs/AtmosModel/AtmosModel.cpp +++ b/isis/src/base/objs/AtmosModel/AtmosModel.cpp @@ -65,59 +65,59 @@ namespace Isis { p_transs = 0.0; p_standardConditions = false; - PvlGroup &algorithm = pvl.FindObject("AtmosphericModel").FindGroup("Algorithm", Pvl::Traverse); + PvlGroup &algorithm = pvl.findObject("AtmosphericModel").findGroup("Algorithm", Pvl::Traverse); - if(algorithm.HasKeyword("Nulneg")) { + if(algorithm.hasKeyword("Nulneg")) { SetAtmosNulneg(algorithm["Nulneg"][0] == "YES"); } else { p_atmosNulneg = false; } - if(algorithm.HasKeyword("Tau")) { + if(algorithm.hasKeyword("Tau")) { SetAtmosTau(algorithm["Tau"]); } p_atmosTausave = p_atmosTau; - if(algorithm.HasKeyword("Tauref")) { + if(algorithm.hasKeyword("Tauref")) { SetAtmosTauref(algorithm["Tauref"]); } - if(algorithm.HasKeyword("Wha")) { + if(algorithm.hasKeyword("Wha")) { SetAtmosWha(algorithm["Wha"]); } p_atmosWhasave = p_atmosWha; - if(algorithm.HasKeyword("Hga")) { + if(algorithm.hasKeyword("Hga")) { SetAtmosHga(algorithm["Hga"]); } p_atmosHgasave = p_atmosHga; - if(algorithm.HasKeyword("Bha")) { + if(algorithm.hasKeyword("Bha")) { SetAtmosBha(algorithm["Bha"]); } p_atmosBhasave = p_atmosBha; - if(algorithm.HasKeyword("Inc")) { + if(algorithm.hasKeyword("Inc")) { SetAtmosInc(algorithm["Inc"]); } - if(algorithm.HasKeyword("Phi")) { + if(algorithm.hasKeyword("Phi")) { SetAtmosPhi(algorithm["Phi"]); } - if(algorithm.HasKeyword("Hnorm")) { + if(algorithm.hasKeyword("Hnorm")) { SetAtmosHnorm(algorithm["Hnorm"]); } - if(algorithm.HasKeyword("Iord")) { + if(algorithm.hasKeyword("Iord")) { SetAtmosIord(algorithm["Iord"][0] == "YES"); } else { p_atmosAddOffset = false; } - if(algorithm.HasKeyword("EstTau")) { + if(algorithm.hasKeyword("EstTau")) { SetAtmosEstTau(algorithm["EstTau"][0] == "YES"); } else { diff --git a/isis/src/base/objs/AtmosModel/unitTest.cpp b/isis/src/base/objs/AtmosModel/unitTest.cpp index ae2ab48fabefdb088fc7319d326f1545e500d8a9..6b9687eb883444ee6e125a464ced0d25414d548f 100644 --- a/isis/src/base/objs/AtmosModel/unitTest.cpp +++ b/isis/src/base/objs/AtmosModel/unitTest.cpp @@ -21,23 +21,23 @@ int main() { cout << "UNIT TEST for Isis::AtmosModel" << endl << endl; Pvl lab; - lab.AddObject(PvlObject("PhotometricModel")); - lab.FindObject("PhotometricModel").AddGroup(PvlGroup("Algorithm")); - lab.FindObject("PhotometricModel").FindGroup("Algorithm").AddKeyword(PvlKeyword("Name", "Lambert")); // HapkeHen + lab.addObject(PvlObject("PhotometricModel")); + lab.findObject("PhotometricModel").addGroup(PvlGroup("Algorithm")); + lab.findObject("PhotometricModel").findGroup("Algorithm").addKeyword(PvlKeyword("Name", "Lambert")); // HapkeHen PhotoModel *pm = PhotoModelFactory::Create(lab); cout << "Testing missing AtmosphericModel object ..." << endl; doit(lab, *pm); - lab.AddObject(PvlObject("AtmosphericModel")); + lab.addObject(PvlObject("AtmosphericModel")); cout << "Testing missing Algorithm group ..." << endl; doit(lab, *pm); - lab.FindObject("AtmosphericModel").AddGroup(PvlGroup("Algorithm")); + lab.findObject("AtmosphericModel").addGroup(PvlGroup("Algorithm")); cout << "Testing missing Name keyword ..." << endl; doit(lab, *pm); - lab.FindObject("AtmosphericModel").FindGroup("Algorithm").AddKeyword(PvlKeyword("Name", "Anisotropic1"), Pvl::Replace); + lab.findObject("AtmosphericModel").findGroup("Algorithm").addKeyword(PvlKeyword("Name", "Anisotropic1"), Pvl::Replace); cout << "Testing supported atmospheric model ..." << endl; doit(lab, *pm); diff --git a/isis/src/base/objs/AtmosModelFactory/AtmosModelFactory.cpp b/isis/src/base/objs/AtmosModelFactory/AtmosModelFactory.cpp index 5a36a0945d71d7b501924e6bc9f9f943689ef406..457798556b55e61e5d8c33b247dc3cc545c2e6bb 100644 --- a/isis/src/base/objs/AtmosModelFactory/AtmosModelFactory.cpp +++ b/isis/src/base/objs/AtmosModelFactory/AtmosModelFactory.cpp @@ -60,14 +60,14 @@ namespace Isis { AtmosModel *AtmosModelFactory::Create(Pvl &pvl, PhotoModel &pmodel) { // Get the algorithm name to create - PvlGroup &algo = pvl.FindObject("AtmosphericModel") - .FindGroup("Algorithm", Pvl::Traverse); + PvlGroup &algo = pvl.findObject("AtmosphericModel") + .findGroup("Algorithm", Pvl::Traverse); QString algorithm = ""; - if(algo.HasKeyword("AtmName")) { + if(algo.hasKeyword("AtmName")) { algorithm = QString(algo["AtmName"]); } - else if(algo.HasKeyword("Name")) { + else if(algo.hasKeyword("Name")) { algorithm = QString(algo["Name"]); } else { @@ -80,10 +80,10 @@ namespace Isis { Plugin *p = new Plugin; FileName f("AtmosModel.plugin"); if(f.fileExists()) { - p->Read("AtmosModel.plugin"); + p->read("AtmosModel.plugin"); } else { - p->Read("$ISISROOT/lib/AtmosModel.plugin"); + p->read("$ISISROOT/lib/AtmosModel.plugin"); } // Get the algorithm specific plugin and return it diff --git a/isis/src/base/objs/AutoReg/AutoReg.cpp b/isis/src/base/objs/AutoReg/AutoReg.cpp index 4e8f1cfe4d7019df225205d0bf83e0380fdda5ee..4ba8b8bfa6103b1b37689f2ea8e8ccabb5b273e5 100644 --- a/isis/src/base/objs/AutoReg/AutoReg.cpp +++ b/isis/src/base/objs/AutoReg/AutoReg.cpp @@ -77,7 +77,7 @@ namespace Isis { * @see patternMatch.doc under the coreg application */ AutoReg::AutoReg(Pvl &pvl) { - p_template = pvl.FindObject("AutoRegistration"); + p_template = pvl.findObject("AutoRegistration"); // Set default parameters p_patternChip.SetSize(3, 3); @@ -207,70 +207,70 @@ namespace Isis { void AutoReg::Parse(Pvl &pvl) { try { // Get info from Algorithm group - PvlGroup &algo = pvl.FindGroup("Algorithm", Pvl::Traverse); + PvlGroup &algo = pvl.findGroup("Algorithm", Pvl::Traverse); SetTolerance(algo["Tolerance"]); - if(algo.HasKeyword("ChipInterpolator")) { + if(algo.hasKeyword("ChipInterpolator")) { SetChipInterpolator((QString)algo["ChipInterpolator"]); } - if(algo.HasKeyword("SubpixelAccuracy")) { + if(algo.hasKeyword("SubpixelAccuracy")) { SetSubPixelAccuracy((QString)algo["SubpixelAccuracy"] == "True"); } - if(algo.HasKeyword("ReductionFactor")) { + if(algo.hasKeyword("ReductionFactor")) { SetReductionFactor((int)algo["ReductionFactor"]); } - if (algo.HasKeyword("Gradient")) { + if (algo.hasKeyword("Gradient")) { SetGradientFilterType((QString)algo["Gradient"]); } // Setup the pattern chip - PvlGroup &pchip = pvl.FindGroup("PatternChip", Pvl::Traverse); + PvlGroup &pchip = pvl.findGroup("PatternChip", Pvl::Traverse); PatternChip()->SetSize((int)pchip["Samples"], (int)pchip["Lines"]); double minimum = Isis::ValidMinimum; double maximum = Isis::ValidMaximum; - if(pchip.HasKeyword("ValidMinimum")) minimum = pchip["ValidMinimum"]; - if(pchip.HasKeyword("ValidMaximum")) maximum = pchip["ValidMaximum"]; + if(pchip.hasKeyword("ValidMinimum")) minimum = pchip["ValidMinimum"]; + if(pchip.hasKeyword("ValidMaximum")) maximum = pchip["ValidMaximum"]; PatternChip()->SetValidRange(minimum, maximum); - if(pchip.HasKeyword("MinimumZScore")) { + if(pchip.hasKeyword("MinimumZScore")) { SetPatternZScoreMinimum((double)pchip["MinimumZScore"]); } - if(pchip.HasKeyword("ValidPercent")) { + if(pchip.hasKeyword("ValidPercent")) { SetPatternValidPercent((double)pchip["ValidPercent"]); } // Setup the search chip - PvlGroup &schip = pvl.FindGroup("SearchChip", Pvl::Traverse); + PvlGroup &schip = pvl.findGroup("SearchChip", Pvl::Traverse); SearchChip()->SetSize((int)schip["Samples"], (int)schip["Lines"]); minimum = Isis::ValidMinimum; maximum = Isis::ValidMaximum; - if(schip.HasKeyword("ValidMinimum")) minimum = schip["ValidMinimum"]; - if(schip.HasKeyword("ValidMaximum")) maximum = schip["ValidMaximum"]; + if(schip.hasKeyword("ValidMinimum")) minimum = schip["ValidMinimum"]; + if(schip.hasKeyword("ValidMaximum")) maximum = schip["ValidMaximum"]; SearchChip()->SetValidRange(minimum, maximum); - if(schip.HasKeyword("SubchipValidPercent")) { + if(schip.hasKeyword("SubchipValidPercent")) { SetSubsearchValidPercent((double)schip["SubchipValidPercent"]); } // Setup surface model - PvlObject ar = pvl.FindObject("AutoRegistration"); - if(ar.HasGroup("SurfaceModel")) { - PvlGroup &smodel = ar.FindGroup("SurfaceModel", Pvl::Traverse); - if(smodel.HasKeyword("DistanceTolerance")) { + PvlObject ar = pvl.findObject("AutoRegistration"); + if(ar.hasGroup("SurfaceModel")) { + PvlGroup &smodel = ar.findGroup("SurfaceModel", Pvl::Traverse); + if(smodel.hasKeyword("DistanceTolerance")) { SetSurfaceModelDistanceTolerance((double)smodel["DistanceTolerance"]); } - if(smodel.HasKeyword("WindowSize")) { + if(smodel.hasKeyword("WindowSize")) { SetSurfaceModelWindowSize((int)smodel["WindowSize"]); } } } catch(IException &e) { - QString msg = "Improper format for AutoReg PVL [" + pvl.FileName() + "]"; + QString msg = "Improper format for AutoReg PVL [" + pvl.fileName() + "]"; throw IException(e, IException::User, msg, _FILEINFO_); } return; @@ -1183,28 +1183,28 @@ namespace Isis { stats += Isis::PvlKeyword("Total", toString(p_totalRegistrations)); stats += Isis::PvlKeyword("Successful", toString(p_pixelSuccesses + p_subpixelSuccesses)); stats += Isis::PvlKeyword("Failure", toString(p_totalRegistrations - (p_pixelSuccesses + p_subpixelSuccesses))); - pvl.AddGroup(stats); + pvl.addGroup(stats); PvlGroup successes("Successes"); successes += PvlKeyword("SuccessPixel", toString(p_pixelSuccesses)); successes += PvlKeyword("SuccessSubPixel", toString(p_subpixelSuccesses)); - pvl.AddGroup(successes); + pvl.addGroup(successes); PvlGroup grp("PatternChipFailures"); grp += PvlKeyword("PatternNotEnoughValidData", toString(p_patternChipNotEnoughValidDataCount)); grp += PvlKeyword("PatternZScoreNotMet", toString(p_patternZScoreNotMetCount)); - pvl.AddGroup(grp); + pvl.addGroup(grp); PvlGroup fit("FitChipFailures"); fit += PvlKeyword("FitChipNoData", toString(p_fitChipNoDataCount)); fit += PvlKeyword("FitChipToleranceNotMet", toString(p_fitChipToleranceNotMetCount)); - pvl.AddGroup(fit); + pvl.addGroup(fit); PvlGroup model("SurfaceModelFailures"); model += PvlKeyword("SurfaceModelNotEnoughValidData", toString(p_surfaceModelNotEnoughValidDataCount)); model += PvlKeyword("SurfaceModelSolutionInvalid", toString(p_surfaceModelSolutionInvalidCount)); model += PvlKeyword("SurfaceModelDistanceInvalid", toString(p_surfaceModelDistanceInvalidCount)); - pvl.AddGroup(model); + pvl.addGroup(model); return (AlgorithmStatistics(pvl)); } @@ -1219,57 +1219,57 @@ namespace Isis { PvlGroup AutoReg::RegTemplate() { PvlGroup reg("AutoRegistration"); - PvlGroup &algo = p_template.FindGroup("Algorithm", Pvl::Traverse); + PvlGroup &algo = p_template.findGroup("Algorithm", Pvl::Traverse); reg += PvlKeyword("Algorithm", algo["Name"][0]); reg += PvlKeyword("Tolerance", algo["Tolerance"][0]); - if(algo.HasKeyword("SubpixelAccuracy")) { + if(algo.hasKeyword("SubpixelAccuracy")) { reg += PvlKeyword("SubpixelAccuracy", algo["SubpixelAccuracy"][0]); } - if(algo.HasKeyword("ReductionFactor")) { + if(algo.hasKeyword("ReductionFactor")) { reg += PvlKeyword("ReductionFactor", algo["ReductionFactor"][0]); } - if(algo.HasKeyword("Gradient")) { + if(algo.hasKeyword("Gradient")) { reg += PvlKeyword("Gradient", algo["Gradient"][0]); } - PvlGroup &pchip = p_template.FindGroup("PatternChip", Pvl::Traverse); + PvlGroup &pchip = p_template.findGroup("PatternChip", Pvl::Traverse); reg += PvlKeyword("PatternSamples", pchip["Samples"][0]); reg += PvlKeyword("PatternLines", pchip["Lines"][0]); - if(pchip.HasKeyword("ValidMinimum")) { + if(pchip.hasKeyword("ValidMinimum")) { reg += PvlKeyword("PatternMinimum", pchip["ValidMinimum"][0]); } - if(pchip.HasKeyword("ValidMaximum")) { + if(pchip.hasKeyword("ValidMaximum")) { reg += PvlKeyword("PatternMaximum", pchip["ValidMaximum"][0]); } - if(pchip.HasKeyword("MinimumZScore")) { + if(pchip.hasKeyword("MinimumZScore")) { reg += PvlKeyword("MinimumZScore", pchip["MinimumZScore"][0]); } - if(pchip.HasKeyword("ValidPercent")) { + if(pchip.hasKeyword("ValidPercent")) { SetPatternValidPercent((double)pchip["ValidPercent"]); reg += PvlKeyword("ValidPercent", pchip["ValidPercent"][0]); } - PvlGroup &schip = p_template.FindGroup("SearchChip", Pvl::Traverse); + PvlGroup &schip = p_template.findGroup("SearchChip", Pvl::Traverse); reg += PvlKeyword("SearchSamples", schip["Samples"][0]); reg += PvlKeyword("SearchLines", schip["Lines"][0]); - if(schip.HasKeyword("ValidMinimum")) { + if(schip.hasKeyword("ValidMinimum")) { reg += PvlKeyword("SearchMinimum", schip["ValidMinimum"][0]); } - if(schip.HasKeyword("ValidMaximum")) { + if(schip.hasKeyword("ValidMaximum")) { reg += PvlKeyword("SearchMaximum", schip["ValidMaximum"][0]); } - if(schip.HasKeyword("SubchipValidPercent")) { + if(schip.hasKeyword("SubchipValidPercent")) { SetSubsearchValidPercent((double)schip["SubchipValidPercent"]); reg += PvlKeyword("SubchipValidPercent", schip["SubchipValidPercent"][0]); } - if(p_template.HasGroup("SurfaceModel")) { - PvlGroup &smodel = p_template.FindGroup("SurfaceModel", Pvl::Traverse); - if(smodel.HasKeyword("DistanceTolerance")) { + if(p_template.hasGroup("SurfaceModel")) { + PvlGroup &smodel = p_template.findGroup("SurfaceModel", Pvl::Traverse); + if(smodel.hasKeyword("DistanceTolerance")) { reg += PvlKeyword("DistanceTolerance", smodel["DistanceTolerance"][0]); } - if(smodel.HasKeyword("WindowSize")) { + if(smodel.hasKeyword("WindowSize")) { reg += PvlKeyword("WindowSize", smodel["WindowSize"][0]); } } diff --git a/isis/src/base/objs/AutoReg/unitTest.cpp b/isis/src/base/objs/AutoReg/unitTest.cpp index 7d5a861bd039953ebe76126da1b4e3da7f071897..2034039f6f9bc1ebaa835dd17384f54305c339e4 100644 --- a/isis/src/base/objs/AutoReg/unitTest.cpp +++ b/isis/src/base/objs/AutoReg/unitTest.cpp @@ -30,8 +30,8 @@ int main() { cout << "------------------------------" << endl; cout << "Test for missing Name Keyword" << endl; cout << "------------------------------" << endl; - obj.AddGroup(Isis::PvlGroup("Algorithm")); - Isis::PvlGroup &mg = obj.FindGroup("Algorithm"); + obj.addGroup(Isis::PvlGroup("Algorithm")); + Isis::PvlGroup &mg = obj.findGroup("Algorithm"); Doit(obj); cout << endl; @@ -72,15 +72,15 @@ int main() { mg["Gradient"] = "None"; cout << endl; - obj.AddGroup(Isis::PvlGroup("PatternChip")); - Isis::PvlGroup &pc = obj.FindGroup("PatternChip"); + obj.addGroup(Isis::PvlGroup("PatternChip")); + Isis::PvlGroup &pc = obj.findGroup("PatternChip"); pc += Isis::PvlKeyword("Lines", "90"); pc += Isis::PvlKeyword("Samples", "90"); cout << "-------------------------------" << endl; cout << "Test for missing Lines Keyword" << endl; cout << "-------------------------------" << endl; - pc.DeleteKeyword("Lines"); + pc.deleteKeyword("Lines"); Doit(obj); cout << endl; @@ -88,7 +88,7 @@ int main() { cout << "Test for missing Samples Keyword" << endl; cout << "---------------------------------" << endl; pc += Isis::PvlKeyword("Lines", "90"); - pc.DeleteKeyword("Samples"); + pc.deleteKeyword("Samples"); Doit(obj); cout << endl; @@ -115,15 +115,15 @@ int main() { Doit(obj); cout << endl; - obj.AddGroup(Isis::PvlGroup("SearchChip")); - Isis::PvlGroup &sc = obj.FindGroup("SearchChip"); + obj.addGroup(Isis::PvlGroup("SearchChip")); + Isis::PvlGroup &sc = obj.findGroup("SearchChip"); sc += Isis::PvlKeyword("Lines", "150"); sc += Isis::PvlKeyword("Samples", "150"); cout << "-------------------------------" << endl; cout << "Test for missing Lines Keyword" << endl; cout << "-------------------------------" << endl; - sc.DeleteKeyword("Lines"); + sc.deleteKeyword("Lines"); Doit(obj); cout << endl; @@ -131,7 +131,7 @@ int main() { cout << "Test for missing Samples Keyword" << endl; cout << "---------------------------------" << endl; sc += Isis::PvlKeyword("Lines", "150"); - sc.DeleteKeyword("Samples"); + sc.deleteKeyword("Samples"); Doit(obj); cout << endl; @@ -294,7 +294,7 @@ int main() { cout << "\n---------------------" << endl; cout << "Testing Minimum Difference Algorithm" << endl; cout << "---------------------" << endl; - mg = obj.FindGroup("Algorithm"); + mg = obj.findGroup("Algorithm"); mg["Name"] = "MinimumDifference"; Doit(obj); p_ar->SetSubPixelAccuracy(false); @@ -309,7 +309,7 @@ int main() { void Doit(Isis::PvlObject &obj) { try { Pvl lab; - lab.AddObject(obj); + lab.addObject(obj); p_ar = AutoRegFactory::Create(lab); Cube c; c.open("search_low.cub"); diff --git a/isis/src/base/objs/AutoRegFactory/AutoRegFactory.cpp b/isis/src/base/objs/AutoRegFactory/AutoRegFactory.cpp index bbb52b838631490f78597a12d2b3b5805b1341de..f2640197e2cb628d08af598ea5c1cdc8fd81db8d 100644 --- a/isis/src/base/objs/AutoRegFactory/AutoRegFactory.cpp +++ b/isis/src/base/objs/AutoRegFactory/AutoRegFactory.cpp @@ -60,17 +60,17 @@ namespace Isis { **/ AutoReg *AutoRegFactory::Create(Pvl &pvl) { // Get the algorithm name to create - PvlGroup &algo = pvl.FindGroup("Algorithm", Pvl::Traverse); + PvlGroup &algo = pvl.findGroup("Algorithm", Pvl::Traverse); QString algorithm = algo["Name"]; // Open the factory plugin file Plugin p; FileName f("AutoReg.plugin"); if(f.fileExists()) { - p.Read("AutoReg.plugin"); + p.read("AutoReg.plugin"); } else { - p.Read("$ISISROOT/lib/AutoReg.plugin"); + p.read("$ISISROOT/lib/AutoReg.plugin"); } // Get the algorithm specific plugin and return it diff --git a/isis/src/base/objs/Blob/Blob.cpp b/isis/src/base/objs/Blob/Blob.cpp index f6df2122acb54fa80f38ed81da8005b2fc9d654c..15944e8e70713f240f6a3d855efc25579caa4408 100644 --- a/isis/src/base/objs/Blob/Blob.cpp +++ b/isis/src/base/objs/Blob/Blob.cpp @@ -48,7 +48,7 @@ namespace Isis { p_nbytes = 0; p_type = type; - p_blobPvl.SetName(p_type); + p_blobPvl.setName(p_type); p_blobPvl += PvlKeyword("Name", p_blobName); p_blobPvl += PvlKeyword("StartByte", "0"); p_blobPvl += PvlKeyword("Bytes", "0"); @@ -181,9 +181,9 @@ namespace Isis { try { // Search for the blob name QString blobName = p_blobName.toUpper(); - for (int o = 0; o < pvl.Objects(); o++) { - const PvlObject &obj = pvl.Object(o); - if (obj.IsNamed(p_type)) { + for (int o = 0; o < pvl.objects(); o++) { + const PvlObject &obj = pvl.object(o); + if (obj.isNamed(p_type)) { QString curName = obj["Name"]; curName = curName.toUpper(); if (blobName == curName) { @@ -217,13 +217,13 @@ namespace Isis { p_startByte = p_blobPvl["StartByte"]; p_nbytes = p_blobPvl["Bytes"]; p_detached = ""; - if (p_blobPvl.HasKeyword("^" + p_type)) { + if (p_blobPvl.hasKeyword("^" + p_type)) { QString path = ""; if (p_labelFile != "") { path = FileName(p_labelFile).path() + "/"; } p_detached = path + (QString) p_blobPvl["^"+p_type]; - p_blobPvl.DeleteKeyword("^" + p_type); + p_blobPvl.deleteKeyword("^" + p_type); } } catch (IException &e) { @@ -247,7 +247,7 @@ namespace Isis { // Get the pvl Pvl pvl; try { - pvl.Read(temp); + pvl.read(temp); } catch (IException &e) { QString msg = "Invalid " + p_type + " label format"; @@ -371,15 +371,15 @@ namespace Isis { try { WriteInit(); Pvl pvl; - pvl.AddObject(p_blobPvl); + pvl.addObject(p_blobPvl); ostringstream os; os << pvl << endl; os.seekp(0, std::ios::end); BigInt nbytes = (BigInt) os.tellp() + (BigInt) 64; p_startByte = nbytes + 1 + 1; // 1-based; - pvl.FindObject(p_type)["StartByte"] = toString(p_startByte); - pvl.FindObject(p_type)["Bytes"] = toString(p_nbytes); - pvl.Write(file); + pvl.findObject(p_type)["StartByte"] = toString(p_startByte); + pvl.findObject(p_type)["Bytes"] = toString(p_nbytes); + pvl.write(file); // Prepare and write the binary data fstream stream; @@ -439,9 +439,9 @@ namespace Isis { p_blobPvl["Bytes"] = toString(p_nbytes); bool found = false; - for (int i = 0; i < pvl.Objects(); i++) { - if (pvl.Object(i).Name() == p_blobPvl.Name()) { - PvlObject &obj = pvl.Object(i); + for (int i = 0; i < pvl.objects(); i++) { + if (pvl.object(i).name() == p_blobPvl.name()) { + PvlObject &obj = pvl.object(i); if ((QString)obj["Name"] == (QString)p_blobPvl["Name"]) { found = true; @@ -473,7 +473,7 @@ namespace Isis { // Didn't find the same blob so add it to the labels if (!found) { - pvl.AddObject(p_blobPvl); + pvl.addObject(p_blobPvl); } stm.seekp((BigInt) sbyte - (BigInt)1); @@ -481,7 +481,7 @@ namespace Isis { // Handle detached blobs if (detachedFileName != "") { - p_blobPvl.DeleteKeyword("^" + p_type); + p_blobPvl.deleteKeyword("^" + p_type); } } @@ -516,7 +516,7 @@ namespace Isis { * @return bool Returns true if the object is a blob, and false if it is not */ bool IsBlob(PvlObject &obj) { - if (obj.IsNamed("TABLE")) return true; + if (obj.isNamed("TABLE")) return true; return false; } } // end namespace isis diff --git a/isis/src/base/objs/Camera/Camera.cpp b/isis/src/base/objs/Camera/Camera.cpp index 4dab9063173581dbf34edae3dcd96878f4229d28..38471029b7df13d77c4be840e7c0bdc8261779cd 100644 --- a/isis/src/base/objs/Camera/Camera.cpp +++ b/isis/src/base/objs/Camera/Camera.cpp @@ -62,9 +62,9 @@ namespace Isis { Camera::Camera(Pvl &lab) : Sensor(lab) { // Get the image size which can be different than the alpha cube size - PvlGroup &dims = lab.FindObject("IsisCube") - .FindObject("Core") - .FindGroup("Dimensions"); + PvlGroup &dims = lab.findObject("IsisCube") + .findObject("Core") + .findGroup("Dimensions"); p_lines = dims["Lines"]; p_samples = dims["Samples"]; p_bands = dims["Bands"]; @@ -75,7 +75,7 @@ namespace Isis { p_alphaCube = new AlphaCube(lab); // Get the projection group if it exists - if (lab.FindObject("IsisCube").HasGroup("Mapping")) { + if (lab.findObject("IsisCube").hasGroup("Mapping")) { p_projection = ProjectionFactory::CreateFromCube(lab); } else { @@ -96,8 +96,8 @@ namespace Isis { p_skyMap = NULL; // See if we have a reference band - PvlGroup &inst = lab.FindObject("IsisCube").FindGroup("Instrument"); - if (inst.HasKeyword("ReferenceBand")) { + PvlGroup &inst = lab.findObject("IsisCube").findGroup("Instrument"); + if (inst.hasKeyword("ReferenceBand")) { p_referenceBand = inst["ReferenceBand"]; } @@ -698,18 +698,18 @@ namespace Isis { Distance &b = localRadii[2]; // See if the PVL overrides the radii - PvlGroup map = pvl.FindGroup("Mapping", Pvl::Traverse); + PvlGroup map = pvl.findGroup("Mapping", Pvl::Traverse); - if (map.HasKeyword("EquatorialRadius")) + if (map.hasKeyword("EquatorialRadius")) a = Distance(toDouble(map["EquatorialRadius"][0]), Distance::Meters); - if (map.HasKeyword("PolarRadius")) + if (map.hasKeyword("PolarRadius")) b = Distance(toDouble(map["PolarRadius"][0]), Distance::Meters); // Convert to planetographic if necessary minlat = p_minlat; maxlat = p_maxlat; - if (map.HasKeyword("LatitudeType")) { + if (map.hasKeyword("LatitudeType")) { QString latType = (QString) map["LatitudeType"]; if (latType.toUpper() == "PLANETOGRAPHIC") { if (abs(minlat) < 90.0) { // So tan doesn't fail @@ -730,7 +730,7 @@ namespace Isis { minlon = p_minlon; maxlon = p_maxlon; bool domain360 = true; - if (map.HasKeyword("LongitudeDomain")) { + if (map.hasKeyword("LongitudeDomain")) { QString lonDomain = (QString) map["LongitudeDomain"]; if (lonDomain == "180") { minlon = p_minlon180; @@ -740,7 +740,7 @@ namespace Isis { } // Convert to the proper longitude direction - if (map.HasKeyword("LongitudeDirection")) { + if (map.hasKeyword("LongitudeDirection")) { QString lonDirection = (QString) map["LongitudeDirection"]; if (lonDirection.toUpper() == "POSITIVEWEST") { double swap = minlon; @@ -801,7 +801,7 @@ namespace Isis { map += PvlKeyword("PixelResolution", toString(p_minres)); map += PvlKeyword("ProjectionName", "Sinusoidal"); - pvl.AddGroup(map); + pvl.addGroup(map); } //! Reads the focal length from the instrument kernel diff --git a/isis/src/base/objs/Camera/unitTest.cpp b/isis/src/base/objs/Camera/unitTest.cpp index f484a43a8936eeeb3cd09c1b286ff0cc9905ae6f..c59cbb3052dfa7936bdd84e467635dadef920469 100644 --- a/isis/src/base/objs/Camera/unitTest.cpp +++ b/isis/src/base/objs/Camera/unitTest.cpp @@ -132,11 +132,11 @@ int main() { cout << "Calling BasicMapping (pvl)..." << endl; c->BasicMapping(pvl); - double pixRes2 = pvl.FindGroup("Mapping")["PixelResolution"]; + double pixRes2 = pvl.findGroup("Mapping")["PixelResolution"]; pixRes2 *= 10000000; pixRes2 = round(pixRes2); pixRes2 /= 10000000; - pvl.FindGroup("Mapping")["PixelResolution"] = toString(pixRes2); + pvl.findGroup("Mapping")["PixelResolution"] = toString(pixRes2); cout << "BasicMapping PVL: " << endl << pvl << endl << endl; cout << "FocalLength: " << c->FocalLength() << endl; @@ -223,30 +223,30 @@ int main() { Pvl camMap; cam2->BasicMapping(camMap); - double minLat = camMap.FindGroup("Mapping")["MinimumLatitude"]; + double minLat = camMap.findGroup("Mapping")["MinimumLatitude"]; minLat *= 100; minLat = round(minLat); minLat /= 100; - camMap.FindGroup("Mapping")["MinimumLatitude"] = toString(minLat); + camMap.findGroup("Mapping")["MinimumLatitude"] = toString(minLat); - double pixRes = camMap.FindGroup("Mapping")["PixelResolution"]; + double pixRes = camMap.findGroup("Mapping")["PixelResolution"]; pixRes *= 100; pixRes = round(pixRes); pixRes /= 100; - camMap.FindGroup("Mapping")["PixelResolution"] = toString(pixRes); + camMap.findGroup("Mapping")["PixelResolution"] = toString(pixRes); - double minLon = camMap.FindGroup("Mapping")["MinimumLongitude"]; + double minLon = camMap.findGroup("Mapping")["MinimumLongitude"]; minLon *= 100000000000.0; minLon = round(minLon); minLon /= 100000000000.0; - camMap.FindGroup("Mapping")["MinimumLongitude"] = toString(minLon); + camMap.findGroup("Mapping")["MinimumLongitude"] = toString(minLon); cout << camMap << endl; cout << endl; cout << "180 Domain Range: " << endl; double minlat, maxlat, minlon, maxlon; - camMap.FindGroup("Mapping")["LongitudeDomain"][0] = "180"; + camMap.findGroup("Mapping")["LongitudeDomain"][0] = "180"; cam2->GroundRange(minlat, maxlat, minlon, maxlon, camMap); cout << "Latitude Range: " << minlat << " to " << maxlat << endl; cout << "Longitude Range: " << minlon << " to " << maxlon diff --git a/isis/src/base/objs/CameraFactory/CameraFactory.cpp b/isis/src/base/objs/CameraFactory/CameraFactory.cpp index 8c89336cf4727ca66feb696e1b0daac0aad6ed8c..de23600f3c0c4e549f21390ae4f1ecd882ddffec 100644 --- a/isis/src/base/objs/CameraFactory/CameraFactory.cpp +++ b/isis/src/base/objs/CameraFactory/CameraFactory.cpp @@ -50,7 +50,7 @@ namespace Isis { try { // First get the spacecraft and instrument and combine them - PvlGroup &inst = lab.FindGroup("Instrument", Isis::Pvl::Traverse); + PvlGroup &inst = lab.findGroup("Instrument", Isis::Pvl::Traverse); QString spacecraft = (QString) inst["SpacecraftName"]; QString name = (QString) inst["InstrumentId"]; spacecraft = spacecraft.toUpper(); @@ -58,10 +58,10 @@ namespace Isis { QString group = spacecraft + "/" + name; group = group.remove(" "); - PvlGroup &kerns = lab.FindGroup("Kernels", Isis::Pvl::Traverse); + PvlGroup &kerns = lab.findGroup("Kernels", Isis::Pvl::Traverse); // Default version 1 for backwards compatibility (spiceinit'd cubes before camera model versioning) - if(!kerns.HasKeyword("CameraVersion")) { - kerns.AddKeyword(PvlKeyword("CameraVersion", "1")); + if(!kerns.hasKeyword("CameraVersion")) { + kerns.addKeyword(PvlKeyword("CameraVersion", "1")); } int cameraOriginalVersion = (int)kerns["CameraVersion"]; @@ -102,14 +102,14 @@ namespace Isis { void CameraFactory::initPlugin() { - if(m_cameraPlugin.FileName() == "") { + if(m_cameraPlugin.fileName() == "") { FileName localFile("Camera.plugin"); if(localFile.fileExists()) - m_cameraPlugin.Read(localFile.expanded()); + m_cameraPlugin.read(localFile.expanded()); FileName systemFile("$ISISROOT/lib/Camera.plugin"); if(systemFile.fileExists()) - m_cameraPlugin.Read(systemFile.expanded()); + m_cameraPlugin.read(systemFile.expanded()); } } @@ -128,7 +128,7 @@ namespace Isis { try { // First get the spacecraft and instrument and combine them - PvlGroup &inst = lab.FindGroup("Instrument", Isis::Pvl::Traverse); + PvlGroup &inst = lab.findGroup("Instrument", Isis::Pvl::Traverse); QString spacecraft = (QString) inst["SpacecraftName"]; QString name = (QString) inst["InstrumentId"]; spacecraft = spacecraft.toUpper(); @@ -138,7 +138,7 @@ namespace Isis { PvlGroup plugin; try { - plugin = m_cameraPlugin.FindGroup(group); + plugin = m_cameraPlugin.findGroup(group); } catch(IException &e) { QString msg = "Unsupported camera model, unable to find plugin for "; @@ -147,7 +147,7 @@ namespace Isis { throw IException(e, IException::Unknown, msg, _FILEINFO_); } - if(!plugin.HasKeyword("Version")) { + if(!plugin.hasKeyword("Version")) { QString msg = "Camera model identified by [" + group + "] does not have a version number"; throw IException(IException::Programmer, msg, _FILEINFO_); } diff --git a/isis/src/base/objs/CameraFactory/unitTest.cpp b/isis/src/base/objs/CameraFactory/unitTest.cpp index a07dbd3d4796338a0411ac67dd29d53c0c42c216..91a0285d339a341b29271197326f84c7c9ef82b2 100644 --- a/isis/src/base/objs/CameraFactory/unitTest.cpp +++ b/isis/src/base/objs/CameraFactory/unitTest.cpp @@ -15,14 +15,14 @@ int main(int argc, char *argv[]) { Isis::Pvl lab; doit(lab); - lab.AddGroup(Isis::PvlGroup("Kernels")); + lab.addGroup(Isis::PvlGroup("Kernels")); cerr << "Testing missing spacecraft name ..." << endl; - lab.AddGroup(Isis::PvlGroup("Instrument")); + lab.addGroup(Isis::PvlGroup("Instrument")); doit(lab); cerr << "Testing missing instrument id ..." << endl; - Isis::PvlGroup &inst = lab.FindGroup("Instrument"); + Isis::PvlGroup &inst = lab.findGroup("Instrument"); inst += Isis::PvlKeyword("SpacecraftName", "Bogus Spacecraft"); doit(lab); diff --git a/isis/src/base/objs/CameraPointInfo/CameraPointInfo.cpp b/isis/src/base/objs/CameraPointInfo/CameraPointInfo.cpp index 4f3bfc02fae3fe09f4a7a7a54222a358ed1a41cf..e4ff145b1e88fca904d79863595406e220cdc580 100644 --- a/isis/src/base/objs/CameraPointInfo/CameraPointInfo.cpp +++ b/isis/src/base/objs/CameraPointInfo/CameraPointInfo.cpp @@ -195,46 +195,46 @@ namespace Isis { PvlGroup *CameraPointInfo::GetPointInfo(bool passed, bool allowOutside, bool allowErrors) { PvlGroup *gp = new PvlGroup("GroundPoint"); { - gp->AddKeyword(PvlKeyword("Filename")); - gp->AddKeyword(PvlKeyword("Sample")); - gp->AddKeyword(PvlKeyword("Line")); - gp->AddKeyword(PvlKeyword("PixelValue")); - gp->AddKeyword(PvlKeyword("RightAscension")); - gp->AddKeyword(PvlKeyword("Declination")); - gp->AddKeyword(PvlKeyword("PlanetocentricLatitude")); - gp->AddKeyword(PvlKeyword("PlanetographicLatitude")); - gp->AddKeyword(PvlKeyword("PositiveEast360Longitude")); - gp->AddKeyword(PvlKeyword("PositiveEast180Longitude")); - gp->AddKeyword(PvlKeyword("PositiveWest360Longitude")); - gp->AddKeyword(PvlKeyword("PositiveWest180Longitude")); - gp->AddKeyword(PvlKeyword("BodyFixedCoordinate")); - gp->AddKeyword(PvlKeyword("LocalRadius")); - gp->AddKeyword(PvlKeyword("SampleResolution")); - gp->AddKeyword(PvlKeyword("LineResolution")); - gp->AddKeyword(PvlKeyword("SpacecraftPosition")); - gp->AddKeyword(PvlKeyword("SpacecraftAzimuth")); - gp->AddKeyword(PvlKeyword("SlantDistance")); - gp->AddKeyword(PvlKeyword("TargetCenterDistance")); - gp->AddKeyword(PvlKeyword("SubSpacecraftLatitude")); - gp->AddKeyword(PvlKeyword("SubSpacecraftLongitude")); - gp->AddKeyword(PvlKeyword("SpacecraftAltitude")); - gp->AddKeyword(PvlKeyword("OffNadirAngle")); - gp->AddKeyword(PvlKeyword("SubSpacecraftGroundAzimuth")); - gp->AddKeyword(PvlKeyword("SunPosition")); - gp->AddKeyword(PvlKeyword("SubSolarAzimuth")); - gp->AddKeyword(PvlKeyword("SolarDistance")); - gp->AddKeyword(PvlKeyword("SubSolarLatitude")); - gp->AddKeyword(PvlKeyword("SubSolarLongitude")); - gp->AddKeyword(PvlKeyword("SubSolarGroundAzimuth")); - gp->AddKeyword(PvlKeyword("Phase")); - gp->AddKeyword(PvlKeyword("Incidence")); - gp->AddKeyword(PvlKeyword("Emission")); - gp->AddKeyword(PvlKeyword("NorthAzimuth")); - gp->AddKeyword(PvlKeyword("EphemerisTime")); - gp->AddKeyword(PvlKeyword("UTC")); - gp->AddKeyword(PvlKeyword("LocalSolarTime")); - gp->AddKeyword(PvlKeyword("SolarLongitude")); - if(allowErrors) gp->AddKeyword(PvlKeyword("Error")); + gp->addKeyword(PvlKeyword("Filename")); + gp->addKeyword(PvlKeyword("Sample")); + gp->addKeyword(PvlKeyword("Line")); + gp->addKeyword(PvlKeyword("PixelValue")); + gp->addKeyword(PvlKeyword("RightAscension")); + gp->addKeyword(PvlKeyword("Declination")); + gp->addKeyword(PvlKeyword("PlanetocentricLatitude")); + gp->addKeyword(PvlKeyword("PlanetographicLatitude")); + gp->addKeyword(PvlKeyword("PositiveEast360Longitude")); + gp->addKeyword(PvlKeyword("PositiveEast180Longitude")); + gp->addKeyword(PvlKeyword("PositiveWest360Longitude")); + gp->addKeyword(PvlKeyword("PositiveWest180Longitude")); + gp->addKeyword(PvlKeyword("BodyFixedCoordinate")); + gp->addKeyword(PvlKeyword("LocalRadius")); + gp->addKeyword(PvlKeyword("SampleResolution")); + gp->addKeyword(PvlKeyword("LineResolution")); + gp->addKeyword(PvlKeyword("SpacecraftPosition")); + gp->addKeyword(PvlKeyword("SpacecraftAzimuth")); + gp->addKeyword(PvlKeyword("SlantDistance")); + gp->addKeyword(PvlKeyword("TargetCenterDistance")); + gp->addKeyword(PvlKeyword("SubSpacecraftLatitude")); + gp->addKeyword(PvlKeyword("SubSpacecraftLongitude")); + gp->addKeyword(PvlKeyword("SpacecraftAltitude")); + gp->addKeyword(PvlKeyword("OffNadirAngle")); + gp->addKeyword(PvlKeyword("SubSpacecraftGroundAzimuth")); + gp->addKeyword(PvlKeyword("SunPosition")); + gp->addKeyword(PvlKeyword("SubSolarAzimuth")); + gp->addKeyword(PvlKeyword("SolarDistance")); + gp->addKeyword(PvlKeyword("SubSolarLatitude")); + gp->addKeyword(PvlKeyword("SubSolarLongitude")); + gp->addKeyword(PvlKeyword("SubSolarGroundAzimuth")); + gp->addKeyword(PvlKeyword("Phase")); + gp->addKeyword(PvlKeyword("Incidence")); + gp->addKeyword(PvlKeyword("Emission")); + gp->addKeyword(PvlKeyword("NorthAzimuth")); + gp->addKeyword(PvlKeyword("EphemerisTime")); + gp->addKeyword(PvlKeyword("UTC")); + gp->addKeyword(PvlKeyword("LocalSolarTime")); + gp->addKeyword(PvlKeyword("SolarLongitude")); + if(allowErrors) gp->addKeyword(PvlKeyword("Error")); } bool noErrors = passed; @@ -251,31 +251,31 @@ namespace Isis { } if(!noErrors) { - for(int i = 0; i < gp->Keywords(); i++) { - QString name = (*gp)[i].Name(); + for(int i = 0; i < gp->keywords(); i++) { + QString name = (*gp)[i].name(); // These three keywords have 3 values, so they must have 3 N/As if(name == "BodyFixedCoordinate" || name == "SpacecraftPosition" || name == "SunPosition") { - (*gp)[i].AddValue("N/A"); - (*gp)[i].AddValue("N/A"); - (*gp)[i].AddValue("N/A"); + (*gp)[i].addValue("N/A"); + (*gp)[i].addValue("N/A"); + (*gp)[i].addValue("N/A"); } else { - (*gp)[i].SetValue("N/A"); + (*gp)[i].setValue("N/A"); } } // Set all keywords that still have valid information - gp->FindKeyword("Error").SetValue(error); - gp->FindKeyword("FileName").SetValue(currentCube->fileName()); - gp->FindKeyword("Sample").SetValue(toString(camera->Sample())); - gp->FindKeyword("Line").SetValue(toString(camera->Line())); - gp->FindKeyword("EphemerisTime").SetValue(toString(camera->time().Et()), "seconds"); - gp->FindKeyword("EphemerisTime").AddComment("Time"); + gp->findKeyword("Error").setValue(error); + gp->findKeyword("FileName").setValue(currentCube->fileName()); + gp->findKeyword("Sample").setValue(toString(camera->Sample())); + gp->findKeyword("Line").setValue(toString(camera->Line())); + gp->findKeyword("EphemerisTime").setValue(toString(camera->time().Et()), "seconds"); + gp->findKeyword("EphemerisTime").addComment("Time"); QString utc = camera->time().UTC(); - gp->FindKeyword("UTC").SetValue(utc); - gp->FindKeyword("SpacecraftPosition").AddComment("Spacecraft Information"); - gp->FindKeyword("SunPosition").AddComment("Sun Information"); - gp->FindKeyword("Phase").AddComment("Illumination and Other"); + gp->findKeyword("UTC").setValue(utc); + gp->findKeyword("SpacecraftPosition").addComment("Spacecraft Information"); + gp->findKeyword("SunPosition").addComment("Sun Information"); + gp->findKeyword("Phase").addComment("Illumination and Other"); } else { @@ -292,95 +292,95 @@ namespace Isis { double ssplat, ssplon, sslat, sslon, pwlon, oglat; { - gp->FindKeyword("FileName").SetValue(currentCube->fileName()); - gp->FindKeyword("Sample").SetValue(toString(camera->Sample())); - gp->FindKeyword("Line").SetValue(toString(camera->Line())); - gp->FindKeyword("PixelValue").SetValue(PixelToString(b[0])); - gp->FindKeyword("RightAscension").SetValue(toString(camera->RightAscension())); - gp->FindKeyword("Declination").SetValue(toString(camera->Declination())); - gp->FindKeyword("PlanetocentricLatitude").SetValue(toString(camera->UniversalLatitude())); + gp->findKeyword("FileName").setValue(currentCube->fileName()); + gp->findKeyword("Sample").setValue(toString(camera->Sample())); + gp->findKeyword("Line").setValue(toString(camera->Line())); + gp->findKeyword("PixelValue").setValue(PixelToString(b[0])); + gp->findKeyword("RightAscension").setValue(toString(camera->RightAscension())); + gp->findKeyword("Declination").setValue(toString(camera->Declination())); + gp->findKeyword("PlanetocentricLatitude").setValue(toString(camera->UniversalLatitude())); // Convert lat to planetographic Distance radii[3]; camera->radii(radii); oglat = Isis::Projection::ToPlanetographic(camera->UniversalLatitude(), radii[0].kilometers(), radii[2].kilometers()); - gp->FindKeyword("PlanetographicLatitude").SetValue(toString(oglat)); + gp->findKeyword("PlanetographicLatitude").setValue(toString(oglat)); - gp->FindKeyword("PositiveEast360Longitude").SetValue(toString( + gp->findKeyword("PositiveEast360Longitude").setValue(toString( camera->UniversalLongitude())); //Convert lon to -180 - 180 range - gp->FindKeyword("PositiveEast180Longitude").SetValue(toString( + gp->findKeyword("PositiveEast180Longitude").setValue(toString( Isis::Projection::To180Domain( camera->UniversalLongitude()))); //Convert lon to positive west pwlon = Isis::Projection::ToPositiveWest(camera->UniversalLongitude(), 360); - gp->FindKeyword("PositiveWest360Longitude").SetValue(toString(pwlon)); + gp->findKeyword("PositiveWest360Longitude").setValue(toString(pwlon)); //Convert pwlon to -180 - 180 range - gp->FindKeyword("PositiveWest180Longitude").SetValue(toString( + gp->findKeyword("PositiveWest180Longitude").setValue(toString( Isis::Projection::To180Domain(pwlon))); camera->Coordinate(pB); - gp->FindKeyword("BodyFixedCoordinate").AddValue(toString(pB[0]), "km"); - gp->FindKeyword("BodyFixedCoordinate").AddValue(toString(pB[1]), "km"); - gp->FindKeyword("BodyFixedCoordinate").AddValue(toString(pB[2]), "km"); + gp->findKeyword("BodyFixedCoordinate").addValue(toString(pB[0]), "km"); + gp->findKeyword("BodyFixedCoordinate").addValue(toString(pB[1]), "km"); + gp->findKeyword("BodyFixedCoordinate").addValue(toString(pB[2]), "km"); - gp->FindKeyword("LocalRadius").SetValue(toString(camera->LocalRadius().meters()), "meters"); - gp->FindKeyword("SampleResolution").SetValue(toString(camera->SampleResolution()), "meters/pixel"); - gp->FindKeyword("LineResolution").SetValue(toString(camera->LineResolution()), "meters/pixel"); + gp->findKeyword("LocalRadius").setValue(toString(camera->LocalRadius().meters()), "meters"); + gp->findKeyword("SampleResolution").setValue(toString(camera->SampleResolution()), "meters/pixel"); + gp->findKeyword("LineResolution").setValue(toString(camera->LineResolution()), "meters/pixel"); camera->instrumentPosition(spB); - gp->FindKeyword("SpacecraftPosition").AddValue(toString(spB[0]), "km"); - gp->FindKeyword("SpacecraftPosition").AddValue(toString(spB[1]), "km"); - gp->FindKeyword("SpacecraftPosition").AddValue(toString(spB[2]), "km"); - gp->FindKeyword("SpacecraftPosition").AddComment("Spacecraft Information"); - - gp->FindKeyword("SpacecraftAzimuth").SetValue(toString(camera->SpacecraftAzimuth())); - gp->FindKeyword("SlantDistance").SetValue(toString(camera->SlantDistance()), "km"); - gp->FindKeyword("TargetCenterDistance").SetValue(toString(camera->targetCenterDistance()), "km"); + gp->findKeyword("SpacecraftPosition").addValue(toString(spB[0]), "km"); + gp->findKeyword("SpacecraftPosition").addValue(toString(spB[1]), "km"); + gp->findKeyword("SpacecraftPosition").addValue(toString(spB[2]), "km"); + gp->findKeyword("SpacecraftPosition").addComment("Spacecraft Information"); + + gp->findKeyword("SpacecraftAzimuth").setValue(toString(camera->SpacecraftAzimuth())); + gp->findKeyword("SlantDistance").setValue(toString(camera->SlantDistance()), "km"); + gp->findKeyword("TargetCenterDistance").setValue(toString(camera->targetCenterDistance()), "km"); camera->subSpacecraftPoint(ssplat, ssplon); - gp->FindKeyword("SubSpacecraftLatitude").SetValue(toString(ssplat)); - gp->FindKeyword("SubSpacecraftLongitude").SetValue(toString(ssplon)); - gp->FindKeyword("SpacecraftAltitude").SetValue(toString(camera->SpacecraftAltitude()), "km"); - gp->FindKeyword("OffNadirAngle").SetValue(toString(camera->OffNadirAngle())); + gp->findKeyword("SubSpacecraftLatitude").setValue(toString(ssplat)); + gp->findKeyword("SubSpacecraftLongitude").setValue(toString(ssplon)); + gp->findKeyword("SpacecraftAltitude").setValue(toString(camera->SpacecraftAltitude()), "km"); + gp->findKeyword("OffNadirAngle").setValue(toString(camera->OffNadirAngle())); double subspcgrdaz; subspcgrdaz = camera->GroundAzimuth(camera->UniversalLatitude(), camera->UniversalLongitude(), ssplat, ssplon); - gp->FindKeyword("SubSpacecraftGroundAzimuth").SetValue(toString(subspcgrdaz)); + gp->findKeyword("SubSpacecraftGroundAzimuth").setValue(toString(subspcgrdaz)); camera->sunPosition(sB); - gp->FindKeyword("SunPosition").AddValue(toString(sB[0]), "km"); - gp->FindKeyword("SunPosition").AddValue(toString(sB[1]), "km"); - gp->FindKeyword("SunPosition").AddValue(toString(sB[2]), "km"); - gp->FindKeyword("SunPosition").AddComment("Sun Information"); + gp->findKeyword("SunPosition").addValue(toString(sB[0]), "km"); + gp->findKeyword("SunPosition").addValue(toString(sB[1]), "km"); + gp->findKeyword("SunPosition").addValue(toString(sB[2]), "km"); + gp->findKeyword("SunPosition").addComment("Sun Information"); - gp->FindKeyword("SubSolarAzimuth").SetValue(toString(camera->SunAzimuth())); - gp->FindKeyword("SolarDistance").SetValue(toString(camera->SolarDistance()), "AU"); + gp->findKeyword("SubSolarAzimuth").setValue(toString(camera->SunAzimuth())); + gp->findKeyword("SolarDistance").setValue(toString(camera->SolarDistance()), "AU"); camera->subSolarPoint(sslat, sslon); - gp->FindKeyword("SubSolarLatitude").SetValue(toString(sslat)); - gp->FindKeyword("SubSolarLongitude").SetValue(toString(sslon)); + gp->findKeyword("SubSolarLatitude").setValue(toString(sslat)); + gp->findKeyword("SubSolarLongitude").setValue(toString(sslon)); double subsolgrdaz; subsolgrdaz = camera->GroundAzimuth(camera->UniversalLatitude(), camera->UniversalLongitude(), sslat, sslon); - gp->FindKeyword("SubSolarGroundAzimuth").SetValue(toString(subsolgrdaz)); + gp->findKeyword("SubSolarGroundAzimuth").setValue(toString(subsolgrdaz)); - gp->FindKeyword("Phase").SetValue(toString(camera->PhaseAngle())); - gp->FindKeyword("Phase").AddComment("Illumination and Other"); - gp->FindKeyword("Incidence").SetValue(toString(camera->IncidenceAngle())); - gp->FindKeyword("Emission").SetValue(toString(camera->EmissionAngle())); - gp->FindKeyword("NorthAzimuth").SetValue(toString(camera->NorthAzimuth())); + gp->findKeyword("Phase").setValue(toString(camera->PhaseAngle())); + gp->findKeyword("Phase").addComment("Illumination and Other"); + gp->findKeyword("Incidence").setValue(toString(camera->IncidenceAngle())); + gp->findKeyword("Emission").setValue(toString(camera->EmissionAngle())); + gp->findKeyword("NorthAzimuth").setValue(toString(camera->NorthAzimuth())); - gp->FindKeyword("EphemerisTime").SetValue(toString(camera->time().Et()), "seconds"); - gp->FindKeyword("EphemerisTime").AddComment("Time"); + gp->findKeyword("EphemerisTime").setValue(toString(camera->time().Et()), "seconds"); + gp->findKeyword("EphemerisTime").addComment("Time"); utc = camera->time().UTC(); - gp->FindKeyword("UTC").SetValue(utc); - gp->FindKeyword("LocalSolarTime").SetValue(toString(camera->LocalSolarTime()), "hour"); - gp->FindKeyword("SolarLongitude").SetValue(toString(camera->solarLongitude().degrees())); - if(allowErrors) gp->FindKeyword("Error").SetValue("N/A"); + gp->findKeyword("UTC").setValue(utc); + gp->findKeyword("LocalSolarTime").setValue(toString(camera->LocalSolarTime()), "hour"); + gp->findKeyword("SolarLongitude").setValue(toString(camera->solarLongitude().degrees())); + if(allowErrors) gp->findKeyword("Error").setValue("N/A"); } } return gp; diff --git a/isis/src/base/objs/CameraPointInfo/unitTest.cpp b/isis/src/base/objs/CameraPointInfo/unitTest.cpp index 7ed1c1ea16297642517b232e7cd130c3a2f464ad..649b27c756491189265060251ce630d1b26a4f2d 100644 --- a/isis/src/base/objs/CameraPointInfo/unitTest.cpp +++ b/isis/src/base/objs/CameraPointInfo/unitTest.cpp @@ -44,7 +44,7 @@ void LowerPrecision(PvlKeyword &keyword) { } void PrintResults(PvlGroup &grp) { - grp.DeleteKeyword("FileName"); + grp.deleteKeyword("FileName"); LowerPrecision(grp["NorthAzimuth"]); LowerPrecision(grp["SpacecraftAzimuth"]); diff --git a/isis/src/base/objs/CameraStatistics/CameraStatistics.cpp b/isis/src/base/objs/CameraStatistics/CameraStatistics.cpp index d3cb663388f0f604abb0741108a7958a80d82789..4ba5f5158d3729bfcd24d7d09c12d187dc66b5e6 100644 --- a/isis/src/base/objs/CameraStatistics/CameraStatistics.cpp +++ b/isis/src/base/objs/CameraStatistics/CameraStatistics.cpp @@ -424,20 +424,20 @@ namespace Isis { m_northAzimuthStat->StandardDeviation()); Pvl returnPvl; - returnPvl.SetTerminator(""); - returnPvl.AddGroup(pUser); - returnPvl.AddGroup(pLat); - returnPvl.AddGroup(pLon); - returnPvl.AddGroup(pSampleRes); - returnPvl.AddGroup(pLineRes); - returnPvl.AddGroup(pResolution); - returnPvl.AddGroup(pAspectRatio); - returnPvl.AddGroup(pPhase); - returnPvl.AddGroup(pEmission); - returnPvl.AddGroup(pIncidence); - returnPvl.AddGroup(pTime); - returnPvl.AddGroup(pLocalRadius); - returnPvl.AddGroup(pNorthAzimuth); + returnPvl.setTerminator(""); + returnPvl.addGroup(pUser); + returnPvl.addGroup(pLat); + returnPvl.addGroup(pLon); + returnPvl.addGroup(pSampleRes); + returnPvl.addGroup(pLineRes); + returnPvl.addGroup(pResolution); + returnPvl.addGroup(pAspectRatio); + returnPvl.addGroup(pPhase); + returnPvl.addGroup(pEmission); + returnPvl.addGroup(pIncidence); + returnPvl.addGroup(pTime); + returnPvl.addGroup(pLocalRadius); + returnPvl.addGroup(pNorthAzimuth); return returnPvl; } } diff --git a/isis/src/base/objs/CameraStatistics/unitTest.cpp b/isis/src/base/objs/CameraStatistics/unitTest.cpp index 70775c075847e0079d6fe9e017abdff21385d2e7..2a0276d786ae365154bdcaa0d204bc6a55675dc2 100644 --- a/isis/src/base/objs/CameraStatistics/unitTest.cpp +++ b/isis/src/base/objs/CameraStatistics/unitTest.cpp @@ -25,13 +25,13 @@ int main(int argc, char *argv[]) { Pvl statsPvl = camStats.toPvl(); cout << endl; - for (int i = 0; i < statsPvl.Groups(); i++) { - PvlGroup &group = statsPvl.Group(i); - cout << group.Name() << ":" << endl; + for (int i = 0; i < statsPvl.groups(); i++) { + PvlGroup &group = statsPvl.group(i); + cout << group.name() << ":" << endl; - for (int j = 0; j < group.Keywords(); j++) { + for (int j = 0; j < group.keywords(); j++) { PvlKeyword &keyword = group[j]; - cout << " " << keyword.Name() << " = " << toDouble(keyword[0]) << endl; + cout << " " << keyword.name() << " = " << toDouble(keyword[0]) << endl; } cout << endl; diff --git a/isis/src/base/objs/Cube/Cube.cpp b/isis/src/base/objs/Cube/Cube.cpp index 494e08ae5e854b5a8a6a272460d6886e64009944..2a922896d90056030001579d70ee136b8f00f53a 100644 --- a/isis/src/base/objs/Cube/Cube.cpp +++ b/isis/src/base/objs/Cube/Cube.cpp @@ -121,7 +121,7 @@ namespace Isis { * @return bool True if the file should have a valid projection */ bool Cube::isProjected() const { - return label()->FindObject("IsisCube").HasGroup("Mapping"); + return label()->findObject("IsisCube").hasGroup("Mapping"); } @@ -240,22 +240,22 @@ namespace Isis { // Allocate the cube result->create(newFile.expanded()); - PvlObject &isisCube = label()->FindObject("IsisCube"); - PvlObject &outIsisCube = result->label()->FindObject("IsisCube"); - for(int i = 0; i < isisCube.Groups(); i++) { - outIsisCube.AddGroup(isisCube.Group(i)); + PvlObject &isisCube = label()->findObject("IsisCube"); + PvlObject &outIsisCube = result->label()->findObject("IsisCube"); + for(int i = 0; i < isisCube.groups(); i++) { + outIsisCube.addGroup(isisCube.group(i)); } - if (label()->HasObject("NaifKeywords")) { - result->label()->AddObject( - label()->FindObject("NaifKeywords")); + if (label()->hasObject("NaifKeywords")) { + result->label()->addObject( + label()->findObject("NaifKeywords")); } - for (int i = 0; i < m_label->Objects(); i++) { - PvlObject &obj = m_label->Object(i); - if (obj.IsNamed("Table") || obj.IsNamed("Polygon") || obj.IsNamed("OriginalLabel") || - obj.IsNamed("History")) { - Isis::Blob t((QString)obj["Name"], obj.Name()); + for (int i = 0; i < m_label->objects(); i++) { + PvlObject &obj = m_label->object(i); + if (obj.isNamed("Table") || obj.isNamed("Polygon") || obj.isNamed("OriginalLabel") || + obj.isNamed("History")) { + Isis::Blob t((QString)obj["Name"], obj.name()); read(t); result->write(t); } @@ -286,8 +286,8 @@ namespace Isis { // Just in case the orig label doesn't work... here's original code: // if((p_propagateOriginalLabel) && (InputCubes.size() > 0)) { // Isis::Pvl &inlab = *InputCubes[0]->label(); -// for(int i = 0; i < inlab.Objects(); i++) { -// if(inlab.Object(i).IsNamed("OriginalLabel")) { +// for(int i = 0; i < inlab.objects(); i++) { +// if(inlab.Object(i).isNamed("OriginalLabel")) { // Isis::OriginalLabel ol; // InputCubes[0]->read(ol); // cube->write(ol); @@ -352,7 +352,7 @@ namespace Isis { int maxSizePreference = 0; maxSizePreference = - Preference::Preferences().FindGroup("CubeCustomization")["MaximumSize"]; + Preference::Preferences().findGroup("CubeCustomization")["MaximumSize"]; if (size > maxSizePreference) { QString msg; @@ -402,7 +402,7 @@ namespace Isis { dims += PvlKeyword("Samples", toString(m_samples)); dims += PvlKeyword("Lines", toString(m_lines)); dims += PvlKeyword("Bands", toString(m_bands)); - core.AddGroup(dims); + core.addGroup(dims); // Create the pixel type PvlGroup ptype("Pixels"); @@ -412,7 +412,7 @@ namespace Isis { ptype += PvlKeyword("ByteOrder", ByteOrderName(m_byteOrder)); ptype += PvlKeyword("Base", toString(m_base)); ptype += PvlKeyword("Multiplier", toString(m_multiplier)); - core.AddGroup(ptype); + core.addGroup(ptype); } else { cubFile = cubFile.addExtension("ecub"); @@ -427,18 +427,18 @@ namespace Isis { m_labelFile = new QFile(cubFile.expanded()); } - isiscube.AddObject(core); + isiscube.addObject(core); m_label = new Pvl; - m_label->AddObject(isiscube); + m_label->addObject(isiscube); // Setup storage reserved for the label PvlObject lbl("Label"); lbl += PvlKeyword("Bytes", toString(m_labelBytes)); - m_label->AddObject(lbl); + m_label->addObject(lbl); const PvlGroup &pref = - Preference::Preferences().FindGroup("CubeCustomization"); + Preference::Preferences().findGroup("CubeCustomization"); bool overwrite = pref["Overwrite"][0].toUpper() == "ALLOW"; if (!overwrite && m_labelFile->exists() && m_labelFile->size()) { QString msg = "Cube file [" + m_labelFileName->original() + "] exists, " + @@ -518,8 +518,8 @@ namespace Isis { // Figure out the name of the data file try { - PvlObject &core = m_label->FindObject("IsisCube").FindObject("Core"); - if (core.HasKeyword("^Core")) { + PvlObject &core = m_label->findObject("IsisCube").findObject("Core"); + if (core.hasKeyword("^Core")) { FileName temp(core["^Core"][0]); if (temp.originalPath() == ".") { @@ -534,7 +534,7 @@ namespace Isis { m_dataFile = new QFile(realDataFileName().expanded()); } - else if (core.HasKeyword("^DnFile")) { + else if (core.hasKeyword("^DnFile")) { FileName dataFileName(core["^DnFile"][0]); if (dataFileName.originalPath() == ".") { @@ -611,7 +611,7 @@ namespace Isis { // Determine the number of bytes in the label if (m_attached) { - m_labelBytes = m_label->FindObject("Label")["Bytes"]; + m_labelBytes = m_label->findObject("Label")["Bytes"]; } else { m_labelBytes = labelSize(true); @@ -1436,11 +1436,11 @@ namespace Isis { * @return boolean if it found the blob and deleted it. */ bool Cube::deleteBlob(QString BlobType, QString BlobName) { - for(int i = 0; i < m_label->Objects(); i++) { - PvlObject obj = m_label->Object(i); - if (obj.Name().compare(BlobType) == 0) { - if (obj.FindKeyword("Name")[0] == BlobName) { - m_label->DeleteObject(i); + for(int i = 0; i < m_label->objects(); i++) { + PvlObject obj = m_label->object(i); + if (obj.name().compare(BlobType) == 0) { + if (obj.findKeyword("Name")[0] == BlobName) { + m_label->deleteObject(i); return true; } } @@ -1458,9 +1458,9 @@ namespace Isis { * @param[out] group Name of the group to delete. */ void Cube::deleteGroup(const QString &group) { - PvlObject &isiscube = label()->FindObject("IsisCube"); - if (!isiscube.HasGroup(group)) return; - isiscube.DeleteGroup(group); + PvlObject &isiscube = label()->findObject("IsisCube"); + if (!isiscube.hasGroup(group)) return; + isiscube.deleteGroup(group); } @@ -1472,8 +1472,8 @@ namespace Isis { * @return (PvlGroup) Label which will contain the requested group. */ PvlGroup &Cube::group(const QString &group) const { - PvlObject &isiscube = label()->FindObject("IsisCube"); - return isiscube.FindGroup(group); + PvlObject &isiscube = label()->findObject("IsisCube"); + return isiscube.findGroup(group); } @@ -1485,8 +1485,8 @@ namespace Isis { * @return (bool) True if the cube has the specified group, false if not. */ bool Cube::hasGroup(const QString &group) const { - const PvlObject &isiscube = label()->FindObject("IsisCube"); - if (isiscube.HasGroup(group)) return true; + const PvlObject &isiscube = label()->findObject("IsisCube"); + if (isiscube.hasGroup(group)) return true; return false; } @@ -1499,10 +1499,10 @@ namespace Isis { * @return bool True if the pvl table was found */ bool Cube::hasTable(const QString &name) { - for(int o = 0; o < label()->Objects(); o++) { - PvlObject &obj = label()->Object(o); - if (obj.IsNamed("Table")) { - if (obj.HasKeyword("Name")) { + for(int o = 0; o < label()->objects(); o++) { + PvlObject &obj = label()->object(o); + if (obj.isNamed("Table")) { + if (obj.hasKeyword("Name")) { QString temp = (QString) obj["Name"]; temp = temp.toUpper(); QString temp2 = name; @@ -1524,37 +1524,37 @@ namespace Isis { * @param[in] group Label containing the group to put. */ void Cube::putGroup(const PvlGroup &group) { - PvlObject &isiscube = label()->FindObject("IsisCube"); - if (isiscube.HasGroup(group.Name())) { - isiscube.FindGroup(group.Name()) = group; + PvlObject &isiscube = label()->findObject("IsisCube"); + if (isiscube.hasGroup(group.name())) { + isiscube.findGroup(group.name()) = group; } else { - isiscube.AddGroup(group); + isiscube.addGroup(group); } } void Cube::applyVirtualBandsToLabel() { - PvlObject &core = m_label->FindObject("IsisCube").FindObject("Core"); + PvlObject &core = m_label->findObject("IsisCube").findObject("Core"); // Prune the band bin group if it exists - if (m_label->FindObject("IsisCube").HasGroup("BandBin")) { - PvlGroup &bandBin = m_label->FindObject("IsisCube").FindGroup("BandBin"); - for(int k = 0; k < bandBin.Keywords(); k++) { - if (bandBin[k].Size() == m_bands && m_virtualBandList) { + if (m_label->findObject("IsisCube").hasGroup("BandBin")) { + PvlGroup &bandBin = m_label->findObject("IsisCube").findGroup("BandBin"); + for(int k = 0; k < bandBin.keywords(); k++) { + if (bandBin[k].size() == m_bands && m_virtualBandList) { PvlKeyword temp = bandBin[k]; - bandBin[k].Clear(); + bandBin[k].clear(); for(int i = 0; i < m_virtualBandList->size(); i++) { int physicalBand = m_virtualBandList->at(i) - 1; - bandBin[k].AddValue(temp[physicalBand], temp.Unit(physicalBand)); + bandBin[k].addValue(temp[physicalBand], temp.unit(physicalBand)); } } } } // Change the number of bands in the labels of the cube - if (m_virtualBandList && core.HasGroup("Dimensions")) - core.FindGroup("Dimensions")["Bands"] = toString(m_virtualBandList->size()); + if (m_virtualBandList && core.hasGroup("Dimensions")) + core.findGroup("Dimensions")["Bands"] = toString(m_virtualBandList->size()); } @@ -1648,12 +1648,12 @@ namespace Isis { do { Pvl guessLabel(guess.expanded()); - PvlObject &core = guessLabel.FindObject("IsisCube").FindObject("Core"); + PvlObject &core = guessLabel.findObject("IsisCube").findObject("Core"); - if (core.HasKeyword("^DnFile")) { + if (core.hasKeyword("^DnFile")) { guess = core["^DnFile"][0]; } - else if (core.HasKeyword("^Core")) { + else if (core.hasKeyword("^Core")) { result = core["^Core"][0]; } else { @@ -1699,17 +1699,17 @@ namespace Isis { void Cube::initCoreFromLabel(const Pvl &label) { - const PvlObject &core = label.FindObject("IsisCube").FindObject("Core"); + const PvlObject &core = label.findObject("IsisCube").findObject("Core"); - if (!core.HasKeyword("^DnFile")) { + if (!core.hasKeyword("^DnFile")) { // Dimensions - const PvlGroup &dims = core.FindGroup("Dimensions"); + const PvlGroup &dims = core.findGroup("Dimensions"); m_samples = dims["Samples"]; m_lines = dims["Lines"]; m_bands = dims["Bands"]; // Stored pixel information - const PvlGroup &pixelsGroup = core.FindGroup("Pixels"); + const PvlGroup &pixelsGroup = core.findGroup("Pixels"); m_byteOrder = ByteOrderEnumeration(pixelsGroup["ByteOrder"]); m_base = pixelsGroup["Base"]; m_multiplier = pixelsGroup["Multiplier"]; @@ -1735,7 +1735,7 @@ namespace Isis { try { if (labelFileName.fileExists()) { m_label = new Pvl(labelFileName.expanded()); - if (!m_label->Objects()) { + if (!m_label->objects()) { throw IException(); } } @@ -1753,7 +1753,7 @@ namespace Isis { tmp = tmp.addExtension("cub"); if (tmp.fileExists()) { m_label = new Pvl(tmp.expanded()); - if (!m_label->Objects()) { + if (!m_label->objects()) { throw IException(); } labelFileName = tmp; @@ -1773,7 +1773,7 @@ namespace Isis { tmp = tmp.setExtension("lbl"); if (tmp.fileExists()) { m_label = new Pvl(tmp.expanded()); - if (!m_label->Objects()) { + if (!m_label->objects()) { throw IException(); } labelFileName = tmp; @@ -1793,7 +1793,7 @@ namespace Isis { tmp = tmp.addExtension("ecub"); if (tmp.fileExists()) { m_label = new Pvl(tmp.expanded()); - if (!m_label->Objects()) { + if (!m_label->objects()) { throw IException(); } labelFileName = tmp; @@ -1816,7 +1816,7 @@ namespace Isis { // See if this is an old Isis cube format. If so then we will // need to internalize a new label - if (m_label->HasKeyword("CCSD3ZF0000100000001NJPL3IF0PDS200000001")) { + if (m_label->hasKeyword("CCSD3ZF0000100000001NJPL3IF0PDS200000001")) { if (!readWrite) { reformatOldIsisLabel(m_labelFileName->expanded()); } @@ -1848,9 +1848,9 @@ namespace Isis { PvlObject *core = NULL; do { - core = &label.FindObject("IsisCube").FindObject("Core"); + core = &label.findObject("IsisCube").findObject("Core"); - if (core->HasKeyword("^DnFile")) { + if (core->hasKeyword("^DnFile")) { label = Pvl((*core)["^DnFile"]); core = NULL; } @@ -1899,7 +1899,7 @@ namespace Isis { } // Set the pvl's format template - m_label->SetFormatTemplate(m_formatTemplateFile->original()); + m_label->setFormatTemplate(m_formatTemplateFile->original()); // Write them with attached data if (m_attached) { @@ -1929,7 +1929,7 @@ namespace Isis { // or detached label else { - m_label->Write(m_labelFileName->expanded()); + m_label->write(m_labelFileName->expanded()); } } } diff --git a/isis/src/base/objs/Cube/CubeBsqHandler.cpp b/isis/src/base/objs/Cube/CubeBsqHandler.cpp index 0ba3c4f8d748cc31b8bba8e7cf4222277257f0cb..2961ae62327570644159f601aa6e38a303f334bf 100644 --- a/isis/src/base/objs/Cube/CubeBsqHandler.cpp +++ b/isis/src/base/objs/Cube/CubeBsqHandler.cpp @@ -80,8 +80,8 @@ namespace Isis { void CubeBsqHandler::updateLabels(Pvl &label) { - PvlObject &core = label.FindObject("IsisCube").FindObject("Core"); - core.AddKeyword(PvlKeyword("Format", "BandSequential"), + PvlObject &core = label.findObject("IsisCube").findObject("Core"); + core.addKeyword(PvlKeyword("Format", "BandSequential"), PvlContainer::Replace); } diff --git a/isis/src/base/objs/Cube/CubeIoHandler.cpp b/isis/src/base/objs/Cube/CubeIoHandler.cpp index 0018642261f57a3d4f38f02bfc5542e07453be33..c3f394f877522fd63af49767fa0f83ded2f83390 100644 --- a/isis/src/base/objs/Cube/CubeIoHandler.cpp +++ b/isis/src/base/objs/Cube/CubeIoHandler.cpp @@ -97,7 +97,7 @@ namespace Isis { m_cachingAlgorithms = new QList; PvlGroup &performancePrefs = - Preference::Preferences().FindGroup("Performance"); + Preference::Preferences().findGroup("Performance"); IString cubeWritePerfOpt = performancePrefs["CubeWriteThread"][0]; m_useOptimizedCubeWrite = (cubeWritePerfOpt.DownCase() == "optimized"); if ((m_useOptimizedCubeWrite && !alreadyOnDisk) || @@ -119,15 +119,15 @@ namespace Isis { m_dataFile = dataFile; - const PvlObject &core = label.FindObject("IsisCube").FindObject("Core"); - const PvlGroup &pixelGroup = core.FindGroup("Pixels"); + const PvlObject &core = label.findObject("IsisCube").findObject("Core"); + const PvlGroup &pixelGroup = core.findGroup("Pixels"); - QString byteOrderStr = pixelGroup.FindKeyword("ByteOrder")[0]; + QString byteOrderStr = pixelGroup.findKeyword("ByteOrder")[0]; m_byteSwapper = new EndianSwapper( byteOrderStr.toUpper()); - m_base = pixelGroup.FindKeyword("Base"); - m_multiplier = pixelGroup.FindKeyword("Multiplier"); - m_pixelType = PixelTypeEnumeration(pixelGroup.FindKeyword("Type")); + m_base = pixelGroup.findKeyword("Base"); + m_multiplier = pixelGroup.findKeyword("Multiplier"); + m_pixelType = PixelTypeEnumeration(pixelGroup.findKeyword("Type")); // If the byte swapper isn't going to do anything, then get rid of it // because it's quicker to check for a NULL byte swapper member than to @@ -137,12 +137,12 @@ namespace Isis { m_byteSwapper = NULL; } - const PvlGroup &dimensions = core.FindGroup("Dimensions"); - m_numSamples = dimensions.FindKeyword("Samples"); - m_numLines = dimensions.FindKeyword("Lines"); - m_numBands = dimensions.FindKeyword("Bands"); + const PvlGroup &dimensions = core.findGroup("Dimensions"); + m_numSamples = dimensions.findKeyword("Samples"); + m_numLines = dimensions.findKeyword("Lines"); + m_numBands = dimensions.findKeyword("Bands"); - m_startByte = (int)core.FindKeyword("StartByte") - 1; + m_startByte = (int)core.findKeyword("StartByte") - 1; m_samplesInChunk = -1; m_linesInChunk = -1; diff --git a/isis/src/base/objs/Cube/CubeTileHandler.cpp b/isis/src/base/objs/Cube/CubeTileHandler.cpp index 5174784355289807c9d3757ca55aeca56d6250bb..678bc3a9afb0cd4a5eab008dab5645e1a2cdba60 100644 --- a/isis/src/base/objs/Cube/CubeTileHandler.cpp +++ b/isis/src/base/objs/Cube/CubeTileHandler.cpp @@ -49,9 +49,9 @@ namespace Isis { const QList *virtualBandList, const Pvl &labels, bool alreadyOnDisk) : CubeIoHandler(dataFile, virtualBandList, labels, alreadyOnDisk) { - const PvlObject &core = labels.FindObject("IsisCube").FindObject("Core"); + const PvlObject &core = labels.findObject("IsisCube").findObject("Core"); - if(core.HasKeyword("Format")) { + if(core.hasKeyword("Format")) { setChunkSizes(core["TileSamples"], core["TileLines"], 1); } else { @@ -80,12 +80,12 @@ namespace Isis { * @param labels The "Core" object in this Pvl will be updated */ void CubeTileHandler::updateLabels(Pvl &labels) { - PvlObject &core = labels.FindObject("IsisCube").FindObject("Core"); - core.AddKeyword(PvlKeyword("Format", "Tile"), + PvlObject &core = labels.findObject("IsisCube").findObject("Core"); + core.addKeyword(PvlKeyword("Format", "Tile"), PvlContainer::Replace); - core.AddKeyword(PvlKeyword("TileSamples", toString(getSampleCountInChunk())), + core.addKeyword(PvlKeyword("TileSamples", toString(getSampleCountInChunk())), PvlContainer::Replace); - core.AddKeyword(PvlKeyword("TileLines", toString(getLineCountInChunk())), + core.addKeyword(PvlKeyword("TileLines", toString(getLineCountInChunk())), PvlContainer::Replace); } diff --git a/isis/src/base/objs/DemShape/DemShape.cpp b/isis/src/base/objs/DemShape/DemShape.cpp index f01a64fae8b9cf4f5dcf3eb49b0c5d1ea8125706..ca5b310ec5af46309120fc71fce56edd7a68e6d1 100644 --- a/isis/src/base/objs/DemShape/DemShape.cpp +++ b/isis/src/base/objs/DemShape/DemShape.cpp @@ -47,13 +47,13 @@ namespace Isis { m_interp = NULL; m_portal = NULL; - PvlGroup &kernels = pvl.FindGroup("Kernels", Pvl::Traverse); + PvlGroup &kernels = pvl.findGroup("Kernels", Pvl::Traverse); QString demCubeFile; - if (kernels.HasKeyword("ElevationModel")) { + if (kernels.hasKeyword("ElevationModel")) { demCubeFile = (QString) kernels["ElevationModel"]; } - else if(kernels.HasKeyword("ShapeModel")) { + else if(kernels.hasKeyword("ShapeModel")) { demCubeFile = (QString) kernels["ShapeModel"]; } @@ -73,7 +73,7 @@ namespace Isis { m_interp->HotSample(), m_interp->HotLine()); // Read in the Scale of the DEM file in pixels/degree - const PvlGroup &mapgrp = m_demCube->label()->FindGroup("Mapping", Pvl::Traverse); + const PvlGroup &mapgrp = m_demCube->label()->findGroup("Mapping", Pvl::Traverse); // Save map scale in pixels per degree m_pixPerDegree = (double) mapgrp["Scale"]; diff --git a/isis/src/base/objs/DemShape/unitTest.cpp b/isis/src/base/objs/DemShape/unitTest.cpp index e907df036047a0e86fe3cfec3aa9de13b0cc0423..6fb574a9e63953041c3715f780daf490feecb200 100644 --- a/isis/src/base/objs/DemShape/unitTest.cpp +++ b/isis/src/base/objs/DemShape/unitTest.cpp @@ -182,13 +182,13 @@ Local normal = -0.581842, -0.703663, 0.407823 cout << endl << " Testing input of dem file with keyword ElevationModel" << endl; try { Pvl elPvl; - PvlGroup kernels = pvl.FindGroup("Kernels", Pvl::Traverse); + PvlGroup kernels = pvl.findGroup("Kernels", Pvl::Traverse); QString demCubeFile; demCubeFile = (QString) kernels["ShapeModel"]; - kernels.DeleteKeyword("ShapeModel"); + kernels.deleteKeyword("ShapeModel"); PvlKeyword shapeKey("ElevationModel", demCubeFile); - kernels.AddKeyword(shapeKey); - elPvl.AddGroup(kernels); + kernels.addKeyword(shapeKey); + elPvl.addGroup(kernels); DemShape elShape (&targ, elPvl); } catch(Isis::IException &e) { diff --git a/isis/src/base/objs/Enlarge/unitTest.cpp b/isis/src/base/objs/Enlarge/unitTest.cpp index 4847bd2b9bffa1b90fec68fdabb928af08a08807..bb033b8646429a6e7a689a2f6c7f640de40d6f39 100644 --- a/isis/src/base/objs/Enlarge/unitTest.cpp +++ b/isis/src/base/objs/Enlarge/unitTest.cpp @@ -33,7 +33,7 @@ void IsisMain() { p.StartProcess(*trans, *interp); trans->UpdateOutputLabel(outCube); Pvl *outLabel = outCube->label(); - outLabel->DeleteObject("History"); + outLabel->deleteObject("History"); cerr << *outLabel; p.EndProcess(); diff --git a/isis/src/base/objs/Equalization/Equalization.cpp b/isis/src/base/objs/Equalization/Equalization.cpp index 33dc09b5904ef12c01967a7eb46004fa7c5e9fad..d1a7ab9d43ce825758096bfe9e2ba2c66f029147 100644 --- a/isis/src/base/objs/Equalization/Equalization.cpp +++ b/isis/src/base/objs/Equalization/Equalization.cpp @@ -236,7 +236,7 @@ cout << oNormList[band]->Gain(img) << endl; setResults(); for (unsigned int i = 0; i < overlapStats.size(); i++) { - m_results->AddObject(overlapStats[i].toPvl()); + m_results->addObject(overlapStats[i].toPvl()); } } @@ -248,7 +248,7 @@ cout << oNormList[band]->Gain(img) << endl; } m_results = new Pvl(); - m_results->SetTerminator(""); + m_results->setTerminator(""); PvlObject equ("EqualizationInformation"); PvlGroup gen("General"); @@ -257,12 +257,12 @@ cout << oNormList[band]->Gain(img) << endl; gen += PvlKeyword("InvalidOverlaps", toString(m_invalidCnt)); gen += PvlKeyword("Weighted", (m_wtopt) ? "true" : "false"); gen += PvlKeyword("MinCount", toString(m_mincnt)); - equ.AddGroup(gen); + equ.addGroup(gen); for (int img = 0; img < m_imageList.size(); img++) { // Format and name information PvlGroup norm("Normalization"); - norm.AddComment("Formula: newDN = (oldDN - AVERAGE) * GAIN + AVERAGE + OFFSET"); - norm.AddComment("BandN = (GAIN, OFFSET, AVERAGE)"); + norm.addComment("Formula: newDN = (oldDN - AVERAGE) * GAIN + AVERAGE + OFFSET"); + norm.addComment("BandN = (GAIN, OFFSET, AVERAGE)"); norm += PvlKeyword("FileName", m_imageList[img].original()); // Band by band statistics @@ -278,10 +278,10 @@ cout << oNormList[band]->Gain(img) << endl; bandStats += avg; norm += bandStats; } - equ.AddGroup(norm); + equ.addGroup(norm); } - m_results->AddObject(equ); + m_results->addObject(equ); } @@ -293,15 +293,15 @@ cout << oNormList[band]->Gain(img) << endl; for (int img = 0; img < (int) m_imageList.size(); img++) { // Apply correction based on pre-determined statistics information Pvl inStats(instatsFileName); - PvlObject &equalInfo = inStats.FindObject("EqualizationInformation"); - PvlGroup &normalization = equalInfo.Group(normIndices[img]); + PvlObject &equalInfo = inStats.findObject("EqualizationInformation"); + PvlGroup &normalization = equalInfo.group(normIndices[img]); // TODO should we also get the valid and invalid count? ImageAdjustment *adjustment = new ImageAdjustment(m_sType); // Get and store the modifiers for each band - for (int band = 1; band < normalization.Keywords(); band++) { + for (int band = 1; band < normalization.keywords(); band++) { adjustment->addGain(toDouble(normalization[band][0])); adjustment->addOffset(toDouble(normalization[band][1])); adjustment->addAverage(toDouble(normalization[band][2])); @@ -376,7 +376,7 @@ cout << oNormList[band]->Gain(img) << endl; void Equalization::write(QString outstatsFileName) { // Write the equalization and overlap statistics to the file - m_results->Write(outstatsFileName); + m_results->write(outstatsFileName); } @@ -532,10 +532,10 @@ cout << oNormList[band]->Gain(img) << endl; vector Equalization::validateInputStatistics(QString instatsFileName) { Pvl inStats(instatsFileName); - PvlObject &equalInfo = inStats.FindObject("EqualizationInformation"); + PvlObject &equalInfo = inStats.findObject("EqualizationInformation"); // Make sure each file in the instats matches a file in the fromlist - if (m_imageList.size() > equalInfo.Groups() - 1) { + if (m_imageList.size() > equalInfo.groups() - 1) { QString msg = "Each input file in the FROM LIST must have a "; msg += "corresponding input file in the INPUT STATISTICS."; throw IException(IException::User, msg, _FILEINFO_); @@ -547,8 +547,8 @@ cout << oNormList[band]->Gain(img) << endl; for (int i = 0; i < m_imageList.size(); i++) { QString fromFile = m_imageList[i].original(); bool foundFile = false; - for (int j = 1; j < equalInfo.Groups(); j++) { - PvlGroup &normalization = equalInfo.Group(j); + for (int j = 1; j < equalInfo.groups(); j++) { + PvlGroup &normalization = equalInfo.group(j); QString normFile = normalization["FileName"][0]; if (fromFile == normFile) { diff --git a/isis/src/base/objs/Equirectangular/Equirectangular.cpp b/isis/src/base/objs/Equirectangular/Equirectangular.cpp index 0d4931598af18891ebb596c4ce642d216781e267..706beaa11d132fe93eef6f8d833e45837a176f7a 100644 --- a/isis/src/base/objs/Equirectangular/Equirectangular.cpp +++ b/isis/src/base/objs/Equirectangular/Equirectangular.cpp @@ -56,15 +56,15 @@ namespace Isis { Projection::Projection(label) { try { // Try to read the mapping group - PvlGroup &mapGroup = label.FindGroup("Mapping", Pvl::Traverse); + PvlGroup &mapGroup = label.findGroup("Mapping", Pvl::Traverse); // Compute the default value if allowed and needed - if ((allowDefaults) && (!mapGroup.HasKeyword("CenterLongitude"))) { + if ((allowDefaults) && (!mapGroup.hasKeyword("CenterLongitude"))) { double lon = 0.0; mapGroup += PvlKeyword("CenterLongitude", toString(lon)); } - if ((allowDefaults) && (!mapGroup.HasKeyword("CenterLatitude"))) { + if ((allowDefaults) && (!mapGroup.hasKeyword("CenterLatitude"))) { double lat = (m_minimumLatitude + m_maximumLatitude) / 2.0; if (lat >= 65.0) { lat = 65.0; @@ -90,7 +90,7 @@ namespace Isis { m_centerLatitude *= PI / 180.0; // This keyword is just for user's information, and was put in for Hirise - if (!mapGroup.HasKeyword("CenterLatitudeRadius")) { + if (!mapGroup.hasKeyword("CenterLatitudeRadius")) { mapGroup += PvlKeyword("CenterLatitudeRadius"); } diff --git a/isis/src/base/objs/Equirectangular/unitTest.cpp b/isis/src/base/objs/Equirectangular/unitTest.cpp index 1b1acea4c2399d68ecf5e15d0e5cc2a0eab895a7..7c1b3327e3753fa29daa000db93989b12c71ad5b 100644 --- a/isis/src/base/objs/Equirectangular/unitTest.cpp +++ b/isis/src/base/objs/Equirectangular/unitTest.cpp @@ -14,8 +14,8 @@ int main(int argc, char *argv[]) { cout << "UNIT TEST FOR Equirectangular" << endl << endl; Pvl lab; - lab.AddGroup(PvlGroup("Mapping")); - PvlGroup &mapGroup = lab.FindGroup("Mapping"); + lab.addGroup(PvlGroup("Mapping")); + PvlGroup &mapGroup = lab.findGroup("Mapping"); mapGroup += PvlKeyword("EquatorialRadius", toString(1.0)); mapGroup += PvlKeyword("PolarRadius", toString(1.0)); mapGroup += PvlKeyword("LatitudeType", "Planetocentric"); @@ -91,8 +91,8 @@ int main(int argc, char *argv[]) { cout << endl; cout << "Testing default option ... " << endl; - mapGroup.DeleteKeyword("CenterLongitude"); - mapGroup.DeleteKeyword("CenterLatitude"); + mapGroup.deleteKeyword("CenterLongitude"); + mapGroup.deleteKeyword("CenterLatitude"); Equirectangular p2(lab, true); cout << lab << endl; cout << endl; @@ -102,9 +102,9 @@ int main(int argc, char *argv[]) { Pvl tmp1; Pvl tmp2; Pvl tmp3; - tmp1.AddGroup(p.Mapping()); - tmp2.AddGroup(p.MappingLatitudes()); - tmp3.AddGroup(p.MappingLongitudes()); + tmp1.addGroup(p.Mapping()); + tmp2.addGroup(p.MappingLatitudes()); + tmp3.addGroup(p.MappingLongitudes()); cout << "Mapping() = " << endl; cout << tmp1 << endl; @@ -115,7 +115,7 @@ int main(int argc, char *argv[]) { cout << endl; std::cout << "Check Invalid Latitude" << std::endl; - mapGroup.AddKeyword(PvlKeyword("CenterLatitude", toString(90.0)), Pvl::Replace); + mapGroup.addKeyword(PvlKeyword("CenterLatitude", toString(90.0)), Pvl::Replace); std::cout << mapGroup << std::endl; try { Equirectangular p2(lab); diff --git a/isis/src/base/objs/ExportPdsTable/ExportPdsTable.cpp b/isis/src/base/objs/ExportPdsTable/ExportPdsTable.cpp index 193ba065552d9a13f14e7f8e692204d97bfa9f41..75447fb320f9adc82f395188e1519d69f294f069 100644 --- a/isis/src/base/objs/ExportPdsTable/ExportPdsTable.cpp +++ b/isis/src/base/objs/ExportPdsTable/ExportPdsTable.cpp @@ -143,22 +143,22 @@ namespace Isis { // Data Object Descriptions // NOTE: this class is currently only exporting BINARY format PDS tables. // implementation may be added later to export ASCII PDS tables. - pdsTableLabelInfo.AddKeyword(PvlKeyword("INTERCHANGE_FORMAT", "BINARY")); - pdsTableLabelInfo.AddKeyword(PvlKeyword("ROWS", toString(m_isisTable->Records()))); - pdsTableLabelInfo.AddKeyword(PvlKeyword("COLUMNS", toString(m_isisTable->RecordFields()))); - pdsTableLabelInfo.AddKeyword(PvlKeyword("ROW_BYTES", toString(m_rowBytes))); - pdsTableLabelInfo.AddKeyword(PvlKeyword("ROW_SUFFIX_BYTES", toString(m_outputRecordBytes - m_rowBytes))); + pdsTableLabelInfo.addKeyword(PvlKeyword("INTERCHANGE_FORMAT", "BINARY")); + pdsTableLabelInfo.addKeyword(PvlKeyword("ROWS", toString(m_isisTable->Records()))); + pdsTableLabelInfo.addKeyword(PvlKeyword("COLUMNS", toString(m_isisTable->RecordFields()))); + pdsTableLabelInfo.addKeyword(PvlKeyword("ROW_BYTES", toString(m_rowBytes))); + pdsTableLabelInfo.addKeyword(PvlKeyword("ROW_SUFFIX_BYTES", toString(m_outputRecordBytes - m_rowBytes))); int startByte = 1; // PDS begins indexing at 1 for(int fieldIndex = 0; fieldIndex < m_isisTable->RecordFields(); fieldIndex++) { int columnBytes = 0; TableField field = (*m_isisTable)[0][fieldIndex]; PvlObject columnObj("COLUMN"); - columnObj.AddKeyword(PvlKeyword("COLUMN_NUMBER", toString(fieldIndex + 1))); - columnObj.AddKeyword(PvlKeyword("NAME", field.name())); + columnObj.addKeyword(PvlKeyword("COLUMN_NUMBER", toString(fieldIndex + 1))); + columnObj.addKeyword(PvlKeyword("NAME", field.name())); if (field.type() == TableField::Text) { - columnObj.AddKeyword(PvlKeyword("DATA_TYPE", "CHARACTER")); + columnObj.addKeyword(PvlKeyword("DATA_TYPE", "CHARACTER")); QString val = field; for(int i = 0; i < field.size(); i++) { columnBytes++; @@ -166,34 +166,34 @@ namespace Isis { } else if (field.type() == TableField::Integer) { if (m_pdsByteOrder == "MSB") { - columnObj.AddKeyword(PvlKeyword("DATA_TYPE", "MSB_INTEGER")); + columnObj.addKeyword(PvlKeyword("DATA_TYPE", "MSB_INTEGER")); columnBytes = sizeof(int); } else { // if (m_pdsByteOrder == "LSB") { // no need to check this. already validated in exportPdsTable() - columnObj.AddKeyword(PvlKeyword("DATA_TYPE", "LSB_INTEGER")); + columnObj.addKeyword(PvlKeyword("DATA_TYPE", "LSB_INTEGER")); columnBytes = sizeof(int); } } else if (field.type() == TableField::Double) { if (m_pdsByteOrder == "MSB") { - columnObj.AddKeyword(PvlKeyword("DATA_TYPE", "IEEE_REAL")); + columnObj.addKeyword(PvlKeyword("DATA_TYPE", "IEEE_REAL")); columnBytes = sizeof(double); } else { // if (m_pdsByteOrder == "LSB") { // no need to check this. already validated in exportPdsTable() - columnObj.AddKeyword(PvlKeyword("DATA_TYPE", "PC_REAL")); + columnObj.addKeyword(PvlKeyword("DATA_TYPE", "PC_REAL")); columnBytes = sizeof(double); } } else if (field.type() == TableField::Real) { if (m_pdsByteOrder == "MSB") { - columnObj.AddKeyword(PvlKeyword("DATA_TYPE", "IEEE_REAL")); + columnObj.addKeyword(PvlKeyword("DATA_TYPE", "IEEE_REAL")); columnBytes = sizeof(float); } else { // if (m_pdsByteOrder == "LSB") { // no need to check this. already validated in exportPdsTable() - columnObj.AddKeyword(PvlKeyword("DATA_TYPE", "PC_REAL")); + columnObj.addKeyword(PvlKeyword("DATA_TYPE", "PC_REAL")); columnBytes = sizeof(float); } } @@ -204,10 +204,10 @@ namespace Isis { "field type found for [" + field.name() + "]."; throw IException(IException::Programmer, msg, _FILEINFO_); } - columnObj.AddKeyword(PvlKeyword("START_BYTE", toString(startByte))); + columnObj.addKeyword(PvlKeyword("START_BYTE", toString(startByte))); startByte += columnBytes; - columnObj.AddKeyword(PvlKeyword("BYTES", toString(columnBytes))); - pdsTableLabelInfo.AddObject(columnObj); + columnObj.addKeyword(PvlKeyword("BYTES", toString(columnBytes))); + pdsTableLabelInfo.addObject(columnObj); } return pdsTableLabelInfo; } diff --git a/isis/src/base/objs/FileName/FileName.cpp b/isis/src/base/objs/FileName/FileName.cpp index ebe3778b536f1741633971d9d11e46afd70aefcc..97655e1bb94b579441c58163233513b5d037c496 100644 --- a/isis/src/base/objs/FileName/FileName.cpp +++ b/isis/src/base/objs/FileName/FileName.cpp @@ -615,9 +615,9 @@ namespace Isis { QString varValue; // Find the corresponding Isis Preference if one exists - if(Preference::Preferences().HasGroup("DataDirectory")) { - PvlGroup &dataDir = Preference::Preferences().FindGroup("DataDirectory"); - if(dataDir.HasKeyword(varName)) { + if(Preference::Preferences().hasGroup("DataDirectory")) { + PvlGroup &dataDir = Preference::Preferences().findGroup("DataDirectory"); + if(dataDir.hasKeyword(varName)) { varValue = ((QString)dataDir[varName.toStdString().c_str()][0]); } } diff --git a/isis/src/base/objs/ForstnerOperator/unitTest.cpp b/isis/src/base/objs/ForstnerOperator/unitTest.cpp index fdb775a512232d695040fb7bee4790205052b954..63c1d87670a56fc80110eb4fbac702d6231e21e1 100644 --- a/isis/src/base/objs/ForstnerOperator/unitTest.cpp +++ b/isis/src/base/objs/ForstnerOperator/unitTest.cpp @@ -31,11 +31,11 @@ int main() { opv += PvlKeyword("MaxIncidence", "135.0"); PvlObject o("InterestOperator"); - o.AddGroup(op); - o.AddGroup(opv); + o.addGroup(op); + o.addGroup(opv); Pvl pvl; - pvl.AddObject(o); + pvl.addObject(o); std::cout << pvl << std::endl; InterestOperator *iop = InterestOperatorFactory::Create(pvl); diff --git a/isis/src/base/objs/FramingCamera/unitTest.cpp b/isis/src/base/objs/FramingCamera/unitTest.cpp index b1094f4b18d286fac74647f43402bfd5a5b5faa8..ac2907959ed6cd29261b2eb92f41d9336bf1e63a 100644 --- a/isis/src/base/objs/FramingCamera/unitTest.cpp +++ b/isis/src/base/objs/FramingCamera/unitTest.cpp @@ -90,7 +90,7 @@ int main() { cout << "Camera = Radar? " << (cam.GetCameraType() == Camera::Radar) << endl; // test ShutterOpenCloseTimes() method - PvlGroup inst = pvl.FindGroup ("Instrument",Pvl::Traverse); + PvlGroup inst = pvl.findGroup ("Instrument",Pvl::Traverse); QString startTime = inst["StartTime"]; double eTime = 0.0; utc2et_c(startTime.toAscii().data(), &eTime); diff --git a/isis/src/base/objs/GradientOperator/unitTest.cpp b/isis/src/base/objs/GradientOperator/unitTest.cpp index 6289ef0268b33b105606d464a1943cb0d115f495..193a2c84ebeed4efd6db4d170dceb834bf085d04 100644 --- a/isis/src/base/objs/GradientOperator/unitTest.cpp +++ b/isis/src/base/objs/GradientOperator/unitTest.cpp @@ -31,11 +31,11 @@ int main() { opv += PvlKeyword("MaxIncidence", "135.0"); PvlObject o("InterestOperator"); - o.AddGroup(op); - o.AddGroup(opv); + o.addGroup(op); + o.addGroup(opv); Pvl pvl; - pvl.AddObject(o); + pvl.addObject(o); std::cout << pvl << std::endl; InterestOperator *iop = InterestOperatorFactory::Create(pvl); diff --git a/isis/src/base/objs/GridPolygonSeeder/GridPolygonSeeder.cpp b/isis/src/base/objs/GridPolygonSeeder/GridPolygonSeeder.cpp index 0d046faa969a383161794516f801e17372557be5..ee1d597f5727f8d3312d7712f8babda6f8524408 100644 --- a/isis/src/base/objs/GridPolygonSeeder/GridPolygonSeeder.cpp +++ b/isis/src/base/objs/GridPolygonSeeder/GridPolygonSeeder.cpp @@ -401,47 +401,47 @@ namespace Isis { // Pull parameters specific to this algorithm out try { // Get info from Algorithm group - PvlGroup &algo = pvl.FindGroup("PolygonSeederAlgorithm", Pvl::Traverse); - PvlGroup &invalgo = invalidInput->FindGroup("PolygonSeederAlgorithm", + PvlGroup &algo = pvl.findGroup("PolygonSeederAlgorithm", Pvl::Traverse); + PvlGroup &invalgo = invalidInput->findGroup("PolygonSeederAlgorithm", Pvl::Traverse); // Set the spacing p_Xspacing = 0.0; - if(algo.HasKeyword("XSpacing")) { + if(algo.hasKeyword("XSpacing")) { p_Xspacing = (double) algo["XSpacing"]; - if(invalgo.HasKeyword("XSpacing")) { - invalgo.DeleteKeyword("XSpacing"); + if(invalgo.hasKeyword("XSpacing")) { + invalgo.deleteKeyword("XSpacing"); } } else { QString msg = "PVL for GridPolygonSeeder must contain [XSpacing] in ["; - msg += pvl.FileName() + "]"; + msg += pvl.fileName() + "]"; throw IException(IException::User, msg, _FILEINFO_); } p_Yspacing = 0.0; - if(algo.HasKeyword("YSpacing")) { + if(algo.hasKeyword("YSpacing")) { p_Yspacing = (double) algo["YSpacing"]; - if(invalgo.HasKeyword("YSpacing")) { - invalgo.DeleteKeyword("YSpacing"); + if(invalgo.hasKeyword("YSpacing")) { + invalgo.deleteKeyword("YSpacing"); } } else { QString msg = "PVL for GridPolygonSeeder must contain [YSpacing] in ["; - msg += pvl.FileName() + "]"; + msg += pvl.fileName() + "]"; throw IException(IException::User, msg, _FILEINFO_); } p_subGrid = false; - if(algo.HasKeyword("SubGrid")) { + if(algo.hasKeyword("SubGrid")) { p_subGrid = IString((QString)algo["SubGrid"]).UpCase() != "FALSE"; - if(invalgo.HasKeyword("SubGrid")) { - invalgo.DeleteKeyword("SubGrid"); + if(invalgo.hasKeyword("SubGrid")) { + invalgo.deleteKeyword("SubGrid"); } } } catch(IException &e) { - QString msg = "Improper format for PolygonSeeder PVL [" + pvl.FileName() + "]"; + QString msg = "Improper format for PolygonSeeder PVL [" + pvl.fileName() + "]"; throw IException(e, IException::User, msg, _FILEINFO_); } @@ -465,12 +465,12 @@ namespace Isis { PvlKeyword ySpac("YSpacing", toString(p_Yspacing)); PvlKeyword subGrid("SubGrid", toString(p_subGrid)); - pluginInfo.AddKeyword(name); - pluginInfo.AddKeyword(minThickness); - pluginInfo.AddKeyword(minArea); - pluginInfo.AddKeyword(xSpac); - pluginInfo.AddKeyword(ySpac); - pluginInfo.AddKeyword(subGrid); + pluginInfo.addKeyword(name); + pluginInfo.addKeyword(minThickness); + pluginInfo.addKeyword(minArea); + pluginInfo.addKeyword(xSpac); + pluginInfo.addKeyword(ySpac); + pluginInfo.addKeyword(subGrid); return pluginInfo; } diff --git a/isis/src/base/objs/GridPolygonSeeder/unitTest.cpp b/isis/src/base/objs/GridPolygonSeeder/unitTest.cpp index 253b78e77e2051c58c12b3ce53058c567d4c9845..c5209f05992b8e189c089b5e0372a50b54f2e286 100644 --- a/isis/src/base/objs/GridPolygonSeeder/unitTest.cpp +++ b/isis/src/base/objs/GridPolygonSeeder/unitTest.cpp @@ -28,7 +28,7 @@ int main() { PvlGroup alg("PolygonSeederAlgorithm"); do { - if(!alg.HasKeyword("Name")) { + if(!alg.hasKeyword("Name")) { cout << "Test without subgrid" << endl; alg += PvlKeyword("Name", "Grid"); alg += PvlKeyword("MinimumThickness", toString(0.3)); @@ -42,10 +42,10 @@ int main() { } PvlObject o("AutoSeed"); - o.AddGroup(alg); + o.addGroup(alg); Pvl pvl; - pvl.AddObject(o); + pvl.addObject(o); cout << pvl << endl << endl; PolygonSeeder *ps = PolygonSeederFactory::Create(pvl); @@ -80,8 +80,8 @@ int main() { // Create the projection necessary for seeding PvlGroup radii = Projection::TargetRadii("MARS"); Isis::Pvl maplab; - maplab.AddGroup(Isis::PvlGroup("Mapping")); - Isis::PvlGroup &mapGroup = maplab.FindGroup("Mapping"); + maplab.addGroup(Isis::PvlGroup("Mapping")); + Isis::PvlGroup &mapGroup = maplab.findGroup("Mapping"); mapGroup += Isis::PvlKeyword("EquatorialRadius", radii["EquatorialRadius"]); mapGroup += Isis::PvlKeyword("PolarRadius", radii["PolarRadius"]); mapGroup += Isis::PvlKeyword("LatitudeType", "Planetocentric"); @@ -143,8 +143,8 @@ int main() { // Create the projection necessary for seeding PvlGroup radii = Projection::TargetRadii("MARS"); Isis::Pvl maplab; - maplab.AddGroup(Isis::PvlGroup("Mapping")); - Isis::PvlGroup &mapGroup = maplab.FindGroup("Mapping"); + maplab.addGroup(Isis::PvlGroup("Mapping")); + Isis::PvlGroup &mapGroup = maplab.findGroup("Mapping"); mapGroup += Isis::PvlKeyword("EquatorialRadius", radii["EquatorialRadius"]); mapGroup += Isis::PvlKeyword("PolarRadius", radii["PolarRadius"]); mapGroup += Isis::PvlKeyword("LatitudeType", "Planetocentric"); @@ -166,7 +166,7 @@ int main() { e.print(); } } - while(!alg.HasKeyword("SubGrid")); + while(!alg.hasKeyword("SubGrid")); } catch(IException &e) { e.print(); diff --git a/isis/src/base/objs/GroundGrid/GroundGrid.cpp b/isis/src/base/objs/GroundGrid/GroundGrid.cpp index a858023e43f34ea36f9fbdd2b13574a22452cf35..4ee83f56d7ac9729b1c8cd1cb917f83fec22eeb4 100644 --- a/isis/src/base/objs/GroundGrid/GroundGrid.cpp +++ b/isis/src/base/objs/GroundGrid/GroundGrid.cpp @@ -74,7 +74,7 @@ namespace Isis { if(p_groundMap->Camera()) { Pvl tmp; p_groundMap->Camera()->BasicMapping(tmp); - *p_mapping = tmp.FindGroup("Mapping"); + *p_mapping = tmp.findGroup("Mapping"); } else { *p_mapping = p_groundMap->Projection()->Mapping(); @@ -85,7 +85,7 @@ namespace Isis { Distance radius2 = Distance((double)(*p_mapping)["PolarRadius"], Distance::Meters); - if(p_mapping->HasKeyword("MinimumLatitude")) { + if(p_mapping->hasKeyword("MinimumLatitude")) { p_minLat = new Latitude( toDouble((*p_mapping)["MinimumLatitude"][0]), *p_mapping, Angle::Degrees); @@ -94,7 +94,7 @@ namespace Isis { p_minLat = new Latitude; } - if(p_mapping->HasKeyword("MaximumLatitude")) { + if(p_mapping->hasKeyword("MaximumLatitude")) { p_maxLat = new Latitude( toDouble((*p_mapping)["MaximumLatitude"][0]), *p_mapping, Angle::Degrees); @@ -103,7 +103,7 @@ namespace Isis { p_maxLat = new Latitude; } - if(p_mapping->HasKeyword("MinimumLongitude")) { + if(p_mapping->hasKeyword("MinimumLongitude")) { p_minLon = new Longitude( toDouble((*p_mapping)["MinimumLongitude"][0]), *p_mapping, Angle::Degrees); @@ -112,7 +112,7 @@ namespace Isis { p_minLon = new Longitude; } - if(p_mapping->HasKeyword("MaximumLongitude")) { + if(p_mapping->hasKeyword("MaximumLongitude")) { p_maxLon = new Longitude( toDouble((*p_mapping)["MaximumLongitude"][0]), *p_mapping, Angle::Degrees); diff --git a/isis/src/base/objs/Gruen/Gruen.cpp b/isis/src/base/objs/Gruen/Gruen.cpp index c38758bae65894b86e78eda5aef6f7cddb45283a..22235199bbd472e40f87c0693434e3b98d9f539d 100644 --- a/isis/src/base/objs/Gruen/Gruen.cpp +++ b/isis/src/base/objs/Gruen/Gruen.cpp @@ -851,9 +851,9 @@ namespace Isis { if (m_unclassified > 0) { algo += PvlKeyword("UnclassifiedErrors", toString(m_unclassified)); } - pvl.AddGroup(algo); - pvl.AddGroup(StatsLog()); - pvl.AddGroup(ParameterLog()); + pvl.addGroup(algo); + pvl.addGroup(StatsLog()); + pvl.addGroup(ParameterLog()); return (pvl); } @@ -983,8 +983,8 @@ namespace Isis { */ void Gruen::init(Pvl &pvl) { // Establish the parameters - if (pvl.HasObject("AutoRegistration")) { - m_prof = DbProfile(pvl.FindGroup("Algorithm", Pvl::Traverse)); + if (pvl.hasObject("AutoRegistration")) { + m_prof = DbProfile(pvl.findGroup("Algorithm", Pvl::Traverse)); } else { m_prof = DbProfile(pvl); diff --git a/isis/src/base/objs/Gruen/unitTest.cpp b/isis/src/base/objs/Gruen/unitTest.cpp index 1965adf67d59e7d6817780e7ca5ee4cd4e5f6027..8e802f7094eb2201b2039fae16be488f029562e0 100644 --- a/isis/src/base/objs/Gruen/unitTest.cpp +++ b/isis/src/base/objs/Gruen/unitTest.cpp @@ -31,12 +31,12 @@ int main() { schip += PvlKeyword("Lines", toString(25)); PvlObject o("AutoRegistration"); - o.AddGroup(alg); - o.AddGroup(pchip); - o.AddGroup(schip); + o.addGroup(alg); + o.addGroup(pchip); + o.addGroup(schip); Pvl pvl; - pvl.AddObject(o); + pvl.addObject(o); std::cout << pvl << std::endl; Gruen gruen(pvl); diff --git a/isis/src/base/objs/Gui/Gui.cpp b/isis/src/base/objs/Gui/Gui.cpp index 8f3ca28ab9b8b603c65a45849e7582df1ec8f886..f7cd551eceb2c27709da800bd363a6f44028b576 100644 --- a/isis/src/base/objs/Gui/Gui.cpp +++ b/isis/src/base/objs/Gui/Gui.cpp @@ -73,7 +73,7 @@ namespace Isis { if(p_gui != NULL) return p_gui; // Get preferences - PvlGroup &uiPref = Preference::Preferences().FindGroup("UserInterface"); + PvlGroup &uiPref = Preference::Preferences().findGroup("UserInterface"); // Create the application new QApplication(argc, argv); @@ -84,7 +84,7 @@ namespace Isis { // Qt is smart enough to use the style of the system running the program. // However, Isis supports overriding this with a setting in IsisPreferences. // Here we check to see if this has been done and force the style if needed. - if(uiPref.HasKeyword("GuiStyle")) { + if(uiPref.hasKeyword("GuiStyle")) { QString style = uiPref["GuiStyle"]; QApplication::setStyle(style); } @@ -667,7 +667,7 @@ namespace Isis { Isis::UserInterface &ui = Application::GetUserInterface(); Preference &p = Preference::Preferences(); - PvlGroup &grp = p.FindGroup("UserInterface", Isis::Pvl::Traverse); + PvlGroup &grp = p.findGroup("UserInterface", Isis::Pvl::Traverse); Isis::FileName progHist(grp["HistoryPath"][0] + "/" + ui.ProgramName() + ".par"); if(!progHist.fileExists()) { @@ -679,7 +679,7 @@ namespace Isis { Isis::Pvl hist; try { - hist.Read(progHist.expanded()); + hist.read(progHist.expanded()); } catch(...) { p_historyEntry = -1; @@ -691,8 +691,8 @@ namespace Isis { } int entries = 0; - for(int i = 0; i < hist.Groups(); i++) { - if(hist.Group(i).IsNamed("UserParameters")) entries++; + for(int i = 0; i < hist.groups(); i++) { + if(hist.group(i).isNamed("UserParameters")) entries++; } // If we are past the last entry ring the bell @@ -705,9 +705,9 @@ namespace Isis { int useEntry = entries - p_historyEntry - 1; try { - Isis::PvlGroup &up = hist.Group(useEntry); - for(int k = 0; k < up.Keywords(); k++) { - QString key = up[k].Name(); + Isis::PvlGroup &up = hist.group(useEntry); + for(int k = 0; k < up.keywords(); k++) { + QString key = up[k].name(); QString val = up[k]; ui.Clear(key); ui.PutAsString(key, val); @@ -797,7 +797,7 @@ namespace Isis { // Show help for Isis void Gui::AboutIsis() { - Isis::PvlGroup &uig = Isis::Preference::Preferences().FindGroup("UserInterface"); + Isis::PvlGroup &uig = Isis::Preference::Preferences().findGroup("UserInterface"); QString command = (QString) uig["GuiHelpBrowser"] + " http://isis.astrogeology.usgs.gov >> /dev/null &"; ProgramLauncher::RunSystemCommand(command); @@ -812,7 +812,7 @@ namespace Isis { Isis::Application::GetUserInterface().ProgramName() + ".html"); - Isis::PvlGroup &uig = Isis::Preference::Preferences().FindGroup("UserInterface"); + Isis::PvlGroup &uig = Isis::Preference::Preferences().findGroup("UserInterface"); QString command = (QString) uig["GuiHelpBrowser"] + (QString)" file:" + file.expanded() + " &"; ProgramLauncher::RunSystemCommand(command); diff --git a/isis/src/base/objs/Hapke/Hapke.cpp b/isis/src/base/objs/Hapke/Hapke.cpp index f0af5415aca0c243835550b31c9cee08d015adb0..940c315cb88b544268ae85ebea60b7dc483acdb9 100644 --- a/isis/src/base/objs/Hapke/Hapke.cpp +++ b/isis/src/base/objs/Hapke/Hapke.cpp @@ -20,49 +20,49 @@ namespace Isis { p_photoHg1 = 0.0; p_photoHg2 = 0.0; - PvlGroup &algorithm = pvl.FindObject("PhotometricModel").FindGroup("Algorithm", Pvl::Traverse); + PvlGroup &algorithm = pvl.findObject("PhotometricModel").findGroup("Algorithm", Pvl::Traverse); p_algName = AlgorithmName().toUpper(); - if(algorithm.HasKeyword("Hg1")) { + if(algorithm.hasKeyword("Hg1")) { SetPhotoHg1(algorithm["Hg1"]); } - if(algorithm.HasKeyword("Hg2")) { + if(algorithm.hasKeyword("Hg2")) { SetPhotoHg2(algorithm["Hg2"]); } - if(algorithm.HasKeyword("Bh")) { + if(algorithm.hasKeyword("Bh")) { SetPhotoBh(algorithm["Bh"]); } - if(algorithm.HasKeyword("Ch")) { + if(algorithm.hasKeyword("Ch")) { SetPhotoCh(algorithm["Ch"]); } - if(algorithm.HasKeyword("ZeroB0Standard")) { + if(algorithm.hasKeyword("ZeroB0Standard")) { SetPhoto0B0Standard(algorithm["ZeroB0Standard"][0]); - } else if (algorithm.HasKeyword("ZeroB0St")) { + } else if (algorithm.hasKeyword("ZeroB0St")) { SetPhoto0B0Standard(algorithm["ZeroB0St"][0]); } else { SetPhoto0B0Standard("TRUE"); } - if(algorithm.HasKeyword("Wh")) { + if(algorithm.hasKeyword("Wh")) { SetPhotoWh(algorithm["Wh"]); } - if(algorithm.HasKeyword("Hh")) { + if(algorithm.hasKeyword("Hh")) { SetPhotoHh(algorithm["Hh"]); } - if(algorithm.HasKeyword("B0")) { + if(algorithm.hasKeyword("B0")) { SetPhotoB0(algorithm["B0"]); } p_photoB0save = p_photoB0; - if(algorithm.HasKeyword("Theta")) { + if(algorithm.hasKeyword("Theta")) { SetPhotoTheta(algorithm["Theta"]); } } diff --git a/isis/src/base/objs/Hapke/unitTest.cpp b/isis/src/base/objs/Hapke/unitTest.cpp index 1515a848645f23dad26f8bbd86c803f801cc5470..9763534927c08be243687babeb0119d01d4d9ed5 100644 --- a/isis/src/base/objs/Hapke/unitTest.cpp +++ b/isis/src/base/objs/Hapke/unitTest.cpp @@ -19,10 +19,10 @@ int main() { algp1 += PvlKeyword("Name", "HapkeHen"); PvlObject op1("PhotometricModel"); - op1.AddGroup(algp1); + op1.addGroup(algp1); Pvl pvl1; - pvl1.AddObject(op1); + pvl1.addObject(op1); std::cout << pvl1 << std::endl << std::endl; try { @@ -55,10 +55,10 @@ int main() { algp2 += PvlKeyword("ZeroB0St", "TRUE"); PvlObject op2("PhotometricModel"); - op2.AddGroup(algp2); + op2.addGroup(algp2); Pvl pvl2; - pvl2.AddObject(op2); + pvl2.addObject(op2); std::cout << pvl2 << std::endl << std::endl; try { @@ -91,10 +91,10 @@ int main() { algp3 += PvlKeyword("ZeroB0St", "YES"); PvlObject op3("PhotometricModel"); - op3.AddGroup(algp3); + op3.addGroup(algp3); Pvl pvl3; - pvl3.AddObject(op3); + pvl3.addObject(op3); std::cout << pvl3 << std::endl << std::endl; try { @@ -130,10 +130,10 @@ int main() { algp4 += PvlKeyword("ZeroB0Standard", "FALSE"); PvlObject op4("PhotometricModel"); - op4.AddGroup(algp4); + op4.addGroup(algp4); Pvl pvl4; - pvl4.AddObject(op4); + pvl4.addObject(op4); std::cout << pvl4 << std::endl << std::endl; try { @@ -166,10 +166,10 @@ int main() { algp5 += PvlKeyword("ZeroB0Standard", "NO"); PvlObject op5("PhotometricModel"); - op5.AddGroup(algp5); + op5.addGroup(algp5); Pvl pvl5; - pvl5.AddObject(op5); + pvl5.addObject(op5); std::cout << pvl5 << std::endl << std::endl; try { @@ -202,10 +202,10 @@ int main() { algp6 += PvlKeyword("ZeroB0Standard", "MAYBE"); PvlObject op6("PhotometricModel"); - op6.AddGroup(algp6); + op6.addGroup(algp6); Pvl pvl6; - pvl6.AddObject(op6); + pvl6.addObject(op6); std::cout << pvl6 << std::endl << std::endl; try { diff --git a/isis/src/base/objs/HapkeAtm1/unitTest.cpp b/isis/src/base/objs/HapkeAtm1/unitTest.cpp index 2b2f2106794f67579a4e4830842c88039cca4cf1..e7a47a4ca17268c982373607cb94540eb8e982b5 100644 --- a/isis/src/base/objs/HapkeAtm1/unitTest.cpp +++ b/isis/src/base/objs/HapkeAtm1/unitTest.cpp @@ -25,17 +25,17 @@ int main() { algp += PvlKeyword("Name", "Lambert"); PvlObject op("PhotometricModel"); - op.AddGroup(algp); + op.addGroup(algp); PvlGroup alga("Algorithm"); alga += PvlKeyword("Name", "HapkeAtm1"); PvlObject oa("AtmosphericModel"); - oa.AddGroup(alga); + oa.addGroup(alga); Pvl pvl; - pvl.AddObject(op); - pvl.AddObject(oa); + pvl.addObject(op); + pvl.addObject(oa); std::cout << pvl << std::endl << std::endl; diff --git a/isis/src/base/objs/HapkeAtm2/unitTest.cpp b/isis/src/base/objs/HapkeAtm2/unitTest.cpp index c43c4f8595fc6c6f15a84de866c0bfad5e8ac734..2505127ef4ca84073397ae3556597cb2ede5feba 100644 --- a/isis/src/base/objs/HapkeAtm2/unitTest.cpp +++ b/isis/src/base/objs/HapkeAtm2/unitTest.cpp @@ -25,17 +25,17 @@ int main() { algp += PvlKeyword("Name", "Lambert"); PvlObject op("PhotometricModel"); - op.AddGroup(algp); + op.addGroup(algp); PvlGroup alga("Algorithm"); alga += PvlKeyword("Name", "HapkeAtm2"); PvlObject oa("AtmosphericModel"); - oa.AddGroup(alga); + oa.addGroup(alga); Pvl pvl; - pvl.AddObject(op); - pvl.AddObject(oa); + pvl.addObject(op); + pvl.addObject(oa); std::cout << pvl << std::endl << std::endl; diff --git a/isis/src/base/objs/History/History.cpp b/isis/src/base/objs/History/History.cpp index d92883714bfd31d7f646b3b65f8181253ded7143..9c71c5de46c7e90203932ddbcea04d8f11fafc0a 100644 --- a/isis/src/base/objs/History/History.cpp +++ b/isis/src/base/objs/History/History.cpp @@ -38,7 +38,7 @@ namespace Isis { * @param name */ History::History(const QString &name) : Isis::Blob(name, "History") { - p_history.SetTerminator(""); + p_history.setTerminator(""); } /** @@ -69,7 +69,7 @@ namespace Isis { * @param obj PvlObject to be added */ void History::AddEntry(Isis::PvlObject &obj) { - p_history.AddObject(obj); + p_history.addObject(obj); } /** diff --git a/isis/src/base/objs/IException/IException.cpp b/isis/src/base/objs/IException/IException.cpp index e7a16c815a338da5a275e4a2fa609181ae39d6e6..308191b1a07e7bd4f94d7f5fb6e732b39f51b5b4 100644 --- a/isis/src/base/objs/IException/IException.cpp +++ b/isis/src/base/objs/IException/IException.cpp @@ -534,7 +534,7 @@ namespace Isis { } if (!exceptionIsBlank) - errors.AddGroup(errGroup); + errors.addGroup(errGroup); } return errors; @@ -553,10 +553,10 @@ namespace Isis { QString IException::toString() const { bool reportFileLine = true; - if (Preference::Preferences().HasGroup("ErrorFacility")) { + if (Preference::Preferences().hasGroup("ErrorFacility")) { PvlGroup &errorFacility = - Preference::Preferences().FindGroup("ErrorFacility"); - if (errorFacility.HasKeyword("FileLine")) { + Preference::Preferences().findGroup("ErrorFacility"); + if (errorFacility.hasKeyword("FileLine")) { QString fileLine = errorFacility["FileLine"][0]; reportFileLine = (fileLine.toUpper() == "ON"); } @@ -582,10 +582,10 @@ namespace Isis { bool usePvlFormat = false; - if (Preference::Preferences().HasGroup("ErrorFacility")) { + if (Preference::Preferences().hasGroup("ErrorFacility")) { PvlGroup &errorFacility = - Preference::Preferences().FindGroup("ErrorFacility"); - if (errorFacility.HasKeyword("Format")) { + Preference::Preferences().findGroup("ErrorFacility"); + if (errorFacility.hasKeyword("Format")) { QString format = errorFacility["Format"][0]; usePvlFormat = (format.toUpper() == "PVL"); } @@ -594,7 +594,7 @@ namespace Isis { if (usePvlFormat) { Pvl errors = toPvl(); - if (errors.Groups() != 0) { + if (errors.groups() != 0) { stringstream stringStream; stringStream << errors; result = stringStream.str().c_str(); diff --git a/isis/src/base/objs/IException/unitTest.cpp b/isis/src/base/objs/IException/unitTest.cpp index 88ccfedaeb4ee4b933bed005926208786eba04b6..ebfee0db1479294cb5f382ebe767df61be1a5fb4 100644 --- a/isis/src/base/objs/IException/unitTest.cpp +++ b/isis/src/base/objs/IException/unitTest.cpp @@ -133,7 +133,7 @@ int main(void) { cerr << "\n"; Pvl &prefs = Preference::Preferences(); - PvlGroup &errorPrefs = prefs.FindGroup("ErrorFacility"); + PvlGroup &errorPrefs = prefs.findGroup("ErrorFacility"); cerr << "Test Preference 'FileLine'\n"; { diff --git a/isis/src/base/objs/IdealCamera/IdealCamera.cpp b/isis/src/base/objs/IdealCamera/IdealCamera.cpp index 346c423fe108801a76efa92c5e2ad8672fcffdff..597ae40e27f3e43f2f37acac3f6972d36a33eca0 100644 --- a/isis/src/base/objs/IdealCamera/IdealCamera.cpp +++ b/isis/src/base/objs/IdealCamera/IdealCamera.cpp @@ -75,18 +75,18 @@ namespace Isis { IdealCamera::IdealCamera(Pvl &lab) : Camera(lab) { NaifStatus::CheckErrors(); // Get required keywords from instrument group - PvlGroup &inst = lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup &inst = lab.findGroup("Instrument", Pvl::Traverse); // Setup camera characteristics from instrument - if (inst.HasKeyword("FocalLength")) { + if (inst.hasKeyword("FocalLength")) { SetFocalLength(inst["FocalLength"]); } else { SetFocalLength(readValue("IDEAL_FOCAL_LENGTH", SpiceDoubleType).toDouble()); } - if (inst.HasKeyword("PixelPitch")) { + if (inst.hasKeyword("PixelPitch")) { SetPixelPitch(inst["PixelPitch"]); } else { @@ -96,7 +96,7 @@ namespace Isis { double et = inst["EphemerisTime"]; double exposureDuration = 0.0; - if (inst.HasKeyword("ExposureDuration")) { + if (inst.hasKeyword("ExposureDuration")) { exposureDuration = ((double) inst["ExposureDuration"]) / 1000.0; } @@ -114,8 +114,8 @@ namespace Isis { double sdir = xdir; double ldir = ydir; - if (inst.HasKeyword("TransX")) xdir = inst["TransX"]; - if (inst.HasKeyword("TransY")) ydir = inst["TransY"]; + if (inst.hasKeyword("TransX")) xdir = inst["TransX"]; + if (inst.hasKeyword("TransY")) ydir = inst["TransY"]; if (xDependency == CameraFocalPlaneMap::Line) { yDependency = CameraFocalPlaneMap::Sample; @@ -131,7 +131,7 @@ namespace Isis { catch (IException &) { double keyval[3]; keyval[0] = 0.; - if (inst.HasKeyword("TransX0")) { + if (inst.hasKeyword("TransX0")) { keyval[0] = inst["TransX0"]; } @@ -150,7 +150,7 @@ namespace Isis { catch (IException &) { double keyval[3]; keyval[0] = 0.; - if (inst.HasKeyword("TransY0")) { + if (inst.hasKeyword("TransY0")) { keyval[0] = inst["TransY0"]; } @@ -169,7 +169,7 @@ namespace Isis { catch (IException &) { double keyval[3]; keyval[0] = 0.; - if (inst.HasKeyword("TransS0")) { + if (inst.hasKeyword("TransS0")) { keyval[0] = inst["TransS0"]; } @@ -188,7 +188,7 @@ namespace Isis { catch (IException &) { double keyval[3]; keyval[0] = 0.; - if (inst.HasKeyword("TransL0")) { + if (inst.hasKeyword("TransL0")) { keyval[0] = inst["TransL0"]; } diff --git a/isis/src/base/objs/IdealCamera/unitTest.cpp b/isis/src/base/objs/IdealCamera/unitTest.cpp index ca79f1b15d1762691daf2575fe539138b71095fd..9c4e2251c95f23d072fe2460917a611553769953 100644 --- a/isis/src/base/objs/IdealCamera/unitTest.cpp +++ b/isis/src/base/objs/IdealCamera/unitTest.cpp @@ -52,7 +52,7 @@ int main(void) { for(unsigned int i = 0; i < sizeof(knownLat) / sizeof(double); i++) { Pvl p(files[i]); cam = CameraFactory::Create(p); - cout << "FileName: " << FileName(p.FileName()).name() << endl; + cout << "FileName: " << FileName(p.fileName()).name() << endl; cout << "CK Frame: " << cam->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); diff --git a/isis/src/base/objs/ImageImporter/ImageImporter.cpp b/isis/src/base/objs/ImageImporter/ImageImporter.cpp index 40850649185a7dc58919b24718f671429df82f00..bfc869f3ac7bc1293fbedd011a7144a7b717384c 100644 --- a/isis/src/base/objs/ImageImporter/ImageImporter.cpp +++ b/isis/src/base/objs/ImageImporter/ImageImporter.cpp @@ -129,7 +129,7 @@ namespace Isis { _FILEINFO_); } bandBin += name; - label->AddGroup(bandBin); + label->addGroup(bandBin); p.SetInputCube(cube); p.SetProcessingDirection(ProcessByBrick::BandsFirst); diff --git a/isis/src/base/objs/ImageOverlapSet/ImageOverlapSet.cpp b/isis/src/base/objs/ImageOverlapSet/ImageOverlapSet.cpp index 1c731127a0bf4c851f737541d4bec347f3251367..a6553bb7ce02a8440d0ff0bf23f43d3bce668565 100644 --- a/isis/src/base/objs/ImageOverlapSet/ImageOverlapSet.cpp +++ b/isis/src/base/objs/ImageOverlapSet/ImageOverlapSet.cpp @@ -833,7 +833,7 @@ namespace Isis { err += serialNumbers; - if(filename.Size() != 0) { + if(filename.size() != 0) { err += filename; } @@ -856,7 +856,7 @@ namespace Isis { err += serialNumbers; - if(filename.Size() != 0) { + if(filename.size() != 0) { err += filename; } @@ -901,7 +901,7 @@ namespace Isis { err += serialNumbers; - if(filename.Size() != 0) { + if(filename.size() != 0) { err += filename; } } @@ -920,7 +920,7 @@ namespace Isis { err += serialNumbers; - if(filename.Size() != 0) { + if(filename.size() != 0) { err += filename; } } @@ -969,7 +969,7 @@ namespace Isis { err += serialNumbers; - if(filename.Size() != 0) { + if(filename.size() != 0) { err += filename; } } @@ -988,7 +988,7 @@ namespace Isis { err += serialNumbers; - if(filename.Size() != 0) { + if(filename.size() != 0) { err += filename; } } diff --git a/isis/src/base/objs/ImportPdsTable/ImportPdsTable.cpp b/isis/src/base/objs/ImportPdsTable/ImportPdsTable.cpp index f7b9e249ff170be178f7d407cff3393939792f20..f97f6e8dfb70ea7fc27fd07c1ecc93f47c07070b 100644 --- a/isis/src/base/objs/ImportPdsTable/ImportPdsTable.cpp +++ b/isis/src/base/objs/ImportPdsTable/ImportPdsTable.cpp @@ -395,20 +395,20 @@ namespace Isis { Isis::Pvl label(pdsLabFile); - if (!label.HasObject(m_tableName)) { + if (!label.hasObject(m_tableName)) { QString msg = "The PDS file " + pdsLabFile + " does not have the required TABLE object, [" + m_tableName +"]. The PDS label file is probably invalid"; throw IException(IException::Unknown, msg.toStdString(), _FILEINFO_); } - m_recordBytes = (int) label.FindKeyword("RECORD_BYTES"); + m_recordBytes = (int) label.findKeyword("RECORD_BYTES"); // Get some pertinent information from the label - PvlObject &tabobj = label.FindObject(m_tableName); + PvlObject &tabobj = label.findObject(m_tableName); pdsTableFile = FileName(pdsLabFile).path() + "/" + label["^" + m_tableName][0]; - m_trows = (int) tabobj.FindKeyword("ROWS"); - int ncols = (int) tabobj.FindKeyword("COLUMNS"); - m_pdsTableType = QString(tabobj.FindKeyword("INTERCHANGE_FORMAT")); + m_trows = (int) tabobj.findKeyword("ROWS"); + int ncols = (int) tabobj.findKeyword("COLUMNS"); + m_pdsTableType = QString(tabobj.findKeyword("INTERCHANGE_FORMAT")); if (m_pdsTableType != "ASCII" && m_pdsTableType.toUpper() != "BINARY") { QString msg = "Unable to import the PDS table [" + m_tableName + "] from the PDS file [" @@ -417,13 +417,13 @@ namespace Isis { + "] is not supported. Valid values are ASCII or BINARY."; throw IException(IException::User, msg.toStdString(), _FILEINFO_); } - m_rowBytes = tabobj.FindKeyword("ROW_BYTES"); + m_rowBytes = tabobj.findKeyword("ROW_BYTES"); m_coldesc.clear(); - PvlObject::PvlObjectIterator colobj = tabobj.BeginObject(); + PvlObject::PvlObjectIterator colobj = tabobj.beginObject(); int icol(0); - while (colobj != tabobj.EndObject()) { - if (colobj->IsNamed("COLUMN")) { + while (colobj != tabobj.endObject()) { + if (colobj->isNamed("COLUMN")) { m_coldesc.push_back(getColumnDescription(*colobj, icol)); icol++; } diff --git a/isis/src/base/objs/IsisAml/IsisAml.cpp b/isis/src/base/objs/IsisAml/IsisAml.cpp index ce1c8eaa14fa465e54fc198fd0a62a896f7b3d2d..3f3acd91c4c7dd0039eec97f76503073346ee9b7 100644 --- a/isis/src/base/objs/IsisAml/IsisAml.cpp +++ b/isis/src/base/objs/IsisAml/IsisAml.cpp @@ -2085,7 +2085,7 @@ void IsisAml::Verify(const IsisParameterData *param) { // Isis::FileName name(value); // value = name.expanded(); // if (name.Exists() && param->fileMode == "output" - // && Isis::Preference::Preferences().FindGroup("CubeCustomization").FindKeyword("Overwrite")[0] == "Error") { + // && Isis::Preference::Preferences().findGroup("CubeCustomization").findKeyword("Overwrite")[0] == "Error") { // QString message = "Invalid output cube for [" + param->name + "]. The cube file [" + value + "] already exists. " + // "The user preference cube customization group is set to disallow cube overwrites."; // throw Isis::IException(Isis::IException::User, message, _FILEINFO_); @@ -2381,8 +2381,8 @@ void IsisAml::Verify(const IsisParameterData *param) { * @history 2010-07-19 Jeannie Walldren - Original version. */ void IsisAml::CheckFileNamePreference(QString filename, QString paramname) { - Isis::PvlGroup fileCustomization = Isis::Preference::Preferences().FindGroup("FileCustomization"); - QString overwritePreference = fileCustomization.FindKeyword("Overwrite")[0].simplified().trimmed(); + Isis::PvlGroup fileCustomization = Isis::Preference::Preferences().findGroup("FileCustomization"); + QString overwritePreference = fileCustomization.findKeyword("Overwrite")[0].simplified().trimmed(); QString temp = overwritePreference; if(overwritePreference.toUpper() == "ERROR") { QString message = "Invalid output filename for [" + paramname + "]. The file [" + filename + "] already exists. " + @@ -2935,7 +2935,7 @@ void IsisAml::CommandLine(Isis::Pvl &cont) const { Isis::PvlKeyword paramKeyword(param->name); for(unsigned int value = 0; value < param->values.size(); value++) { - paramKeyword.AddValue(param->values[value]); + paramKeyword.addValue(param->values[value]); } group += paramKeyword; @@ -2948,7 +2948,7 @@ void IsisAml::CommandLine(Isis::Pvl &cont) const { for(unsigned int value = 0; value < param->defaultValues.size(); value++) { - paramKeyword.AddValue(param->defaultValues[value]); + paramKeyword.addValue(param->defaultValues[value]); } group += paramKeyword; @@ -2979,8 +2979,8 @@ void IsisAml::CommandLine(Isis::Pvl &cont) const { for(unsigned int e2 = 0; e2 < param->listOptions[o2].exclude.size(); e2++) { const IsisParameterData *param2 = ReturnParam(param->listOptions[o2].exclude[e2]); - if(group.HasKeyword(param2->name)) { - group.DeleteKeyword(param2->name); + if(group.hasKeyword(param2->name)) { + group.deleteKeyword(param2->name); } } } @@ -2989,8 +2989,8 @@ void IsisAml::CommandLine(Isis::Pvl &cont) const { } } - cont.Clear(); - cont.AddGroup(group); + cont.clear(); + cont.addGroup(group); return; } diff --git a/isis/src/base/objs/IsisAml/unitTest.cpp b/isis/src/base/objs/IsisAml/unitTest.cpp index 347bea6a3e7866792680a0e2d6ec650de4a37ec1..705d9cfb36c5987f3f6ff5103db2a9003edc62de 100644 --- a/isis/src/base/objs/IsisAml/unitTest.cpp +++ b/isis/src/base/objs/IsisAml/unitTest.cpp @@ -740,7 +740,7 @@ int main(void) { try { // FILE OVERWRITE NOT ALLOWED - testpref.FindGroup("FileCustomization").FindKeyword("Overwrite")[0] = "Error"; + testpref.findGroup("FileCustomization").findKeyword("Overwrite")[0] = "Error"; cout << " Overwrite not allowed:" << endl; aml->VerifyAll(); } @@ -749,7 +749,7 @@ int main(void) { } try { // INVALID OVERWRITE VALUE IN USER PREFERENCE FILE - testpref.FindGroup("FileCustomization").FindKeyword("Overwrite")[0] = "Err"; + testpref.findGroup("FileCustomization").findKeyword("Overwrite")[0] = "Err"; cout << " Invalid Overwrite preference value:" << endl; aml->VerifyAll(); } diff --git a/isis/src/base/objs/Isotropic1/unitTest.cpp b/isis/src/base/objs/Isotropic1/unitTest.cpp index 57b932e51a0c05717462e87b72a98887db5a5bb0..c56fbbb5dd1eb5e7e113e4fd04fa3d15bb3aab8f 100644 --- a/isis/src/base/objs/Isotropic1/unitTest.cpp +++ b/isis/src/base/objs/Isotropic1/unitTest.cpp @@ -26,17 +26,17 @@ int main() { algp += PvlKeyword("Name", "Lambert"); PvlObject op("PhotometricModel"); - op.AddGroup(algp); + op.addGroup(algp); PvlGroup alga("Algorithm"); alga += PvlKeyword("Name", "Isotropic1"); PvlObject oa("AtmosphericModel"); - oa.AddGroup(alga); + oa.addGroup(alga); Pvl pvl; - pvl.AddObject(op); - pvl.AddObject(oa); + pvl.addObject(op); + pvl.addObject(oa); std::cout << pvl << std::endl << std::endl; try { diff --git a/isis/src/base/objs/Isotropic2/unitTest.cpp b/isis/src/base/objs/Isotropic2/unitTest.cpp index ffe32f91170b41893afe0f097ac47d9a661d8176..c7b0d57d8653451c83e7a83fe4c3bfb53c92e92c 100644 --- a/isis/src/base/objs/Isotropic2/unitTest.cpp +++ b/isis/src/base/objs/Isotropic2/unitTest.cpp @@ -25,17 +25,17 @@ int main() { algp += PvlKeyword("Name", "Lambert"); PvlObject op("PhotometricModel"); - op.AddGroup(algp); + op.addGroup(algp); PvlGroup alga("Algorithm"); alga += PvlKeyword("Name", "Isotropic2"); PvlObject oa("AtmosphericModel"); - oa.AddGroup(alga); + oa.addGroup(alga); Pvl pvl; - pvl.AddObject(op); - pvl.AddObject(oa); + pvl.addObject(op); + pvl.addObject(oa); std::cout << pvl << std::endl << std::endl; try { diff --git a/isis/src/base/objs/JP2Encoder/JP2Encoder.h b/isis/src/base/objs/JP2Encoder/JP2Encoder.h index 4ac6d510eef8ade4176a57afdaa14eee299cde43..ae650ebc1875c8c5da934ca86693d1dc9ed7d194 100644 --- a/isis/src/base/objs/JP2Encoder/JP2Encoder.h +++ b/isis/src/base/objs/JP2Encoder/JP2Encoder.h @@ -50,7 +50,7 @@ namespace Isis { * JP2Encoder *JP2_encoder; * icube = p.SetInputCube("FROM",Isis::OneBand); * p.SetInputRange(); - * p.SetFormat(ProcessExport::BIL); + * p.setFormat(ProcessExport::BIL); * jp2buf = new char* [1]; * jp2buf[0] = new char[icube->Samples()]; * p.SetOutputType(Isis::UnsignedByte); diff --git a/isis/src/base/objs/Kernels/Kernels.cpp b/isis/src/base/objs/Kernels/Kernels.cpp index 29be9bcd7675b9346dba24d6b1094c7a3dec6683..48485228e6ca0524c7a48908f70e48f5c0fe6a38 100644 --- a/isis/src/base/objs/Kernels/Kernels.cpp +++ b/isis/src/base/objs/Kernels/Kernels.cpp @@ -911,12 +911,12 @@ namespace Isis { const bool &manage) { KernelList klist; // Get the kernel group and load main kernels - PvlGroup &kernels = pvl.FindGroup("Kernels",Pvl::Traverse); + PvlGroup &kernels = pvl.findGroup("Kernels",Pvl::Traverse); // Check for the keyword - if (kernels.HasKeyword(kname)) { + if (kernels.hasKeyword(kname)) { PvlKeyword &kkey = kernels[kname]; - for (int i = 0 ; i < kkey.Size() ; i++) { - if (!kkey.IsNull(i)) { + for (int i = 0 ; i < kkey.size() ; i++) { + if (!kkey.isNull(i)) { if (kkey[i].toLower() != "table") { klist.push_back(examine(kkey[i], manage)); } @@ -1241,10 +1241,10 @@ namespace Isis { * determined, 0 is returned. */ int Kernels::getCameraVersion(Pvl &pvl) const { - PvlGroup &kernels = pvl.FindGroup("Kernels",Pvl::Traverse); + PvlGroup &kernels = pvl.findGroup("Kernels",Pvl::Traverse); int cv(0); // Check for the keyword - if (kernels.HasKeyword("CameraVersion")) { + if (kernels.hasKeyword("CameraVersion")) { PvlKeyword &kkey = kernels["CameraVersion"]; cv = IString(kkey[0]).ToInteger(); } diff --git a/isis/src/base/objs/Lambert/unitTest.cpp b/isis/src/base/objs/Lambert/unitTest.cpp index 9e44e8ec7129d4eb0b167b339211782a8057df98..5843a1ee4d8fc6638094bbc87df0c0f5f7a02ad1 100644 --- a/isis/src/base/objs/Lambert/unitTest.cpp +++ b/isis/src/base/objs/Lambert/unitTest.cpp @@ -19,10 +19,10 @@ int main() { alg += PvlKeyword("Name", "Lambert"); PvlObject o("PhotometricModel"); - o.AddGroup(alg); + o.addGroup(alg); Pvl pvl; - pvl.AddObject(o); + pvl.addObject(o); std::cout << pvl << std::endl << std::endl; PhotoModel *pm = PhotoModelFactory::Create(pvl); diff --git a/isis/src/base/objs/LambertAzimuthalEqualArea/LambertAzimuthalEqualArea.cpp b/isis/src/base/objs/LambertAzimuthalEqualArea/LambertAzimuthalEqualArea.cpp index 8ad904da9c8e25ccdfff0a9f2d6184e5c2254e01..179e23df78a372f91ad645005ef1356550c6b8ad 100644 --- a/isis/src/base/objs/LambertAzimuthalEqualArea/LambertAzimuthalEqualArea.cpp +++ b/isis/src/base/objs/LambertAzimuthalEqualArea/LambertAzimuthalEqualArea.cpp @@ -84,11 +84,11 @@ namespace Isis { // Map Projections--A Working Manual by John P. Snyder // Try to read the mapping group - PvlGroup &mapGroup = label.FindGroup("Mapping", Pvl::Traverse); + PvlGroup &mapGroup = label.findGroup("Mapping", Pvl::Traverse); // Compute and write the default center longitude if allowed and // necessary - if (!mapGroup.HasKeyword("CenterLongitude")) { + if (!mapGroup.hasKeyword("CenterLongitude")) { if (allowDefaults) { double centerLon = (MinimumLongitude() + MaximumLongitude()) / 2.0; mapGroup += PvlKeyword("CenterLongitude", toString(centerLon), "Degrees"); @@ -103,7 +103,7 @@ namespace Isis { // Compute and write the default center latitude if allowed and // necessary - if (!mapGroup.HasKeyword("CenterLatitude")) { + if (!mapGroup.hasKeyword("CenterLatitude")) { if (allowDefaults) { double centerLat = (MinimumLatitude() + MaximumLatitude()) / 2.0; mapGroup += PvlKeyword("CenterLatitude", toString(centerLat), "Degrees"); diff --git a/isis/src/base/objs/LambertAzimuthalEqualArea/unitTest.cpp b/isis/src/base/objs/LambertAzimuthalEqualArea/unitTest.cpp index a4a2ad6aec56feba984265394be4c523c2dc3e69..c0dc81c28650d2f91ddf5faf6e7df2735d1655d2 100644 --- a/isis/src/base/objs/LambertAzimuthalEqualArea/unitTest.cpp +++ b/isis/src/base/objs/LambertAzimuthalEqualArea/unitTest.cpp @@ -21,8 +21,8 @@ int main(int argc, char *argv[]) { cout << "UNIT TEST FOR LambertAzimuthalEqualArea projection" << endl << endl; Pvl lab; - lab.AddGroup(PvlGroup("Mapping")); - PvlGroup &mapGroup = lab.FindGroup("Mapping"); + lab.addGroup(PvlGroup("Mapping")); + PvlGroup &mapGroup = lab.findGroup("Mapping"); mapGroup += PvlKeyword("EquatorialRadius", "1.0"); mapGroup += PvlKeyword("PolarRadius", "1.0"); mapGroup += PvlKeyword("LatitudeType", "Planetographic"); @@ -127,7 +127,7 @@ int main(int argc, char *argv[]) { cout << "\t\t\t\t/-----------------------------------------/" << endl; cout << endl; // CHECKING OTHER KNOWN POINTS - double rad = p1.LocalRadius(mapGroup.FindKeyword("CenterLatitude")); + double rad = p1.LocalRadius(mapGroup.findKeyword("CenterLatitude")); cout << " Testing other known points..." << endl; cout << endl; cout << " Comparison Values" << endl; @@ -280,10 +280,10 @@ int main(int argc, char *argv[]) { cout << "(x,y) = (" << p1.XCoord() << ", " << p1.YCoord() << ")"<< endl; cout << endl; cout << endl; - mapGroup.FindKeyword("MinimumLatitude").SetValue("-90.0"); - mapGroup.FindKeyword("MaximumLatitude").SetValue("90.0"); - mapGroup.FindKeyword("MinimumLongitude").SetValue("-179.99999"); - mapGroup.FindKeyword("MaximumLongitude").SetValue("179.99999"); + mapGroup.findKeyword("MinimumLatitude").setValue("-90.0"); + mapGroup.findKeyword("MaximumLatitude").setValue("90.0"); + mapGroup.findKeyword("MinimumLongitude").setValue("-179.99999"); + mapGroup.findKeyword("MaximumLongitude").setValue("179.99999"); Projection &p1a = *ProjectionFactory::Create(lab); cout << "Given: " << endl; cout << " Minimum Latitude: " << p1a.MinimumLatitude() << endl; @@ -309,8 +309,8 @@ int main(int argc, char *argv[]) { p1a.SetCoordinate(0, minY); cout << " SetCoordinate(0,minY) returns lat/lon = " << p1a.Latitude() << " / " << p1a.Longitude() << endl; - mapGroup.FindKeyword("MinimumLongitude").SetValue("-90.0"); - mapGroup.FindKeyword("MaximumLongitude").SetValue("90.0"); + mapGroup.findKeyword("MinimumLongitude").setValue("-90.0"); + mapGroup.findKeyword("MaximumLongitude").setValue("90.0"); cout << "Given: " << endl; Projection &p1b = *ProjectionFactory::Create(lab); cout << " Minimum Latitude: " << p1b.MinimumLatitude() << endl; @@ -345,14 +345,14 @@ int main(int argc, char *argv[]) { cout << "\t\t\t SPHERICAL-PLANETOGRAPHIC-POSITIVEEAST-OBLIQUE-360" << endl; cout << border << endl << endl; //|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| - mapGroup.DeleteKeyword("EquatorialRadius"); + mapGroup.deleteKeyword("EquatorialRadius"); mapGroup += PvlKeyword("EquatorialRadius", "3.0"); - mapGroup.FindKeyword("PolarRadius").SetValue("3.0"); - mapGroup.FindKeyword("CenterLatitude").SetValue("40.0"); - mapGroup.FindKeyword("CenterLongitude").SetValue("-100.0"); - mapGroup.FindKeyword("MinimumLongitude").SetValue("-279.99999"); - mapGroup.FindKeyword("MaximumLongitude").SetValue("79.99999"); - mapGroup.FindKeyword("LongitudeDomain").SetValue("360"); + mapGroup.findKeyword("PolarRadius").setValue("3.0"); + mapGroup.findKeyword("CenterLatitude").setValue("40.0"); + mapGroup.findKeyword("CenterLongitude").setValue("-100.0"); + mapGroup.findKeyword("MinimumLongitude").setValue("-279.99999"); + mapGroup.findKeyword("MaximumLongitude").setValue("79.99999"); + mapGroup.findKeyword("LongitudeDomain").setValue("360"); Projection &p2 = *ProjectionFactory::Create(lab); cout << mapGroup["CenterLatitude"] << endl; cout << mapGroup["CenterLongitude"] << endl; @@ -421,8 +421,8 @@ int main(int argc, char *argv[]) { cout << "\t\t\t\t/-----------------------------------------/" << endl; cout << endl; // CHECKING OTHER KNOWN POINTS - //rad = mapGroup.FindKeyword("EquatorialRadius"); - rad = p2.LocalRadius(mapGroup.FindKeyword("CenterLatitude")); + //rad = mapGroup.findKeyword("EquatorialRadius"); + rad = p2.LocalRadius(mapGroup.findKeyword("CenterLatitude")); cout << " Testing other known points..." << endl; cout << endl; cout << " Comparison Values" << endl; @@ -527,8 +527,8 @@ int main(int argc, char *argv[]) { << p2.Latitude() << " / " << p2.Longitude() << endl; cout << endl; cout << endl; - mapGroup.FindKeyword("MinimumLongitude").SetValue("-110.0"); - mapGroup.FindKeyword("MaximumLongitude").SetValue("70.0"); + mapGroup.findKeyword("MinimumLongitude").setValue("-110.0"); + mapGroup.findKeyword("MaximumLongitude").setValue("70.0"); Projection &p2a = *ProjectionFactory::Create(lab); cout << std::setprecision(7); cout << "Given: " << endl; @@ -565,9 +565,9 @@ int main(int argc, char *argv[]) { cout << "\t\t\t SPHERICAL-PLANETOGRAPHIC-POSITIVEEAST-SOUTH POLAR-180" << endl; cout << border << endl << endl; //|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| - mapGroup.FindKeyword("CenterLatitude").SetValue("-90.0"); - mapGroup.FindKeyword("CenterLongitude").SetValue("-96.0"); - mapGroup.FindKeyword("LongitudeDomain").SetValue("180"); + mapGroup.findKeyword("CenterLatitude").setValue("-90.0"); + mapGroup.findKeyword("CenterLongitude").setValue("-96.0"); + mapGroup.findKeyword("LongitudeDomain").setValue("180"); Projection &p3 = *ProjectionFactory::Create(lab); cout << mapGroup["CenterLatitude"] << endl; cout << mapGroup["CenterLongitude"] << endl; @@ -635,8 +635,8 @@ int main(int argc, char *argv[]) { cout << "\t\t\t\t/-----------------------------------------/" << endl; cout << endl; // CHECKING OTHER KNOWN POINTS - //rad = mapGroup.FindKeyword("EquatorialRadius"); - rad = p3.LocalRadius(mapGroup.FindKeyword("CenterLatitude")); + //rad = mapGroup.findKeyword("EquatorialRadius"); + rad = p3.LocalRadius(mapGroup.findKeyword("CenterLatitude")); cout << " Testing other known points..." << endl; cout << endl; cout << " Comparison Values" << endl; @@ -784,10 +784,10 @@ int main(int argc, char *argv[]) { cout << "(x,y) = (" << p3.XCoord() << ", " << p3.YCoord() << ")"<< endl; cout << endl; cout << endl; - mapGroup.FindKeyword("MinimumLatitude").SetValue("-90.0"); - mapGroup.FindKeyword("MaximumLatitude").SetValue("0.0"); - mapGroup.FindKeyword("MinimumLongitude").SetValue("-336.0");//24 - mapGroup.FindKeyword("MaximumLongitude").SetValue("-66.0");//294 + mapGroup.findKeyword("MinimumLatitude").setValue("-90.0"); + mapGroup.findKeyword("MaximumLatitude").setValue("0.0"); + mapGroup.findKeyword("MinimumLongitude").setValue("-336.0");//24 + mapGroup.findKeyword("MaximumLongitude").setValue("-66.0");//294 Projection &p3a = *ProjectionFactory::Create(lab); cout << "Given: " << endl; cout << " Minimum Latitude: " << p3a.MinimumLatitude() << endl; @@ -823,8 +823,8 @@ int main(int argc, char *argv[]) { << p3a.Latitude() << " / " << p3a.Longitude() << endl; cout << endl; cout << endl; - mapGroup.FindKeyword("MinimumLongitude").SetValue("-66.0"); - mapGroup.FindKeyword("MaximumLongitude").SetValue("-51.0"); + mapGroup.findKeyword("MinimumLongitude").setValue("-66.0"); + mapGroup.findKeyword("MaximumLongitude").setValue("-51.0"); Projection &p3b = *ProjectionFactory::Create(lab); cout << "Given: " << endl; cout << " Minimum Latitude: " << p3b.MinimumLatitude() << endl; @@ -867,13 +867,13 @@ int main(int argc, char *argv[]) { cout << "\t\t\t SPHERICAL-PLANETOCENTRIC-POSITIVEWEST-NORTH POLAR-180" << endl; cout << border << endl << endl; //|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| - mapGroup.FindKeyword("CenterLatitude").SetValue("90.0"); - mapGroup.FindKeyword("LatitudeType").SetValue("Planetocentric"); - mapGroup.FindKeyword("LongitudeDirection").SetValue("PositiveWest"); - mapGroup.FindKeyword("MinimumLatitude").SetValue("-89.99999"); - mapGroup.FindKeyword("MaximumLatitude").SetValue("0.0"); - mapGroup.FindKeyword("MinimumLongitude").SetValue("-51.0"); - mapGroup.FindKeyword("MaximumLongitude").SetValue("129.0"); + mapGroup.findKeyword("CenterLatitude").setValue("90.0"); + mapGroup.findKeyword("LatitudeType").setValue("Planetocentric"); + mapGroup.findKeyword("LongitudeDirection").setValue("PositiveWest"); + mapGroup.findKeyword("MinimumLatitude").setValue("-89.99999"); + mapGroup.findKeyword("MaximumLatitude").setValue("0.0"); + mapGroup.findKeyword("MinimumLongitude").setValue("-51.0"); + mapGroup.findKeyword("MaximumLongitude").setValue("129.0"); Projection &p4 = *ProjectionFactory::Create(lab); cout << mapGroup["CenterLatitude"] << endl; cout << mapGroup["CenterLongitude"] << endl; @@ -941,8 +941,8 @@ int main(int argc, char *argv[]) { cout << "\t\t\t\t/-----------------------------------------/" << endl; cout << endl; // CHECKING OTHER KNOWN POINTS - //rad = mapGroup.FindKeyword("EquatorialRadius"); - rad = p4.LocalRadius(mapGroup.FindKeyword("CenterLatitude")); + //rad = mapGroup.findKeyword("EquatorialRadius"); + rad = p4.LocalRadius(mapGroup.findKeyword("CenterLatitude")); cout << " Testing other known points..." << endl; cout << endl; cout << " Comparison Values" << endl; @@ -1075,8 +1075,8 @@ int main(int argc, char *argv[]) { p4.SetGround(-90, 90); cout << endl; cout << endl; - mapGroup.FindKeyword("MinimumLongitude").SetValue("-6.0"); - mapGroup.FindKeyword("MaximumLongitude").SetValue("24.0"); + mapGroup.findKeyword("MinimumLongitude").setValue("-6.0"); + mapGroup.findKeyword("MaximumLongitude").setValue("24.0"); Projection &p4a = *ProjectionFactory::Create(lab); cout << "Given: " << endl; cout << std::setprecision(7);// so all of the 9's are visible for minlat @@ -1117,7 +1117,7 @@ int main(int argc, char *argv[]) { << p4a.Latitude() << " / " << p4a.Longitude() << endl; cout << endl; cout << endl; - mapGroup.FindKeyword("MinimumLatitude").SetValue("-90.0"); + mapGroup.findKeyword("MinimumLatitude").setValue("-90.0"); Projection &p4b = *ProjectionFactory::Create(lab); cout << "Given: " << endl; cout << std::setprecision(7); @@ -1158,15 +1158,15 @@ int main(int argc, char *argv[]) { cout << "\t\t \t ELLIPSOIDAL-PLANETOGRAPHIC-POSITIVEEAST-NORTH POLAR-180" <Name() << endl; @@ -2017,8 +2017,8 @@ int main(int argc, char *argv[]) { cout << "\t\t\t\t/-----------------------------------------/" << endl; cout << endl; cout << "Testing default computations of CenterLatitude and CenterLongitude by Constructor" << endl; - mapGroup.DeleteKeyword("CenterLongitude"); - mapGroup.DeleteKeyword("CenterLatitude"); + mapGroup.deleteKeyword("CenterLongitude"); + mapGroup.deleteKeyword("CenterLatitude"); LambertAzimuthalEqualArea allowDefaultsTrue(lab, true); cout << lab << endl; cout << endl; @@ -2028,9 +2028,9 @@ int main(int argc, char *argv[]) { Pvl tmp1; Pvl tmp2; Pvl tmp3; - tmp1.AddGroup(p1.Mapping()); - tmp2.AddGroup(p1.MappingLatitudes()); - tmp3.AddGroup(p1.MappingLongitudes()); + tmp1.addGroup(p1.Mapping()); + tmp2.addGroup(p1.MappingLatitudes()); + tmp3.addGroup(p1.MappingLongitudes()); cout << "Mapping() = " << endl; cout << tmp1 << endl; cout << "MappingLatitudes() = " << endl; @@ -2076,7 +2076,7 @@ int main(int argc, char *argv[]) { cout << "\t\t\t\t\t\t\t\t\t TESTING ERRORS " << endl; cout << border << endl << endl; //|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| - mapGroup.DeleteKeyword("CenterLongitude"); + mapGroup.deleteKeyword("CenterLongitude"); cout << "Error check: Missing center longitude keyword" << endl; try { LambertAzimuthalEqualArea p(lab); @@ -2088,7 +2088,7 @@ int main(int argc, char *argv[]) { cout << endl; cout << "\t\t\t\t/-----------------------------------------/" << endl; cout << endl; - mapGroup.DeleteKeyword("CenterLatitude"); + mapGroup.deleteKeyword("CenterLatitude"); cout << "Error check: Missing center latitude keyword" << endl; try { LambertAzimuthalEqualArea p(lab); @@ -2103,13 +2103,13 @@ int main(int argc, char *argv[]) { cout << "Error check: MinimumLongitude more than 360 degrees " "from CenterLongitude" << endl; try { - mapGroup.FindKeyword("MinimumLongitude").SetValue("-181.0"); - mapGroup.FindKeyword("MaximumLongitude").SetValue("270.0"); + mapGroup.findKeyword("MinimumLongitude").setValue("-181.0"); + mapGroup.findKeyword("MaximumLongitude").setValue("270.0"); LambertAzimuthalEqualArea p(lab); } catch(IException &e) { e.print(); - mapGroup.FindKeyword("MinimumLongitude").SetValue("-180.0"); + mapGroup.findKeyword("MinimumLongitude").setValue("-180.0"); } cout << endl; cout << "\t\t\t\t/-----------------------------------------/" << endl; @@ -2117,12 +2117,12 @@ int main(int argc, char *argv[]) { cout << "Error check: MaximumLongitude more than 360 degrees " "from CenterLongitude" << endl; try { - mapGroup.FindKeyword("MaximumLongitude").SetValue("541.0"); + mapGroup.findKeyword("MaximumLongitude").setValue("541.0"); LambertAzimuthalEqualArea p(lab); } catch(IException &e) { e.print(); - mapGroup.FindKeyword("MaximumLongitude").SetValue("270.0"); + mapGroup.findKeyword("MaximumLongitude").setValue("270.0"); } cout << endl; cout << "\t\t\t\t/-----------------------------------------/" << endl; @@ -2133,31 +2133,31 @@ int main(int argc, char *argv[]) { } catch(IException &e) { e.print(); - mapGroup.FindKeyword("MinimumLongitude").SetValue("90.0"); + mapGroup.findKeyword("MinimumLongitude").setValue("90.0"); } cout << endl; cout << "\t\t\t\t/-----------------------------------------/" << endl; cout << endl; cout << "Error check: Center longitude out of valid range" << endl; try { - mapGroup.FindKeyword("CenterLongitude").SetValue("361.0"); + mapGroup.findKeyword("CenterLongitude").setValue("361.0"); LambertAzimuthalEqualArea p(lab); } catch(IException &e) { e.print(); - mapGroup.FindKeyword("CenterLongitude").SetValue("180.0"); + mapGroup.findKeyword("CenterLongitude").setValue("180.0"); } cout << endl; cout << "\t\t\t\t/-----------------------------------------/" << endl; cout << endl; cout << "Error check: Center latitude out of valid range" << endl; try { - mapGroup.FindKeyword("CenterLatitude").SetValue("-91.0"); + mapGroup.findKeyword("CenterLatitude").setValue("-91.0"); LambertAzimuthalEqualArea p(lab); } catch(IException &e) { e.print(); - mapGroup.FindKeyword("CenterLatitude").SetValue("0.0"); + mapGroup.findKeyword("CenterLatitude").setValue("0.0"); } cout << endl; cout << "\t\t\t\t/-----------------------------------------/" << endl; @@ -2166,14 +2166,14 @@ int main(int argc, char *argv[]) { "antipodal point for equatorial projections." << endl; try { // non-polar, clat = 0 (equatorial) - mapGroup.FindKeyword("CenterLatitude").SetValue("0"); + mapGroup.findKeyword("CenterLatitude").setValue("0"); // minlat(-90) <= -clat <= maxlat(90) - mapGroup.FindKeyword("MinimumLatitude").SetValue("-90"); - mapGroup.FindKeyword("MaximumLatitude").SetValue("90.0"); + mapGroup.findKeyword("MinimumLatitude").setValue("-90"); + mapGroup.findKeyword("MaximumLatitude").setValue("90.0"); // minlon(-180) <= clon-180 <= maxlon(90) - mapGroup.FindKeyword("CenterLongitude").SetValue("0"); - mapGroup.FindKeyword("MinimumLongitude").SetValue("-180.0"); - mapGroup.FindKeyword("MaximumLongitude").SetValue("90.0"); + mapGroup.findKeyword("CenterLongitude").setValue("0"); + mapGroup.findKeyword("MinimumLongitude").setValue("-180.0"); + mapGroup.findKeyword("MaximumLongitude").setValue("90.0"); LambertAzimuthalEqualArea p(lab); } catch(IException &e) { @@ -2186,19 +2186,19 @@ int main(int argc, char *argv[]) { "antipodal point for oblique projections." << endl; try { // non-polar, clat = 10 (oblique) - mapGroup.FindKeyword("CenterLatitude").SetValue("10"); + mapGroup.findKeyword("CenterLatitude").setValue("10"); // minlat(-20) <= -clat(-10) <= maxlat(0) - mapGroup.FindKeyword("MinimumLatitude").SetValue("-20"); - mapGroup.FindKeyword("MaximumLatitude").SetValue("0"); + mapGroup.findKeyword("MinimumLatitude").setValue("-20"); + mapGroup.findKeyword("MaximumLatitude").setValue("0"); // minlon(180) <= clon+180(190) <= maxlon(200) - mapGroup.FindKeyword("CenterLongitude").SetValue("10"); - mapGroup.FindKeyword("MinimumLongitude").SetValue("180.0"); - mapGroup.FindKeyword("MaximumLongitude").SetValue("200.0"); + mapGroup.findKeyword("CenterLongitude").setValue("10"); + mapGroup.findKeyword("MinimumLongitude").setValue("180.0"); + mapGroup.findKeyword("MaximumLongitude").setValue("200.0"); LambertAzimuthalEqualArea p(lab); } catch(IException &e) { e.print(); - mapGroup.FindKeyword("MaximumLongitude").SetValue("189.0"); + mapGroup.findKeyword("MaximumLongitude").setValue("189.0"); } cout << endl; cout << "\t\t\t\t/-----------------------------------------/" << endl; @@ -2226,8 +2226,8 @@ int main(int argc, char *argv[]) { cout << endl; cout << "\t\t\t\t/-----------------------------------------/" << endl; cout << endl; - mapGroup.FindKeyword("EquatorialRadius").SetValue("2.0"); - mapGroup.FindKeyword("PolarRadius").SetValue("1.0"); + mapGroup.findKeyword("EquatorialRadius").setValue("2.0"); + mapGroup.findKeyword("PolarRadius").setValue("1.0"); cout << "Error check: Relative scale factor. " "Ellipsoidal oblique aspect projection." << endl; LambertAzimuthalEqualArea pp(lab); @@ -2243,7 +2243,7 @@ int main(int argc, char *argv[]) { cout << endl; cout << "Error check: Relative scale factor. " "Polar aspect projection projected at opposite pole." << endl; - mapGroup.FindKeyword("CenterLatitude").SetValue("90"); + mapGroup.findKeyword("CenterLatitude").setValue("90"); LambertAzimuthalEqualArea nPole(lab); nPole.SetGround(-90,0); try { @@ -2252,7 +2252,7 @@ int main(int argc, char *argv[]) { catch(IException &e) { e.print(); } - mapGroup.FindKeyword("CenterLatitude").SetValue("-90"); + mapGroup.findKeyword("CenterLatitude").setValue("-90"); LambertAzimuthalEqualArea sPole(lab); sPole.SetGround(90,0); try { diff --git a/isis/src/base/objs/LambertConformal/LambertConformal.cpp b/isis/src/base/objs/LambertConformal/LambertConformal.cpp index 485272cbfb5de5afbcc8b05618a4bda4fccdc040..eaf7867b27d79b2827c6c3ea0e9f0469fcf400b0 100644 --- a/isis/src/base/objs/LambertConformal/LambertConformal.cpp +++ b/isis/src/base/objs/LambertConformal/LambertConformal.cpp @@ -58,18 +58,18 @@ namespace Isis { Projection::Projection(label) { try { // Try to read the mapping group - PvlGroup &mapGroup = label.FindGroup("Mapping", Pvl::Traverse); + PvlGroup &mapGroup = label.findGroup("Mapping", Pvl::Traverse); // Compute and write the default center longitude if allowed and // necessary - if ((allowDefaults) && (!mapGroup.HasKeyword("CenterLongitude"))) { + if ((allowDefaults) && (!mapGroup.hasKeyword("CenterLongitude"))) { double lon = (m_minimumLongitude + m_maximumLongitude) / 2.0; mapGroup += PvlKeyword("CenterLongitude", toString(lon)); } // Compute and write the default center latitude if allowed and // necessary - if ((allowDefaults) && (!mapGroup.HasKeyword("CenterLatitude"))) { + if ((allowDefaults) && (!mapGroup.hasKeyword("CenterLatitude"))) { double lat = (m_minimumLatitude + m_maximumLatitude) / 2.0; mapGroup += PvlKeyword("CenterLatitude", toString(lat)); } diff --git a/isis/src/base/objs/LambertConformal/unitTest.cpp b/isis/src/base/objs/LambertConformal/unitTest.cpp index 4990f20c9a242431bac27aa5f5c849313676b9b6..04153cf79c92ac5faa7f623b46e08621c51e612d 100644 --- a/isis/src/base/objs/LambertConformal/unitTest.cpp +++ b/isis/src/base/objs/LambertConformal/unitTest.cpp @@ -15,8 +15,8 @@ int main(int argc, char *argv[]) { cout << "UNIT TEST FOR LambertConformal" << endl << endl; Pvl lab; - lab.AddGroup(PvlGroup("Mapping")); - PvlGroup &mapGroup = lab.FindGroup("Mapping"); + lab.addGroup(PvlGroup("Mapping")); + PvlGroup &mapGroup = lab.findGroup("Mapping"); mapGroup += PvlKeyword("EquatorialRadius", "1.0"); mapGroup += PvlKeyword("PolarRadius", "1.0"); mapGroup += PvlKeyword("LatitudeType", "Planetographic"); @@ -113,8 +113,8 @@ int main(int argc, char *argv[]) { cout << endl; cout << "Test default computation ... " << endl; - mapGroup.DeleteKeyword("CenterLongitude"); - mapGroup.DeleteKeyword("CenterLatitude"); + mapGroup.deleteKeyword("CenterLongitude"); + mapGroup.deleteKeyword("CenterLatitude"); LambertConformal p2(lab, true); cout << lab << endl; cout << endl; @@ -128,9 +128,9 @@ int main(int argc, char *argv[]) { Pvl tmp1; Pvl tmp2; Pvl tmp3; - tmp1.AddGroup(p.Mapping()); - tmp2.AddGroup(p.MappingLatitudes()); - tmp3.AddGroup(p.MappingLongitudes()); + tmp1.addGroup(p.Mapping()); + tmp2.addGroup(p.MappingLatitudes()); + tmp3.addGroup(p.MappingLongitudes()); cout << "Mapping() = " << endl; cout << tmp1 << endl; @@ -142,7 +142,7 @@ int main(int argc, char *argv[]) { cout << "Test invalid combinations of mapping parameters ..." << endl; - mapGroup.DeleteKeyword("CenterLatitude"); + mapGroup.deleteKeyword("CenterLatitude"); mapGroup += PvlKeyword("CenterLatitude", "-90.0"); try { LambertConformal p(lab); @@ -152,9 +152,9 @@ int main(int argc, char *argv[]) { } cout << endl; - mapGroup.DeleteKeyword("CenterLatitude"); + mapGroup.deleteKeyword("CenterLatitude"); mapGroup += PvlKeyword("CenterLatitude", "90.0"); - mapGroup.DeleteKeyword("FirstStandardParallel"); + mapGroup.deleteKeyword("FirstStandardParallel"); mapGroup += PvlKeyword("FirstStandardParallel", "-60"); try { diff --git a/isis/src/base/objs/Latitude/unitTest.cpp b/isis/src/base/objs/Latitude/unitTest.cpp index 880d9e73e6a0655dabbf51273d0656264b185fc4..a46bc18d95cc403c61aa021bccbc58128855f5d4 100644 --- a/isis/src/base/objs/Latitude/unitTest.cpp +++ b/isis/src/base/objs/Latitude/unitTest.cpp @@ -167,8 +167,8 @@ int main(int argc, char *argv[]) { try { Isis::Pvl latRangeTest; - latRangeTest.AddGroup(Isis::PvlGroup("Mapping")); - Isis::PvlGroup &latTestGroup = latRangeTest.FindGroup("Mapping"); + latRangeTest.addGroup(Isis::PvlGroup("Mapping")); + Isis::PvlGroup &latTestGroup = latRangeTest.findGroup("Mapping"); latTestGroup += Isis::PvlKeyword("ProjectionName", "Equirectangular"); latTestGroup += Isis::PvlKeyword("EquatorialRadius", "5000.0"); latTestGroup += Isis::PvlKeyword("PolarRadius", "1000.0"); diff --git a/isis/src/base/objs/LimitPolygonSeeder/LimitPolygonSeeder.cpp b/isis/src/base/objs/LimitPolygonSeeder/LimitPolygonSeeder.cpp index f290da429362f8467a45efcd357eefd1c4ef4a50..1fa9c70cbf3ceda565f508da351e76d494416455 100644 --- a/isis/src/base/objs/LimitPolygonSeeder/LimitPolygonSeeder.cpp +++ b/isis/src/base/objs/LimitPolygonSeeder/LimitPolygonSeeder.cpp @@ -164,39 +164,39 @@ namespace Isis { // Pull parameters specific to this algorithm out try { // Get info from Algorithm group - PvlGroup &algo = pvl.FindGroup("PolygonSeederAlgorithm", Pvl::Traverse); - PvlGroup &invalgo = invalidInput->FindGroup("PolygonSeederAlgorithm", + PvlGroup &algo = pvl.findGroup("PolygonSeederAlgorithm", Pvl::Traverse); + PvlGroup &invalgo = invalidInput->findGroup("PolygonSeederAlgorithm", Pvl::Traverse); // Set the spacing p_majorAxisPts = 0; - if(algo.HasKeyword("MajorAxisPoints")) { + if(algo.hasKeyword("MajorAxisPoints")) { p_majorAxisPts = (int) algo["MajorAxisPoints"]; - if(invalgo.HasKeyword("MajorAxisPoints")) { - invalgo.DeleteKeyword("MajorAxisPoints"); + if(invalgo.hasKeyword("MajorAxisPoints")) { + invalgo.deleteKeyword("MajorAxisPoints"); } } else { QString msg = "PVL for LimitPolygonSeeder must contain [MajorAxisPoints] in ["; - msg += pvl.FileName() + "]"; + msg += pvl.fileName() + "]"; throw IException(IException::User, msg, _FILEINFO_); } p_minorAxisPts = 0; - if(algo.HasKeyword("MinorAxisPoints")) { + if(algo.hasKeyword("MinorAxisPoints")) { p_minorAxisPts = (int) algo["MinorAxisPoints"]; - if(invalgo.HasKeyword("MinorAxisPoints")) { - invalgo.DeleteKeyword("MinorAxisPoints"); + if(invalgo.hasKeyword("MinorAxisPoints")) { + invalgo.deleteKeyword("MinorAxisPoints"); } } else { QString msg = "PVL for LimitPolygonSeeder must contain [MinorAxisPoints] in ["; - msg += pvl.FileName() + "]"; + msg += pvl.fileName() + "]"; throw IException(IException::User, msg, _FILEINFO_); } } catch(IException &e) { - QString msg = "Improper format for PolygonSeeder PVL [" + pvl.FileName() + "]"; + QString msg = "Improper format for PolygonSeeder PVL [" + pvl.fileName() + "]"; throw IException(IException::User, msg, _FILEINFO_); } @@ -220,11 +220,11 @@ namespace Isis { PvlKeyword majAxis("MajorAxisPoints", toString(p_majorAxisPts)); PvlKeyword minAxis("MinorAxisPoints", toString(p_minorAxisPts)); - pluginInfo.AddKeyword(name); - pluginInfo.AddKeyword(minThickness); - pluginInfo.AddKeyword(minArea); - pluginInfo.AddKeyword(majAxis); - pluginInfo.AddKeyword(minAxis); + pluginInfo.addKeyword(name); + pluginInfo.addKeyword(minThickness); + pluginInfo.addKeyword(minArea); + pluginInfo.addKeyword(majAxis); + pluginInfo.addKeyword(minAxis); return pluginInfo; } diff --git a/isis/src/base/objs/LimitPolygonSeeder/unitTest.cpp b/isis/src/base/objs/LimitPolygonSeeder/unitTest.cpp index 439d78fe94b78119cbe121c88f711582d7083bf0..de1ca18caab088cbf28a1ee3e964fb2cd6fdc597 100644 --- a/isis/src/base/objs/LimitPolygonSeeder/unitTest.cpp +++ b/isis/src/base/objs/LimitPolygonSeeder/unitTest.cpp @@ -27,7 +27,7 @@ int main() { PvlGroup alg("PolygonSeederAlgorithm"); - if(!alg.HasKeyword("Name")) { + if(!alg.hasKeyword("Name")) { alg += PvlKeyword("Name", "Limit"); alg += PvlKeyword("MinimumThickness", "0.3"); alg += PvlKeyword("MinimumArea", "5"); @@ -36,10 +36,10 @@ int main() { } PvlObject o("AutoSeed"); - o.AddGroup(alg); + o.addGroup(alg); Pvl pvl; - pvl.AddObject(o); + pvl.addObject(o); cout << pvl << endl << endl; PolygonSeeder *ps = PolygonSeederFactory::Create(pvl); @@ -72,8 +72,8 @@ int main() { // Create the projection necessary for seeding PvlGroup radii = Projection::TargetRadii("MARS"); Isis::Pvl maplab; - maplab.AddGroup(Isis::PvlGroup("Mapping")); - Isis::PvlGroup &mapGroup = maplab.FindGroup("Mapping"); + maplab.addGroup(Isis::PvlGroup("Mapping")); + Isis::PvlGroup &mapGroup = maplab.findGroup("Mapping"); mapGroup += Isis::PvlKeyword("EquatorialRadius", (QString)radii["EquatorialRadius"]); mapGroup += Isis::PvlKeyword("PolarRadius", (QString)radii["PolarRadius"]); mapGroup += Isis::PvlKeyword("LatitudeType", "Planetocentric"); @@ -135,8 +135,8 @@ int main() { // Create the projection necessary for seeding PvlGroup radii = Projection::TargetRadii("MARS"); Isis::Pvl maplab; - maplab.AddGroup(Isis::PvlGroup("Mapping")); - Isis::PvlGroup &mapGroup = maplab.FindGroup("Mapping"); + maplab.addGroup(Isis::PvlGroup("Mapping")); + Isis::PvlGroup &mapGroup = maplab.findGroup("Mapping"); mapGroup += Isis::PvlKeyword("EquatorialRadius", (QString)radii["EquatorialRadius"]); mapGroup += Isis::PvlKeyword("PolarRadius", (QString)radii["PolarRadius"]); mapGroup += Isis::PvlKeyword("LatitudeType", "Planetocentric"); diff --git a/isis/src/base/objs/LommelSeeliger/unitTest.cpp b/isis/src/base/objs/LommelSeeliger/unitTest.cpp index 03608114f0551f336464c825e0f06c35438d69c6..e98840438843ee67d1541ccaa91bbdcc7b0eab9a 100644 --- a/isis/src/base/objs/LommelSeeliger/unitTest.cpp +++ b/isis/src/base/objs/LommelSeeliger/unitTest.cpp @@ -20,10 +20,10 @@ int main() { alg += PvlKeyword("Name", "LommelSeeliger"); PvlObject o("PhotometricModel"); - o.AddGroup(alg); + o.addGroup(alg); Pvl pvl; - pvl.AddObject(o); + pvl.addObject(o); std::cout << pvl << std::endl << std::endl; PhotoModel *pm = PhotoModelFactory::Create(pvl); diff --git a/isis/src/base/objs/LunarAzimuthalEqualArea/LunarAzimuthalEqualArea.cpp b/isis/src/base/objs/LunarAzimuthalEqualArea/LunarAzimuthalEqualArea.cpp index a1643cd714ed5cc38d1163a056d9daa86666008a..b40979bc3dd59cb703786fbcc6572669d89dc2ed 100644 --- a/isis/src/base/objs/LunarAzimuthalEqualArea/LunarAzimuthalEqualArea.cpp +++ b/isis/src/base/objs/LunarAzimuthalEqualArea/LunarAzimuthalEqualArea.cpp @@ -47,7 +47,7 @@ namespace Isis { Pvl &label) : Projection::Projection(label) { try { // Try to read the mapping group - PvlGroup &mapGroup = label.FindGroup("Mapping", Pvl::Traverse); + PvlGroup &mapGroup = label.findGroup("Mapping", Pvl::Traverse); // Get the max libration m_maxLibration = mapGroup["MaximumLibration"]; diff --git a/isis/src/base/objs/LunarAzimuthalEqualArea/unitTest.cpp b/isis/src/base/objs/LunarAzimuthalEqualArea/unitTest.cpp index 98732cbb4b97c7755dd496a1d2ea23b4e8d55391..9cda77c0620d922fbb96ae8fd21c0cb0bd88e660 100644 --- a/isis/src/base/objs/LunarAzimuthalEqualArea/unitTest.cpp +++ b/isis/src/base/objs/LunarAzimuthalEqualArea/unitTest.cpp @@ -19,8 +19,8 @@ int main(int argc, char *argv[]) { cout << "UNIT TEST FOR LunarAzimuthalEqualArea\n\n"; Pvl lab; - lab.AddGroup(PvlGroup("Mapping")); - PvlGroup &mapGroup = lab.FindGroup("Mapping"); + lab.addGroup(PvlGroup("Mapping")); + PvlGroup &mapGroup = lab.findGroup("Mapping"); mapGroup += PvlKeyword("EquatorialRadius", toString(6378206.4)); mapGroup += PvlKeyword("PolarRadius", toString(6378206.4)); mapGroup += PvlKeyword("LatitudeType", "Planetographic"); @@ -79,10 +79,10 @@ int main(int argc, char *argv[]) { cout << "true! ..................................... [ OK ]\n"; else cout << "false! .................................... [ FAILED ]\n"; - mapGroup["PolarRadius"].SetValue(toString(42)); + mapGroup["PolarRadius"].setValue(toString(42)); Pvl tmp1; Projection &p2 = *ProjectionFactory::Create(lab); - tmp1.AddGroup(p2.Mapping()); + tmp1.addGroup(p2.Mapping()); s = &p2; cout << "created a second Projection reference p2" << "\nusing the same pvl as p except for that PolarRadius = 42" @@ -103,7 +103,7 @@ int main(int argc, char *argv[]) { << "\n Maximum Y: " << maxY << "\n"; Pvl tmp2; - tmp2.AddGroup(p.Mapping()); + tmp2.addGroup(p.Mapping()); } catch(IException &e) { diff --git a/isis/src/base/objs/LunarLambert/LunarLambert.cpp b/isis/src/base/objs/LunarLambert/LunarLambert.cpp index bb7df4ca4581d01b76057074bc22eb7630f39821..819df31172fd606a3a707f8df712ec5582ce14a1 100644 --- a/isis/src/base/objs/LunarLambert/LunarLambert.cpp +++ b/isis/src/base/objs/LunarLambert/LunarLambert.cpp @@ -3,13 +3,13 @@ namespace Isis { LunarLambert::LunarLambert(Pvl &pvl) : PhotoModel(pvl) { - PvlGroup &algo = pvl.FindObject("PhotometricModel") - .FindGroup("Algorithm", Pvl::Traverse); + PvlGroup &algo = pvl.findObject("PhotometricModel") + .findGroup("Algorithm", Pvl::Traverse); // Set default value SetPhotoL(1.0); // Get value from user - if(algo.HasKeyword("L")) SetPhotoL(algo["L"]); + if(algo.hasKeyword("L")) SetPhotoL(algo["L"]); } /** diff --git a/isis/src/base/objs/LunarLambert/unitTest.cpp b/isis/src/base/objs/LunarLambert/unitTest.cpp index 899d3dd9342b14a7bd55e6bfa76b052c194e8bb7..f3206c392c980c857b8ccf50a8eb016682410216 100644 --- a/isis/src/base/objs/LunarLambert/unitTest.cpp +++ b/isis/src/base/objs/LunarLambert/unitTest.cpp @@ -19,10 +19,10 @@ int main() { alg += PvlKeyword("Name", "LunarLambert"); PvlObject o("PhotometricModel"); - o.AddGroup(alg); + o.addGroup(alg); Pvl pvl; - pvl.AddObject(o); + pvl.addObject(o); std::cout << pvl << std::endl << std::endl; try { diff --git a/isis/src/base/objs/LunarLambertEmpirical/LunarLambertEmpirical.cpp b/isis/src/base/objs/LunarLambertEmpirical/LunarLambertEmpirical.cpp index 2afe42f3c893953dd9bd0267abb4cd5393e9eb07..9a1a297e7883e4419ff554c8296af984a435a166 100755 --- a/isis/src/base/objs/LunarLambertEmpirical/LunarLambertEmpirical.cpp +++ b/isis/src/base/objs/LunarLambertEmpirical/LunarLambertEmpirical.cpp @@ -4,23 +4,23 @@ namespace Isis { LunarLambertEmpirical::LunarLambertEmpirical(Pvl &pvl) : PhotoModel(pvl) { - PvlGroup &algo = pvl.FindObject("PhotometricModel") - .FindGroup("Algorithm", Pvl::Traverse); + PvlGroup &algo = pvl.findObject("PhotometricModel") + .findGroup("Algorithm", Pvl::Traverse); // There are no default values for the Lunar Lambert Empirical function; if user // does not provide information, then an exception is thrown - if (algo.HasKeyword("PhaseList")) { + if (algo.hasKeyword("PhaseList")) { SetPhotoPhaseList(algo["PhaseList"]); } else { QString msg = "The empirical Lunar Lambert phase list was not provided by user"; throw IException(IException::User, msg, _FILEINFO_); } - if (algo.HasKeyword("LList")) { + if (algo.hasKeyword("LList")) { SetPhotoLList(algo["LList"]); } else { QString msg = "The empirical Lunar Lambert l exponent list was not provided by user"; throw IException(IException::User, msg, _FILEINFO_); } - if (algo.HasKeyword("PhaseCurveList")) { + if (algo.hasKeyword("PhaseCurveList")) { SetPhotoPhaseCurveList(algo["PhaseCurveList"]); } else { QString msg = "The empirical Lunar Lambert phase brightness list was not provided by user"; diff --git a/isis/src/base/objs/LunarLambertEmpirical/unitTest.cpp b/isis/src/base/objs/LunarLambertEmpirical/unitTest.cpp index 108187b7e274f2d51a043b5475535a2ee6ad9fb8..1ae3525203587d2417d209e944098ae32f7564c6 100755 --- a/isis/src/base/objs/LunarLambertEmpirical/unitTest.cpp +++ b/isis/src/base/objs/LunarLambertEmpirical/unitTest.cpp @@ -22,10 +22,10 @@ int main() { alg += PvlKeyword("PhaseCurveList", "0.03338,0.03386,0.03350,0.03247,0.03109,0.02949,0.02780,0.02608,0.02432,0.02246,0.02050,0.01832,0.01599,0.01363,0.01134,0.009113,0.006710,0.003510,0."); PvlObject o("PhotometricModel"); - o.AddGroup(alg); + o.addGroup(alg); Pvl pvl; - pvl.AddObject(o); + pvl.addObject(o); std::cout << pvl << std::endl << std::endl; try { diff --git a/isis/src/base/objs/LunarLambertMcEwen/unitTest.cpp b/isis/src/base/objs/LunarLambertMcEwen/unitTest.cpp index 3385bc0816c4eb33dfe2a56a65f09ad8bba6da0c..45834bdda92a7d5bb2be0cf510dec66ddd248007 100644 --- a/isis/src/base/objs/LunarLambertMcEwen/unitTest.cpp +++ b/isis/src/base/objs/LunarLambertMcEwen/unitTest.cpp @@ -19,10 +19,10 @@ int main() { alg += PvlKeyword("Name", "LunarLambertMcEwen"); PvlObject o("PhotometricModel"); - o.AddGroup(alg); + o.addGroup(alg); Pvl pvl; - pvl.AddObject(o); + pvl.addObject(o); std::cout << pvl << std::endl << std::endl; try { diff --git a/isis/src/base/objs/MaximumCorrelation/unitTest.cpp b/isis/src/base/objs/MaximumCorrelation/unitTest.cpp index a24794daaae7f3f16abb779fa088482807fa756e..7ec42822f6229045f16f74a1387af441577f6477 100644 --- a/isis/src/base/objs/MaximumCorrelation/unitTest.cpp +++ b/isis/src/base/objs/MaximumCorrelation/unitTest.cpp @@ -30,12 +30,12 @@ int main() { schip += PvlKeyword("Lines", "35"); PvlObject o("AutoRegistration"); - o.AddGroup(alg); - o.AddGroup(pchip); - o.AddGroup(schip); + o.addGroup(alg); + o.addGroup(pchip); + o.addGroup(schip); Pvl pvl; - pvl.AddObject(o); + pvl.addObject(o); std::cout << pvl << std::endl; AutoReg *ar = AutoRegFactory::Create(pvl); diff --git a/isis/src/base/objs/Mercator/Mercator.cpp b/isis/src/base/objs/Mercator/Mercator.cpp index d75cac8fab82f8bbb7dac98c93fae5c8fef3012f..2a1e9cabb6edeaf936edbd8c11ddd08fc9c3dc23 100644 --- a/isis/src/base/objs/Mercator/Mercator.cpp +++ b/isis/src/base/objs/Mercator/Mercator.cpp @@ -54,18 +54,18 @@ namespace Isis { Projection::Projection(label) { try { // Try to read the mapping group - PvlGroup &mapGroup = label.FindGroup("Mapping", Pvl::Traverse); + PvlGroup &mapGroup = label.findGroup("Mapping", Pvl::Traverse); // Compute and write the default center longitude if allowed and // necessary - if ((allowDefaults) && (!mapGroup.HasKeyword("CenterLongitude"))) { + if ((allowDefaults) && (!mapGroup.hasKeyword("CenterLongitude"))) { double lon = (m_minimumLongitude + m_maximumLongitude) / 2.0; mapGroup += PvlKeyword("CenterLongitude", toString(lon)); } // Compute and write the default center latitude if allowed and // necessary - if ((allowDefaults) && (!mapGroup.HasKeyword("CenterLatitude"))) { + if ((allowDefaults) && (!mapGroup.hasKeyword("CenterLatitude"))) { double lat = (m_minimumLatitude + m_maximumLatitude) / 2.0; mapGroup += PvlKeyword("CenterLatitude", toString(lat)); } diff --git a/isis/src/base/objs/Mercator/unitTest.cpp b/isis/src/base/objs/Mercator/unitTest.cpp index 39fe2a091ec5ea567fa9bc231bf94683a3cba07b..90251a53b7da3bb702a08d65b8c4ba6ed58b1074 100644 --- a/isis/src/base/objs/Mercator/unitTest.cpp +++ b/isis/src/base/objs/Mercator/unitTest.cpp @@ -14,8 +14,8 @@ int main(int argc, char *argv[]) { cout << "UNIT TEST FOR Mercator" << endl << endl; Pvl lab; - lab.AddGroup(PvlGroup("Mapping")); - PvlGroup &mapGroup = lab.FindGroup("Mapping"); + lab.addGroup(PvlGroup("Mapping")); + PvlGroup &mapGroup = lab.findGroup("Mapping"); mapGroup += PvlKeyword("EquatorialRadius", "6378206.4"); mapGroup += PvlKeyword("PolarRadius", "6356583.8"); mapGroup += PvlKeyword("LatitudeType", "Planetographic"); @@ -89,8 +89,8 @@ int main(int argc, char *argv[]) { cout << endl; cout << "Test default computation ... " << endl; - mapGroup.DeleteKeyword("CenterLongitude"); - mapGroup.DeleteKeyword("CenterLatitude"); + mapGroup.deleteKeyword("CenterLongitude"); + mapGroup.deleteKeyword("CenterLatitude"); Mercator p2(lab, true); cout << lab << endl; cout << endl; @@ -104,9 +104,9 @@ int main(int argc, char *argv[]) { Pvl tmp1; Pvl tmp2; Pvl tmp3; - tmp1.AddGroup(p.Mapping()); - tmp2.AddGroup(p.MappingLatitudes()); - tmp3.AddGroup(p.MappingLongitudes()); + tmp1.addGroup(p.Mapping()); + tmp2.addGroup(p.MappingLatitudes()); + tmp3.addGroup(p.MappingLongitudes()); cout << "Mapping() = " << endl; cout << tmp1 << endl; diff --git a/isis/src/base/objs/MinimumDifference/unitTest.cpp b/isis/src/base/objs/MinimumDifference/unitTest.cpp index db4ef8bbb8f3720ba92568d02199523f841c1c4b..1e539d449735ffa9740af71cfa453efc1d3ffcb0 100644 --- a/isis/src/base/objs/MinimumDifference/unitTest.cpp +++ b/isis/src/base/objs/MinimumDifference/unitTest.cpp @@ -31,12 +31,12 @@ int main() { schip += PvlKeyword("Sampling", "50"); PvlObject o("AutoRegistration"); - o.AddGroup(alg); - o.AddGroup(pchip); - o.AddGroup(schip); + o.addGroup(alg); + o.addGroup(pchip); + o.addGroup(schip); Pvl pvl; - pvl.AddObject(o); + pvl.addObject(o); std::cout << pvl << std::endl; AutoReg *ar = AutoRegFactory::Create(pvl); diff --git a/isis/src/base/objs/Minnaert/Minnaert.cpp b/isis/src/base/objs/Minnaert/Minnaert.cpp index afa99bde774f961bcd6ed2fe00148f94e3c86675..eb885e7a35d9040a2281cfe7753db04a972ff922 100644 --- a/isis/src/base/objs/Minnaert/Minnaert.cpp +++ b/isis/src/base/objs/Minnaert/Minnaert.cpp @@ -4,12 +4,12 @@ namespace Isis { Minnaert::Minnaert(Pvl &pvl) : PhotoModel(pvl) { - PvlGroup &algo = pvl.FindObject("PhotometricModel") - .FindGroup("Algorithm", Pvl::Traverse); + PvlGroup &algo = pvl.findObject("PhotometricModel") + .findGroup("Algorithm", Pvl::Traverse); // Set default value SetPhotoK(1.0); // Get value from user - if(algo.HasKeyword("K")) SetPhotoK(algo["K"]); + if(algo.hasKeyword("K")) SetPhotoK(algo["K"]); } /** diff --git a/isis/src/base/objs/Minnaert/unitTest.cpp b/isis/src/base/objs/Minnaert/unitTest.cpp index 3f6149ae6ed7bd9950c56c67962407a9a29f2ce2..d3fad3f71e8d5dfd0ab2eaae83cc137d542a8c6d 100644 --- a/isis/src/base/objs/Minnaert/unitTest.cpp +++ b/isis/src/base/objs/Minnaert/unitTest.cpp @@ -19,10 +19,10 @@ int main() { alg += PvlKeyword("Name", "Minnaert"); PvlObject o("PhotometricModel"); - o.AddGroup(alg); + o.addGroup(alg); Pvl pvl; - pvl.AddObject(o); + pvl.addObject(o); std::cout << pvl << std::endl << std::endl; try { diff --git a/isis/src/base/objs/MinnaertEmpirical/MinnaertEmpirical.cpp b/isis/src/base/objs/MinnaertEmpirical/MinnaertEmpirical.cpp index 7e70a988944880bf094bc94a828f42423e654291..09d36b1eca5ca427275d0bfeaa64633e78a2e631 100755 --- a/isis/src/base/objs/MinnaertEmpirical/MinnaertEmpirical.cpp +++ b/isis/src/base/objs/MinnaertEmpirical/MinnaertEmpirical.cpp @@ -4,23 +4,23 @@ namespace Isis { MinnaertEmpirical::MinnaertEmpirical(Pvl &pvl) : PhotoModel(pvl) { - PvlGroup &algo = pvl.FindObject("PhotometricModel") - .FindGroup("Algorithm", Pvl::Traverse); + PvlGroup &algo = pvl.findObject("PhotometricModel") + .findGroup("Algorithm", Pvl::Traverse); // There are no default values for the Minnaert Empirical function; if user // does not provide information, then an exception is thrown - if (algo.HasKeyword("PhaseList")) { + if (algo.hasKeyword("PhaseList")) { SetPhotoPhaseList(algo["PhaseList"]); } else { std::string msg = "The empirical Minnaert phase list was not provided by user"; throw IException(IException::User, msg, _FILEINFO_); } - if (algo.HasKeyword("KList")) { + if (algo.hasKeyword("KList")) { SetPhotoKList(algo["KList"]); } else { std::string msg = "The empirical Minnaert k exponent list was not provided by user"; throw IException(IException::User, msg, _FILEINFO_); } - if (algo.HasKeyword("PhaseCurveList")) { + if (algo.hasKeyword("PhaseCurveList")) { SetPhotoPhaseCurveList(algo["PhaseCurveList"]); } else { std::string msg = "The empirical Minnaert phase brightness list was not provided by user"; diff --git a/isis/src/base/objs/MinnaertEmpirical/unitTest.cpp b/isis/src/base/objs/MinnaertEmpirical/unitTest.cpp index 5c5f5d4ac67789590dc623bc9211a8347f16cdd9..bc6d7d7f6f8cf76a5fa00b6a24ef7c04812e743f 100755 --- a/isis/src/base/objs/MinnaertEmpirical/unitTest.cpp +++ b/isis/src/base/objs/MinnaertEmpirical/unitTest.cpp @@ -22,10 +22,10 @@ int main() { alg += PvlKeyword("PhaseCurveList", "0.03335,0.03366,0.03328,0.03220,0.03074,0.02909,0.02737,0.02559,0.02369,0.02152,0.01902,0.01651,0.01427,0.01244,0.01079,0.009452,0.007869,0.004866,0."); PvlObject o("PhotometricModel"); - o.AddGroup(alg); + o.addGroup(alg); Pvl pvl; - pvl.AddObject(o); + pvl.addObject(o); std::cout << pvl << std::endl << std::endl; try { diff --git a/isis/src/base/objs/Mixed/Mixed.cpp b/isis/src/base/objs/Mixed/Mixed.cpp index dfef489c5bc31ebdf569ecd4541c65a724f651e3..64b279d5ec57970886e8af0edc273f338eabef23 100644 --- a/isis/src/base/objs/Mixed/Mixed.cpp +++ b/isis/src/base/objs/Mixed/Mixed.cpp @@ -5,7 +5,7 @@ namespace Isis { Mixed::Mixed(Pvl &pvl, PhotoModel &pmodel) : NormModel(pvl, pmodel) { - PvlGroup &algorithm = pvl.FindObject("NormalizationModel").FindGroup("Algorithm", Pvl::Traverse); + PvlGroup &algorithm = pvl.findObject("NormalizationModel").findGroup("Algorithm", Pvl::Traverse); // Set default value SetNormPharef(0.0); @@ -18,37 +18,37 @@ namespace Isis { SetNormAlbedo(1.0); // Get value from user - if(algorithm.HasKeyword("Pharef")) { + if(algorithm.hasKeyword("Pharef")) { SetNormPharef(algorithm["Pharef"]); } - if(algorithm.HasKeyword("Incref")) { + if(algorithm.hasKeyword("Incref")) { SetNormIncref(algorithm["Incref"]); } - if(algorithm.HasKeyword("Emaref")) { + if(algorithm.hasKeyword("Emaref")) { SetNormEmaref(algorithm["Emaref"]); } - if(algorithm.HasKeyword("Incmat")) { + if(algorithm.hasKeyword("Incmat")) { SetNormIncmat(algorithm["Incmat"]); } - if(algorithm.HasKeyword("Phamat")) { + if(algorithm.hasKeyword("Phamat")) { SetNormPhamat(algorithm["Phamat"]); } else { p_normPhamat = p_normIncmat; } - if(algorithm.HasKeyword("Emamat")) { + if(algorithm.hasKeyword("Emamat")) { SetNormEmamat(algorithm["Emamat"]); } - if(algorithm.HasKeyword("Thresh")) { + if(algorithm.hasKeyword("Thresh")) { SetNormThresh(algorithm["Thresh"]); } - if(algorithm.HasKeyword("Albedo")) { + if(algorithm.hasKeyword("Albedo")) { SetNormAlbedo(algorithm["Albedo"]); } diff --git a/isis/src/base/objs/Mixed/unitTest.cpp b/isis/src/base/objs/Mixed/unitTest.cpp index a128735e9e90e8a62fcb828d75f4e1eff62cc63b..c84c07889a96aaddd0b14b6c29aac1f1c525b305 100644 --- a/isis/src/base/objs/Mixed/unitTest.cpp +++ b/isis/src/base/objs/Mixed/unitTest.cpp @@ -24,7 +24,7 @@ int main() { algp += PvlKeyword("Name", "Lambert"); PvlObject op("PhotometricModel"); - op.AddGroup(algp); + op.addGroup(algp); PvlGroup algn("Algorithm"); algn += PvlKeyword("Name", "Mixed"); @@ -32,11 +32,11 @@ int main() { algn += PvlKeyword("Incmat", "51.0"); PvlObject on("NormalizationModel"); - on.AddGroup(algn); + on.addGroup(algn); Pvl pvl; - pvl.AddObject(op); - pvl.AddObject(on); + pvl.addObject(op); + pvl.addObject(on); std::cout << pvl << std::endl << std::endl; diff --git a/isis/src/base/objs/MoonAlbedo/MoonAlbedo.cpp b/isis/src/base/objs/MoonAlbedo/MoonAlbedo.cpp index 780511f1f77b4639daa26cd85e5b4080d48b5323..ac4aaff6938f7936317a4abd0545d41a6a961c71 100644 --- a/isis/src/base/objs/MoonAlbedo/MoonAlbedo.cpp +++ b/isis/src/base/objs/MoonAlbedo/MoonAlbedo.cpp @@ -9,8 +9,8 @@ namespace Isis { MoonAlbedo::MoonAlbedo(Pvl &pvl, PhotoModel &pmodel) : NormModel(pvl, pmodel) { - PvlGroup &algo = pvl.FindObject("NormalizationModel") - .FindGroup("Algorithm", Pvl::Traverse); + PvlGroup &algo = pvl.findObject("NormalizationModel") + .findGroup("Algorithm", Pvl::Traverse); // Set default values SetNormD(0.14); SetNormE(-0.4179); @@ -24,15 +24,15 @@ namespace Isis { SetNormXb2(0.0081); // Get values from user - if(algo.HasKeyword("D")) { + if(algo.hasKeyword("D")) { SetNormD(algo["D"]); } - if(algo.HasKeyword("Wl")) { + if(algo.hasKeyword("Wl")) { SetNormWl(algo["Wl"]); } - if(algo.HasKeyword("E")) { + if(algo.hasKeyword("E")) { SetNormE(algo["E"]); } else { @@ -44,11 +44,11 @@ namespace Isis { } } - if(algo.HasKeyword("F")) { + if(algo.hasKeyword("F")) { SetNormF(algo["F"]); } - if(algo.HasKeyword("G2")) { + if(algo.hasKeyword("G2")) { SetNormG2(algo["G2"]); } else { @@ -60,15 +60,15 @@ namespace Isis { } } - if(algo.HasKeyword("Xmul")) { + if(algo.hasKeyword("Xmul")) { SetNormXmul(algo["Xmul"]); } - if(algo.HasKeyword("H")) { + if(algo.hasKeyword("H")) { SetNormH(algo["H"]); } - if(algo.HasKeyword("Bsh1")) { + if(algo.hasKeyword("Bsh1")) { SetNormBsh1(algo["Bsh1"]); } else { @@ -79,11 +79,11 @@ namespace Isis { } } - if(algo.HasKeyword("Xb1")) { + if(algo.hasKeyword("Xb1")) { SetNormXb1(algo["Xb1"]); } - if(algo.HasKeyword("Xb2")) { + if(algo.hasKeyword("Xb2")) { SetNormXb2(algo["Xb2"]); } diff --git a/isis/src/base/objs/MoonAlbedo/unitTest.cpp b/isis/src/base/objs/MoonAlbedo/unitTest.cpp index 7c88efe2f65a5ab17931255c2a64efd710f998fb..8e0c956b5581c25d243d7fe86ad09d72c5e13943 100644 --- a/isis/src/base/objs/MoonAlbedo/unitTest.cpp +++ b/isis/src/base/objs/MoonAlbedo/unitTest.cpp @@ -24,7 +24,7 @@ int main() { algp += PvlKeyword("Name", "LunarLambertMcEwen"); PvlObject op("PhotometricModel"); - op.AddGroup(algp); + op.addGroup(algp); PvlGroup algn("Algorithm"); algn += PvlKeyword("Name", "MoonAlbedo"); @@ -36,11 +36,11 @@ int main() { algn += PvlKeyword("Bsh1", "1.6"); PvlObject on("NormalizationModel"); - on.AddGroup(algn); + on.addGroup(algn); Pvl pvl; - pvl.AddObject(op); - pvl.AddObject(on); + pvl.addObject(op); + pvl.addObject(on); std::cout << pvl << std::endl << std::endl; diff --git a/isis/src/base/objs/MoravecOperator/unitTest.cpp b/isis/src/base/objs/MoravecOperator/unitTest.cpp index 3f7f40794799be70f872dd656a7e64ab64c85253..32c28320018d6c481e1a1a684e95430d868d9264 100644 --- a/isis/src/base/objs/MoravecOperator/unitTest.cpp +++ b/isis/src/base/objs/MoravecOperator/unitTest.cpp @@ -36,11 +36,11 @@ int main() { opv += PvlKeyword("MaxIncidence", "135.0"); PvlObject o("InterestOperator"); - o.AddGroup(op); - o.AddGroup(opv); + o.addGroup(op); + o.addGroup(opv); Pvl pvl; - pvl.AddObject(o); + pvl.addObject(o); std::cout << pvl << std::endl; InterestOperator *iop = InterestOperatorFactory::Create(pvl); diff --git a/isis/src/base/objs/NaifStatus/NaifStatus.cpp b/isis/src/base/objs/NaifStatus/NaifStatus.cpp index 64e5aa1d3bde861a8e6bd34de0150fc35a14f578..e7715a70319284bf0adcdfe4c7b446fe9f4f2453 100644 --- a/isis/src/base/objs/NaifStatus/NaifStatus.cpp +++ b/isis/src/base/objs/NaifStatus/NaifStatus.cpp @@ -81,9 +81,9 @@ namespace Isis { Pvl error; PvlGroup errorDescription("ErrorDescription"); - errorDescription.AddKeyword(PvlKeyword("ShortMessage", naifShort)); - errorDescription.AddKeyword(PvlKeyword("LongMessage", naifLong)); - error.AddGroup(errorDescription); + errorDescription.addKeyword(PvlKeyword("ShortMessage", naifShort)); + errorDescription.addKeyword(PvlKeyword("LongMessage", naifLong)); + error.addGroup(errorDescription); PvlTranslationManager trans(error, "$base/translations/NaifErrors.trn"); diff --git a/isis/src/base/objs/NoNormalization/unitTest.cpp b/isis/src/base/objs/NoNormalization/unitTest.cpp index 07618ee952051e77ebc689a72e9ad5e153e1e74b..d2b4e88787c22b4e212da73557dc4b6e335d3099 100644 --- a/isis/src/base/objs/NoNormalization/unitTest.cpp +++ b/isis/src/base/objs/NoNormalization/unitTest.cpp @@ -24,17 +24,17 @@ int main() { algp += PvlKeyword("Name", "LunarLambertMcEwen"); PvlObject op("PhotometricModel"); - op.AddGroup(algp); + op.addGroup(algp); PvlGroup algn("Algorithm"); algn += PvlKeyword("Name", "NoNormalization"); PvlObject on("NormalizationModel"); - on.AddGroup(algn); + on.addGroup(algn); Pvl pvl; - pvl.AddObject(op); - pvl.AddObject(on); + pvl.addObject(op); + pvl.addObject(on); std::cout << pvl << std::endl << std::endl; diff --git a/isis/src/base/objs/NoOperator/unitTest.cpp b/isis/src/base/objs/NoOperator/unitTest.cpp index 5450fe4f6c4bd978d4eab312623f5cfc047b1c79..f1031fa0b774ff754a0c5444d6e2a8e299492cb7 100644 --- a/isis/src/base/objs/NoOperator/unitTest.cpp +++ b/isis/src/base/objs/NoOperator/unitTest.cpp @@ -35,11 +35,11 @@ int main() { opv += PvlKeyword("MaxIncidence", "135.0"); PvlObject o("InterestOperator"); - o.AddGroup(op); - o.AddGroup(opv); + o.addGroup(op); + o.addGroup(opv); Pvl pvl; - pvl.AddObject(o); + pvl.addObject(o); std::cout << pvl << std::endl; InterestOperator *iop = InterestOperatorFactory::Create(pvl); diff --git a/isis/src/base/objs/NormModel/unitTest.cpp b/isis/src/base/objs/NormModel/unitTest.cpp index fedb1e234719a90ec3b9f21b964636ddefd1ffd2..c81d91464a95b442c1e7e06be5a5fa1a3a166750 100644 --- a/isis/src/base/objs/NormModel/unitTest.cpp +++ b/isis/src/base/objs/NormModel/unitTest.cpp @@ -22,14 +22,14 @@ int main() { std::cout << "UNIT TEST for Isis::NormModel" << std::endl << std::endl; Pvl lab; - lab.AddObject(PvlObject("PhotometricModel")); - lab.FindObject("PhotometricModel").AddGroup(PvlGroup("Algorithm")); - lab.FindObject("PhotometricModel").FindGroup("Algorithm").AddKeyword(PvlKeyword("Name", "Lambert")); + lab.addObject(PvlObject("PhotometricModel")); + lab.findObject("PhotometricModel").addGroup(PvlGroup("Algorithm")); + lab.findObject("PhotometricModel").findGroup("Algorithm").addKeyword(PvlKeyword("Name", "Lambert")); PhotoModel *pm = PhotoModelFactory::Create(lab); - lab.AddObject(PvlObject("AtmosphericModel")); - lab.FindObject("AtmosphericModel").AddGroup(PvlGroup("Algorithm")); - lab.FindObject("AtmosphericModel").FindGroup("Algorithm").AddKeyword(PvlKeyword("Name", "Anisotropic1")); + lab.addObject(PvlObject("AtmosphericModel")); + lab.findObject("AtmosphericModel").addGroup(PvlGroup("Algorithm")); + lab.findObject("AtmosphericModel").findGroup("Algorithm").addKeyword(PvlKeyword("Name", "Anisotropic1")); AtmosModel *am = AtmosModelFactory::Create(lab, *pm); std::cout << "Testing missing NormalizationModel object ..." << std::endl; @@ -37,19 +37,19 @@ int main() { doit(lab, *pm); doit(lab, *pm, *am); - lab.AddObject(PvlObject("NormalizationModel")); + lab.addObject(PvlObject("NormalizationModel")); std::cout << "Testing missing Algorithm group ..." << std::endl; doit(lab, *pm); doit(lab, *pm, *am); - lab.FindObject("NormalizationModel").AddGroup(PvlGroup("Algorithm")); + lab.findObject("NormalizationModel").addGroup(PvlGroup("Algorithm")); std::cout << "Testing missing Name keyword ..." << std::endl; doit(lab, *pm); doit(lab, *pm, *am); - lab.FindObject("NormalizationModel").FindGroup("Algorithm").AddKeyword(PvlKeyword("Name", "Albedo"), Pvl::Replace); + lab.findObject("NormalizationModel").findGroup("Algorithm").addKeyword(PvlKeyword("Name", "Albedo"), Pvl::Replace); std::cout << "Testing supported normalization model ..." << std::endl; doit(lab, *pm); doit(lab, *pm, *am); diff --git a/isis/src/base/objs/NormModelFactory/NormModelFactory.cpp b/isis/src/base/objs/NormModelFactory/NormModelFactory.cpp index edef0b67d299703ebca0fd838f61acff5e5467ae..9a043a7729620836e0706e66550613f35206ebe8 100644 --- a/isis/src/base/objs/NormModelFactory/NormModelFactory.cpp +++ b/isis/src/base/objs/NormModelFactory/NormModelFactory.cpp @@ -51,13 +51,13 @@ namespace Isis { **/ NormModel *NormModelFactory::Create(Pvl &pvl, PhotoModel &pmodel) { // Get the algorithm name to create - PvlGroup &algo = pvl.FindObject("NormalizationModel") - .FindGroup("Algorithm", Pvl::Traverse); + PvlGroup &algo = pvl.findObject("NormalizationModel") + .findGroup("Algorithm", Pvl::Traverse); QString algorithm = ""; - if (algo.HasKeyword("NormName")) { + if (algo.hasKeyword("NormName")) { algorithm = QString(algo["NormName"]); } - else if (algo.HasKeyword("Name")) { + else if (algo.hasKeyword("Name")) { algorithm = QString(algo["Name"]); } else { @@ -70,10 +70,10 @@ namespace Isis { Plugin *p = new Plugin; FileName f("NormModel.plugin"); if(f.fileExists()) { - p->Read("NormModel.plugin"); + p->read("NormModel.plugin"); } else { - p->Read("$ISISROOT/lib/NormModel.plugin"); + p->read("$ISISROOT/lib/NormModel.plugin"); } // Get the algorithm specific plugin and return it @@ -107,13 +107,13 @@ namespace Isis { NormModel *NormModelFactory::Create(Pvl &pvl, PhotoModel &pmodel, AtmosModel &amodel) { // Get the algorithm name to create - PvlGroup &algo = pvl.FindObject("NormalizationModel") - .FindGroup("Algorithm", Pvl::Traverse); + PvlGroup &algo = pvl.findObject("NormalizationModel") + .findGroup("Algorithm", Pvl::Traverse); QString algorithm = ""; - if (algo.HasKeyword("NormName")) { + if (algo.hasKeyword("NormName")) { algorithm = QString(algo["NormName"]); } - else if (algo.HasKeyword("Name")) { + else if (algo.hasKeyword("Name")) { algorithm = QString(algo["Name"]); } else { @@ -126,10 +126,10 @@ namespace Isis { Plugin *p = new Plugin; FileName f("NormModel.plugin"); if(f.fileExists()) { - p->Read("NormModel.plugin"); + p->read("NormModel.plugin"); } else { - p->Read("$ISISROOT/lib/NormModel.plugin"); + p->read("$ISISROOT/lib/NormModel.plugin"); } // Get the algorithm specific plugin and return it diff --git a/isis/src/base/objs/ObliqueCylindrical/ObliqueCylindrical.cpp b/isis/src/base/objs/ObliqueCylindrical/ObliqueCylindrical.cpp index 76e070f60955b51f9df7d3f81651b370c348802a..40607d19a1a1628f025c8e13df0da86d3181d2a0 100644 --- a/isis/src/base/objs/ObliqueCylindrical/ObliqueCylindrical.cpp +++ b/isis/src/base/objs/ObliqueCylindrical/ObliqueCylindrical.cpp @@ -53,7 +53,7 @@ namespace Isis { Projection::Projection(label) { try { // Try to read the mapping group - PvlGroup &mapGroup = label.FindGroup("Mapping", Pvl::Traverse); + PvlGroup &mapGroup = label.findGroup("Mapping", Pvl::Traverse); m_poleLatitude = mapGroup["PoleLatitude"]; @@ -87,18 +87,18 @@ namespace Isis { bool calculateVectors = false; // Check vectors for the right array size - if (!mapGroup.HasKeyword("XAxisVector") - || mapGroup["XAxisVector"].Size() != 3) { + if (!mapGroup.hasKeyword("XAxisVector") + || mapGroup["XAxisVector"].size() != 3) { calculateVectors = true; } - if (!mapGroup.HasKeyword("YAxisVector") - || mapGroup["YAxisVector"].Size() != 3) { + if (!mapGroup.hasKeyword("YAxisVector") + || mapGroup["YAxisVector"].size() != 3) { calculateVectors = true; } - if (!mapGroup.HasKeyword("ZAxisVector") - || mapGroup["ZAxisVector"].Size() != 3) { + if (!mapGroup.hasKeyword("ZAxisVector") + || mapGroup["ZAxisVector"].size() != 3) { calculateVectors = true; } @@ -128,14 +128,14 @@ namespace Isis { eul2m_c(rotationAngle, latitudeAngle, longitudeAngle, 3, 2, 3, pvec); // Reset the vector keywords - if (mapGroup.HasKeyword("XAxisVector")) { - mapGroup.DeleteKeyword("XAxisVector"); + if (mapGroup.hasKeyword("XAxisVector")) { + mapGroup.deleteKeyword("XAxisVector"); } - if (mapGroup.HasKeyword("YAxisVector")) { - mapGroup.DeleteKeyword("YAxisVector"); + if (mapGroup.hasKeyword("YAxisVector")) { + mapGroup.deleteKeyword("YAxisVector"); } - if (mapGroup.HasKeyword("ZAxisVector")) { - mapGroup.DeleteKeyword("ZAxisVector"); + if (mapGroup.hasKeyword("ZAxisVector")) { + mapGroup.deleteKeyword("ZAxisVector"); } mapGroup += PvlKeyword("XAxisVector"); diff --git a/isis/src/base/objs/ObliqueCylindrical/unitTest.cpp b/isis/src/base/objs/ObliqueCylindrical/unitTest.cpp index 7bc4b6aab95c8af7484d4854a844a3502abf5154..fab48ec01378296cb4c47900ce4e3c8fc1e1b434 100644 --- a/isis/src/base/objs/ObliqueCylindrical/unitTest.cpp +++ b/isis/src/base/objs/ObliqueCylindrical/unitTest.cpp @@ -15,8 +15,8 @@ int main(int argc, char *argv[]) { cout << "UNIT TEST FOR ObliqueCylindrical" << endl << endl; Pvl lab; - lab.AddGroup(PvlGroup("Mapping")); - PvlGroup &mapGrp = lab.FindGroup("Mapping"); + lab.addGroup(PvlGroup("Mapping")); + PvlGroup &mapGrp = lab.findGroup("Mapping"); mapGrp += PvlKeyword("EquatorialRadius", "2575000.0"); mapGrp += PvlKeyword("PolarRadius", "2575000.0"); @@ -129,9 +129,9 @@ int main(int argc, char *argv[]) { Pvl tmp1; Pvl tmp2; Pvl tmp3; - tmp1.AddGroup(p.Mapping()); - tmp2.AddGroup(p.MappingLatitudes()); - tmp3.AddGroup(p.MappingLongitudes()); + tmp1.addGroup(p.Mapping()); + tmp2.addGroup(p.MappingLatitudes()); + tmp3.addGroup(p.MappingLongitudes()); cout << "Mapping() = " << endl; cout << tmp1 << endl; diff --git a/isis/src/base/objs/ObservationNumber/ObservationNumber.cpp b/isis/src/base/objs/ObservationNumber/ObservationNumber.cpp index 3b5c4ae8188ed8fa4a2ea051e9844da442e87074..c43a532c31b4c3ba3e6537f79368a4b3ef447465 100644 --- a/isis/src/base/objs/ObservationNumber/ObservationNumber.cpp +++ b/isis/src/base/objs/ObservationNumber/ObservationNumber.cpp @@ -32,7 +32,7 @@ namespace Isis { if(def2filename) { // Try to return the filename if it exists in the label, otherwise use // "Unknown" as a last resort. - QString snTemp = label.FileName(); + QString snTemp = label.fileName(); if(!snTemp.isEmpty()) { sn = FileName(snTemp).name(); } @@ -74,7 +74,7 @@ namespace Isis { */ PvlGroup ObservationNumber::FindObservationTranslation(Pvl &label) { Pvl outLabel; - static PvlGroup dataDir(Preference::Preferences().FindGroup("DataDirectory")); + static PvlGroup dataDir(Preference::Preferences().findGroup("DataDirectory")); // Get the mission name static QString missionTransFile = (QString) dataDir["base"] + "/translations/MissionName2DataDir.trn"; @@ -107,7 +107,7 @@ namespace Isis { // Delets the extra Pvl translation(snFile.expanded()); PvlKeyword observationKeys; - if(translation.HasKeyword("ObservationKeys")) { + if(translation.hasKeyword("ObservationKeys")) { observationKeys = translation["ObservationKeys"]; } @@ -122,14 +122,14 @@ namespace Isis { translationIterator->second.first.SetLabel(label); translationIterator->second.first.Auto(outLabel); - PvlGroup snGroup = outLabel.FindGroup("SerialNumberKeywords"); + PvlGroup snGroup = outLabel.findGroup("SerialNumberKeywords"); // Delets the extra - if(!translationIterator->second.second.Name().isEmpty()) { + if(!translationIterator->second.second.name().isEmpty()) { snGroup += translationIterator->second.second; } else { - snGroup += PvlKeyword("ObservationKeys", toString(snGroup.Keywords())); + snGroup += PvlKeyword("ObservationKeys", toString(snGroup.keywords())); } return snGroup; diff --git a/isis/src/base/objs/OriginalLabel/OriginalLabel.cpp b/isis/src/base/objs/OriginalLabel/OriginalLabel.cpp index 0ae30a996b2ed3a7c175ff4222081ee52192e0e9..28027b079746ff1c34d9e54e4ac74c6d597955ed 100644 --- a/isis/src/base/objs/OriginalLabel/OriginalLabel.cpp +++ b/isis/src/base/objs/OriginalLabel/OriginalLabel.cpp @@ -33,7 +33,7 @@ namespace Isis { * Constructor for creating an original blob with a given name */ OriginalLabel::OriginalLabel() : Isis::Blob("IsisCube", "OriginalLabel") { - m_originalLabel.SetTerminator(""); + m_originalLabel.setTerminator(""); } /** diff --git a/isis/src/base/objs/OriginalLabel/unitTest.cpp b/isis/src/base/objs/OriginalLabel/unitTest.cpp index 1dee48189a5a23438daeab2d7638ea8ca0d9fddd..637374a00e737d0471f1a933ab9ab587a7e097ca 100644 --- a/isis/src/base/objs/OriginalLabel/unitTest.cpp +++ b/isis/src/base/objs/OriginalLabel/unitTest.cpp @@ -17,7 +17,7 @@ int main(int argc, char *argv[]) { Isis::PvlGroup g("Test"); g += Isis::PvlKeyword("Keyword", "Value"); - p.AddGroup(g); + p.addGroup(g); cout << p << endl; Isis::OriginalLabel ol(p); diff --git a/isis/src/base/objs/Orthographic/Orthographic.cpp b/isis/src/base/objs/Orthographic/Orthographic.cpp index 9b367c51f213c7a86a42178360f0dfab905c4cea..ae01782abb2b4dd4ceb7892802c5c5116edfd732 100644 --- a/isis/src/base/objs/Orthographic/Orthographic.cpp +++ b/isis/src/base/objs/Orthographic/Orthographic.cpp @@ -57,13 +57,13 @@ namespace Isis { Projection::Projection(label) { try { // Try to read the mapping group - PvlGroup &mapGroup = label.FindGroup("Mapping", Pvl::Traverse); + PvlGroup &mapGroup = label.findGroup("Mapping", Pvl::Traverse); /* * Compute and write the default center longitude if allowed and * necessary. */ - if ((allowDefaults) && (!mapGroup.HasKeyword("CenterLongitude"))) { + if ((allowDefaults) && (!mapGroup.hasKeyword("CenterLongitude"))) { double lon = (m_minimumLongitude + m_maximumLongitude) / 2.0; mapGroup += PvlKeyword("CenterLongitude", toString(lon)); } @@ -72,7 +72,7 @@ namespace Isis { * Compute and write the default center latitude if allowed and * necessary */ - if ((allowDefaults) && (!mapGroup.HasKeyword("CenterLatitude"))) { + if ((allowDefaults) && (!mapGroup.hasKeyword("CenterLatitude"))) { double lat = (m_minimumLatitude + m_maximumLatitude) / 2.0; mapGroup += PvlKeyword("CenterLatitude", toString(lat)); } diff --git a/isis/src/base/objs/Orthographic/unitTest.cpp b/isis/src/base/objs/Orthographic/unitTest.cpp index 41cffca3380e8e0ab7532a3b2627f5ef344677a9..55ecdc21307d9c2d6ded4827f0035320bf2b0208 100644 --- a/isis/src/base/objs/Orthographic/unitTest.cpp +++ b/isis/src/base/objs/Orthographic/unitTest.cpp @@ -15,8 +15,8 @@ int main(int argc, char *argv[]) { cout << "UNIT TEST FOR Orthographic" << endl << endl; Pvl lab; - lab.AddGroup(PvlGroup("Mapping")); - PvlGroup &mapGroup = lab.FindGroup("Mapping"); + lab.addGroup(PvlGroup("Mapping")); + PvlGroup &mapGroup = lab.findGroup("Mapping"); mapGroup += PvlKeyword("EquatorialRadius", "1.0"); mapGroup += PvlKeyword("PolarRadius", "1.0"); mapGroup += PvlKeyword("LatitudeType", "Planetographic"); @@ -93,8 +93,8 @@ int main(int argc, char *argv[]) { cout << endl; cout << "Test default computation ... " << endl; - mapGroup.DeleteKeyword("CenterLongitude"); - mapGroup.DeleteKeyword("CenterLatitude"); + mapGroup.deleteKeyword("CenterLongitude"); + mapGroup.deleteKeyword("CenterLatitude"); Orthographic p2(lab, true); cout << lab << endl; cout << endl; @@ -104,9 +104,9 @@ int main(int argc, char *argv[]) { Pvl tmp1; Pvl tmp2; Pvl tmp3; - tmp1.AddGroup(p.Mapping()); - tmp2.AddGroup(p.MappingLatitudes()); - tmp3.AddGroup(p.MappingLongitudes()); + tmp1.addGroup(p.Mapping()); + tmp2.addGroup(p.MappingLatitudes()); + tmp3.addGroup(p.MappingLongitudes()); cout << "Mapping() = " << endl; cout << tmp1 << endl; diff --git a/isis/src/base/objs/OverlapStatistics/OverlapStatistics.cpp b/isis/src/base/objs/OverlapStatistics/OverlapStatistics.cpp index 4264e12b42497b57628377f673c79d14e60646a0..a0df8838ec29d9b115fd6d56bf7e7c88e04b377f 100644 --- a/isis/src/base/objs/OverlapStatistics/OverlapStatistics.cpp +++ b/isis/src/base/objs/OverlapStatistics/OverlapStatistics.cpp @@ -235,8 +235,8 @@ namespace Isis { o += PvlKeyword("Width", toString(Samples())); o += PvlKeyword("Height", toString(Lines())); o += PvlKeyword("SamplingPercent", toString(SampPercent())); - o.AddGroup(gX); - o.AddGroup(gY); + o.addGroup(gX); + o.addGroup(gY); PvlKeyword cov("Covariance"); PvlKeyword cor("Correlation"); diff --git a/isis/src/base/objs/PhotoModel/PhotoModel.cpp b/isis/src/base/objs/PhotoModel/PhotoModel.cpp index 10707cac29b54ec50cd15ce3029e44f57e69f3aa..c09d3439dfb6ff2510850ae047e754371d6068d1 100644 --- a/isis/src/base/objs/PhotoModel/PhotoModel.cpp +++ b/isis/src/base/objs/PhotoModel/PhotoModel.cpp @@ -18,14 +18,14 @@ namespace Isis { * @see photometricModels.doc */ PhotoModel::PhotoModel(Pvl &pvl) { - PvlGroup &algorithm = pvl.FindObject("PhotometricModel").FindGroup("Algorithm", Pvl::Traverse); + PvlGroup &algorithm = pvl.findObject("PhotometricModel").findGroup("Algorithm", Pvl::Traverse); // Use 'PhtName' instead of 'Name' if using the Gui combo box // for unique Pvl keyword in DefFile - if(algorithm.HasKeyword("PhtName")) { + if(algorithm.hasKeyword("PhtName")) { p_photoAlgorithmName = algorithm["PhtName"][0]; } - else if(algorithm.HasKeyword("Name")) { + else if(algorithm.hasKeyword("Name")) { p_photoAlgorithmName = algorithm["Name"][0]; } else { diff --git a/isis/src/base/objs/PhotoModel/unitTest.cpp b/isis/src/base/objs/PhotoModel/unitTest.cpp index 801e03c6b9dbaeae224f41c66f3e0a9de2a1e612..9f5cb2e7fc65f6e6cd6ec2dd08122a9ec851d7b4 100644 --- a/isis/src/base/objs/PhotoModel/unitTest.cpp +++ b/isis/src/base/objs/PhotoModel/unitTest.cpp @@ -22,30 +22,30 @@ int main() { Pvl lab; doit(lab); - lab.AddObject(PvlObject("PhotometricModel")); + lab.addObject(PvlObject("PhotometricModel")); std::cout << "Testing missing Algorithm group ..." << std::endl; doit(lab); - lab.FindObject("PhotometricModel").AddGroup(PvlGroup("Algorithm")); + lab.findObject("PhotometricModel").addGroup(PvlGroup("Algorithm")); std::cout << "Testing missing Name keyword ..." << std::endl; doit(lab); // We can't do this in the unit test because it prints out an absolute path // to the isis root which changes. - //lab.FindObject("PhotometricModel").FindGroup("Algorithm"). - // AddKeyword(PvlKeyword("Name","Bogus")); + //lab.findObject("PhotometricModel").findGroup("Algorithm"). + // addKeyword(PvlKeyword("Name","Bogus")); //std::cout << "Testing unsupported photometric model ..." << std::endl; //doit(lab); - lab.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Name", "Minnaert"), Pvl::Replace); + lab.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Name", "Minnaert"), Pvl::Replace); std::cout << "Testing supported photometric model ..." << std::endl; doit(lab); - lab.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Name", "Lambert"), Pvl::Replace); + lab.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Name", "Lambert"), Pvl::Replace); PhotoModel *pm = PhotoModelFactory::Create(lab); std::cout << "Testing photometric model PhtTopder method ..." << std::endl; diff --git a/isis/src/base/objs/PhotoModelFactory/PhotoModelFactory.cpp b/isis/src/base/objs/PhotoModelFactory/PhotoModelFactory.cpp index fdb7ae5f90d50ab16100d2a5029ccd822112de94..a550e209e29a601b0b318c25ef66238c954dd3b1 100644 --- a/isis/src/base/objs/PhotoModelFactory/PhotoModelFactory.cpp +++ b/isis/src/base/objs/PhotoModelFactory/PhotoModelFactory.cpp @@ -50,14 +50,14 @@ namespace Isis { **/ PhotoModel *PhotoModelFactory::Create(Pvl &pvl) { // Get the algorithm name to create - PvlGroup &algo = pvl.FindObject("PhotometricModel") - .FindGroup("Algorithm", Pvl::Traverse); + PvlGroup &algo = pvl.findObject("PhotometricModel") + .findGroup("Algorithm", Pvl::Traverse); QString algorithm = ""; - if (algo.HasKeyword("PhtName")) { + if (algo.hasKeyword("PhtName")) { algorithm = algo["PhtName"][0]; } - else if (algo.HasKeyword("Name")) { + else if (algo.hasKeyword("Name")) { algorithm = algo["Name"][0]; } else { @@ -70,10 +70,10 @@ namespace Isis { Plugin *p = new Plugin; FileName f("PhotoModel.plugin"); if(f.fileExists()) { - p->Read("PhotoModel.plugin"); + p->read("PhotoModel.plugin"); } else { - p->Read("$ISISROOT/lib/PhotoModel.plugin"); + p->read("$ISISROOT/lib/PhotoModel.plugin"); } // Get the algorithm specific plugin and return it diff --git a/isis/src/base/objs/Photometry/Photometry.cpp b/isis/src/base/objs/Photometry/Photometry.cpp index 795603a6523cc747d56b995c090f10eee0561e4c..2fdbd12c23577fb702de8f1e7457db16d9e96e02 100644 --- a/isis/src/base/objs/Photometry/Photometry.cpp +++ b/isis/src/base/objs/Photometry/Photometry.cpp @@ -23,16 +23,16 @@ namespace Isis { p_phtAmodel = NULL; p_phtPmodel = NULL; p_phtNmodel = NULL; - if(pvl.HasObject("PhotometricModel")) { + if(pvl.hasObject("PhotometricModel")) { p_phtPmodel = PhotoModelFactory::Create(pvl); } else { std::string msg = "A Photometric model must be specified to do any type of photometry"; throw IException(IException::User, msg, _FILEINFO_); } - if(pvl.HasObject("AtmosphericModel")) { + if(pvl.hasObject("AtmosphericModel")) { p_phtAmodel = AtmosModelFactory::Create(pvl, *p_phtPmodel); } - if (pvl.HasObject("NormalizationModel")) { + if (pvl.hasObject("NormalizationModel")) { if (p_phtAmodel != NULL) { p_phtNmodel = NormModelFactory::Create(pvl, *p_phtPmodel, *p_phtAmodel); } else { diff --git a/isis/src/base/objs/Photometry/unitTest.cpp b/isis/src/base/objs/Photometry/unitTest.cpp index e706d1660a3306ee1cf9cd76443d0f7c7a407d22..3117944f267ba737da0b90e3254b34bf84801506 100644 --- a/isis/src/base/objs/Photometry/unitTest.cpp +++ b/isis/src/base/objs/Photometry/unitTest.cpp @@ -24,100 +24,100 @@ int main() { std::endl << std::endl; Pvl lab; - lab.AddObject(PvlObject("PhotometricModel")); - lab.FindObject("PhotometricModel").AddGroup(PvlGroup("Algorithm")); - lab.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Name", "Minnaert")); - lab.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Wh", "0.52")); - lab.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("B0", "0.0")); - lab.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Hh", "0.0")); - lab.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Theta", "30.0")); - lab.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Hg1", "0.213")); - lab.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Hg2", "1.0")); - - lab.AddObject(PvlObject("AtmosphericModel")); - lab.FindObject("AtmosphericModel").AddGroup(PvlGroup("Algorithm")); - lab.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Name", "Anisotropic1")); - lab.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Tau", "0.28")); - lab.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Tauref", "0.001")); - lab.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Wha", "0.95")); - lab.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Bha", "0.85")); - lab.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Hga", "0.68")); - lab.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Hnorm", "0.003")); - lab.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Nulneg", "NO")); - - lab.AddObject(PvlObject("NormalizationModel")); - lab.FindObject("NormalizationModel").AddGroup(PvlGroup("Algorithm")); - lab.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Name", "Albedo")); - lab.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Incref", "30.0")); - lab.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Albedo", "0.0690507")); - lab.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Thresh", "30.0")); + lab.addObject(PvlObject("PhotometricModel")); + lab.findObject("PhotometricModel").addGroup(PvlGroup("Algorithm")); + lab.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Name", "Minnaert")); + lab.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Wh", "0.52")); + lab.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("B0", "0.0")); + lab.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Hh", "0.0")); + lab.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Theta", "30.0")); + lab.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Hg1", "0.213")); + lab.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Hg2", "1.0")); + + lab.addObject(PvlObject("AtmosphericModel")); + lab.findObject("AtmosphericModel").addGroup(PvlGroup("Algorithm")); + lab.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Name", "Anisotropic1")); + lab.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Tau", "0.28")); + lab.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Tauref", "0.001")); + lab.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Wha", "0.95")); + lab.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Bha", "0.85")); + lab.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Hga", "0.68")); + lab.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Hnorm", "0.003")); + lab.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Nulneg", "NO")); + + lab.addObject(PvlObject("NormalizationModel")); + lab.findObject("NormalizationModel").addGroup(PvlGroup("Algorithm")); + lab.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Name", "Albedo")); + lab.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Incref", "30.0")); + lab.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Albedo", "0.0690507")); + lab.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Thresh", "30.0")); Pvl labdem; - labdem.AddObject(PvlObject("PhotometricModel")); - labdem.FindObject("PhotometricModel").AddGroup(PvlGroup("Algorithm")); - labdem.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Name", "Lambert")); - labdem.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Wh", "0.52")); - labdem.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("B0", "0.0")); - labdem.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Hh", "0.0")); - labdem.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Theta", "30.0")); - labdem.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Hg1", "0.213")); - labdem.FindObject("PhotometricModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Hg2", "1.0")); - - labdem.AddObject(PvlObject("AtmosphericModel")); - labdem.FindObject("AtmosphericModel").AddGroup(PvlGroup("Algorithm")); - labdem.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Name", "Anisotropic1")); - labdem.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Tau", "0.28")); - labdem.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Tauref", "0.001")); - labdem.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Wha", "0.95")); - labdem.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Bha", "0.85")); - labdem.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Hga", "0.68")); - labdem.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Hnorm", "0.003")); - labdem.FindObject("AtmosphericModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Nulneg", "NO")); - - labdem.AddObject(PvlObject("NormalizationModel")); - labdem.FindObject("NormalizationModel").AddGroup(PvlGroup("Algorithm")); - labdem.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Name", "AlbedoAtm")); - labdem.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Incref", "0.0")); - labdem.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Albedo", "0.0690507")); - labdem.FindObject("NormalizationModel").FindGroup("Algorithm"). - AddKeyword(PvlKeyword("Thresh", "30.0")); + labdem.addObject(PvlObject("PhotometricModel")); + labdem.findObject("PhotometricModel").addGroup(PvlGroup("Algorithm")); + labdem.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Name", "Lambert")); + labdem.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Wh", "0.52")); + labdem.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("B0", "0.0")); + labdem.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Hh", "0.0")); + labdem.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Theta", "30.0")); + labdem.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Hg1", "0.213")); + labdem.findObject("PhotometricModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Hg2", "1.0")); + + labdem.addObject(PvlObject("AtmosphericModel")); + labdem.findObject("AtmosphericModel").addGroup(PvlGroup("Algorithm")); + labdem.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Name", "Anisotropic1")); + labdem.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Tau", "0.28")); + labdem.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Tauref", "0.001")); + labdem.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Wha", "0.95")); + labdem.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Bha", "0.85")); + labdem.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Hga", "0.68")); + labdem.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Hnorm", "0.003")); + labdem.findObject("AtmosphericModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Nulneg", "NO")); + + labdem.addObject(PvlObject("NormalizationModel")); + labdem.findObject("NormalizationModel").addGroup(PvlGroup("Algorithm")); + labdem.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Name", "AlbedoAtm")); + labdem.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Incref", "0.0")); + labdem.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Albedo", "0.0690507")); + labdem.findObject("NormalizationModel").findGroup("Algorithm"). + addKeyword(PvlKeyword("Thresh", "30.0")); std::cout << "Testing creation of photometry object ..." << std::endl; try { diff --git a/isis/src/base/objs/Pipeline/Pipeline.cpp b/isis/src/base/objs/Pipeline/Pipeline.cpp index 80f48620fbdea941f41f42087579269df7abc52f..0c0b6b231482e77b0687f17d478f7b3f8ef8b0d9 100644 --- a/isis/src/base/objs/Pipeline/Pipeline.cpp +++ b/isis/src/base/objs/Pipeline/Pipeline.cpp @@ -885,7 +885,7 @@ namespace Isis { */ QString Pipeline::TemporaryFolder() { Pvl &pref = Preference::Preferences(); - return pref.FindGroup("DataDirectory")["Temporary"]; + return pref.findGroup("DataDirectory")["Temporary"]; } diff --git a/isis/src/base/objs/Plugin/Plugin.cpp b/isis/src/base/objs/Plugin/Plugin.cpp index 2be1f3384dc634a050e1d84f0050bdc88499bf6b..58f82723daad2f142fd4890022ddd7ce321b7dab 100644 --- a/isis/src/base/objs/Plugin/Plugin.cpp +++ b/isis/src/base/objs/Plugin/Plugin.cpp @@ -54,7 +54,7 @@ namespace Isis { */ void *Plugin::GetPlugin(const QString &group) { // Get the library and plugin to load - PvlGroup &g = FindGroup(group); + PvlGroup &g = findGroup(group); QString library = g["Library"]; QString path = "./"; diff --git a/isis/src/base/objs/PointPerspective/PointPerspective.cpp b/isis/src/base/objs/PointPerspective/PointPerspective.cpp index 0d0aeac021dda582f4cff696c29617363faa47bc..8a92a6d54aff8a9d636a65a4edf8e92d15d3dbe0 100644 --- a/isis/src/base/objs/PointPerspective/PointPerspective.cpp +++ b/isis/src/base/objs/PointPerspective/PointPerspective.cpp @@ -54,18 +54,18 @@ namespace Isis { Projection::Projection(label) { try { // Try to read the mapping group - PvlGroup &mapGroup = label.FindGroup("Mapping", Pvl::Traverse); + PvlGroup &mapGroup = label.findGroup("Mapping", Pvl::Traverse); // Compute and write the default center longitude if allowed and // necessary - if ((allowDefaults) && (!mapGroup.HasKeyword("CenterLongitude"))) { + if ((allowDefaults) && (!mapGroup.hasKeyword("CenterLongitude"))) { double lon = (m_minimumLongitude + m_maximumLongitude) / 2.0; mapGroup += PvlKeyword("CenterLongitude", toString(lon)); } // Compute and write the default center latitude if allowed and // necessary - if ((allowDefaults) && (!mapGroup.HasKeyword("CenterLatitude"))) { + if ((allowDefaults) && (!mapGroup.hasKeyword("CenterLatitude"))) { double lat = (m_minimumLatitude + m_maximumLatitude) / 2.0; mapGroup += PvlKeyword("CenterLatitude", toString(lat)); } diff --git a/isis/src/base/objs/PointPerspective/unitTest.cpp b/isis/src/base/objs/PointPerspective/unitTest.cpp index 48852694fdbb49b1c7cdeaa1dac393278ab35453..8962929dd3f6eea1098f3586382274d61f7082e1 100644 --- a/isis/src/base/objs/PointPerspective/unitTest.cpp +++ b/isis/src/base/objs/PointPerspective/unitTest.cpp @@ -14,8 +14,8 @@ int main(int argc, char *argv[]) { cout << "UNIT TEST FOR PointPerspective" << endl << endl; Pvl lab; - lab.AddGroup(PvlGroup("Mapping")); - PvlGroup &mapGroup = lab.FindGroup("Mapping"); + lab.addGroup(PvlGroup("Mapping")); + PvlGroup &mapGroup = lab.findGroup("Mapping"); mapGroup += PvlKeyword("EquatorialRadius", toString(6371000.)); mapGroup += PvlKeyword("PolarRadius", toString(6371000.)); mapGroup += PvlKeyword("LatitudeType", "Planetographic"); @@ -104,8 +104,8 @@ int main(int argc, char *argv[]) { cout << endl; cout << "Test default computation ... " << endl; - mapGroup.DeleteKeyword("CenterLongitude"); - mapGroup.DeleteKeyword("CenterLatitude"); + mapGroup.deleteKeyword("CenterLongitude"); + mapGroup.deleteKeyword("CenterLatitude"); PointPerspective p2(lab, true); cout << lab << endl; cout << endl; @@ -115,9 +115,9 @@ int main(int argc, char *argv[]) { Pvl tmp1; Pvl tmp2; Pvl tmp3; - tmp1.AddGroup(p.Mapping()); - tmp2.AddGroup(p.MappingLatitudes()); - tmp3.AddGroup(p.MappingLongitudes()); + tmp1.addGroup(p.Mapping()); + tmp2.addGroup(p.MappingLatitudes()); + tmp3.addGroup(p.MappingLongitudes()); cout << "Mapping() = " << endl; cout << tmp1 << endl; diff --git a/isis/src/base/objs/PolarStereographic/PolarStereographic.cpp b/isis/src/base/objs/PolarStereographic/PolarStereographic.cpp index 1ba33d956931bfb38e3e33a3e2e052acdfd3310c..f4d9264600481c8c313858451f18d454e5a8d4e4 100644 --- a/isis/src/base/objs/PolarStereographic/PolarStereographic.cpp +++ b/isis/src/base/objs/PolarStereographic/PolarStereographic.cpp @@ -59,18 +59,18 @@ namespace Isis { Projection::Projection(label) { try { // Try to read the mapping group - PvlGroup &mapGroup = label.FindGroup("Mapping", Pvl::Traverse); + PvlGroup &mapGroup = label.findGroup("Mapping", Pvl::Traverse); // Compute and write the default center longitude if allowed and // necessary - if ((allowDefaults) && (!mapGroup.HasKeyword("CenterLongitude"))) { + if ((allowDefaults) && (!mapGroup.hasKeyword("CenterLongitude"))) { double lon = (m_minimumLongitude + m_maximumLongitude) / 2.0; mapGroup += PvlKeyword("CenterLongitude", toString(lon)); } // Compute and write the default center latitude if allowed and // necessary - if ((allowDefaults) && (!mapGroup.HasKeyword("CenterLatitude"))) { + if ((allowDefaults) && (!mapGroup.hasKeyword("CenterLatitude"))) { double lat = (m_minimumLatitude + m_maximumLatitude) / 2.0; if (lat > 0.0) { mapGroup += PvlKeyword("CenterLatitude", toString(90.0)); diff --git a/isis/src/base/objs/PolarStereographic/unitTest.cpp b/isis/src/base/objs/PolarStereographic/unitTest.cpp index 706a1b70400432099553cf034d02c8a0e9ff33d5..5b7743afd2fdfb0e640dd98f98359d71c2c4d9c9 100644 --- a/isis/src/base/objs/PolarStereographic/unitTest.cpp +++ b/isis/src/base/objs/PolarStereographic/unitTest.cpp @@ -15,8 +15,8 @@ int main(int argc, char *argv[]) { cout << std::setprecision(14); Pvl lab; - lab.AddGroup(PvlGroup("Mapping")); - PvlGroup &mg = lab.FindGroup("Mapping"); + lab.addGroup(PvlGroup("Mapping")); + PvlGroup &mg = lab.findGroup("Mapping"); mg += PvlKeyword("EquatorialRadius", toString(6378388.0)); mg += PvlKeyword("PolarRadius", toString(6356911.9)); mg += PvlKeyword("LatitudeType", "Planetographic"); @@ -56,7 +56,7 @@ int main(int argc, char *argv[]) { e.print(); } cout << endl; - mg.AddKeyword(PvlKeyword("CenterLatitude", toString(-71.0)), PvlGroup::Replace); + mg.addKeyword(PvlKeyword("CenterLatitude", toString(-71.0)), PvlGroup::Replace); try { Projection &p = *ProjectionFactory::Create(lab); @@ -118,8 +118,8 @@ int main(int argc, char *argv[]) { cout << endl; cout << "Test default computation ... " << endl; - mg.DeleteKeyword("CenterLongitude"); - mg.DeleteKeyword("CenterLatitude"); + mg.deleteKeyword("CenterLongitude"); + mg.deleteKeyword("CenterLatitude"); PolarStereographic p2(lab, true); cout << lab << endl; cout << endl; @@ -129,9 +129,9 @@ int main(int argc, char *argv[]) { Pvl tmp1; Pvl tmp2; Pvl tmp3; - tmp1.AddGroup(p.Mapping()); - tmp2.AddGroup(p.MappingLatitudes()); - tmp3.AddGroup(p.MappingLongitudes()); + tmp1.addGroup(p.Mapping()); + tmp2.addGroup(p.MappingLatitudes()); + tmp3.addGroup(p.MappingLongitudes()); cout << "Mapping() = " << endl; cout << tmp1 << endl; diff --git a/isis/src/base/objs/PolygonSeeder/PolygonSeeder.cpp b/isis/src/base/objs/PolygonSeeder/PolygonSeeder.cpp index 4130ec231bc08996173c1b9ebaccd5ccfb059e2c..2b845397d96c9a00c81f61c5209f8654cc9d26b2 100644 --- a/isis/src/base/objs/PolygonSeeder/PolygonSeeder.cpp +++ b/isis/src/base/objs/PolygonSeeder/PolygonSeeder.cpp @@ -83,42 +83,42 @@ namespace Isis { try { // Get info from Algorithm group errorSpot = "Algorithm"; - PvlGroup &algo = pvl.FindGroup("PolygonSeederAlgorithm", Pvl::Traverse); + PvlGroup &algo = pvl.findGroup("PolygonSeederAlgorithm", Pvl::Traverse); // algo is such a cool name for a PvlGroup that it begs to be out done - PvlGroup &invalgo = invalidInput->FindGroup("PolygonSeederAlgorithm", + PvlGroup &invalgo = invalidInput->findGroup("PolygonSeederAlgorithm", Pvl::Traverse); // Set the algorithm name errorSpot = "Name"; p_algorithmName = (QString) algo["Name"]; - if(invalgo.HasKeyword("Name")) - invalgo.DeleteKeyword("Name"); + if(invalgo.hasKeyword("Name")) + invalgo.deleteKeyword("Name"); // Set the minimum thickness (Area / max(extent X, extent Y)**2 errorSpot = "MinimumThickness"; p_minimumThickness = 0.0; - if(algo.HasKeyword("MinimumThickness")) { + if(algo.hasKeyword("MinimumThickness")) { p_minimumThickness = (double) algo["MinimumThickness"]; } - if(invalgo.HasKeyword("MinimumThickness")) - invalgo.DeleteKeyword("MinimumThickness"); + if(invalgo.hasKeyword("MinimumThickness")) + invalgo.deleteKeyword("MinimumThickness"); // Set the minimum area errorSpot = "MinimumArea"; p_minimumArea = 0.0; - if(algo.HasKeyword("MinimumArea")) { + if(algo.hasKeyword("MinimumArea")) { p_minimumArea = (double) algo["MinimumArea"]; } - if(invalgo.HasKeyword("MinimumArea")) - invalgo.DeleteKeyword("MinimumArea"); + if(invalgo.hasKeyword("MinimumArea")) + invalgo.deleteKeyword("MinimumArea"); } catch(IException &e) { QString msg = "Improper format for PolygonSeeder PVL ["; - msg += pvl.FileName() + "]. Location [" + errorSpot + "]"; + msg += pvl.fileName() + "]. Location [" + errorSpot + "]"; throw IException(IException::User, msg, _FILEINFO_); } @@ -208,9 +208,9 @@ namespace Isis { PvlKeyword minThickness("MinimumThickness", toString(p_minimumThickness)); PvlKeyword minArea("MinimumArea", toString(p_minimumArea)); - pluginInfo.AddKeyword(name); - pluginInfo.AddKeyword(minThickness); - pluginInfo.AddKeyword(minArea); + pluginInfo.addKeyword(name); + pluginInfo.addKeyword(minThickness); + pluginInfo.addKeyword(minArea); return pluginInfo; } diff --git a/isis/src/base/objs/PolygonSeeder/unitTest.cpp b/isis/src/base/objs/PolygonSeeder/unitTest.cpp index b563fb13ae4ce0722646d41ed9f5a2d6f77ad942..723b27160abc8dcb324210b707c2aa4e5ee86c5d 100644 --- a/isis/src/base/objs/PolygonSeeder/unitTest.cpp +++ b/isis/src/base/objs/PolygonSeeder/unitTest.cpp @@ -23,10 +23,10 @@ int main() { alg += PvlKeyword("YSpacing", "11"); PvlObject o("AutoSeed"); - o.AddGroup(alg); + o.addGroup(alg); Pvl pvl; - pvl.AddObject(o); + pvl.addObject(o); std::cout << pvl << std::endl << std::endl; PolygonSeeder *ps = PolygonSeederFactory::Create(pvl); diff --git a/isis/src/base/objs/PolygonSeederFactory/PolygonSeederFactory.cpp b/isis/src/base/objs/PolygonSeederFactory/PolygonSeederFactory.cpp index fa16b9a1ebe1ec33cb0e6f1b409ceb6393cd3f76..6c527fb2cc142f1b1a6c17e39847ca15be7ea9a4 100644 --- a/isis/src/base/objs/PolygonSeederFactory/PolygonSeederFactory.cpp +++ b/isis/src/base/objs/PolygonSeederFactory/PolygonSeederFactory.cpp @@ -51,17 +51,17 @@ namespace Isis { **/ PolygonSeeder *PolygonSeederFactory::Create(Pvl &pvl) { // Get the algorithm name to create - PvlGroup &algo = pvl.FindGroup("PolygonSeederAlgorithm", Pvl::Traverse); + PvlGroup &algo = pvl.findGroup("PolygonSeederAlgorithm", Pvl::Traverse); QString algorithm = algo["Name"]; // Open the factory plugin file Plugin p; FileName f("PolygonSeeder.plugin"); if(f.fileExists()) { - p.Read("PolygonSeeder.plugin"); + p.read("PolygonSeeder.plugin"); } else { - p.Read("$ISISROOT/lib/PolygonSeeder.plugin"); + p.read("$ISISROOT/lib/PolygonSeeder.plugin"); } // Get the algorithm specific plugin and return it diff --git a/isis/src/base/objs/PolygonTools/unitTest.cpp b/isis/src/base/objs/PolygonTools/unitTest.cpp index e5c834c682b885e37894c7f25e4e229068717ce9..e8d2c4b5b78454457f31c793e08cc401acd83b51 100644 --- a/isis/src/base/objs/PolygonTools/unitTest.cpp +++ b/isis/src/base/objs/PolygonTools/unitTest.cpp @@ -67,8 +67,8 @@ int main() { cout << "Copy of the multipolygon = " << tmpMp->toString() << endl << endl; Isis::Pvl lab; - lab.AddGroup(Isis::PvlGroup("Mapping")); - Isis::PvlGroup &mapGroup = lab.FindGroup("Mapping"); + lab.addGroup(Isis::PvlGroup("Mapping")); + Isis::PvlGroup &mapGroup = lab.findGroup("Mapping"); mapGroup += Isis::PvlKeyword("EquatorialRadius", "1.0"); mapGroup += Isis::PvlKeyword("PolarRadius", "1.0"); mapGroup += Isis::PvlKeyword("LatitudeType", "Planetocentric"); @@ -89,9 +89,9 @@ int main() { // Change the radius and set a new projection // Then get the XYPolygon again - mapGroup.DeleteKeyword("EquatorialRadius"); + mapGroup.deleteKeyword("EquatorialRadius"); mapGroup += Isis::PvlKeyword("EquatorialRadius", "10.0"); - mapGroup.DeleteKeyword("PolarRadius"); + mapGroup.deleteKeyword("PolarRadius"); mapGroup += Isis::PvlKeyword("PolarRadius", "10.0"); proj = ProjectionFactory::Create(lab); diff --git a/isis/src/base/objs/Preference/Preference.cpp b/isis/src/base/objs/Preference/Preference.cpp index 5d42c675fb31f5108e66b9fec4f3f2e29f3027ab..6a01d7a8199d9514755144cab6be11ced7609893 100644 --- a/isis/src/base/objs/Preference/Preference.cpp +++ b/isis/src/base/objs/Preference/Preference.cpp @@ -46,32 +46,32 @@ namespace Isis { Isis::Pvl pvl; if(Isis::FileName(file).fileExists()) { - pvl.Read(file); + pvl.read(file); } // Override parameters each time load is called - for(int i = 0; i < pvl.Groups(); i++) { - Isis::PvlGroup &inGroup = pvl.Group(i); - if(this->HasGroup(inGroup.Name())) { - Isis::PvlGroup &outGroup = this->FindGroup(inGroup.Name()); - for(int k = 0; k < inGroup.Keywords(); k++) { + for(int i = 0; i < pvl.groups(); i++) { + Isis::PvlGroup &inGroup = pvl.group(i); + if(this->hasGroup(inGroup.name())) { + Isis::PvlGroup &outGroup = this->findGroup(inGroup.name()); + for(int k = 0; k < inGroup.keywords(); k++) { Isis::PvlKeyword &inKey = inGroup[k]; - while(outGroup.HasKeyword(inKey.Name())) { - outGroup.DeleteKeyword(inKey.Name()); + while(outGroup.hasKeyword(inKey.name())) { + outGroup.deleteKeyword(inKey.name()); } outGroup += inKey; } } else { - this->AddGroup(inGroup); + this->addGroup(inGroup); } } // Configure Isis to use the user performance preferences where // appropriate. - if (HasGroup("Performance")) { - PvlGroup &performance = FindGroup("Performance"); - if (performance.HasKeyword("GlobalThreads")) { + if (hasGroup("Performance")) { + PvlGroup &performance = findGroup("Performance"); + if (performance.hasKeyword("GlobalThreads")) { IString threadsPreference = performance["GlobalThreads"][0]; if (threadsPreference.DownCase() != "optimized") { @@ -126,7 +126,7 @@ namespace Isis { // the system and user preferences instead of the TestPreferences. else if(unitTest) { p_unitTest = unitTest; - p_preference->Clear(); + p_preference->clear(); p_preference->Load("$ISISROOT/src/base/objs/Preference/TestPreferences"); } diff --git a/isis/src/base/objs/Preference/unitTest.cpp b/isis/src/base/objs/Preference/unitTest.cpp index 42b86009077f3d3a4fea68051ca80ad367440ffd..72d3d52d9b096bc6e8f1cf6885aa3f4a913ff50e 100644 --- a/isis/src/base/objs/Preference/unitTest.cpp +++ b/isis/src/base/objs/Preference/unitTest.cpp @@ -17,14 +17,14 @@ int main() { Isis::PvlGroup j1("Junk"); j1 += Isis::PvlKeyword("Fruit", "Tomato"); j1 += Isis::PvlKeyword("Vegetable", "Potato"); - system.AddGroup(j1); - system.Write("tmpSystem"); + system.addGroup(j1); + system.write("tmpSystem"); Isis::Pvl user; Isis::PvlGroup j2("Junk"); j2 += Isis::PvlKeyword("Vegetable", "Potatoe"); - user.AddGroup(j2); - user.Write("tmpUser"); + user.addGroup(j2); + user.write("tmpUser"); cout << "Testing normally" << endl; #if 0 @@ -36,16 +36,16 @@ int main() { #endif Isis::Preference::Preferences(false).Load("tmpSystem"); - Isis::PvlGroup j3 = Isis::Preference::Preferences(false).FindGroup("Junk"); + Isis::PvlGroup j3 = Isis::Preference::Preferences(false).findGroup("Junk"); cout << j3 << endl; Isis::Preference::Preferences(false).Load("tmpUser"); - Isis::PvlGroup j4 = Isis::Preference::Preferences(false).FindGroup("Junk"); + Isis::PvlGroup j4 = Isis::Preference::Preferences(false).findGroup("Junk"); cout << j4 << endl; cout << endl << endl; - // if (p2.HasGroup("Junk")) { - if(Isis::Preference::Preferences(false).HasGroup("Junk")) { - Isis::PvlGroup &g = Isis::Preference::Preferences(false).FindGroup("Junk"); + // if (p2.hasGroup("Junk")) { + if(Isis::Preference::Preferences(false).hasGroup("Junk")) { + Isis::PvlGroup &g = Isis::Preference::Preferences(false).findGroup("Junk"); cout << "Value of Vegetable is : " << (QString) g["Vegetable"] << endl; } diff --git a/isis/src/base/objs/Process/Process.cpp b/isis/src/base/objs/Process/Process.cpp index 4e31f6b7e9a8f7d40a20ecea69f3960232fe9f49..8aafa9b206630a7381ec23ea0d79fd22e84cfb07 100644 --- a/isis/src/base/objs/Process/Process.cpp +++ b/isis/src/base/objs/Process/Process.cpp @@ -410,24 +410,24 @@ namespace Isis { // Transfer labels from the first input cube if((p_propagateLabels) && (InputCubes.size() > 0)) { Isis::PvlObject &incube = - InputCubes[0]->label()->FindObject("IsisCube"); - Isis::PvlObject &outcube = cube->label()->FindObject("IsisCube"); - for(int i = 0; i < incube.Groups(); i++) { - outcube.AddGroup(incube.Group(i)); + InputCubes[0]->label()->findObject("IsisCube"); + Isis::PvlObject &outcube = cube->label()->findObject("IsisCube"); + for(int i = 0; i < incube.groups(); i++) { + outcube.addGroup(incube.group(i)); } - if (InputCubes[0]->label()->HasObject("NaifKeywords")) { - cube->label()->AddObject( - InputCubes[0]->label()->FindObject("NaifKeywords")); + if (InputCubes[0]->label()->hasObject("NaifKeywords")) { + cube->label()->addObject( + InputCubes[0]->label()->findObject("NaifKeywords")); } } // Transfer tables from the first input cube if((p_propagateTables) && (InputCubes.size() > 0)) { Isis::Pvl &inlab = *InputCubes[0]->label(); - for(int i = 0; i < inlab.Objects(); i++) { - if(inlab.Object(i).IsNamed("Table")) { - Isis::Blob t((QString)inlab.Object(i)["Name"], inlab.Object(i).Name()); + for(int i = 0; i < inlab.objects(); i++) { + if(inlab.object(i).isNamed("Table")) { + Isis::Blob t((QString)inlab.object(i)["Name"], inlab.object(i).name()); InputCubes[0]->read(t); cube->write(t); } @@ -437,9 +437,9 @@ namespace Isis { // Transfer blobs from the first input cube if((p_propagatePolygons) && (InputCubes.size() > 0)) { Isis::Pvl &inlab = *InputCubes[0]->label(); - for(int i = 0; i < inlab.Objects(); i++) { - if(inlab.Object(i).IsNamed("Polygon")) { - Isis::Blob t((QString)inlab.Object(i)["Name"], inlab.Object(i).Name()); + for(int i = 0; i < inlab.objects(); i++) { + if(inlab.object(i).isNamed("Polygon")) { + Isis::Blob t((QString)inlab.object(i)["Name"], inlab.object(i).name()); InputCubes[0]->read(t); cube->write(t); } @@ -449,8 +449,8 @@ namespace Isis { // Transfer tables from the first input cube if((p_propagateOriginalLabel) && (InputCubes.size() > 0)) { Isis::Pvl &inlab = *InputCubes[0]->label(); - for(int i = 0; i < inlab.Objects(); i++) { - if(inlab.Object(i).IsNamed("OriginalLabel")) { + for(int i = 0; i < inlab.objects(); i++) { + if(inlab.object(i).isNamed("OriginalLabel")) { Isis::OriginalLabel ol; InputCubes[0]->read(ol); cube->write(ol); @@ -566,17 +566,17 @@ namespace Isis { // Loop for each output cube for(int i = 0; i < (int)OutputCubes.size(); i++) { - Isis::PvlObject &inCubeLabels = inLabels.FindObject("IsisCube"); + Isis::PvlObject &inCubeLabels = inLabels.findObject("IsisCube"); Isis::Pvl &outLabels(*OutputCubes[i]->label()); - Isis::PvlObject &outCubeLabels = outLabels.FindObject("IsisCube"); + Isis::PvlObject &outCubeLabels = outLabels.findObject("IsisCube"); - for(int g = 0; g < inCubeLabels.Groups(); g++) { - outCubeLabels.AddGroup(inCubeLabels.Group(g)); + for(int g = 0; g < inCubeLabels.groups(); g++) { + outCubeLabels.addGroup(inCubeLabels.group(g)); } - if (inLabels.HasObject("NaifKeywords")) { - outLabels.AddObject(inLabels.FindObject("NaifKeywords")); + if (inLabels.hasObject("NaifKeywords")) { + outLabels.addObject(inLabels.findObject("NaifKeywords")); } } } @@ -603,11 +603,11 @@ namespace Isis { const Pvl *fromLabels = fromCube->label(); for (unsigned int i = 0; i < OutputCubes.size(); i++) { - for (int j = 0; j < fromLabels->Objects(); j++) { - const PvlObject &object = fromLabels->Object(j); + for (int j = 0; j < fromLabels->objects(); j++) { + const PvlObject &object = fromLabels->object(j); - if (object.IsNamed("Table")) { - Blob table((QString) object["Name"], object.Name()); + if (object.isNamed("Table")) { + Blob table((QString) object["Name"], object.name()); fromCube->read(table); OutputCubes[i]->write(table); } @@ -665,7 +665,7 @@ namespace Isis { */ QString Process::MissionData(const QString &mission, const QString &file, bool highestVersion) { - Isis::PvlGroup &dataDir = Isis::Preference::Preferences().FindGroup("DataDirectory"); + Isis::PvlGroup &dataDir = Isis::Preference::Preferences().findGroup("DataDirectory"); QString dir = dataDir[mission]; // See if the data directory is installed @@ -689,9 +689,9 @@ namespace Isis { bool addedHist = false; if(InputCubes.size() > 0) { Isis::Pvl & inlab = *InputCubes[0]->label(); - for(int i = 0; i < inlab.Objects(); i++) { - if(inlab.Object(i).IsNamed("History") && Isis::iApp != NULL) { - Isis::History h((QString)inlab.Object(i)["Name"]); + for(int i = 0; i < inlab.objects(); i++) { + if(inlab.object(i).isNamed("History") && Isis::iApp != NULL) { + Isis::History h((QString)inlab.object(i)["Name"]); InputCubes[0]->read(h); h.AddEntry(); cube.write(h); diff --git a/isis/src/base/objs/Process/unitTest.cpp b/isis/src/base/objs/Process/unitTest.cpp index 3887b97b4b8a0174363d55aebb5ea44465cddcd1..653bd2a9ece69a11a2d84c59800d7745fce3e5a0 100644 --- a/isis/src/base/objs/Process/unitTest.cpp +++ b/isis/src/base/objs/Process/unitTest.cpp @@ -246,10 +246,10 @@ void IsisMain() { Isis::Cube *ocube8 = p6.SetOutputCube("TO"); Isis::Pvl *inlab1 = ocube8->label(); - for(int i = 0; i < inlab1->Objects(); i++) { - if(inlab1->Object(i).IsNamed("Polygon")) { + for(int i = 0; i < inlab1->objects(); i++) { + if(inlab1->object(i).isNamed("Polygon")) { cout << "Image Polygon does exist" << endl; - cout << "Size: " << (int)inlab1->Object(i)["Bytes"] << endl; + cout << "Size: " << (int)inlab1->object(i)["Bytes"] << endl; // We cannot instantiate without spice data, so we won't try. } } @@ -259,8 +259,8 @@ void IsisMain() { bool exists = false; Isis::Cube *ocube9 = p6.SetOutputCube("TO4", 126, 126, 1); Isis::Pvl *inlab2 = ocube9->label(); - for(int i = 0; i < inlab2->Objects(); i++) { - if(inlab2->Object(i).IsNamed("Polygon")) { + for(int i = 0; i < inlab2->objects(); i++) { + if(inlab2->object(i).isNamed("Polygon")) { cout << "Image Polygon does exist" << endl; exists = true; } diff --git a/isis/src/base/objs/ProcessExport/ProcessExport.cpp b/isis/src/base/objs/ProcessExport/ProcessExport.cpp index eb98aef5624b7378195f51488ef45737b8e89472..9b5ec719dfcfa85b234b480c6fd5d7749114c651 100644 --- a/isis/src/base/objs/ProcessExport/ProcessExport.cpp +++ b/isis/src/base/objs/ProcessExport/ProcessExport.cpp @@ -49,7 +49,7 @@ namespace Isis { p_endianSwap = NULL; - SetFormat(BSQ); + setFormat(BSQ); SetOutputEndian(Isis::IsLsb() ? Isis::Lsb : Isis::Msb); SetOutputType(Isis::Real); diff --git a/isis/src/base/objs/ProcessExport/ProcessExport.h b/isis/src/base/objs/ProcessExport/ProcessExport.h index 5b8d40cdf60ef7eb9bf9de6fc776bc0b5a1aaf70..79182d2ff24f099df0f8ab872d707b7032a46801 100644 --- a/isis/src/base/objs/ProcessExport/ProcessExport.h +++ b/isis/src/base/objs/ProcessExport/ProcessExport.h @@ -157,7 +157,7 @@ namespace Isis { }; //! Sets the storage order of the output file - void SetFormat(ExportFormat format) { + void setFormat(ExportFormat format) { p_format = format; }; diff --git a/isis/src/base/objs/ProcessExportPds/ProcessExportPds.cpp b/isis/src/base/objs/ProcessExportPds/ProcessExportPds.cpp index 53a7e4701b63549fc2e288bd2611ec74460e7467..87799169b8ac69e2276238f5ed31f45212b362f9 100644 --- a/isis/src/base/objs/ProcessExportPds/ProcessExportPds.cpp +++ b/isis/src/base/objs/ProcessExportPds/ProcessExportPds.cpp @@ -106,12 +106,12 @@ namespace Isis { m_pdsFileType = type; if(m_pdsFileType == ProcessExportPds::JP2Image) { - SetFormat(JP2); + setFormat(JP2); } m_formatter = new PvlFormatPds("$base/translations/pdsExportRootGen.typ"); - m_label->SetFormat(m_formatter); - m_label->SetTerminator("END"); + m_label->setFormat(m_formatter); + m_label->setTerminator("END"); if(type == ProcessExportPds::Image || type == ProcessExportPds::JP2Image) { CreateImageLabel(); @@ -163,7 +163,7 @@ namespace Isis { // The IMAGE_MAP_PROJECTION group is located in the ROOT for PDS IMAGEs. The // standard routines will add the IMAGE_MAP_PROJECTION correctly StandardAllMapping(mainPvl); - mainPvl.GetFormat()->Add("$base/translations/pdsExportAllMapping.typ"); + mainPvl.format()->add("$base/translations/pdsExportAllMapping.typ"); } @@ -182,8 +182,8 @@ namespace Isis { // the output PDS label. Pvl mapTmp; StandardAllMapping(mapTmp); - if(mapTmp.HasObject("IMAGE_MAP_PROJECTION")) { - mainPvl.FindObject("QUBE").AddObject(mapTmp.FindObject("IMAGE_MAP_PROJECTION")); + if(mapTmp.hasObject("IMAGE_MAP_PROJECTION")) { + mainPvl.findObject("QUBE").addObject(mapTmp.findObject("IMAGE_MAP_PROJECTION")); } } @@ -203,8 +203,8 @@ namespace Isis { // extracted and added to the output PDS label. Pvl mapTmp; StandardAllMapping(mapTmp); - if(mapTmp.HasObject("IMAGE_MAP_PROJECTION")) { - mainPvl.FindObject("QUBE").AddObject(mapTmp.FindObject("IMAGE_MAP_PROJECTION")); + if(mapTmp.hasObject("IMAGE_MAP_PROJECTION")) { + mainPvl.findObject("QUBE").addObject(mapTmp.findObject("IMAGE_MAP_PROJECTION")); } } @@ -245,7 +245,7 @@ namespace Isis { * @param mainPvl */ void ProcessExportPds::StreamJP2ImageRoot(Pvl &mainPvl) { - mainPvl.GetFormat()->Add("$base/translations/pdsExportImageJP2.typ"); + mainPvl.format()->add("$base/translations/pdsExportImageJP2.typ"); // Create standard ROOT object keywords mainPvl += PvlKeyword("PDS_VERSION_ID", "PDS3"); QString sImageFile = m_detachedPdsLabelFile; @@ -280,7 +280,7 @@ namespace Isis { storagebytes = storagebytes * 2; } cmpObj += PvlKeyword("REQUIRED_STORAGE_BYTES", toString(storagebytes)); - mainPvl.AddObject(cmpObj); + mainPvl.addObject(cmpObj); PvlObject ucmpObj("UNCOMPRESSED_FILE"); ucmpObj += PvlKeyword("FILE_NAME", infilename.name()); ucmpObj += PvlKeyword("RECORD_TYPE", "FIXED_LENGTH"); @@ -291,7 +291,7 @@ namespace Isis { ucmpObj += PvlKeyword("RECORD_BYTES", toString(recordbytes)); ucmpObj += PvlKeyword("FILE_RECORDS", toString(InputCubes[0]->lineCount())); ucmpObj += PvlKeyword("^IMAGE", infilename.name()); - mainPvl.AddObject(ucmpObj); + mainPvl.addObject(ucmpObj); } @@ -333,7 +333,7 @@ namespace Isis { * @param mainPvl */ void ProcessExportPds::FixedJP2ImageRoot(Pvl &mainPvl) { - mainPvl.GetFormat()->Add("$base/translations/pdsExportImageJP2.typ"); + mainPvl.format()->add("$base/translations/pdsExportImageJP2.typ"); //Create fixed ROOT object keywords mainPvl += PvlKeyword("PDS_VERSION_ID", "PDS3"); QString sImageFile = m_detachedPdsLabelFile; @@ -368,7 +368,7 @@ namespace Isis { storagebytes = storagebytes * 2; } cmpObj += PvlKeyword("REQUIRED_STORAGE_BYTES", toString(storagebytes)); - mainPvl.AddObject(cmpObj); + mainPvl.addObject(cmpObj); PvlObject ucmpObj("UNCOMPRESSED_FILE"); ucmpObj += PvlKeyword("FILE_NAME", infilename.name()); ucmpObj += PvlKeyword("RECORD_TYPE", "FIXED_LENGTH"); @@ -379,7 +379,7 @@ namespace Isis { ucmpObj += PvlKeyword("RECORD_BYTES", toString(recordbytes)); ucmpObj += PvlKeyword("FILE_RECORDS", toString(InputCubes[0]->lineCount())); ucmpObj += PvlKeyword("^IMAGE", infilename.name()); - mainPvl.AddObject(ucmpObj); + mainPvl.addObject(ucmpObj); } @@ -393,7 +393,7 @@ namespace Isis { * @throws Isis::IException::Message */ void ProcessExportPds::StandardImageImage(Pvl &mainPvl) { - mainPvl.GetFormat()->Add("$base/translations/pdsExportImageImage.typ"); + mainPvl.format()->add("$base/translations/pdsExportImageImage.typ"); // Build up an IMAGE object: // Auto translate standard keywords for the IMAGE object Pvl *inputLabel = InputCubes[0]->label(); @@ -433,12 +433,12 @@ namespace Isis { // Manually set the keyword for the number of bits in a pixel // NOTE: this is dependent on settings in ProcessExport and not the cube - PvlObject &imgObj = mainPvl.FindObject("IMAGE"); + PvlObject &imgObj = mainPvl.findObject("IMAGE"); - if(!m_forceBands) imgObj.DeleteKeyword("BANDS"); - if(!m_forceBandName && imgObj.HasKeyword("BAND_NAME")) imgObj.DeleteKeyword("BAND_NAME"); - if(!m_forceCenterFilterWavelength && imgObj.HasKeyword("CENTER_FILTER_WAVELENGTH")) imgObj.DeleteKeyword("CENTER_FILTER_WAVELENGTH"); - if(!m_forceBandwidth && imgObj.HasKeyword("BANDWIDTH")) imgObj.DeleteKeyword("BANDWIDTH"); + if(!m_forceBands) imgObj.deleteKeyword("BANDS"); + if(!m_forceBandName && imgObj.hasKeyword("BAND_NAME")) imgObj.deleteKeyword("BAND_NAME"); + if(!m_forceCenterFilterWavelength && imgObj.hasKeyword("CENTER_FILTER_WAVELENGTH")) imgObj.deleteKeyword("CENTER_FILTER_WAVELENGTH"); + if(!m_forceBandwidth && imgObj.hasKeyword("BANDWIDTH")) imgObj.deleteKeyword("BANDWIDTH"); if(m_forceBandStorageType) imgObj += PvlKeyword("BAND_STORAGE_TYPE", "BAND_SEQUENTIAL"); if(m_forceOffset) imgObj += PvlKeyword("OFFSET", toString(base)); @@ -454,7 +454,7 @@ namespace Isis { if(m_forceCoreLis) imgObj += PvlKeyword("CORE_LOW_INSTR_SATURATION", toString((int)OutputLis())); if(m_forceCoreHrs) imgObj += PvlKeyword("CORE_HIGH_REPR_SATURATION", toString((int)OutputHrs())); if(m_forceCoreHis) imgObj += PvlKeyword("CORE_HIGH_INSTR_SATURATION", toString((int)OutputHis())); - mainPvl.GetFormat()->Add("$base/translations/pdsExportImageImagePixel8.typ"); + mainPvl.format()->add("$base/translations/pdsExportImageImagePixel8.typ"); } else if((p_pixelType == Isis::UnsignedWord) && (p_endianType == Isis::Msb)) { if(m_forceSampleBits) imgObj += PvlKeyword("SAMPLE_BITS", "16"); @@ -465,7 +465,7 @@ namespace Isis { if(m_forceCoreLis) imgObj += PvlKeyword("CORE_LOW_INSTR_SATURATION", toString((int)OutputLis())); if(m_forceCoreHrs) imgObj += PvlKeyword("CORE_HIGH_REPR_SATURATION", toString((int)OutputHrs())); if(m_forceCoreHis) imgObj += PvlKeyword("CORE_HIGH_INSTR_SATURATION", toString((int)OutputHis())); - mainPvl.GetFormat()->Add("$base/translations/pdsExportImageImagePixel16.typ"); + mainPvl.format()->add("$base/translations/pdsExportImageImagePixel16.typ"); } else if((p_pixelType == Isis::UnsignedWord) && (p_endianType == Isis::Lsb)) { if(m_forceSampleBits) imgObj += PvlKeyword("SAMPLE_BITS", "16"); @@ -476,7 +476,7 @@ namespace Isis { if(m_forceCoreLis) imgObj += PvlKeyword("CORE_LOW_INSTR_SATURATION", toString((int)OutputLis())); if(m_forceCoreHrs) imgObj += PvlKeyword("CORE_HIGH_REPR_SATURATION", toString((int)OutputHrs())); if(m_forceCoreHis) imgObj += PvlKeyword("CORE_HIGH_INSTR_SATURATION", toString((int)OutputHis())); - mainPvl.GetFormat()->Add("$base/translations/pdsExportImageImagePixel16.typ"); + mainPvl.format()->add("$base/translations/pdsExportImageImagePixel16.typ"); } else if((p_pixelType == Isis::SignedWord) && (p_endianType == Isis::Msb)) { if(m_forceSampleBits) imgObj += PvlKeyword("SAMPLE_BITS", "16"); @@ -487,7 +487,7 @@ namespace Isis { if(m_forceCoreLis) imgObj += PvlKeyword("CORE_LOW_INSTR_SATURATION", toString((int)OutputLis())); if(m_forceCoreHrs) imgObj += PvlKeyword("CORE_HIGH_REPR_SATURATION", toString((int)OutputHrs())); if(m_forceCoreHis) imgObj += PvlKeyword("CORE_HIGH_INSTR_SATURATION", toString((int)OutputHis())); - mainPvl.GetFormat()->Add("$base/translations/pdsExportImageImagePixel16.typ"); + mainPvl.format()->add("$base/translations/pdsExportImageImagePixel16.typ"); } else if((p_pixelType == Isis::SignedWord) && (p_endianType == Isis::Lsb)) { if(m_forceSampleBits) imgObj += PvlKeyword("SAMPLE_BITS", "16"); @@ -498,7 +498,7 @@ namespace Isis { if(m_forceCoreLis) imgObj += PvlKeyword("CORE_LOW_INSTR_SATURATION", toString((int)OutputLis())); if(m_forceCoreHrs) imgObj += PvlKeyword("CORE_HIGH_REPR_SATURATION", toString((int)OutputHrs())); if(m_forceCoreHis) imgObj += PvlKeyword("CORE_HIGH_INSTR_SATURATION", toString((int)OutputHis())); - mainPvl.GetFormat()->Add("$base/translations/pdsExportImageImagePixel16.typ"); + mainPvl.format()->add("$base/translations/pdsExportImageImagePixel16.typ"); } else if(p_pixelType == Isis::Real) { if(m_forceSampleBits) imgObj += PvlKeyword("SAMPLE_BITS", "32"); @@ -515,7 +515,7 @@ namespace Isis { if(m_forceCoreLis) imgObj += PvlKeyword("CORE_LOW_INSTR_SATURATION", toString(Isis::ILOW_INSTR_SAT4)); if(m_forceCoreHrs) imgObj += PvlKeyword("CORE_HIGH_REPR_SATURATION", toString(Isis::IHIGH_REPR_SAT4)); if(m_forceCoreHis) imgObj += PvlKeyword("CORE_HIGH_INSTR_SATURATION", toString(Isis::IHIGH_INSTR_SAT4)); - mainPvl.GetFormat()->Add("$base/translations/pdsExportImageImagePixel32.typ"); + mainPvl.format()->add("$base/translations/pdsExportImageImagePixel32.typ"); } else { QString msg = "Unsupported PDS pixel type or sample size"; @@ -534,9 +534,9 @@ namespace Isis { * @throws Isis::IException::Message */ void ProcessExportPds::StandardJP2Image(Pvl &mainPvl) { - mainPvl.GetFormat()->Add("$base/translations/pdsExportImageImage.typ"); + mainPvl.format()->add("$base/translations/pdsExportImageImage.typ"); if(m_pdsFileType == ProcessExportPds::JP2Image) { - mainPvl.GetFormat()->Add("$base/translations/pdsExportImageJP2.typ"); + mainPvl.format()->add("$base/translations/pdsExportImageJP2.typ"); } // Build up a JP2 IMAGE object: // Auto translate standard keywords for the IMAGE object @@ -577,12 +577,12 @@ namespace Isis { // Manually set the keyword for the number of bits in a pixel // NOTE: this is dependent on settings in ProcessExport and not the cube - PvlObject &imgObj = mainPvl.FindObject("UNCOMPRESSED_FILE").FindObject("IMAGE"); + PvlObject &imgObj = mainPvl.findObject("UNCOMPRESSED_FILE").findObject("IMAGE"); - if(!m_forceBands) imgObj.DeleteKeyword("BANDS"); - if(!m_forceBandName && imgObj.HasKeyword("BAND_NAME")) imgObj.DeleteKeyword("BAND_NAME"); - if(!m_forceCenterFilterWavelength && imgObj.HasKeyword("CENTER_FILTER_WAVELENGTH")) imgObj.DeleteKeyword("CENTER_FILTER_WAVELENGTH"); - if(!m_forceBandwidth && imgObj.HasKeyword("BANDWIDTH")) imgObj.DeleteKeyword("BANDWIDTH"); + if(!m_forceBands) imgObj.deleteKeyword("BANDS"); + if(!m_forceBandName && imgObj.hasKeyword("BAND_NAME")) imgObj.deleteKeyword("BAND_NAME"); + if(!m_forceCenterFilterWavelength && imgObj.hasKeyword("CENTER_FILTER_WAVELENGTH")) imgObj.deleteKeyword("CENTER_FILTER_WAVELENGTH"); + if(!m_forceBandwidth && imgObj.hasKeyword("BANDWIDTH")) imgObj.deleteKeyword("BANDWIDTH"); if(m_forceBandStorageType) imgObj += PvlKeyword("BAND_STORAGE_TYPE", "BAND_SEQUENTIAL"); if(m_forceOffset) imgObj += PvlKeyword("OFFSET", toString(base)); @@ -598,7 +598,7 @@ namespace Isis { if(m_forceCoreLis) imgObj += PvlKeyword("CORE_LOW_INSTR_SATURATION", toString((int)OutputLis())); if(m_forceCoreHrs) imgObj += PvlKeyword("CORE_HIGH_REPR_SATURATION", toString((int)OutputHrs())); if(m_forceCoreHis) imgObj += PvlKeyword("CORE_HIGH_INSTR_SATURATION", toString((int)OutputHis())); - mainPvl.GetFormat()->Add("$base/translations/pdsExportImageImagePixel8.typ"); + mainPvl.format()->add("$base/translations/pdsExportImageImagePixel8.typ"); } else if((p_pixelType == Isis::UnsignedWord) && (p_endianType == Isis::Msb)) { if(m_forceSampleBits) imgObj += PvlKeyword("SAMPLE_BITS", "16"); @@ -609,7 +609,7 @@ namespace Isis { if(m_forceCoreLis) imgObj += PvlKeyword("CORE_LOW_INSTR_SATURATION", toString((int)OutputLis())); if(m_forceCoreHrs) imgObj += PvlKeyword("CORE_HIGH_REPR_SATURATION", toString((int)OutputHrs())); if(m_forceCoreHis) imgObj += PvlKeyword("CORE_HIGH_INSTR_SATURATION", toString((int)OutputHis())); - mainPvl.GetFormat()->Add("$base/translations/pdsExportImageImagePixel16.typ"); + mainPvl.format()->add("$base/translations/pdsExportImageImagePixel16.typ"); } else if((p_pixelType == Isis::UnsignedWord) && (p_endianType == Isis::Lsb)) { if(m_forceSampleBits) imgObj += PvlKeyword("SAMPLE_BITS", "16"); @@ -620,7 +620,7 @@ namespace Isis { if(m_forceCoreLis) imgObj += PvlKeyword("CORE_LOW_INSTR_SATURATION", toString((int)OutputLis())); if(m_forceCoreHrs) imgObj += PvlKeyword("CORE_HIGH_REPR_SATURATION", toString((int)OutputHrs())); if(m_forceCoreHis) imgObj += PvlKeyword("CORE_HIGH_INSTR_SATURATION", toString((int)OutputHis())); - mainPvl.GetFormat()->Add("$base/translations/pdsExportImageImagePixel16.typ"); + mainPvl.format()->add("$base/translations/pdsExportImageImagePixel16.typ"); } else if((p_pixelType == Isis::SignedWord) && (p_endianType == Isis::Msb)) { if(m_forceSampleBits) imgObj += PvlKeyword("SAMPLE_BITS", "16"); @@ -631,7 +631,7 @@ namespace Isis { if(m_forceCoreLis) imgObj += PvlKeyword("CORE_LOW_INSTR_SATURATION", toString((int)OutputLis())); if(m_forceCoreHrs) imgObj += PvlKeyword("CORE_HIGH_REPR_SATURATION", toString((int)OutputHrs())); if(m_forceCoreHis) imgObj += PvlKeyword("CORE_HIGH_INSTR_SATURATION", toString((int)OutputHis())); - mainPvl.GetFormat()->Add("$base/translations/pdsExportImageImagePixel16.typ"); + mainPvl.format()->add("$base/translations/pdsExportImageImagePixel16.typ"); } else if((p_pixelType == Isis::SignedWord) && (p_endianType == Isis::Lsb)) { if(m_forceSampleBits) imgObj += PvlKeyword("SAMPLE_BITS", "16"); @@ -642,7 +642,7 @@ namespace Isis { if(m_forceCoreLis) imgObj += PvlKeyword("CORE_LOW_INSTR_SATURATION", toString((int)OutputLis())); if(m_forceCoreHrs) imgObj += PvlKeyword("CORE_HIGH_REPR_SATURATION", toString((int)OutputHrs())); if(m_forceCoreHis) imgObj += PvlKeyword("CORE_HIGH_INSTR_SATURATION", toString((int)OutputHis())); - mainPvl.GetFormat()->Add("$base/translations/pdsExportImageImagePixel16.typ"); + mainPvl.format()->add("$base/translations/pdsExportImageImagePixel16.typ"); } else if(p_pixelType == Isis::Real) { if(m_forceSampleBits) imgObj += PvlKeyword("SAMPLE_BITS", "32"); @@ -659,7 +659,7 @@ namespace Isis { if(m_forceCoreLis) imgObj += PvlKeyword("CORE_LOW_INSTR_SATURATION", toString(Isis::ILOW_INSTR_SAT4)); if(m_forceCoreHrs) imgObj += PvlKeyword("CORE_HIGH_REPR_SATURATION", toString(Isis::IHIGH_REPR_SAT4)); if(m_forceCoreHis) imgObj += PvlKeyword("CORE_HIGH_INSTR_SATURATION", toString(Isis::IHIGH_INSTR_SAT4)); - mainPvl.GetFormat()->Add("$base/translations/pdsExportImageImagePixel32.typ"); + mainPvl.format()->add("$base/translations/pdsExportImageImagePixel32.typ"); } else { QString msg = "Unsupported PDS pixel type or sample size"; @@ -680,9 +680,9 @@ namespace Isis { // Get the input Isis cube label and find the Mapping group if it has one Pvl *inputLabel = InputCubes[0]->label(); - if(inputLabel->HasObject("IsisCube") && - !(inputLabel->FindObject("IsisCube").HasGroup("Mapping"))) return; - PvlGroup &inputMapping = inputLabel->FindGroup("Mapping", Pvl::Traverse); + if(inputLabel->hasObject("IsisCube") && + !(inputLabel->findObject("IsisCube").hasGroup("Mapping"))) return; + PvlGroup &inputMapping = inputLabel->findGroup("Mapping", Pvl::Traverse); // Translate the common keywords for a PDS IMAGE_MAP_PROJECTION PvlTranslationManager xlatGenProj(*inputLabel, "$base/translations/pdsExportAllMapping.trn"); @@ -700,68 +700,68 @@ namespace Isis { xlatTarget.Auto(outputPvl); // Add keywords to the PDS labels that could not be handled automatically - PvlObject &pdsMapObj = outputPvl.FindObject("IMAGE_MAP_PROJECTION"); + PvlObject &pdsMapObj = outputPvl.findObject("IMAGE_MAP_PROJECTION"); // Add the projection name // pdsMapObj += PvlKeyword ("MAP_PROJECTION_TYPE", projName.toUpper()); // Modify the radii to be km PvlKeyword &aRadius = pdsMapObj["A_AXIS_RADIUS"]; - QString unit = aRadius.Unit(); + QString unit = aRadius.unit(); if(unit.toUpper() == "METERS") { double dValue = (double)aRadius; dValue /= 1000.0; - aRadius.SetValue(toString(dValue), "KM"); + aRadius.setValue(toString(dValue), "KM"); } PvlKeyword &bRadius = pdsMapObj["B_AXIS_RADIUS"]; - unit = bRadius.Unit(); + unit = bRadius.unit(); if(unit.toUpper() == "METERS") { double dValue = (double)bRadius; dValue /= 1000.0; - bRadius.SetValue(toString(dValue), "KM"); + bRadius.setValue(toString(dValue), "KM"); } PvlKeyword &cRadius = pdsMapObj["C_AXIS_RADIUS"]; - unit = cRadius.Unit(); + unit = cRadius.unit(); if(unit.toUpper() == "METERS") { double dValue = (double)cRadius; dValue /= 1000.0; - cRadius.SetValue(toString(dValue), "KM"); + cRadius.setValue(toString(dValue), "KM"); } // Modify the units on MAP_SCALE and MAP_RESOLUTION PvlKeyword &mapScale = pdsMapObj["MAP_SCALE"]; - unit = mapScale.Unit(); + unit = mapScale.unit(); if((unit.toUpper() == "METERS/PIX") || (unit.toUpper() == "METERS/PIXEL")) { if(m_exportResolution == Kilometer) { double dValue = (double)mapScale; dValue /= 1000.0; - mapScale.SetValue(toString(dValue), "KM/PIXEL"); + mapScale.setValue(toString(dValue), "KM/PIXEL"); } else { - mapScale.SetValue(toString((double)mapScale), "METERS/PIXEL"); + mapScale.setValue(toString((double)mapScale), "METERS/PIXEL"); } } PvlKeyword &mapRes = pdsMapObj["MAP_RESOLUTION"]; - unit = mapRes.Unit(); + unit = mapRes.unit(); if(unit.toUpper() == "PIXELS/DEGREE") { - mapRes.SetValue((QString)mapRes, "PIX/DEG"); + mapRes.setValue((QString)mapRes, "PIX/DEG"); } // Add the EASTERNMOST AND WESTERNMOST LONGITUDE keywords - PvlKeyword &isisLonDir = inputMapping.FindKeyword("LongitudeDirection"); + PvlKeyword &isisLonDir = inputMapping.findKeyword("LongitudeDirection"); QString lonDir = isisLonDir[0]; lonDir = lonDir.toUpper(); if(lonDir == "POSITIVEEAST") { - double maxLon = inputMapping.FindKeyword("MaximumLongitude"); + double maxLon = inputMapping.findKeyword("MaximumLongitude"); pdsMapObj += PvlKeyword("EASTERNMOST_LONGITUDE", toString(maxLon)); - double minLon = inputMapping.FindKeyword("MinimumLongitude"); + double minLon = inputMapping.findKeyword("MinimumLongitude"); pdsMapObj += PvlKeyword("WESTERNMOST_LONGITUDE", toString(minLon)); } else { - double minLon = inputMapping.FindKeyword("MinimumLongitude"); + double minLon = inputMapping.findKeyword("MinimumLongitude"); pdsMapObj += PvlKeyword("EASTERNMOST_LONGITUDE", toString(minLon)); - double maxLon = inputMapping.FindKeyword("MaximumLongitude"); + double maxLon = inputMapping.findKeyword("MaximumLongitude"); pdsMapObj += PvlKeyword("WESTERNMOST_LONGITUDE", toString(maxLon)); } @@ -769,53 +769,53 @@ namespace Isis { // These keywords are the distance from the origin of the image to the // origin of the projection. The units are line or samples. The image origin // is the middle of pixel (1,1) - double lineOffset = inputMapping.FindKeyword("UpperLeftCornerY"); - lineOffset /= (double)inputMapping.FindKeyword("PixelResolution"); + double lineOffset = inputMapping.findKeyword("UpperLeftCornerY"); + lineOffset /= (double)inputMapping.findKeyword("PixelResolution"); lineOffset *= 1.0; lineOffset += 0.5; // Add half a line to get to the center of (1,1) pdsMapObj += PvlKeyword("LINE_PROJECTION_OFFSET", toString(lineOffset), "PIXEL"); - double sampleOffset = inputMapping.FindKeyword("UpperLeftCornerX"); - sampleOffset /= (double)inputMapping.FindKeyword("PixelResolution"); + double sampleOffset = inputMapping.findKeyword("UpperLeftCornerX"); + sampleOffset /= (double)inputMapping.findKeyword("PixelResolution"); sampleOffset *= -1.0; sampleOffset += 0.5; // Add half a sample to get to the center of (1,1) pdsMapObj += PvlKeyword("SAMPLE_PROJECTION_OFFSET", toString(sampleOffset), "PIXEL"); // Add units to keywords already in the IMAGE_MAP_PROJECTION object as necessary - if(pdsMapObj.HasKeyword("CENTER_LATITUDE")) { - PvlKeyword &tempKey = pdsMapObj.FindKeyword("CENTER_LATITUDE"); - tempKey.SetValue(tempKey[0], "DEG"); + if(pdsMapObj.hasKeyword("CENTER_LATITUDE")) { + PvlKeyword &tempKey = pdsMapObj.findKeyword("CENTER_LATITUDE"); + tempKey.setValue(tempKey[0], "DEG"); } - if(pdsMapObj.HasKeyword("CENTER_LONGITUDE")) { - PvlKeyword &tempKey = pdsMapObj.FindKeyword("CENTER_LONGITUDE"); - tempKey.SetValue(tempKey[0], "DEG"); + if(pdsMapObj.hasKeyword("CENTER_LONGITUDE")) { + PvlKeyword &tempKey = pdsMapObj.findKeyword("CENTER_LONGITUDE"); + tempKey.setValue(tempKey[0], "DEG"); } -// if (pdsMapObj.HasKeyword("REFERENCE_LATITUDE")) { -// PvlKeyword &tempKey = pdsMapObj.FindKeyword("REFERENCE_LATITUDE"); -// tempKey.SetValue(tempKey[0], "DEG"); +// if (pdsMapObj.hasKeyword("REFERENCE_LATITUDE")) { +// PvlKeyword &tempKey = pdsMapObj.findKeyword("REFERENCE_LATITUDE"); +// tempKey.setValue(tempKey[0], "DEG"); // } - if(pdsMapObj.HasKeyword("REFERENCE_LONGITUDE")) { - PvlKeyword &tempKey = pdsMapObj.FindKeyword("REFERENCE_LONGITUDE"); - tempKey.SetValue(tempKey[0], "DEG"); + if(pdsMapObj.hasKeyword("REFERENCE_LONGITUDE")) { + PvlKeyword &tempKey = pdsMapObj.findKeyword("REFERENCE_LONGITUDE"); + tempKey.setValue(tempKey[0], "DEG"); } - if(pdsMapObj.HasKeyword("MAXIMUM_LATITUDE")) { - PvlKeyword &tempKey = pdsMapObj.FindKeyword("MAXIMUM_LATITUDE"); - tempKey.SetValue(tempKey[0], "DEG"); + if(pdsMapObj.hasKeyword("MAXIMUM_LATITUDE")) { + PvlKeyword &tempKey = pdsMapObj.findKeyword("MAXIMUM_LATITUDE"); + tempKey.setValue(tempKey[0], "DEG"); } - if(pdsMapObj.HasKeyword("MINIMUM_LATITUDE")) { - PvlKeyword &tempKey = pdsMapObj.FindKeyword("MINIMUM_LATITUDE"); - tempKey.SetValue(tempKey[0], "DEG"); + if(pdsMapObj.hasKeyword("MINIMUM_LATITUDE")) { + PvlKeyword &tempKey = pdsMapObj.findKeyword("MINIMUM_LATITUDE"); + tempKey.setValue(tempKey[0], "DEG"); } - if(pdsMapObj.HasKeyword("EASTERNMOST_LONGITUDE")) { - PvlKeyword &tempKey = pdsMapObj.FindKeyword("EASTERNMOST_LONGITUDE"); - tempKey.SetValue(tempKey[0], "DEG"); + if(pdsMapObj.hasKeyword("EASTERNMOST_LONGITUDE")) { + PvlKeyword &tempKey = pdsMapObj.findKeyword("EASTERNMOST_LONGITUDE"); + tempKey.setValue(tempKey[0], "DEG"); } - if(pdsMapObj.HasKeyword("WESTERNMOST_LONGITUDE")) { - PvlKeyword &tempKey = pdsMapObj.FindKeyword("WESTERNMOST_LONGITUDE"); - tempKey.SetValue(tempKey[0], "DEG"); + if(pdsMapObj.hasKeyword("WESTERNMOST_LONGITUDE")) { + PvlKeyword &tempKey = pdsMapObj.findKeyword("WESTERNMOST_LONGITUDE"); + tempKey.setValue(tempKey[0], "DEG"); } - if(pdsMapObj.HasKeyword("MAP_PROJECTION_ROTATION")) { - PvlKeyword &tempKey = pdsMapObj.FindKeyword("MAP_PROJECTION_ROTATION"); - tempKey.SetValue(tempKey[0], "DEG"); + if(pdsMapObj.hasKeyword("MAP_PROJECTION_ROTATION")) { + PvlKeyword &tempKey = pdsMapObj.findKeyword("MAP_PROJECTION_ROTATION"); + tempKey.setValue(tempKey[0], "DEG"); } } @@ -857,8 +857,8 @@ namespace Isis { */ int ProcessExportPds::LabelSize() { ostringstream temp; - if(m_label->GetFormat() != NULL) { - temp << *m_label << m_label->GetFormat()->FormatEOL(); + if(m_label->format() != NULL) { + temp << *m_label << m_label->format()->formatEOL(); } else { temp << *m_label << endl; @@ -896,13 +896,13 @@ namespace Isis { // corresponding lines in the StandardImageRoot member if(m_exportType == Stream) { if(m_pdsFileType != ProcessExportPds::JP2Image) { - (*m_label)["LABEL_RECORDS"].SetValue(toString(labSize), "BYTES"); + (*m_label)["LABEL_RECORDS"].setValue(toString(labSize), "BYTES"); if(!m_detachedLabel) { - (*m_label)["^IMAGE"].SetValue(toString(labSize + 1), "BYTES"); + (*m_label)["^IMAGE"].setValue(toString(labSize + 1), "BYTES"); } } - if(m_label->GetFormat() != NULL) { - os << *m_label << m_label->GetFormat()->FormatEOL(); + if(m_label->format() != NULL) { + os << *m_label << m_label->format()->formatEOL(); } else { os << *m_label << endl; @@ -917,13 +917,13 @@ namespace Isis { int labelRecords; if(m_pdsFileType != ProcessExportPds::JP2Image) { lineBytes = LineBytes(); - (*m_label)["RECORD_BYTES"].SetValue(toString(lineBytes)); + (*m_label)["RECORD_BYTES"].setValue(toString(lineBytes)); // The number of label records is dependent on the number of label bytes // and the lint bytes labelRecords = (int)ceil((double)labSize / (double)lineBytes); - if(m_label->HasKeyword("LABEL_RECORDS")) { //LRO MRF doesn't have this keyword - (*m_label)["LABEL_RECORDS"].SetValue(toString(labelRecords)); + if(m_label->hasKeyword("LABEL_RECORDS")) { //LRO MRF doesn't have this keyword + (*m_label)["LABEL_RECORDS"].setValue(toString(labelRecords)); } int totalTableRecords = 0; for (unsigned int i = 0; i < m_tableRecords.size(); i++) { @@ -932,14 +932,14 @@ namespace Isis { int imageRecords = InputCubes[0]->lineCount() * InputCubes[0]->bandCount(); int fileRecords = labelRecords + imageRecords + totalTableRecords; - (*m_label)["FILE_RECORDS"].SetValue(toString(fileRecords)); + (*m_label)["FILE_RECORDS"].setValue(toString(fileRecords)); if(!m_detachedLabel) { - (*m_label)["^IMAGE"].SetValue(toString(labelRecords + 1)); + (*m_label)["^IMAGE"].setValue(toString(labelRecords + 1)); } } - if(m_label->GetFormat() != NULL) { - os << *m_label << m_label->GetFormat()->FormatEOL(); + if(m_label->format() != NULL) { + os << *m_label << m_label->format()->formatEOL(); } else { os << *m_label << endl; @@ -1034,7 +1034,7 @@ namespace Isis { os.write(tableBuffer, isisTable.Records() * fileRecordBytes); os.close(); } - mainPvl.AddObject(metadata); + mainPvl.addObject(metadata); m_tableRecords.push_back(isisTable.Records()); return; } diff --git a/isis/src/base/objs/ProcessGroundPolygons/ProcessGroundPolygons.cpp b/isis/src/base/objs/ProcessGroundPolygons/ProcessGroundPolygons.cpp index b468fcb825b734347fc74c6ff1f1f9bcdb1845d7..abd608aaea34908befd7e16c13a70927f29a8e8c 100644 --- a/isis/src/base/objs/ProcessGroundPolygons/ProcessGroundPolygons.cpp +++ b/isis/src/base/objs/ProcessGroundPolygons/ProcessGroundPolygons.cpp @@ -283,7 +283,7 @@ namespace Isis { /*Write the pvl group to the cube files.*/ - PvlGroup group = map.FindGroup("Mapping", Pvl::Traverse); + PvlGroup group = map.findGroup("Mapping", Pvl::Traverse); OutputCubes[0]->putGroup(group); OutputCubes[1]->putGroup(group); diff --git a/isis/src/base/objs/ProcessGroundPolygons/unitTest.cpp b/isis/src/base/objs/ProcessGroundPolygons/unitTest.cpp index d51b0505877d3aafffa3bf72ced799021c896ab4..a713440a52f7696571796674bcbb061834930ee0 100644 --- a/isis/src/base/objs/ProcessGroundPolygons/unitTest.cpp +++ b/isis/src/base/objs/ProcessGroundPolygons/unitTest.cpp @@ -39,7 +39,7 @@ void IsisMain() { } Pvl pvl; - pvl.AddGroup(mapping); + pvl.addGroup(mapping); PvlGroup vimsMapping("Mapping"); { @@ -74,7 +74,7 @@ void IsisMain() { std::vector vimsSamps, vimsLines, vect; Pvl vimsPvl; - vimsPvl.AddGroup(vimsMapping); + vimsPvl.addGroup(vimsMapping); CubeAttributeOutput out_atts; out_atts.setPixelType(Real); diff --git a/isis/src/base/objs/ProcessImport/ProcessImport.cpp b/isis/src/base/objs/ProcessImport/ProcessImport.cpp index 0a50e37a35063093b1da1d54d2c5fcb36cf4c040..8cfee4c43d2a9137f21917d30cef23e32a8f4719 100644 --- a/isis/src/base/objs/ProcessImport/ProcessImport.cpp +++ b/isis/src/base/objs/ProcessImport/ProcessImport.cpp @@ -1945,7 +1945,7 @@ namespace Isis { Isis::Pvl *output = OutputCubes[0]->Label(); output->Find("IsisCube"); - output->AddObject("ImportLabel"); + output->addObject("ImportLabel"); output->Insert(importLab); } #endif diff --git a/isis/src/base/objs/ProcessImportPds/ProcessImportPds.cpp b/isis/src/base/objs/ProcessImportPds/ProcessImportPds.cpp index 01650b0ef456fe26b29f4d74c3f6cf9ec8d65de3..853e17bb402dc7b4adcafb6c6c8361b37e3ceb14 100644 --- a/isis/src/base/objs/ProcessImportPds/ProcessImportPds.cpp +++ b/isis/src/base/objs/ProcessImportPds/ProcessImportPds.cpp @@ -55,7 +55,7 @@ namespace Isis { p_jp2File.clear(); // Set up a translater for PDS file of type IMAGE - Isis::PvlGroup &dataDir = Isis::Preference::Preferences().FindGroup("DataDirectory"); + Isis::PvlGroup &dataDir = Isis::Preference::Preferences().findGroup("DataDirectory"); p_transDir = (QString) dataDir["Base"]; } @@ -87,7 +87,7 @@ namespace Isis { // Internalize the PDS label in the PVL that was passed in try { - pdsLabel.Read(pdsLabelFile); + pdsLabel.read(pdsLabelFile); } catch (IException &e) { throw IException(e, IException::User, @@ -201,11 +201,11 @@ namespace Isis { // If only size 1, we either have a file name or an offset // Either way, when we're done with these two ifs, variables offset and // dataFileName will be set. - if (dataFilePointer.Size() == 1) { + if (dataFilePointer.size() == 1) { try { str = pdsXlater.Translate("DataFilePointer"); offset = toInt(str); - units = dataFilePointer.Unit(); + units = dataFilePointer.unit(); // Successful? we have an offset, means current, p_labelFile // is the location of the data as well dataFileName = FileName(p_labelFile).name(); @@ -220,13 +220,13 @@ namespace Isis { } // We must have a filename and an offset, in that order // Expection ("filname", ) - else if (dataFilePointer.Size() == 2) { + else if (dataFilePointer.size() == 2) { dataFileName = pdsXlater.Translate("DataFilePointer", 0); offset = IString(pdsXlater.Translate("DataFilePointer", 1)).ToInteger(); - units = dataFilePointer.Unit(1); + units = dataFilePointer.unit(1); } // Error, no value - else if (dataFilePointer.Size() == 0) { + else if (dataFilePointer.size() == 0) { QString msg = "Data file pointer ^IMAGE or ^QUBE has no value, must" "have either file name or offset or both, in [" + p_labelFile + "]"; @@ -525,7 +525,7 @@ namespace Isis { int linePos = 0; int samplePos = 0; int bandPos = 0; - int val = pdsXlater.InputKeyword("CoreOrganization").Size(); + int val = pdsXlater.InputKeyword("CoreOrganization").size(); QString tmp = ""; for(int i = 0; i < val; i++) { str = pdsXlater.Translate("CoreOrganization", i); @@ -558,7 +558,7 @@ namespace Isis { SetOrganization(ProcessImport::BIL); } else { - PvlKeyword pdsCoreOrg = p_pdsLabel.FindKeyword(pdsXlater. + PvlKeyword pdsCoreOrg = p_pdsLabel.findKeyword(pdsXlater. InputKeywordName("CoreOrganization"), Pvl::Traverse); stringstream pdsCoreOrgStream; @@ -637,7 +637,7 @@ namespace Isis { (pdsXlater.InputHasKeyword("BandMultiplier"))) { vector bases; vector mults; - for(int i = 0; i < pdsXlater.InputKeyword("BandBase").Size(); i++) { + for(int i = 0; i < pdsXlater.InputKeyword("BandBase").size(); i++) { str = pdsXlater.Translate("BandBase", i); bases.push_back(toDouble(str)); str = pdsXlater.Translate("BandMultiplier", i); @@ -688,7 +688,7 @@ namespace Isis { Isis::PvlTranslationManager projType(p_pdsLabel, trnsStrm); // Set up the correct projection translation table for this label - Isis::PvlGroup &dataDir = Isis::Preference::Preferences().FindGroup("DataDirectory"); + Isis::PvlGroup &dataDir = Isis::Preference::Preferences().findGroup("DataDirectory"); QString transDir = (QString) dataDir["Base"]; Isis::FileName transFile; @@ -761,26 +761,26 @@ namespace Isis { projSpecificFileName += p_projection + ".trn"; Isis::PvlTranslationManager specificXlater(p_pdsLabel, projSpecificFileName); - lab.AddGroup(mapGroup); + lab.addGroup(mapGroup); specificXlater.Auto(lab); - if(lab.FindGroup("Mapping").HasKeyword("CenterLongitude")) { - PvlKeyword ¢erLon = lab.FindGroup("Mapping")["CenterLongitude"]; + if(lab.findGroup("Mapping").hasKeyword("CenterLongitude")) { + PvlKeyword ¢erLon = lab.findGroup("Mapping")["CenterLongitude"]; if(p_longitudeDomain == 180) centerLon = toString(Projection::To180Domain((double)centerLon)); else centerLon = toString(Projection::To360Domain((double)centerLon)); } - if(lab.FindGroup("Mapping").HasKeyword("PoleLongitude")) { - PvlKeyword &poleLon = lab.FindGroup("Mapping")["PoleLongitude"]; + if(lab.findGroup("Mapping").hasKeyword("PoleLongitude")) { + PvlKeyword &poleLon = lab.findGroup("Mapping")["PoleLongitude"]; if(p_longitudeDomain == 180) poleLon = toString(Projection::To180Domain((double)poleLon)); else poleLon = toString(Projection::To360Domain((double)poleLon)); } - OutputCubes[0]->putGroup(lab.FindGroup("Mapping")); + OutputCubes[0]->putGroup(lab.findGroup("Mapping")); } /** @@ -978,7 +978,7 @@ namespace Isis { str = pdsXlater.Translate("PixelResolution"); p_pixelResolution = toDouble(str); - str = pdsXlater.InputKeyword("PixelResolution").Unit().toUpper(); + str = pdsXlater.InputKeyword("PixelResolution").unit().toUpper(); // Assume KM/PIXEL if the unit doesn't exist or is not METERS/PIXEL if((str != "METERS/PIXEL") && (str != "M/PIXEL") && (str != "M/PIX")) { p_pixelResolution *= 1000.0; @@ -1134,7 +1134,7 @@ namespace Isis { */ void ProcessImportPds::TranslateIsis2BandBin(Isis::Pvl &lab) { // Set up a translater for Isis2 labels - Isis::PvlGroup &dataDir = Isis::Preference::Preferences().FindGroup("DataDirectory"); + Isis::PvlGroup &dataDir = Isis::Preference::Preferences().findGroup("DataDirectory"); QString transDir = (QString) dataDir["Base"]; Isis::FileName transFile(transDir + "/" + "translations/isis2bandbin.trn"); @@ -1152,7 +1152,7 @@ namespace Isis { */ void ProcessImportPds::TranslateIsis2Instrument(Isis::Pvl &lab) { // Set up a translater for Isis2 labels - Isis::PvlGroup &dataDir = Isis::Preference::Preferences().FindGroup("DataDirectory"); + Isis::PvlGroup &dataDir = Isis::Preference::Preferences().findGroup("DataDirectory"); QString transDir = (QString) dataDir["Base"]; Isis::FileName transFile(transDir + "/" + "translations/isis2instrument.trn"); Isis::PvlTranslationManager isis2Xlater(p_pdsLabel, transFile.expanded()); @@ -1161,9 +1161,9 @@ namespace Isis { isis2Xlater.Auto(lab); //Check StartTime for appended 'z' (Zulu time) and remove - Isis::PvlGroup &inst = lab.FindGroup("Instrument"); + Isis::PvlGroup &inst = lab.findGroup("Instrument"); - if(inst.HasKeyword("StartTime")) { + if(inst.hasKeyword("StartTime")) { Isis::PvlKeyword &stkey = inst["StartTime"]; QString stime = stkey[0]; stime = stime.remove(QRegExp("[Zz]$")); @@ -1224,20 +1224,20 @@ namespace Isis { // Open projectionOffsetMults file Isis::Pvl p(p_transDir + "/" + "translations/pdsProjectionLineSampToXY.def"); - Isis::PvlObject &projDef = p.FindObject("ProjectionOffsetMults", + Isis::PvlObject &projDef = p.findObject("ProjectionOffsetMults", Pvl::Traverse); - for(int g = 0; g < projDef.Groups(); g++) { - QString key = projDef.Group(g)["Keyword"]; - if(p_pdsLabel.HasKeyword(key)) { + for(int g = 0; g < projDef.groups(); g++) { + QString key = projDef.group(g)["Keyword"]; + if(p_pdsLabel.hasKeyword(key)) { QString value = p_pdsLabel[key]; - QString pattern = projDef.Group(g)["Pattern"]; + QString pattern = projDef.group(g)["Pattern"]; // If value contains pattern, then set the mults to what is in translation file if(value.contains(pattern)) { - xmult = projDef.Group(g)["xMult"]; - ymult = projDef.Group(g)["yMult"]; - xoff = projDef.Group(g)["xOff"]; - yoff = projDef.Group(g)["yOff"]; + xmult = projDef.group(g)["xMult"]; + ymult = projDef.group(g)["yMult"]; + xoff = projDef.group(g)["xOff"]; + yoff = projDef.group(g)["yOff"]; return; } } diff --git a/isis/src/base/objs/ProcessImportPds/unitTest.cpp b/isis/src/base/objs/ProcessImportPds/unitTest.cpp index dc1fc8e73590ab496ccc8a0b2afbfe48ce982a8f..2d82287b0f7b05bffef56b5577e2148dab8fc5c6 100644 --- a/isis/src/base/objs/ProcessImportPds/unitTest.cpp +++ b/isis/src/base/objs/ProcessImportPds/unitTest.cpp @@ -122,13 +122,13 @@ void IsisMain() { QString file = Isis::Application::GetUserInterface().GetFileName("TO"); Isis::Cube *cube = p2.SetInputCube(file, att); Pvl isisCubeLab = *(cube->label()); - (isisCubeLab.FindObject("IsisCube").FindObject("Core")["StartByte"]).SetValue(""); - (isisCubeLab.FindObject("Table")["StartByte"]).SetValue(""); - (isisCubeLab.FindObject("Table")["Bytes"]).SetValue(""); - (isisCubeLab.FindObject("History")["StartByte"]).SetValue(""); - (isisCubeLab.FindObject("History")["Bytes"]).SetValue(""); - (isisCubeLab.FindObject("OriginalLabel")["StartByte"]).SetValue(""); - (isisCubeLab.FindObject("OriginalLabel")["Bytes"]).SetValue(""); + (isisCubeLab.findObject("IsisCube").findObject("Core")["StartByte"]).setValue(""); + (isisCubeLab.findObject("Table")["StartByte"]).setValue(""); + (isisCubeLab.findObject("Table")["Bytes"]).setValue(""); + (isisCubeLab.findObject("History")["StartByte"]).setValue(""); + (isisCubeLab.findObject("History")["Bytes"]).setValue(""); + (isisCubeLab.findObject("OriginalLabel")["StartByte"]).setValue(""); + (isisCubeLab.findObject("OriginalLabel")["Bytes"]).setValue(""); cout << isisCubeLab << endl; Isis::Statistics *stat = cube->statistics(); cout << stat->Average() << endl; diff --git a/isis/src/base/objs/ProcessImportVicar/ProcessImportVicar.cpp b/isis/src/base/objs/ProcessImportVicar/ProcessImportVicar.cpp index 7889735d8cf9e72ea50aee818df78350c387ac64..d81e26f409bc4b4aabfe00f51d98611090d5ecbf 100644 --- a/isis/src/base/objs/ProcessImportVicar/ProcessImportVicar.cpp +++ b/isis/src/base/objs/ProcessImportVicar/ProcessImportVicar.cpp @@ -113,7 +113,7 @@ namespace Isis { // See if there is end-of-dataset labels // If so read them and merge - if(vLab.HasKeyword("EOL")) { + if(vLab.hasKeyword("EOL")) { if((int) vLab["EOL"] == 1) { int startByte = (int) vLab["LBLSIZE"] + (int) vLab["NLB"] * (int) vLab["RECSIZE"] + @@ -129,7 +129,7 @@ namespace Isis { lbl >> endLab; vicFile.close(); - for(int k = 0; k < endLab.Keywords(); k++) { + for(int k = 0; k < endLab.keywords(); k++) { vicarLab += endLab[k]; } } diff --git a/isis/src/base/objs/ProcessImportVicar/ProcessImportVicar.h b/isis/src/base/objs/ProcessImportVicar/ProcessImportVicar.h index 7976f0a4d9553e9446eaaeb46963bb50b31a1505..de54ec590a3cad325022754015004ae03ebd49f8 100644 --- a/isis/src/base/objs/ProcessImportVicar/ProcessImportVicar.h +++ b/isis/src/base/objs/ProcessImportVicar/ProcessImportVicar.h @@ -40,8 +40,8 @@ namespace Isis { * p.StartProcess(); * // extract vicar keywords ... * Pvl outLab; - * outLab.AddGroup("VICAR"); - * outLab.AddKeyword("RecordSize")",inlab.GetInteger("RECSIZ"); opack->AddGroup(outLab,"VICAR"); + * outLab.addGroup("VICAR"); + * outLab.addKeyword("RecordSize")",inlab.GetInteger("RECSIZ"); opack->addGroup(outLab,"VICAR"); * p.EndProcess(); * @endcode * diff --git a/isis/src/base/objs/ProcessMapMosaic/ProcessMapMosaic.cpp b/isis/src/base/objs/ProcessMapMosaic/ProcessMapMosaic.cpp index 5fef39b0000aadf98cd9b1894d6b59d0a227429a..6d3fbd2d97dcb35e7283b70d2aa4a71fe4c566c6 100644 --- a/isis/src/base/objs/ProcessMapMosaic/ProcessMapMosaic.cpp +++ b/isis/src/base/objs/ProcessMapMosaic/ProcessMapMosaic.cpp @@ -261,18 +261,18 @@ namespace Isis { int samples, lines, bands = 0; Pvl label; - label.Read(propagationCubes[0].toString()); - PvlGroup mGroup = label.FindGroup("Mapping", Pvl::Traverse); - mGroup.AddKeyword(PvlKeyword("MinimumLatitude", toString(slat)), Pvl::Replace); - mGroup.AddKeyword(PvlKeyword("MaximumLatitude", toString(elat)), Pvl::Replace); - mGroup.AddKeyword(PvlKeyword("MinimumLongitude", toString(slon)), Pvl::Replace); - mGroup.AddKeyword(PvlKeyword("MaximumLongitude", toString(elon)), Pvl::Replace); + label.read(propagationCubes[0].toString()); + PvlGroup mGroup = label.findGroup("Mapping", Pvl::Traverse); + mGroup.addKeyword(PvlKeyword("MinimumLatitude", toString(slat)), Pvl::Replace); + mGroup.addKeyword(PvlKeyword("MaximumLatitude", toString(elat)), Pvl::Replace); + mGroup.addKeyword(PvlKeyword("MinimumLongitude", toString(slon)), Pvl::Replace); + mGroup.addKeyword(PvlKeyword("MaximumLongitude", toString(elon)), Pvl::Replace); - if (mGroup.HasKeyword("UpperLeftCornerX")) - mGroup.DeleteKeyword("UpperLeftCornerX"); + if (mGroup.hasKeyword("UpperLeftCornerX")) + mGroup.deleteKeyword("UpperLeftCornerX"); - if (mGroup.HasKeyword("UpperLeftCornerY")) - mGroup.DeleteKeyword("UpperLeftCornerY"); + if (mGroup.hasKeyword("UpperLeftCornerY")) + mGroup.deleteKeyword("UpperLeftCornerY"); Pvl mapPvl; mapPvl += mGroup; @@ -284,8 +284,8 @@ namespace Isis { proj->XYRange(xmin, xmax, ymin, ymax); // The xmin/ymax should be rounded for the labels - xmin = mapPvl.FindGroup("Mapping")["UpperLeftCornerX"]; - ymax = mapPvl.FindGroup("Mapping")["UpperLeftCornerY"]; + xmin = mapPvl.findGroup("Mapping")["UpperLeftCornerX"]; + ymax = mapPvl.findGroup("Mapping")["UpperLeftCornerY"]; for (int i = 0; i < propagationCubes.size(); i++) { Cube cube; @@ -326,14 +326,14 @@ namespace Isis { double slat, double elat, double slon, double elon, int nbands, CubeAttributeOutput &oAtt, const QString &mosaicFile) { Pvl fileLab(inputFile); - PvlGroup &mapping = fileLab.FindGroup("Mapping", Pvl::Traverse); + PvlGroup &mapping = fileLab.findGroup("Mapping", Pvl::Traverse); mapping["UpperLeftCornerX"] = toString(xmin); mapping["UpperLeftCornerY"] = toString(ymax); - mapping.AddKeyword(PvlKeyword("MinimumLatitude", toString(slat)), Pvl::Replace); - mapping.AddKeyword(PvlKeyword("MaximumLatitude", toString(elat)), Pvl::Replace); - mapping.AddKeyword(PvlKeyword("MinimumLongitude", toString(slon)), Pvl::Replace); - mapping.AddKeyword(PvlKeyword("MaximumLongitude", toString(elon)), Pvl::Replace); + mapping.addKeyword(PvlKeyword("MinimumLatitude", toString(slat)), Pvl::Replace); + mapping.addKeyword(PvlKeyword("MaximumLatitude", toString(elat)), Pvl::Replace); + mapping.addKeyword(PvlKeyword("MinimumLongitude", toString(slon)), Pvl::Replace); + mapping.addKeyword(PvlKeyword("MaximumLongitude", toString(elon)), Pvl::Replace); Projection *firstProj = ProjectionFactory::CreateFromCube(fileLab); int samps = (int)(ceil(firstProj->ToWorldX(xmax) - firstProj->ToWorldX(xmin)) + 0.5); @@ -342,7 +342,7 @@ namespace Isis { if (p_createMosaic) { Pvl newMap; - newMap.AddGroup(mapping); + newMap.addGroup(mapping); // Initialize the mosaic CubeAttributeInput inAtt; @@ -370,7 +370,7 @@ namespace Isis { p.StartProcess(ProcessMapMosaic::FillNull); // CreateForCube created some keywords in the mapping group that needs to be added - ocube->putGroup(newMap.FindGroup("Mapping", Pvl::Traverse)); + ocube->putGroup(newMap.findGroup("Mapping", Pvl::Traverse)); p.EndProcess(); } @@ -395,15 +395,15 @@ namespace Isis { throw IException(IException::Programmer, msg, _FILEINFO_); } - if (mapping.HasKeyword("UpperLeftCornerX")) - mapping.DeleteKeyword("UpperLeftCornerX"); + if (mapping.hasKeyword("UpperLeftCornerX")) + mapping.deleteKeyword("UpperLeftCornerX"); - if (mapping.HasKeyword("UpperLeftCornerY")) - mapping.DeleteKeyword("UpperLeftCornerY"); + if (mapping.hasKeyword("UpperLeftCornerY")) + mapping.deleteKeyword("UpperLeftCornerY"); if (p_createMosaic) { Pvl newMap; - newMap.AddGroup(mapping); + newMap.addGroup(mapping); int samps, lines, bands; delete ProjectionFactory::CreateForCube(newMap, samps, lines, false); @@ -431,7 +431,7 @@ namespace Isis { p.StartProcess(ProcessMapMosaic::FillNull); // CreateForCube created some keywords in the mapping group that needs to be added - ocube->putGroup(newMap.FindGroup("Mapping", Pvl::Traverse)); + ocube->putGroup(newMap.findGroup("Mapping", Pvl::Traverse)); p.EndProcess(); } @@ -453,7 +453,7 @@ namespace Isis { Cube mosaic; mosaic.open(mosaicFile); - PvlGroup &mapping = mosaic.label()->FindGroup("Mapping", Pvl::Traverse); + PvlGroup &mapping = mosaic.label()->findGroup("Mapping", Pvl::Traverse); CubeAttributeOutput oAtt; // The other SetOutput will not use the attribute or filename Cube *ocube = SetOutputCube("", mapping, oAtt, mosaicFile); diff --git a/isis/src/base/objs/ProcessMapMosaic/unitTest.cpp b/isis/src/base/objs/ProcessMapMosaic/unitTest.cpp index 387c4f4543c7ec01b78d31231fb9ac092c7a7d45..1c90a6df3425fc4b9bf5f24fe77033c05883b388 100644 --- a/isis/src/base/objs/ProcessMapMosaic/unitTest.cpp +++ b/isis/src/base/objs/ProcessMapMosaic/unitTest.cpp @@ -69,8 +69,8 @@ void IsisMain() { m2.EndProcess(); cout << "Mosaic label: " << endl; - labels.Clear(); - labels.Read("./unitTest.cub"); + labels.clear(); + labels.read("./unitTest.cub"); cout << labels << endl; Cube tmp; diff --git a/isis/src/base/objs/ProcessMosaic/ProcessMosaic.cpp b/isis/src/base/objs/ProcessMosaic/ProcessMosaic.cpp index 0ecf56721fb2165da8bca19af9f2cc8148ace3d8..b69515fb424eb5ccde0a35fab30e7cdf4fb4bcd4 100644 --- a/isis/src/base/objs/ProcessMosaic/ProcessMosaic.cpp +++ b/isis/src/base/objs/ProcessMosaic/ProcessMosaic.cpp @@ -217,10 +217,10 @@ namespace Isis { if (m_enforceBandBinMatch) { Pvl *outLab = OutputCubes[0]->label(); - if (inLab->FindObject("IsisCube").HasGroup("BandBin")) { + if (inLab->findObject("IsisCube").hasGroup("BandBin")) { // Check to make sure the output cube has a bandbin group & make sure it // matches the input cube bandbin group - if (!m_createOutputMosaic && outLab->FindObject("IsisCube").HasGroup("BandBin")) { + if (!m_createOutputMosaic && outLab->findObject("IsisCube").hasGroup("BandBin")) { MatchBandBinGroup(isb, inb); } // Otherwise copy the input cube bandbin to the output file @@ -237,7 +237,7 @@ namespace Isis { // Match BandBin set to false and CREATE and TRACKING is true else { if (m_createOutputMosaic) { - if (inLab->FindObject("IsisCube").HasGroup("BandBin")) { + if (inLab->findObject("IsisCube").hasGroup("BandBin")) { AddBandBinGroup(isb); } else { @@ -462,8 +462,8 @@ namespace Isis { //get the output label Pvl *cInPvl = InputCubes[0]->label(); - if (cInPvl->FindGroup("Dimensions", Pvl::Traverse).HasKeyword("Bands")) { - PvlKeyword &cBandKey = cInPvl->FindGroup("Dimensions", Pvl::Traverse).FindKeyword("Bands"); + if (cInPvl->findGroup("Dimensions", Pvl::Traverse).hasKeyword("Bands")) { + PvlKeyword &cBandKey = cInPvl->findGroup("Dimensions", Pvl::Traverse).findKeyword("Bands"); QString sStr(cBandKey[0]); if (toInt(sStr) < nb) { QString m = "The parameter number of input bands exceeds the actual number of bands in the " @@ -533,8 +533,8 @@ namespace Isis { //check if the number of bands specified is not greater than the actual number of bands in the input Pvl *cInPvl = InputCubes[0]->label(); - if (cInPvl->FindGroup("Dimensions", Pvl::Traverse).HasKeyword("Bands")) { - PvlKeyword &cBandKey = cInPvl->FindGroup("Dimensions", Pvl::Traverse).FindKeyword("Bands"); + if (cInPvl->findGroup("Dimensions", Pvl::Traverse).hasKeyword("Bands")) { + PvlKeyword &cBandKey = cInPvl->findGroup("Dimensions", Pvl::Traverse).findKeyword("Bands"); QString sStr(cBandKey[0]); if (toInt(sStr) < nb) { QString m = "The parameter number of input bands exceeds the actual number of bands in the input cube"; @@ -581,8 +581,8 @@ namespace Isis { if (m_createOutputMosaic) { Pvl *outLab = cube->label(); - if (outLab->FindObject("IsisCube").HasGroup("BandBin")) { - outLab->FindObject("IsisCube").DeleteGroup("BandBin"); + if (outLab->findObject("IsisCube").hasGroup("BandBin")) { + outLab->findObject("IsisCube").deleteGroup("BandBin"); } } @@ -649,17 +649,17 @@ namespace Isis { cSNField = sSerialNumber; cFileRecord += cSNField; - int iNumObjs = cPvlOut->Objects(); + int iNumObjs = cPvlOut->objects(); PvlObject cPvlObj; // Check if the Table exists - if (cPvlOut->HasObject("Table")) { + if (cPvlOut->hasObject("Table")) { for (int i = 0; i < iNumObjs; i++) { - cPvlObj = cPvlOut->Object(i); - if (cPvlObj.HasKeyword("Name", Pvl::Traverse)) { - PvlKeyword cNameKey = cPvlObj.FindKeyword("Name", Pvl::Traverse); + cPvlObj = cPvlOut->object(i); + if (cPvlObj.hasKeyword("Name", Pvl::Traverse)) { + PvlKeyword cNameKey = cPvlObj.findKeyword("Name", Pvl::Traverse); if (cNameKey[0] == sTableName) { - PvlKeyword cFieldKey = cPvlObj.FindGroup("Field").FindKeyword("Size"); + PvlKeyword cFieldKey = cPvlObj.findGroup("Field").findKeyword("Size"); //set the tracker flag to true as the tracking table exists m_trackingEnabled = true; @@ -973,14 +973,14 @@ namespace Isis { Pvl* inLabel = InputCubes[0]->label(); Pvl* outLabel = OutputCubes[0]->label(); - if (outLabel->FindObject("IsisCube").HasGroup("Mosaic")) { - PvlGroup outMosaicGrp = outLabel->FindObject("IsisCube").FindGroup("Mosaic"); - if (outMosaicGrp.HasKeyword("ShapeModel")) { - if (inLabel->FindObject("IsisCube").HasGroup("Kernels")) { - PvlGroup inMosaicGrp = inLabel->FindObject("IsisCube").FindGroup("Kernels"); - if (outMosaicGrp.HasKeyword("ShapeModel") && inMosaicGrp.HasKeyword("ShapeModel")) { - PvlKeyword outShapeModelKey = outMosaicGrp.FindKeyword("ShapeModel"); - QString sShapeModel = inMosaicGrp.FindKeyword("ShapeModel")[0]; + if (outLabel->findObject("IsisCube").hasGroup("Mosaic")) { + PvlGroup outMosaicGrp = outLabel->findObject("IsisCube").findGroup("Mosaic"); + if (outMosaicGrp.hasKeyword("ShapeModel")) { + if (inLabel->findObject("IsisCube").hasGroup("Kernels")) { + PvlGroup inMosaicGrp = inLabel->findObject("IsisCube").findGroup("Kernels"); + if (outMosaicGrp.hasKeyword("ShapeModel") && inMosaicGrp.hasKeyword("ShapeModel")) { + PvlKeyword outShapeModelKey = outMosaicGrp.findKeyword("ShapeModel"); + QString sShapeModel = inMosaicGrp.findKeyword("ShapeModel")[0]; int found = sShapeModel.lastIndexOf("/"); if (found != -1) { sShapeModel.remove(0, found + 1); @@ -996,14 +996,14 @@ namespace Isis { } else { if (m_createOutputMosaic) { - if (inLabel->FindObject("IsisCube").HasGroup("Kernels")) { + if (inLabel->findObject("IsisCube").hasGroup("Kernels")) { QString sShapeModel = - inLabel->FindObject("IsisCube").FindGroup("Kernels").FindKeyword("ShapeModel")[0]; + inLabel->findObject("IsisCube").findGroup("Kernels").findKeyword("ShapeModel")[0]; int found = sShapeModel.lastIndexOf("/"); if (found != -1){ sShapeModel.remove(0, found+1); } - PvlObject & outIsisCubeObj = outLabel->FindObject("IsisCube"); + PvlObject & outIsisCubeObj = outLabel->findObject("IsisCube"); PvlGroup mosaicGrp("Mosaic"); PvlKeyword shapeModelKey("ShapeModel"); shapeModelKey += sShapeModel; @@ -1101,9 +1101,9 @@ namespace Isis { Pvl *inLab = InputCubes[0]->label(); Pvl *outLab = OutputCubes[0]->label(); - PvlGroup &inBin = inLab->FindGroup("BandBin", Pvl::Traverse); - PvlGroup &outBin = outLab->FindGroup("BandBin", Pvl::Traverse); - if (inBin.Keywords() != outBin.Keywords()) { + PvlGroup &inBin = inLab->findGroup("BandBin", Pvl::Traverse); + PvlGroup &outBin = outLab->findGroup("BandBin", Pvl::Traverse); + if (inBin.keywords() != outBin.keywords()) { QString msg = "Pvl Group [BandBin] does not match between the input and output cubes"; throw IException(IException::User, msg, _FILEINFO_); } @@ -1113,12 +1113,12 @@ namespace Isis { int osb = (m_osb - 1); int iOutBandsHalf = OutputCubes[0]->bandCount()/2; - for (int i = 0; i < outBin.Keywords(); i++) { + for (int i = 0; i < outBin.keywords(); i++) { PvlKeyword &outKey = outBin[i]; - QString sOutName = outKey.Name(); - if (inBin.HasKeyword(sOutName)) { + QString sOutName = outKey.name(); + if (inBin.hasKeyword(sOutName)) { PvlKeyword &inKey = inBin[sOutName]; - for (int j = osb, k = isb; j < outKey.Size() && k < inKey.Size(); j++, k++) { + for (int j = osb, k = isb; j < outKey.size() && k < inKey.size(); j++, k++) { if (outKey[j] == "NA") { outKey[j] = inKey[k]; if (m_imageOverlay == AverageImageWithMosaic) { @@ -1132,15 +1132,15 @@ namespace Isis { } } else if (outKey[j] != inKey[k]) { - QString msg = "Pvl Group [BandBin] in Key[" + outKey.Name() + "] In value" + inKey[k] + + QString msg = "Pvl Group [BandBin] in Key[" + outKey.name() + "] In value" + inKey[k] + "and Out value=" + outKey[j] + " do not match"; throw IException(IException::User, msg, _FILEINFO_); } } } else { - QString msg = "Pvl Group [BandBin] In Keyword[" + inBin[i].Name() + "] and Out Keyword[" + - outBin[i].Name() + "] does not match"; + QString msg = "Pvl Group [BandBin] In Keyword[" + inBin[i].name() + "] and Out Keyword[" + + outBin[i].name() + "] does not match"; throw IException(IException::User, msg, _FILEINFO_); } } @@ -1178,15 +1178,15 @@ namespace Isis { int isb = origIsb - 1; // array zero based int osb = m_osb - 1; - PvlGroup &cInBin = inLab->FindGroup("BandBin", Pvl::Traverse); + PvlGroup &cInBin = inLab->findGroup("BandBin", Pvl::Traverse); PvlGroup cOutBin("BandBin"); int iInBands = InputCubes[0]->bandCount(); - for (int i = 0; i < cInBin.Keywords(); i++) { + for (int i = 0; i < cInBin.keywords(); i++) { PvlKeyword &cInKey = cInBin[i]; - int iInKeySize = cInKey.Size(); - PvlKeyword cOutKey(cInKey.Name()); + int iInKeySize = cInKey.size(); + PvlKeyword cOutKey(cInKey.name()); for (int b = 0; b < osb; b++) { cOutKey += "NA"; @@ -1211,7 +1211,7 @@ namespace Isis { int iTotalOutBands = OutputCubes[0]->bandCount(); isb = origIsb - 1; // reset the input starting band int iOutStartBand = iOutBands + osb; - QString sKeyName = cInKey.Name(); + QString sKeyName = cInKey.name(); bool bFilterKey = false; if (sKeyName.contains("Filter") || sKeyName.contains("Original") || @@ -1236,14 +1236,14 @@ namespace Isis { // Check for units and make sure output keyword units value is set to input // keyword units value - if (cOutKey.Unit() != cInKey.Unit()) { - cOutKey.SetUnits((QString)(cInKey.Unit())); + if (cOutKey.unit() != cInKey.unit()) { + cOutKey.setUnits((QString)(cInKey.unit())); } cOutBin += cOutKey; isb = origIsb - 1; // reinitialize the input starting band } - outLab->FindObject("IsisCube").AddGroup(cOutBin); + outLab->findObject("IsisCube").addGroup(cOutBin); } @@ -1289,7 +1289,7 @@ namespace Isis { cOutBin += cOutKey; - outLab->FindObject("IsisCube").AddGroup(cOutBin); + outLab->findObject("IsisCube").addGroup(cOutBin); } @@ -1307,10 +1307,10 @@ namespace Isis { //if non-zero integer, must be original band #, 1 based if (m_bandPriorityBandNumber) { PvlKeyword cKeyOrigBand; - if (cPvlLabel.FindGroup("BandBin", Pvl::Traverse).HasKeyword("OriginalBand")) { - cKeyOrigBand = cPvlLabel.FindGroup("BandBin", Pvl::Traverse).FindKeyword("OriginalBand"); + if (cPvlLabel.findGroup("BandBin", Pvl::Traverse).hasKeyword("OriginalBand")) { + cKeyOrigBand = cPvlLabel.findGroup("BandBin", Pvl::Traverse).findKeyword("OriginalBand"); } - int iSize = cKeyOrigBand.Size(); + int iSize = cKeyOrigBand.size(); QString buff = toString(m_bandPriorityBandNumber); for (int i = 0; i < iSize; i++) { if (buff == cKeyOrigBand[i]) { @@ -1323,10 +1323,10 @@ namespace Isis { //key name else { PvlKeyword cKeyName; - if (cPvlLabel.FindGroup("BandBin", Pvl::Traverse).HasKeyword(m_bandPriorityKeyName)) { - cKeyName = cPvlLabel.FindGroup("BandBin", Pvl::Traverse).FindKeyword(m_bandPriorityKeyName); + if (cPvlLabel.findGroup("BandBin", Pvl::Traverse).hasKeyword(m_bandPriorityKeyName)) { + cKeyName = cPvlLabel.findGroup("BandBin", Pvl::Traverse).findKeyword(m_bandPriorityKeyName); } - int iSize = cKeyName.Size(); + int iSize = cKeyName.size(); for (int i = 0; i < iSize; i++) { if (m_bandPriorityKeyValue.toUpper() == cKeyName[i].toUpper()) { iBandIndex = i + 1; //1 based get key value index @@ -1593,15 +1593,15 @@ namespace Isis { Pvl *cPvlOut = OutputCubes[0]->label(); bool bTableExists = false; - int iNumObjs = cPvlOut->Objects(); + int iNumObjs = cPvlOut->objects(); PvlObject cPvlObj; //Check if table already exists - if (cPvlOut->HasObject("Table")) { + if (cPvlOut->hasObject("Table")) { for (int i = 0; i < iNumObjs; i++) { - cPvlObj = cPvlOut->Object(i); - if (cPvlObj.HasKeyword("Name", Pvl::Traverse)) { - PvlKeyword cNameKey = cPvlObj.FindKeyword("Name", Pvl::Traverse); + cPvlObj = cPvlOut->object(i); + if (cPvlObj.hasKeyword("Name", Pvl::Traverse)) { + PvlKeyword cNameKey = cPvlObj.findKeyword("Name", Pvl::Traverse); if (cNameKey[0] == TRACKING_TABLE_NAME) { bTableExists = true; } diff --git a/isis/src/base/objs/ProcessMosaic/unitTest.cpp b/isis/src/base/objs/ProcessMosaic/unitTest.cpp index b3f8008cd0abfd9f619e39f6054ee4f209d13374..9a98d5af4a7185b3fdb437b0a6161a0e69af997d 100644 --- a/isis/src/base/objs/ProcessMosaic/unitTest.cpp +++ b/isis/src/base/objs/ProcessMosaic/unitTest.cpp @@ -318,11 +318,11 @@ void IsisMain() { TestOut(1, 1, 1, ProcessMosaic::UseBandPlacementCriteria, 0); cout << "********* Test imagePositions() ********" << endl; - for (int i = 0; i <= m11.imagePositions().Groups() - 1; i++) { - cout << "Name: " << m11.imagePositions().Group(i).Name() << endl; - cout << "File: " << m11.imagePositions().Group(i).FindKeyword("File")[0] << endl; - cout << "StartSample: " << m11.imagePositions().Group(i).FindKeyword("StartSample")[0] << endl; - cout << "StartLine: " << m11.imagePositions().Group(i).FindKeyword("StartLine")[0] << endl; + for (int i = 0; i <= m11.imagePositions().groups() - 1; i++) { + cout << "Name: " << m11.imagePositions().group(i).name() << endl; + cout << "File: " << m11.imagePositions().group(i).findKeyword("File")[0] << endl; + cout << "StartSample: " << m11.imagePositions().group(i).findKeyword("StartSample")[0] << endl; + cout << "StartLine: " << m11.imagePositions().group(i).findKeyword("StartLine")[0] << endl; } cout << "*************************************************************************************\n"; diff --git a/isis/src/base/objs/ProgramLauncher/ProgramLauncher.cpp b/isis/src/base/objs/ProgramLauncher/ProgramLauncher.cpp index 0b65ed3d23ff67889dd3e916e893a5884b2131ba..0d8d17d00c1db37f968fa1d33a13fc1e46771fc2 100644 --- a/isis/src/base/objs/ProgramLauncher/ProgramLauncher.cpp +++ b/isis/src/base/objs/ProgramLauncher/ProgramLauncher.cpp @@ -177,10 +177,10 @@ namespace Isis { Pvl logPvl; msgStream >> logPvl; - if(logPvl.Groups() == 1 && - logPvl.Keywords() == 0 && - logPvl.Objects() == 0) { - iApp->Log(logPvl.Group(0)); + if(logPvl.groups() == 1 && + logPvl.keywords() == 0 && + logPvl.objects() == 0) { + iApp->Log(logPvl.group(0)); } } else if(code == "GUILOG" && iApp) { @@ -192,8 +192,8 @@ namespace Isis { Pvl errorPvl; msgStream >> errorPvl; - for(int i = 0; i < errorPvl.Groups(); i++) { - PvlGroup &g = errorPvl.Group(i); + for(int i = 0; i < errorPvl.groups(); i++) { + PvlGroup &g = errorPvl.group(i); QString eclass = g["Class"]; QString emsg = g["Message"]; int ecode = g["Code"]; diff --git a/isis/src/base/objs/Progress/Progress.cpp b/isis/src/base/objs/Progress/Progress.cpp index add07e15db446698957c72d5f3257cb7d810697e..2cd4f587c90831478b6f4212853700d82c12df3d 100644 --- a/isis/src/base/objs/Progress/Progress.cpp +++ b/isis/src/base/objs/Progress/Progress.cpp @@ -39,7 +39,7 @@ namespace Isis { // Get user preferences int percent; bool printPercent; - Isis::PvlGroup &group = Isis::Preference::Preferences().FindGroup("UserInterface"); + Isis::PvlGroup &group = Isis::Preference::Preferences().findGroup("UserInterface"); percent = group["ProgressBarPercent"]; QString temp = (QString) group["ProgressBar"]; printPercent = temp.toUpper() == "ON"; diff --git a/isis/src/base/objs/Progress/unitTest.cpp b/isis/src/base/objs/Progress/unitTest.cpp index 5428dcca53e60a3f6fa31ae9605510161855e00b..47d4d6e02c66b9bad65e5655f00deca7a5236a02 100644 --- a/isis/src/base/objs/Progress/unitTest.cpp +++ b/isis/src/base/objs/Progress/unitTest.cpp @@ -7,7 +7,7 @@ using namespace std; int main() { Isis::Preference &pref = Isis::Preference::Preferences(true); - Isis::PvlGroup &uip = pref.FindGroup("UserInterface"); + Isis::PvlGroup &uip = pref.findGroup("UserInterface"); uip["ProgressBarPercent"] = "5"; Isis::Progress p; diff --git a/isis/src/base/objs/Projection/Projection.cpp b/isis/src/base/objs/Projection/Projection.cpp index 094205a3aff60389168941a0b4a283bc32c34483..e24ac6581bd0050a61fb2431492d2831b17a50b4 100644 --- a/isis/src/base/objs/Projection/Projection.cpp +++ b/isis/src/base/objs/Projection/Projection.cpp @@ -104,16 +104,16 @@ namespace Isis { Projection::Projection(Pvl &label) : m_mappingGrp("Mapping") { try { // Try to read the mapping group - m_mappingGrp = label.FindGroup("Mapping", Pvl::Traverse); + m_mappingGrp = label.findGroup("Mapping", Pvl::Traverse); // Get the radii from the EquatorialRadius and PolarRadius keywords - if ((m_mappingGrp.HasKeyword("EquatorialRadius")) && - (m_mappingGrp.HasKeyword("PolarRadius"))) { + if ((m_mappingGrp.hasKeyword("EquatorialRadius")) && + (m_mappingGrp.hasKeyword("PolarRadius"))) { m_equatorialRadius = m_mappingGrp["EquatorialRadius"]; m_polarRadius = m_mappingGrp["PolarRadius"]; } // Get the radii using the "TargetName" keyword and NAIF - else if (m_mappingGrp.HasKeyword("TargetName")) { + else if (m_mappingGrp.hasKeyword("TargetName")) { PvlGroup radii = TargetRadii((QString)m_mappingGrp["TargetName"]); m_equatorialRadius = radii["EquatorialRadius"]; m_polarRadius = radii["PolarRadius"]; @@ -180,10 +180,10 @@ namespace Isis { // Get the ground range if it exists m_groundRangeGood = false; - if ((m_mappingGrp.HasKeyword("MinimumLatitude")) && - (m_mappingGrp.HasKeyword("MaximumLatitude")) && - (m_mappingGrp.HasKeyword("MinimumLongitude")) && - (m_mappingGrp.HasKeyword("MaximumLongitude"))) { + if ((m_mappingGrp.hasKeyword("MinimumLatitude")) && + (m_mappingGrp.hasKeyword("MaximumLatitude")) && + (m_mappingGrp.hasKeyword("MinimumLongitude")) && + (m_mappingGrp.hasKeyword("MaximumLongitude"))) { m_minimumLatitude = m_mappingGrp["MinimumLatitude"]; m_maximumLatitude = m_mappingGrp["MaximumLatitude"]; m_minimumLongitude = m_mappingGrp["MinimumLongitude"]; @@ -233,7 +233,7 @@ namespace Isis { // Get the map rotation m_rotation = 0.0; - if (m_mappingGrp.HasKeyword("Rotation")) { + if (m_mappingGrp.hasKeyword("Rotation")) { m_rotation = m_mappingGrp["Rotation"]; } @@ -242,7 +242,7 @@ namespace Isis { m_good = false; m_pixelResolution = 1.0; - if (m_mappingGrp.HasKeyword("PixelResolution")) { + if (m_mappingGrp.hasKeyword("PixelResolution")) { m_pixelResolution = m_mappingGrp["PixelResolution"]; } @@ -268,7 +268,7 @@ namespace Isis { m_mapper = NULL; m_sky = false; - if (m_mappingGrp.HasKeyword("TargetName")) { + if (m_mappingGrp.hasKeyword("TargetName")) { QString str = m_mappingGrp["TargetName"]; if (str.toUpper() == "SKY") m_sky = true; } @@ -499,29 +499,29 @@ namespace Isis { //Check to see if the mapGroup already has the target radii. //If BOTH radii are already in the mapGroup then just return back the map //Group. - if (mapGroup.HasKeyword("EquatorialRadius") - && mapGroup.HasKeyword("PolarRadius")) { + if (mapGroup.hasKeyword("EquatorialRadius") + && mapGroup.hasKeyword("PolarRadius")) { return mapGroup; } //If the mapping group only has one or the other of the radii keywords, then //we are going to replace both, so delete which ever one it does have. - if (mapGroup.HasKeyword("EquatorialRadius") - && !mapGroup.HasKeyword("PolarRadius")) { - mapGroup.DeleteKeyword("EquatorialRadius"); + if (mapGroup.hasKeyword("EquatorialRadius") + && !mapGroup.hasKeyword("PolarRadius")) { + mapGroup.deleteKeyword("EquatorialRadius"); } - if (!mapGroup.HasKeyword("EquatorialRadius") - && mapGroup.HasKeyword("PolarRadius")) { - mapGroup.DeleteKeyword("PolarRadius"); + if (!mapGroup.hasKeyword("EquatorialRadius") + && mapGroup.hasKeyword("PolarRadius")) { + mapGroup.deleteKeyword("PolarRadius"); } - PvlGroup inst = cubeLab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup inst = cubeLab.findGroup("Instrument", Pvl::Traverse); QString target = inst["TargetName"]; PvlGroup radii = Projection::TargetRadii(target); //Now INSERT the EquatorialRadius and PolorRadius into the mapGroup pvl. mapGroup += PvlKeyword("EquatorialRadius", - radii.FindKeyword("EquatorialRadius")[0], "meters"); + radii.findKeyword("EquatorialRadius")[0], "meters"); mapGroup += PvlKeyword("PolarRadius", - radii.FindKeyword("PolarRadius")[0], "meters"); + radii.findKeyword("PolarRadius")[0], "meters"); return mapGroup; } @@ -2157,8 +2157,8 @@ namespace Isis { const Displacement &y) { PvlKeyword xKeyword("UpperLeftCornerX", toString(x.meters()), "meters"); PvlKeyword yKeyword("UpperLeftCornerY", toString(y.meters()), "meters"); - m_mappingGrp.AddKeyword(xKeyword,Pvl::Replace); - m_mappingGrp.AddKeyword(yKeyword,Pvl::Replace); + m_mappingGrp.addKeyword(xKeyword,Pvl::Replace); + m_mappingGrp.addKeyword(yKeyword,Pvl::Replace); } /** @@ -2177,7 +2177,7 @@ namespace Isis { << "Rotation"; foreach (QString keyName, keyNames) { - if (m_mappingGrp.HasKeyword(keyName)) { + if (m_mappingGrp.hasKeyword(keyName)) { mapping += m_mappingGrp[keyName]; } } diff --git a/isis/src/base/objs/Projection/unitTest.cpp b/isis/src/base/objs/Projection/unitTest.cpp index 9eb649b6c8e8bd909a0aa251b291f826e94e1e1a..1b9a56f0c1e6ac7ebb1b5a0dbfbe53aeeafc1390 100644 --- a/isis/src/base/objs/Projection/unitTest.cpp +++ b/isis/src/base/objs/Projection/unitTest.cpp @@ -152,8 +152,8 @@ int main(int argc, char *argv[]) { cout << endl; cout << "Test for missing Equatorial Radius in the mapping group" << endl; - lab.AddGroup(PvlGroup("Mapping")); - PvlGroup &mg = lab.FindGroup("Mapping"); + lab.addGroup(PvlGroup("Mapping")); + PvlGroup &mg = lab.findGroup("Mapping"); Doit(lab); cout << endl; @@ -280,13 +280,13 @@ int main(int argc, char *argv[]) { cout << endl; cout << "Testing invalid maximum latitude" << endl; - mg["MinimumLatitude"].SetValue(toString(45.0), "units"); - mg["MaximumLatitude"].SetValue(toString(95.0), "units"); + mg["MinimumLatitude"].setValue(toString(45.0), "units"); + mg["MaximumLatitude"].setValue(toString(95.0), "units"); Doit(lab); cout << endl; cout << "Testing unordered longitude range" << endl; - mg["MaximumLatitude"].SetValue(toString(80.0), "units"); + mg["MaximumLatitude"].setValue(toString(80.0), "units"); Doit(lab); cout << "///////////////////////////////////////////////////////////" << endl; cout << endl; @@ -350,8 +350,8 @@ int main(int argc, char *argv[]) { * were added to accommodate for double imprecission. */ Isis::Pvl latRangeTest; - latRangeTest.AddGroup(Isis::PvlGroup("Mapping")); - Isis::PvlGroup &latTestGroup = latRangeTest.FindGroup("Mapping"); + latRangeTest.addGroup(Isis::PvlGroup("Mapping")); + Isis::PvlGroup &latTestGroup = latRangeTest.findGroup("Mapping"); latTestGroup += Isis::PvlKeyword("TargetName", "Moon"); latTestGroup += Isis::PvlKeyword("ProjectionName", "PolarStereographic"); latTestGroup += Isis::PvlKeyword("EquatorialRadius", toString(1737400.0)); @@ -701,9 +701,9 @@ int main(int argc, char *argv[]) { cout << "Rotation Tests" << endl; mg += PvlKeyword("Rotation", toString(90.0)); mg["LongitudeDirection"] = "PositiveEast"; - mg.DeleteKeyword("EquatorialRadius"); - mg.DeleteKeyword("PolarRadius"); - mg.DeleteKeyword("PolarRadius"); + mg.deleteKeyword("EquatorialRadius"); + mg.deleteKeyword("PolarRadius"); + mg.deleteKeyword("PolarRadius"); mg["TargetName"] = "Moon"; MyProjection p4(lab); cout << "Rotation: " << p4.Rotation() << endl; @@ -736,19 +736,19 @@ int main(int argc, char *argv[]) { cout << endl; Pvl mapping; - mapping.AddGroup(p4.Mapping()); + mapping.addGroup(p4.Mapping()); cout << "Testing Mapping() methods" << endl; cout << "Mapping() = " << endl; cout << mapping << endl; - mapping.DeleteGroup("Mapping"); - mapping.AddGroup(p4.MappingLatitudes()); + mapping.deleteGroup("Mapping"); + mapping.addGroup(p4.MappingLatitudes()); cout << "MappingLatitudes() = " << endl; cout << mapping << endl; - mapping.DeleteGroup("Mapping"); - mapping.AddGroup(p4.MappingLongitudes()); + mapping.deleteGroup("Mapping"); + mapping.addGroup(p4.MappingLongitudes()); cout << "MappingLongitudes() = " << endl; cout << mapping << endl; - mapping.DeleteGroup("Mapping"); + mapping.deleteGroup("Mapping"); cout << endl; //SetUpperLeftCorner(Displacement x, Displacement y) diff --git a/isis/src/base/objs/ProjectionFactory/ProjectionFactory.cpp b/isis/src/base/objs/ProjectionFactory/ProjectionFactory.cpp index d587d72ad01b656582fafc2d3e5de2cc616e6f17..c870623be35bb74dca8899c986e912a79e5a64e1 100644 --- a/isis/src/base/objs/ProjectionFactory/ProjectionFactory.cpp +++ b/isis/src/base/objs/ProjectionFactory/ProjectionFactory.cpp @@ -65,19 +65,19 @@ namespace Isis { // load the system file Plugin p; - if(m_projPlugin.FileName() == "") { + if(m_projPlugin.fileName() == "") { FileName localFile("Projection.plugin"); if(localFile.fileExists()) - m_projPlugin.Read(localFile.expanded()); + m_projPlugin.read(localFile.expanded()); FileName systemFile("$ISISROOT/lib/Projection.plugin"); if(systemFile.fileExists()) - m_projPlugin.Read(systemFile.expanded()); + m_projPlugin.read(systemFile.expanded()); } try { // Look for info in the mapping group - Isis::PvlGroup &mapGroup = label.FindGroup("Mapping", Isis::Pvl::Traverse); + Isis::PvlGroup &mapGroup = label.findGroup("Mapping", Isis::Pvl::Traverse); QString proj = mapGroup["ProjectionName"]; // Now get the plugin for the projection @@ -140,7 +140,7 @@ namespace Isis { try { // Try to get the pixel resolution and then compute the scale double scale, pixelResolution; - Isis::PvlGroup &mapGroup = label.FindGroup("Mapping", Isis::Pvl::Traverse); + Isis::PvlGroup &mapGroup = label.findGroup("Mapping", Isis::Pvl::Traverse); try { pixelResolution = mapGroup["PixelResolution"]; scale = (2.0 * Isis::PI * localRadius) / (360.0 * pixelResolution); @@ -154,10 +154,10 @@ namespace Isis { pixelResolution = (2.0 * Isis::PI * localRadius) / (360.0 * scale); } // Write out the scale and resolution with units and truescale latitude - mapGroup.AddKeyword(Isis::PvlKeyword("PixelResolution", toString(pixelResolution), "meters/pixel"), + mapGroup.addKeyword(Isis::PvlKeyword("PixelResolution", toString(pixelResolution), "meters/pixel"), Isis::Pvl::Replace); - mapGroup.AddKeyword(Isis::PvlKeyword("Scale", toString(scale), "pixels/degree"), Isis::Pvl::Replace); - //mapGroup.AddKeyword(Isis::PvlKeyword ("TrueScaleLatitude", trueScaleLat), + mapGroup.addKeyword(Isis::PvlKeyword("Scale", toString(scale), "pixels/degree"), Isis::Pvl::Replace); + //mapGroup.addKeyword(Isis::PvlKeyword ("TrueScaleLatitude", trueScaleLat), // Isis::Pvl::Replace); // Get the upper left corner from the labels if possible @@ -165,8 +165,8 @@ namespace Isis { // output cubes bool sizeFound = false; double upperLeftX = Null, upperLeftY = Null; - if(label.HasObject("IsisCube")) { - Isis::PvlGroup &dims = label.FindGroup("Dimensions", Isis::Pvl::Traverse); + if(label.hasObject("IsisCube")) { + Isis::PvlGroup &dims = label.findGroup("Dimensions", Isis::Pvl::Traverse); samples = dims["Samples"]; lines = dims["Lines"]; @@ -221,47 +221,47 @@ namespace Isis { // Set the upper left corner and add to the labels upperLeftX = minX; - mapGroup.AddKeyword(Isis::PvlKeyword("UpperLeftCornerX", toString(upperLeftX)), + mapGroup.addKeyword(Isis::PvlKeyword("UpperLeftCornerX", toString(upperLeftX)), Isis::Pvl::Replace); upperLeftY = maxY; - mapGroup.AddKeyword(Isis::PvlKeyword("UpperLeftCornerY", toString(upperLeftY)), + mapGroup.addKeyword(Isis::PvlKeyword("UpperLeftCornerY", toString(upperLeftY)), Isis::Pvl::Replace); // Write it in pixel units as well #if 0 lineOffset += 0.5; // This matches the PDS definition sampleOffset += 0.5; // of the offsets (center of pixel). This statement is questionable! - mapGroup.AddKeyword(Isis::PvlKeyword("LineProjectionOffset", lineOffset), + mapGroup.addKeyword(Isis::PvlKeyword("LineProjectionOffset", lineOffset), Isis::Pvl::Replace); - mapGroup.AddKeyword(Isis::PvlKeyword("SampleProjectionOffset", sampleOffset), + mapGroup.addKeyword(Isis::PvlKeyword("SampleProjectionOffset", sampleOffset), Isis::Pvl::Replace); #endif } // Make sure labels have good units - mapGroup.AddKeyword(Isis::PvlKeyword("PixelResolution", + mapGroup.addKeyword(Isis::PvlKeyword("PixelResolution", (QString) mapGroup["PixelResolution"], "meters/pixel"), Isis::Pvl::Replace); - mapGroup.AddKeyword(Isis::PvlKeyword("Scale", + mapGroup.addKeyword(Isis::PvlKeyword("Scale", (QString) mapGroup["Scale"], "pixels/degree"), Isis::Pvl::Replace); - mapGroup.AddKeyword(Isis::PvlKeyword("UpperLeftCornerX", + mapGroup.addKeyword(Isis::PvlKeyword("UpperLeftCornerX", (QString) mapGroup["UpperLeftCornerX"], "meters"), Isis::Pvl::Replace); - mapGroup.AddKeyword(Isis::PvlKeyword("UpperLeftCornerY", + mapGroup.addKeyword(Isis::PvlKeyword("UpperLeftCornerY", (QString) mapGroup["UpperLeftCornerY"], "meters"), Isis::Pvl::Replace); - mapGroup.AddKeyword(Isis::PvlKeyword("EquatorialRadius", + mapGroup.addKeyword(Isis::PvlKeyword("EquatorialRadius", (QString) mapGroup["EquatorialRadius"], "meters"), Isis::Pvl::Replace); - mapGroup.AddKeyword(Isis::PvlKeyword("PolarRadius", + mapGroup.addKeyword(Isis::PvlKeyword("PolarRadius", (QString) mapGroup["PolarRadius"], "meters"), Isis::Pvl::Replace); @@ -274,7 +274,7 @@ namespace Isis { } catch(IException &e) { QString msg = "Unable to create projection"; - if(label.FileName() != "") msg += " from file [" + label.FileName() + "]"; + if(label.fileName() != "") msg += " from file [" + label.fileName() + "]"; IException finalError(IException::Unknown, msg, _FILEINFO_); finalError.append(errors); finalError.append(e); @@ -320,7 +320,7 @@ namespace Isis { try { // Try to get the pixel resolution and then compute the scale double scale, pixelResolution; - Isis::PvlGroup &mapGroup = label.FindGroup("Mapping", Isis::Pvl::Traverse); + Isis::PvlGroup &mapGroup = label.findGroup("Mapping", Isis::Pvl::Traverse); try { pixelResolution = mapGroup["PixelResolution"]; scale = (2.0 * Isis::PI * localRadius) / (360.0 * pixelResolution); @@ -332,10 +332,10 @@ namespace Isis { pixelResolution = (2.0 * Isis::PI * localRadius) / (360.0 * scale); } // Write out the scale and resolution with units and truescale latitude - mapGroup.AddKeyword(Isis::PvlKeyword("PixelResolution", toString(pixelResolution), "meters/pixel"), + mapGroup.addKeyword(Isis::PvlKeyword("PixelResolution", toString(pixelResolution), "meters/pixel"), Isis::Pvl::Replace); - mapGroup.AddKeyword(Isis::PvlKeyword("Scale", toString(scale), "pixels/degree"), Isis::Pvl::Replace); - //mapGroup.AddKeyword(Isis::PvlKeyword ("TrueScaleLatitude", trueScaleLat), + mapGroup.addKeyword(Isis::PvlKeyword("Scale", toString(scale), "pixels/degree"), Isis::Pvl::Replace); + //mapGroup.addKeyword(Isis::PvlKeyword ("TrueScaleLatitude", trueScaleLat), // Isis::Pvl::Replace); // Initialize the rest of the projection @@ -478,35 +478,35 @@ namespace Isis { // Set the upper left corner and add to the labels double upperLeftX = minX; - mapGroup.AddKeyword(Isis::PvlKeyword("UpperLeftCornerX", toString(upperLeftX)), + mapGroup.addKeyword(Isis::PvlKeyword("UpperLeftCornerX", toString(upperLeftX)), Isis::Pvl::Replace); double upperLeftY = maxY; - mapGroup.AddKeyword(Isis::PvlKeyword("UpperLeftCornerY", toString(upperLeftY)), + mapGroup.addKeyword(Isis::PvlKeyword("UpperLeftCornerY", toString(upperLeftY)), Isis::Pvl::Replace); // Make sure labels have good units - mapGroup.AddKeyword(Isis::PvlKeyword("PixelResolution", + mapGroup.addKeyword(Isis::PvlKeyword("PixelResolution", (QString) mapGroup["PixelResolution"], "meters/pixel"), Isis::Pvl::Replace); - mapGroup.AddKeyword(Isis::PvlKeyword("Scale", + mapGroup.addKeyword(Isis::PvlKeyword("Scale", (QString) mapGroup["Scale"], "pixels/degree"), Isis::Pvl::Replace); - mapGroup.AddKeyword(Isis::PvlKeyword("UpperLeftCornerX", + mapGroup.addKeyword(Isis::PvlKeyword("UpperLeftCornerX", (QString) mapGroup["UpperLeftCornerX"], "meters"), Isis::Pvl::Replace); - mapGroup.AddKeyword(Isis::PvlKeyword("UpperLeftCornerY", + mapGroup.addKeyword(Isis::PvlKeyword("UpperLeftCornerY", (QString) mapGroup["UpperLeftCornerY"], "meters"), Isis::Pvl::Replace); - mapGroup.AddKeyword(Isis::PvlKeyword("EquatorialRadius", + mapGroup.addKeyword(Isis::PvlKeyword("EquatorialRadius", (QString) mapGroup["EquatorialRadius"], "meters"), Isis::Pvl::Replace); - mapGroup.AddKeyword(Isis::PvlKeyword("PolarRadius", + mapGroup.addKeyword(Isis::PvlKeyword("PolarRadius", (QString) mapGroup["PolarRadius"], "meters"), Isis::Pvl::Replace); @@ -519,7 +519,7 @@ namespace Isis { } catch(IException &e) { QString msg = "Unable to create projection"; - if(label.FileName() != "") msg += " from file [" + label.FileName() + "]"; + if(label.fileName() != "") msg += " from file [" + label.fileName() + "]"; throw IException(e, IException::Unknown, msg, _FILEINFO_); } return proj; @@ -550,7 +550,7 @@ namespace Isis { Isis::Projection *proj; try { // Get the pixel resolution - Isis::PvlGroup &mapGroup = label.FindGroup("Mapping", Isis::Pvl::Traverse); + Isis::PvlGroup &mapGroup = label.findGroup("Mapping", Isis::Pvl::Traverse); double pixelResolution = mapGroup["PixelResolution"]; // Get the upper left corner @@ -569,7 +569,7 @@ namespace Isis { } catch (IException &e) { QString msg = "Unable to initialize cube projection"; - if(label.FileName() != "") msg += " from file [" + label.FileName() + "]"; + if(label.fileName() != "") msg += " from file [" + label.fileName() + "]"; throw IException(e, IException::Unknown, msg, _FILEINFO_); } return proj; diff --git a/isis/src/base/objs/ProjectionFactory/unitTest.cpp b/isis/src/base/objs/ProjectionFactory/unitTest.cpp index 647159d747f3a9bc3d8aeb989dccf7814e548db4..9a5abd492a499b126809a15a6bc10bf67c234122 100644 --- a/isis/src/base/objs/ProjectionFactory/unitTest.cpp +++ b/isis/src/base/objs/ProjectionFactory/unitTest.cpp @@ -19,8 +19,8 @@ int main(int argc, char *argv[]) { cout << "Unit test for ProjectionFactory" << endl; Pvl lab; - lab.AddGroup(PvlGroup("Mapping")); - PvlGroup &mapGroup = lab.FindGroup("Mapping"); + lab.addGroup(PvlGroup("Mapping")); + PvlGroup &mapGroup = lab.findGroup("Mapping"); mapGroup += PvlKeyword("EquatorialRadius", toString(3396190.0)); mapGroup += PvlKeyword("PolarRadius", toString(3376200.0)); @@ -66,8 +66,8 @@ int main(int argc, char *argv[]) { mapGroup += PvlKeyword("MaximumLatitude", toString(34.7603960060206)); mapGroup += PvlKeyword("MinimumLongitude", toString(219.72432466275)); mapGroup += PvlKeyword("MaximumLongitude", toString(236.186050244411)); - mapGroup.DeleteKeyword("UpperLeftCornerX"); - mapGroup.DeleteKeyword("UpperLeftCornerY"); + mapGroup.deleteKeyword("UpperLeftCornerX"); + mapGroup.deleteKeyword("UpperLeftCornerY"); cout << "Testing create method ... " << endl; int lines, samples; @@ -79,8 +79,8 @@ int main(int argc, char *argv[]) { cout << endl; cout << "Testing create method with existing cube labels" << endl; - mapGroup.AddKeyword(PvlKeyword("UpperLeftCornerX", toString(-16000.0)), Pvl::Replace); - mapGroup.AddKeyword(PvlKeyword("UpperLeftCornerY", toString(2060000.0)), Pvl::Replace); + mapGroup.addKeyword(PvlKeyword("UpperLeftCornerX", toString(-16000.0)), Pvl::Replace); + mapGroup.addKeyword(PvlKeyword("UpperLeftCornerY", toString(2060000.0)), Pvl::Replace); Pvl lab2; PvlObject icube("IsisCube"); @@ -88,15 +88,15 @@ int main(int argc, char *argv[]) { PvlGroup dims("Dimensions"); dims += PvlKeyword("Lines", toString(400)); dims += PvlKeyword("Samples", toString(600)); - core.AddGroup(dims); - icube.AddObject(core); - icube.AddGroup(mapGroup); - lab2.AddObject(icube); + core.addGroup(dims); + icube.addObject(core); + icube.addGroup(mapGroup); + lab2.addObject(icube); proj = ProjectionFactory::CreateForCube(lab2, samples, lines); cout << "Lines: " << lines << endl; cout << "Samples: " << samples << endl; - mapGroup = lab2.FindGroup("Mapping", Pvl::Traverse); + mapGroup = lab2.findGroup("Mapping", Pvl::Traverse); cout << "UpperLeftX: " << (double) mapGroup["UpperLeftCornerX"] << endl; cout << "UpperLeftY: " << (double) mapGroup["UpperLeftCornerY"] << endl; cout << endl; diff --git a/isis/src/base/objs/Pvl/Pvl.cpp b/isis/src/base/objs/Pvl/Pvl.cpp index d9fe7fac3135b3bec26ef29a61a53b90a2d3d155..c31eedfe88220a09e76eb94cf1861bfd4c5482d3 100644 --- a/isis/src/base/objs/Pvl/Pvl.cpp +++ b/isis/src/base/objs/Pvl/Pvl.cpp @@ -36,7 +36,7 @@ using namespace std; namespace Isis { //! Constructs an empty Pvl object. Pvl::Pvl() : Isis::PvlObject("Root") { - Init(); + init(); } @@ -46,23 +46,23 @@ namespace Isis { * @param file The file containing the pvl formatted information */ Pvl::Pvl(const QString &file) : Isis::PvlObject("Root") { - Init(); - Read(file); + init(); + read(file); } //! Copy constructor Pvl::Pvl(const Pvl &other) : PvlObject::PvlObject(other) { - p_internalTemplate = false; - p_terminator = other.p_terminator; + m_internalTemplate = false; + m_terminator = other.m_terminator; } - //! Initializes the class - void Pvl::Init() { - p_filename = ""; - p_terminator = "End"; - p_internalTemplate = false; + //! initializes the class + void Pvl::init() { + m_filename = ""; + m_terminator = "End"; + m_internalTemplate = false; } @@ -73,14 +73,14 @@ namespace Isis { * * @throws Isis::iException::Io */ - void Pvl::Read(const QString &file) { + void Pvl::read(const QString &file) { // Expand the filename Isis::FileName temp(file); - p_filename = temp.expanded(); + m_filename = temp.expanded(); // Open the file ifstream istm; - istm.open(p_filename.toAscii().data(), std::ios::in); + istm.open(m_filename.toAscii().data(), std::ios::in); if(!istm) { QString message = Message::FileOpen(temp.expanded()); throw IException(IException::Io, message, _FILEINFO_); @@ -113,14 +113,14 @@ namespace Isis { * * @throws Isis::iException::Io */ - void Pvl::Write(const QString &file) { + void Pvl::write(const QString &file) { // Expand the filename Isis::FileName temp(file); // Set up a Formatter bool removeFormatter = false; - if(GetFormat() == NULL) { - SetFormat(new PvlFormat()); + if(format() == NULL) { + setFormat(new PvlFormat()); removeFormatter = true; } @@ -137,7 +137,7 @@ namespace Isis { // Write the labels try { ostm << *this; - if(Terminator() != "") ostm << GetFormat()->FormatEOL(); + if(terminator() != "") ostm << format()->formatEOL(); } catch(IException &e) { ostm.close(); @@ -151,8 +151,8 @@ namespace Isis { } if(removeFormatter) { - delete GetFormat(); - SetFormat(NULL); + delete format(); + setFormat(NULL); } // Close the file @@ -167,14 +167,14 @@ namespace Isis { * * @throws Isis::iException::Io */ - void Pvl::Append(const QString &file) { + void Pvl::append(const QString &file) { // Set up for opening and writing Isis::FileName temp(file); // Set up a Formatter bool removeFormatter = false; - if(GetFormat() == NULL) { - SetFormat(new PvlFormat()); + if(format() == NULL) { + setFormat(new PvlFormat()); removeFormatter = true; } @@ -191,7 +191,7 @@ namespace Isis { // Write the labels try { ostm << *this; - if(Terminator() != "") ostm << GetFormat()->FormatEOL(); + if(terminator() != "") ostm << format()->formatEOL(); } catch(...) { ostm.close(); @@ -201,8 +201,8 @@ namespace Isis { } if(removeFormatter) { - delete GetFormat(); - SetFormat(NULL); + delete format(); + setFormat(NULL); } // Close the file @@ -210,17 +210,17 @@ namespace Isis { } - void Pvl::SetFormatTemplate(Isis::Pvl &temp) { - if(p_internalTemplate) delete p_formatTemplate; - p_internalTemplate = false; - Isis::PvlObject::SetFormatTemplate(temp); + void Pvl::setFormatTemplate(Isis::Pvl &temp) { + if(m_internalTemplate) delete m_formatTemplate; + m_internalTemplate = false; + Isis::PvlObject::setFormatTemplate(temp); } - void Pvl::SetFormatTemplate(const QString &file) { - if(p_internalTemplate) delete p_formatTemplate; - p_internalTemplate = true; - p_formatTemplate = new Isis::Pvl(file); + void Pvl::setFormatTemplate(const QString &file) { + if(m_internalTemplate) delete m_formatTemplate; + m_internalTemplate = true; + m_formatTemplate = new Isis::Pvl(file); } @@ -235,20 +235,20 @@ namespace Isis { ostream &operator<<(std::ostream &os, Pvl &pvl) { // Set up a Formatter bool removeFormatter = false; - if(pvl.GetFormat() == NULL) { - pvl.SetFormat(new PvlFormat()); + if(pvl.format() == NULL) { + pvl.setFormat(new PvlFormat()); removeFormatter = true; } Isis::Pvl outTemplate; - if(pvl.HasFormatTemplate()) outTemplate = *(Isis::Pvl *)pvl.FormatTemplate(); + if(pvl.hasFormatTemplate()) outTemplate = *(Isis::Pvl *)pvl.formatTemplate(); // Look for and process all include files and remove duplicates from the // format template. Include files take precedence over all other objects and // groups Isis::Pvl newTemp; - for(int i = 0; i < outTemplate.Keywords(); i++) { - if(outTemplate[i].IsNamed("Isis:PvlTemplate:File")) { + for(int i = 0; i < outTemplate.keywords(); i++) { + if(outTemplate[i].isNamed("Isis:PvlTemplate:File")) { QString filename = outTemplate[i]; Isis::FileName file(filename); if(!file.fileExists()) { @@ -257,121 +257,121 @@ namespace Isis { } Isis::Pvl include(file.expanded()); - for(int j = 0; j < include.Keywords(); j++) { - if(!newTemp.HasKeyword(include[j].Name())) - newTemp.AddKeyword(include[j]); + for(int j = 0; j < include.keywords(); j++) { + if(!newTemp.hasKeyword(include[j].name())) + newTemp.addKeyword(include[j]); } - for(int j = 0; j < include.Objects(); j++) { - if(!newTemp.HasObject(include.Object(j).Name())) - newTemp.AddObject(include.Object(j)); + for(int j = 0; j < include.objects(); j++) { + if(!newTemp.hasObject(include.object(j).name())) + newTemp.addObject(include.object(j)); } - for(int j = 0; j < include.Groups(); j++) { - if(!newTemp.HasGroup(include.Group(j).Name())) - newTemp.AddGroup(include.Group(j)); + for(int j = 0; j < include.groups(); j++) { + if(!newTemp.hasGroup(include.group(j).name())) + newTemp.addGroup(include.group(j)); } } // If it is not an include file add it in place - else if(!newTemp.HasKeyword(outTemplate[i].Name())) - newTemp.AddKeyword(outTemplate[i]); + else if(!newTemp.hasKeyword(outTemplate[i].name())) + newTemp.addKeyword(outTemplate[i]); } // copy over the objects - for(int i = 0; i < outTemplate.Objects(); i++) { - if(!newTemp.HasObject(outTemplate.Object(i).Name())) - newTemp.AddObject(outTemplate.Object(i)); + for(int i = 0; i < outTemplate.objects(); i++) { + if(!newTemp.hasObject(outTemplate.object(i).name())) + newTemp.addObject(outTemplate.object(i)); } // copy over the groups - for(int i = 0; i < outTemplate.Groups(); i++) { - if(!newTemp.HasGroup(outTemplate.Group(i).Name())) - newTemp.AddGroup(outTemplate.Group(i)); + for(int i = 0; i < outTemplate.groups(); i++) { + if(!newTemp.hasGroup(outTemplate.group(i).name())) + newTemp.addGroup(outTemplate.group(i)); } outTemplate = newTemp; // Output the pvl's comments - for(int i = 0; i < pvl.Comments(); i++) { - os << pvl.Comment(i) << pvl.GetFormat()->FormatEOL(); - if(i == (pvl.Comments() - 1)) os << pvl.GetFormat()->FormatEOL(); + for(int i = 0; i < pvl.comments(); i++) { + os << pvl.comment(i) << pvl.format()->formatEOL(); + if(i == (pvl.comments() - 1)) os << pvl.format()->formatEOL(); } // Output the keywords - if(pvl.Keywords() > 0) { - os << (Isis::PvlContainer &) pvl << pvl.GetFormat()->FormatEOL(); + if(pvl.keywords() > 0) { + os << (Isis::PvlContainer &) pvl << pvl.format()->formatEOL(); } // this number keeps track of the number of objects that have been written int numObjects = 0; // Output the objects using the format template - for(int i = 0; i < outTemplate.Objects(); i++) { - for(int j = 0; j < pvl.Objects(); j++) { - if(outTemplate.Object(i).Name() != pvl.Object(j).Name()) continue; - if(numObjects == 0 && pvl.Keywords() > 0) os << pvl.GetFormat()->FormatEOL(); - pvl.Object(j).SetIndent(pvl.Indent()); - pvl.Object(j).SetFormatTemplate(outTemplate.Object(i)); - pvl.Object(j).SetFormat(pvl.GetFormat()); - os << pvl.Object(j) << pvl.GetFormat()->FormatEOL(); - pvl.Object(j).SetFormat(NULL); - pvl.Object(j).SetIndent(0); - if(++numObjects < pvl.Objects()) os << pvl.GetFormat()->FormatEOL(); + for(int i = 0; i < outTemplate.objects(); i++) { + for(int j = 0; j < pvl.objects(); j++) { + if(outTemplate.object(i).name() != pvl.object(j).name()) continue; + if(numObjects == 0 && pvl.keywords() > 0) os << pvl.format()->formatEOL(); + pvl.object(j).setIndent(pvl.indent()); + pvl.object(j).setFormatTemplate(outTemplate.object(i)); + pvl.object(j).setFormat(pvl.format()); + os << pvl.object(j) << pvl.format()->formatEOL(); + pvl.object(j).setFormat(NULL); + pvl.object(j).setIndent(0); + if(++numObjects < pvl.objects()) os << pvl.format()->formatEOL(); } } // Output the objects that were not included in the format template pvl - for(int i = 0; i < pvl.Objects(); i++) { - if(outTemplate.HasObject(pvl.Object(i).Name())) continue; - if(numObjects == 0 && pvl.Keywords() > 0) os << pvl.GetFormat()->FormatEOL(); - pvl.Object(i).SetIndent(pvl.Indent()); - pvl.Object(i).SetFormat(pvl.GetFormat()); - os << pvl.Object(i) << pvl.GetFormat()->FormatEOL(); - pvl.Object(i).SetFormat(NULL); - pvl.Object(i).SetIndent(0); - if(++numObjects < pvl.Objects()) os << pvl.GetFormat()->FormatEOL(); + for(int i = 0; i < pvl.objects(); i++) { + if(outTemplate.hasObject(pvl.object(i).name())) continue; + if(numObjects == 0 && pvl.keywords() > 0) os << pvl.format()->formatEOL(); + pvl.object(i).setIndent(pvl.indent()); + pvl.object(i).setFormat(pvl.format()); + os << pvl.object(i) << pvl.format()->formatEOL(); + pvl.object(i).setFormat(NULL); + pvl.object(i).setIndent(0); + if(++numObjects < pvl.objects()) os << pvl.format()->formatEOL(); } // this number keeps track of the number of groups that have been written int numGroups = 0; // Output the groups using the format template - for(int i = 0; i < outTemplate.Groups(); i++) { - for(int j = 0; j < pvl.Groups(); j++) { - if(outTemplate.Group(i).Name() != pvl.Group(j).Name()) continue; + for(int i = 0; i < outTemplate.groups(); i++) { + for(int j = 0; j < pvl.groups(); j++) { + if(outTemplate.group(i).name() != pvl.group(j).name()) continue; if((numGroups == 0) && - (pvl.Objects() > 0 || pvl.Keywords() > 0)) os << pvl.GetFormat()->FormatEOL(); - pvl.Group(j).SetIndent(pvl.Indent()); - pvl.Group(j).SetFormatTemplate(outTemplate.Group(i)); - pvl.Group(j).SetFormat(pvl.GetFormat()); - os << pvl.Group(j) << pvl.GetFormat()->FormatEOL(); - pvl.Group(j).SetFormat(NULL); - pvl.Group(j).SetIndent(0); - if(++numGroups < pvl.Groups()) os << pvl.GetFormat()->FormatEOL(); + (pvl.objects() > 0 || pvl.keywords() > 0)) os << pvl.format()->formatEOL(); + pvl.group(j).setIndent(pvl.indent()); + pvl.group(j).setFormatTemplate(outTemplate.group(i)); + pvl.group(j).setFormat(pvl.format()); + os << pvl.group(j) << pvl.format()->formatEOL(); + pvl.group(j).setFormat(NULL); + pvl.group(j).setIndent(0); + if(++numGroups < pvl.groups()) os << pvl.format()->formatEOL(); } } // Output the groups that were not in the format template - for(int i = 0; i < pvl.Groups(); i++) { - if(outTemplate.HasGroup(pvl.Group(i).Name())) continue; + for(int i = 0; i < pvl.groups(); i++) { + if(outTemplate.hasGroup(pvl.group(i).name())) continue; if((numGroups == 0) && - (pvl.Objects() > 0 || pvl.Keywords() > 0)) os << pvl.GetFormat()->FormatEOL(); - pvl.Group(i).SetIndent(pvl.Indent()); - pvl.Group(i).SetFormat(pvl.GetFormat()); - os << pvl.Group(i) << pvl.GetFormat()->FormatEOL(); - pvl.Group(i).SetFormat(NULL); - pvl.Group(i).SetIndent(0); - if(++numGroups < pvl.Groups()) os << pvl.GetFormat()->FormatEOL(); + (pvl.objects() > 0 || pvl.keywords() > 0)) os << pvl.format()->formatEOL(); + pvl.group(i).setIndent(pvl.indent()); + pvl.group(i).setFormat(pvl.format()); + os << pvl.group(i) << pvl.format()->formatEOL(); + pvl.group(i).setFormat(NULL); + pvl.group(i).setIndent(0); + if(++numGroups < pvl.groups()) os << pvl.format()->formatEOL(); } // Output the terminator - if(pvl.Terminator() != "") { - os << pvl.Terminator(); + if(pvl.terminator() != "") { + os << pvl.terminator(); } if(removeFormatter) { - delete pvl.GetFormat(); - pvl.SetFormat(NULL); + delete pvl.format(); + pvl.setFormat(NULL); } return os; @@ -413,7 +413,7 @@ namespace Isis { is.seekg(beforeKeywordPos, ios::beg); QString msg = "Unexpected ["; - msg += readKeyword.Name(); + msg += readKeyword.name(); msg += "] in PVL Object [ROOT]"; throw IException(IException::Unknown, msg, _FILEINFO_); } @@ -423,16 +423,16 @@ namespace Isis { is.seekg(beforeKeywordPos); PvlGroup newGroup; is >> newGroup; - pvl.AddGroup(newGroup); + pvl.addGroup(newGroup); } else if(readKeyword == PvlKeyword("Object")) { is.seekg(beforeKeywordPos); PvlObject newObject; is >> newObject; - pvl.AddObject(newObject); + pvl.addObject(newObject); } else { - pvl.AddKeyword(readKeyword); + pvl.addKeyword(readKeyword); } readKeyword = PvlKeyword(); @@ -496,8 +496,8 @@ namespace Isis { const Pvl &Pvl::operator=(const Pvl &other) { this->PvlObject::operator=(other); - p_internalTemplate = other.p_internalTemplate; - p_terminator = other.p_terminator; + m_internalTemplate = other.m_internalTemplate; + m_terminator = other.m_terminator; return *this; } @@ -512,33 +512,33 @@ namespace Isis { * @param pPvl - User Pvl to be validated * @param pPvlResults - Contains the unvalidated Pvl */ - void Pvl::ValidatePvl(const Pvl & pPvl, Pvl & pPvlResults) + void Pvl::validatePvl(const Pvl & pPvl, Pvl & pPvlResults) { pPvlResults=Pvl(pPvl); // Validate Objects - int iTmplObjSize = Objects(); + int iTmplObjSize = objects(); for(int i=0; i 0) msg += " in file [" + p_filename + "]"; + type() + " = " + this->name() + "]"; + if(m_filename.size() > 0) msg += " in file [" + m_filename + "]"; throw IException(IException::Unknown, msg, _FILEINFO_); } @@ -93,12 +93,12 @@ namespace Isis { * @return The PvlKeyword object. * @throws IException The keyword doesn't exist. */ - const Isis::PvlKeyword &PvlContainer::FindKeyword(const QString &name) const { - ConstPvlKeywordIterator key = FindKeyword(name, Begin(), End()); - if(key == End()) { + const Isis::PvlKeyword &PvlContainer::findKeyword(const QString &name) const { + ConstPvlKeywordIterator key = findKeyword(name, begin(), end()); + if(key == end()) { QString msg = "PVL Keyword [" + name + "] does not exist in [" + - Type() + " = " + Name() + "]"; - if(p_filename.size() > 0) msg += " in file [" + p_filename + "]"; + type() + " = " + this->name() + "]"; + if(m_filename.size() > 0) msg += " in file [" + m_filename + "]"; throw IException(IException::Unknown, msg, _FILEINFO_); } @@ -110,16 +110,16 @@ namespace Isis { * @param name The name of the keyword to remove. * @throws iException::Pvl Keyword doesn't exist. */ - void PvlContainer::DeleteKeyword(const QString &name) { - PvlKeywordIterator key = FindKeyword(name, Begin(), End()); - if(key == End()) { + void PvlContainer::deleteKeyword(const QString &name) { + PvlKeywordIterator key = findKeyword(name, begin(), end()); + if(key == end()) { QString msg = "PVL Keyword [" + name + "] does not exist in [" + - Type() + " = " + Name() + "]"; - if(p_filename.size() > 0) msg += " in file [" + p_filename + "]"; + type() + " = " + this->name() + "]"; + if(m_filename.size() > 0) msg += " in file [" + m_filename + "]"; throw IException(IException::Unknown, msg, _FILEINFO_); } - p_keywords.erase(key); + m_keywords.erase(key); } @@ -128,18 +128,18 @@ namespace Isis { * @param index The index of the keyword to remove. * @throws iException::Pvl Keyword doesn't exist. */ - void PvlContainer::DeleteKeyword(const int index) { - if(index >= (int)p_keywords.size() || index < 0) { + void PvlContainer::deleteKeyword(const int index) { + if(index >= (int)m_keywords.size() || index < 0) { QString msg = "The specified index is out of bounds in PVL [" + - Type() + " = " + Name() + "]"; - if(p_filename.size() > 0) msg += " in file [" + p_filename + "]"; + type() + " = " + name() + "]"; + if(m_filename.size() > 0) msg += " in file [" + m_filename + "]"; throw IException(IException::Unknown, msg, _FILEINFO_); } - PvlKeywordIterator key = Begin(); + PvlKeywordIterator key = begin(); for(int i = 0; i < index; i++) key++; - p_keywords.erase(key); + m_keywords.erase(key); } @@ -149,15 +149,15 @@ namespace Isis { * @return bool True if one or more keywords were deleted; False if no keywords * were deleted. */ - bool PvlContainer::CleanDuplicateKeywords() { + bool PvlContainer::cleanDuplicateKeywords() { bool keywordDeleted = false; - for(int index = 0; index < p_keywords.size(); index ++) { - PvlKeyword ¤t = p_keywords[index]; + for(int index = 0; index < m_keywords.size(); index ++) { + PvlKeyword ¤t = m_keywords[index]; - for(PvlKeywordIterator key = Begin() + index + 1; key < End(); key ++) { + for(PvlKeywordIterator key = begin() + index + 1; key < end(); key ++) { if(current == *key) { - p_keywords.erase(key); + m_keywords.erase(key); keywordDeleted = true; } } @@ -172,9 +172,9 @@ namespace Isis { * @param name The name of the keyword to check for. * @return True if the keyword exists, false if it doesn't. */ - bool PvlContainer::HasKeyword(const QString &name) const { - ConstPvlKeywordIterator key = FindKeyword(name, Begin(), End()); - if(key == End()) return false; + bool PvlContainer::hasKeyword(const QString &name) const { + ConstPvlKeywordIterator key = findKeyword(name, begin(), end()); + if(key == end()) return false; return true; } @@ -186,11 +186,11 @@ namespace Isis { * @throws iException::Message The index is out of bounds. */ PvlKeyword &PvlContainer::operator[](const int index) { - if(index < 0 || index >= (int)p_keywords.size()) { + if(index < 0 || index >= (int)m_keywords.size()) { QString msg = Message::ArraySubscriptNotInRange(index); throw IException(IException::Programmer, msg, _FILEINFO_); } - return *(p_keywords.begin() + index); + return *(m_keywords.begin() + index); }; @@ -201,11 +201,11 @@ namespace Isis { * @throws iException::Message The index is out of bounds. */ const Isis::PvlKeyword &PvlContainer::operator[](const int index) const { - if(index < 0 || index >= (int)p_keywords.size()) { + if(index < 0 || index >= (int)m_keywords.size()) { QString msg = Message::ArraySubscriptNotInRange(index); throw IException(IException::Programmer, msg, _FILEINFO_); } - return *(p_keywords.begin() + index); + return *(m_keywords.begin() + index); } /** @@ -215,17 +215,17 @@ namespace Isis { * Use Append if you just want to add it to the end, Replace if you want to * replace it. */ - void PvlContainer::AddKeyword(const Isis::PvlKeyword &key, + void PvlContainer::addKeyword(const Isis::PvlKeyword &key, const InsertMode mode) { if(mode == Append) { - p_keywords.push_back(key); + m_keywords.push_back(key); } - else if(HasKeyword(key.Name())) { - Isis::PvlKeyword &outkey = FindKeyword(key.Name()); + else if(hasKeyword(key.name())) { + Isis::PvlKeyword &outkey = findKeyword(key.name()); outkey = key; } else { - p_keywords.push_back(key); + m_keywords.push_back(key); } } @@ -246,9 +246,9 @@ namespace Isis { * @return PvlContainer::PvlKeywordIterator Returns the position of the * inserted keyword per the STL vector documentation. */ - PvlContainer::PvlKeywordIterator PvlContainer::AddKeyword(const Isis::PvlKeyword &key, + PvlContainer::PvlKeywordIterator PvlContainer::addKeyword(const Isis::PvlKeyword &key, PvlKeywordIterator pos) { - return (p_keywords.insert(pos, key)); + return (m_keywords.insert(pos, key)); } /** @@ -262,20 +262,20 @@ namespace Isis { // Set up a Formatter (This should not be necessary for a container because // Object or Group should have done this already, but just in case. bool removeFormatter = false; - if(container.GetFormat() == NULL) { - container.SetFormat(new PvlFormat()); + if(container.format() == NULL) { + container.setFormat(new PvlFormat()); removeFormatter = true; } Isis::PvlContainer outTemplate("DEFAULT_TEMPLATE"); - if(container.HasFormatTemplate()) outTemplate = *(container.FormatTemplate()); + if(container.hasFormatTemplate()) outTemplate = *(container.formatTemplate()); // Look for and process all include files inside the template - Isis::PvlContainer newTemp(outTemplate.Type()); + Isis::PvlContainer newTemp(outTemplate.type()); // Include files take precedence over all other objects and groups - for(int i = 0; i < outTemplate.Keywords(); i++) { - if(outTemplate[i].IsNamed("Isis:PvlTemplate:File")) { + for(int i = 0; i < outTemplate.keywords(); i++) { + if(outTemplate[i].isNamed("Isis:PvlTemplate:File")) { QString filename = outTemplate[i]; Isis::FileName file(filename); if(!file.fileExists()) { @@ -284,14 +284,14 @@ namespace Isis { } Isis::Pvl include(file.expanded()); - for(int j = 0; j < include.Keywords(); j++) { - if(!newTemp.HasKeyword(include[j].Name())) - newTemp.AddKeyword(include[j]); + for(int j = 0; j < include.keywords(); j++) { + if(!newTemp.hasKeyword(include[j].name())) + newTemp.addKeyword(include[j]); } } // If it is not an include file keyword add it in place - else if(!newTemp.HasKeyword(outTemplate[i].Name())) { - newTemp.AddKeyword(outTemplate[i]); + else if(!newTemp.hasKeyword(outTemplate[i].name())) { + newTemp.addKeyword(outTemplate[i]); } } @@ -299,58 +299,58 @@ namespace Isis { // Figure out the longest keyword int width = 0; - for(int i = 0; i < container.Keywords(); i++) { - if(container[i].Name().length() > width) width = container[i].Name().length(); + for(int i = 0; i < container.keywords(); i++) { + if(container[i].name().length() > width) width = container[i].name().length(); } // This number keeps track of the number of keywords written int numKeywords = 0; // Write out the container using the output format template - for(int i = 0; i < outTemplate.Keywords(); i++) { - for(int j = 0; j < container.Keywords(); j++) { - if(outTemplate[i].Name() != container[j].Name()) continue; - container[j].SetIndent(container.Indent()); - container[j].SetWidth(width); - container[j].SetFormat(container.GetFormat()); + for(int i = 0; i < outTemplate.keywords(); i++) { + for(int j = 0; j < container.keywords(); j++) { + if(outTemplate[i].name() != container[j].name()) continue; + container[j].setIndent(container.indent()); + container[j].setWidth(width); + container[j].setFormat(container.format()); // Add a blank line before keyword comments - if(outTemplate[i].Comments() + container[j].Comments() > 0) os << container.GetFormat()->FormatEOL(); - if(outTemplate[i].Comments() > 0) { - for(int k = 0; k < outTemplate[i].Comments(); k++) { - for(int l = 0; l < outTemplate[i].Indent() + container[j].Indent(); l++) os << " "; - os << outTemplate[i].Comment(k) << container.GetFormat()->FormatEOL(); + if(outTemplate[i].comments() + container[j].comments() > 0) os << container.format()->formatEOL(); + if(outTemplate[i].comments() > 0) { + for(int k = 0; k < outTemplate[i].comments(); k++) { + for(int l = 0; l < outTemplate[i].indent() + container[j].indent(); l++) os << " "; + os << outTemplate[i].comment(k) << container.format()->formatEOL(); } } os << container[j]; - container[j].SetFormat(NULL); - container[j].SetIndent(0); - container[j].SetWidth(0); - if(++numKeywords < container.Keywords()) { -// if (j+1 < container.Keywords() && container[j+1].Comments() > 0) os << container.GetFormat()->FormatEOL(); - os << container.GetFormat()->FormatEOL(); + container[j].setFormat(NULL); + container[j].setIndent(0); + container[j].setWidth(0); + if(++numKeywords < container.keywords()) { +// if (j+1 < container.Keywords() && container[j+1].comments() > 0) os << container.format()->formatEOL(); + os << container.format()->formatEOL(); } } } // Output the keywords in the container that were not specified in the template - for(int i = 0; i < container.Keywords(); i++) { - if(outTemplate.HasKeyword(container[i].Name())) continue; - container[i].SetIndent(container.Indent()); - container[i].SetWidth(width); - container[i].SetFormat(container.GetFormat()); + for(int i = 0; i < container.keywords(); i++) { + if(outTemplate.hasKeyword(container[i].name())) continue; + container[i].setIndent(container.indent()); + container[i].setWidth(width); + container[i].setFormat(container.format()); os << container[i]; - container[i].SetFormat(NULL); - container[i].SetIndent(0); - container[i].SetWidth(0); - if(++numKeywords < container.Keywords()) { - if(i + 1 < container.Keywords() && container[i+1].Comments() > 0) os << container.GetFormat()->FormatEOL(); - os << container.GetFormat()->FormatEOL(); + container[i].setFormat(NULL); + container[i].setIndent(0); + container[i].setWidth(0); + if(++numKeywords < container.keywords()) { + if(i + 1 < container.keywords() && container[i+1].comments() > 0) os << container.format()->formatEOL(); + os << container.format()->formatEOL(); } } if(removeFormatter) { - delete container.GetFormat(); - container.SetFormat(NULL); + delete container.format(); + container.setFormat(NULL); } return os; @@ -364,7 +364,7 @@ namespace Isis { * @param end The ending iterator. * @return The keyword index. */ - PvlContainer::PvlKeywordIterator PvlContainer::FindKeyword(const QString &name, + PvlContainer::PvlKeywordIterator PvlContainer::findKeyword(const QString &name, PvlContainer::PvlKeywordIterator beg, PvlContainer::PvlKeywordIterator end) { PvlKeyword temp(name); @@ -379,7 +379,7 @@ namespace Isis { * @param end The ending iterator. * @return The keyword index. */ - PvlContainer::ConstPvlKeywordIterator PvlContainer::FindKeyword(const QString &name, + PvlContainer::ConstPvlKeywordIterator PvlContainer::findKeyword(const QString &name, PvlContainer::ConstPvlKeywordIterator beg, PvlContainer::ConstPvlKeywordIterator end) const { PvlKeyword temp(name); @@ -389,10 +389,10 @@ namespace Isis { //! This is an assignment operator const PvlContainer &PvlContainer::operator=(const PvlContainer &other) { - p_filename = other.p_filename; - p_name = other.p_name; - p_keywords = other.p_keywords; - p_formatTemplate = other.p_formatTemplate; + m_filename = other.m_filename; + m_name = other.m_name; + m_keywords = other.m_keywords; + m_formatTemplate = other.m_formatTemplate; return *this; } @@ -407,13 +407,13 @@ namespace Isis { * @history 2010-10-18 Sharmila Prasad - Added options "Type", "Range", "Value" * for the keyword validation */ - void PvlContainer::ValidateAllKeywords(PvlContainer & pPvlCont) + void PvlContainer::validateAllKeywords(PvlContainer & pPvlCont) { // Validate the Keywords in the current Object - int iTmplKeySize = Keywords(); + int iTmplKeySize = keywords(); for(int i=0; i=0; j--) { PvlKeyword & pvlKwrd = pPvlCont[j]; - QString sKeyName = pvlKwrd.Name(); + QString sKeyName = pvlKwrd.name(); if(sTmplKeyName == sKeyName) { - pPvlTmplKwrd.ValidateKeyword(pvlKwrd, sValueType); - pPvlCont.DeleteKeyword(pvlKwrd.Name()); + pPvlTmplKwrd.validateKeyword(pvlKwrd, sValueType); + pPvlCont.deleteKeyword(pvlKwrd.name()); } } } diff --git a/isis/src/base/objs/PvlContainer/PvlContainer.h b/isis/src/base/objs/PvlContainer/PvlContainer.h index 249bad4069f150aa88a09b6a2b74625d7c43593a..a7af546e5f6b199b15e25ed559330cda970bd8d8 100644 --- a/isis/src/base/objs/PvlContainer/PvlContainer.h +++ b/isis/src/base/objs/PvlContainer/PvlContainer.h @@ -58,7 +58,8 @@ namespace Isis { * @history 2010-09-27 Sharmila Prasad - Validate all the Keywords in a Container and * verify the 'Repeat' Option also * @history 2010-10-18 Sharmila Prasad - Added more options for the keyword validation - * @todo 2005-04-04 Need coded example. + * @history 2013-03-11 Steven Lambright and Mathew Eis - Brought method names and member variable + * names up to the current Isis 3 coding standards. Fixes #1533. */ class PvlContainer { public: @@ -67,15 +68,15 @@ namespace Isis { PvlContainer(const PvlContainer &other); //! Set the name of the container. - void SetName(const QString &name) { - p_name.SetValue(name); + void setName(const QString &name) { + m_name.setValue(name); }; /** * Returns the container name. * @return The container name. */ - inline QString Name() const { - return (QString) p_name; + inline QString name() const { + return (QString) m_name; }; /** * Returns whether the given string is equal to the container name or not. @@ -83,27 +84,27 @@ namespace Isis { * @return True if the name and string are the same, false if they are * not. */ - bool IsNamed(const QString &match) const { - return PvlKeyword::StringEqual(match, (QString)p_name); + bool isNamed(const QString &match) const { + return PvlKeyword::stringEqual(match, (QString)m_name); } /** * Returns the container type. * @return The container type. */ - inline QString Type() const { - return p_name.Name(); + inline QString type() const { + return m_name.name(); }; /** * Returns the number of keywords contained in the PvlContainer. * @return The number of keywords. */ - inline int Keywords() const { - return p_keywords.size(); + inline int keywords() const { + return m_keywords.size(); }; //! Clears PvlKeywords - void Clear() { - p_keywords.clear(); + void clear() { + m_keywords.clear(); }; //! Contains both modes: Append or Replace. enum InsertMode { Append, Replace }; @@ -112,61 +113,61 @@ namespace Isis { * @param keyword The PvlKeyword object to append. * @param mode Using the InsertMode value of Append. */ - void AddKeyword(const PvlKeyword &keyword, + void addKeyword(const PvlKeyword &keyword, const InsertMode mode = Append); /** * When you use the += operator with a PvlKeyword, it will call the - * AddKeyword() method. + * addKeyword() method. * @param keyword The PvlKeyword to be added. */ void operator+= (const PvlKeyword &keyword) { - AddKeyword(keyword); + addKeyword(keyword); }; - PvlKeyword &FindKeyword(const QString &name); + PvlKeyword &findKeyword(const QString &name); /** * When you use the [] operator with a (string) name, it will call the - * FindKeyword() method. + * findKeyword() method. * @param name The name of the keyword to find. */ PvlKeyword &operator[](const QString &name) { - return FindKeyword(name); + return findKeyword(name); }; PvlKeyword &operator[](const int index); /** * When you use the [] operator with a (char) name, it will call the - * FindKeyword() method. + * findKeyword() method. * @param name The name of the keyword to find. */ PvlKeyword &operator[](const char *name) { return operator[](QString(name)); }; - const PvlKeyword &FindKeyword(const QString &name) const; + const PvlKeyword &findKeyword(const QString &name) const; /** * When you use the [] operator with a (string) name, it will call the - * FindKeyword() method. + * findKeyword() method. * @param name The name of the keyword to find. */ const PvlKeyword &operator[](const QString &name) const { - return FindKeyword(name); + return findKeyword(name); }; const PvlKeyword &operator[](const int index) const; /** * When you use the [] operator with a (char) name, it will call the - * FindKeyword() method. + * findKeyword() method. * @param name The name of the keyword to find. */ PvlKeyword operator[](const char *name) const { return operator[](QString(name)); }; - bool HasKeyword(const QString &name) const; + bool hasKeyword(const QString &name) const; //! The keyword iterator. typedef QList::iterator PvlKeywordIterator; @@ -174,155 +175,155 @@ namespace Isis { typedef QList::const_iterator ConstPvlKeywordIterator; - PvlKeywordIterator FindKeyword(const QString &name, + PvlKeywordIterator findKeyword(const QString &name, PvlKeywordIterator beg, PvlKeywordIterator end); - ConstPvlKeywordIterator FindKeyword(const QString &name, + ConstPvlKeywordIterator findKeyword(const QString &name, ConstPvlKeywordIterator beg, ConstPvlKeywordIterator end) const; - PvlKeywordIterator AddKeyword(const PvlKeyword &keyword, + PvlKeywordIterator addKeyword(const PvlKeyword &keyword, PvlKeywordIterator pos); /** * Return the beginning iterator. * @return The beginning iterator. */ - PvlKeywordIterator Begin() { - return p_keywords.begin(); + PvlKeywordIterator begin() { + return m_keywords.begin(); }; /** * Return the const beginning iterator. * @return The const beginning iterator. */ - ConstPvlKeywordIterator Begin() const { - return p_keywords.begin(); + ConstPvlKeywordIterator begin() const { + return m_keywords.begin(); }; /** * Return the ending iterator. * @return The ending iterator. */ - PvlKeywordIterator End() { - return p_keywords.end(); + PvlKeywordIterator end() { + return m_keywords.end(); }; /** * Return the const ending iterator. * @return The const ending iterator. */ - ConstPvlKeywordIterator End() const { - return p_keywords.end(); + ConstPvlKeywordIterator end() const { + return m_keywords.end(); }; - void DeleteKeyword(const QString &name); - void DeleteKeyword(const int index); + void deleteKeyword(const QString &name); + void deleteKeyword(const int index); - bool CleanDuplicateKeywords(); + bool cleanDuplicateKeywords(); /** * When you use the -= operator with a (string) name, it will call the - * DeleteKeyword() method. + * deleteKeyword() method. * @param name The name of the keyword to remove. */ void operator-= (const QString &name) { - DeleteKeyword(name); + deleteKeyword(name); }; /** * When you use the -= operator with a PvlKeyword object, it will call the - * DeleteKeyword() method. + * deleteKeyword() method. * @param key The PvlKeyword object to remove. */ void operator-= (const PvlKeyword &key) { - DeleteKeyword(key.Name()); + deleteKeyword(key.name()); }; /** * Returns the filename used to initialise the Pvl object. If the object * was not initialized using a file, this string is empty. * @return The filename. */ - QString FileName() const { - return p_filename; + QString fileName() const { + return m_filename; }; - void SetFormatTemplate(PvlContainer &ref) { - p_formatTemplate = &ref; + void setFormatTemplate(PvlContainer &ref) { + m_formatTemplate = &ref; }; - bool HasFormatTemplate() { - return p_formatTemplate != NULL; + bool hasFormatTemplate() { + return m_formatTemplate != NULL; }; - PvlContainer *FormatTemplate() { - return p_formatTemplate; + PvlContainer *formatTemplate() { + return m_formatTemplate; }; - PvlFormat *GetFormat() { - return p_name.GetFormat(); + PvlFormat *format() { + return m_name.format(); } - void SetFormat(PvlFormat *format) { - p_name.SetFormat(format); + void setFormat(PvlFormat *format) { + m_name.setFormat(format); } - int Indent() { - return p_name.Indent(); + int indent() { + return m_name.indent(); } - void SetIndent(int indent) { - p_name.SetIndent(indent); + void setIndent(int indent) { + m_name.setIndent(indent); } - inline int Comments() const { - return p_name.Comments(); + inline int comments() const { + return m_name.comments(); }; - QString Comment(const int index) const { - return p_name.Comment(index); + QString comment(const int index) const { + return m_name.comment(index); } - void AddComment(const QString &comment) { - p_name.AddComment(comment); + void addComment(const QString &comment) { + m_name.addComment(comment); } - PvlKeyword &GetNameKeyword() { - return p_name; + PvlKeyword &nameKeyword() { + return m_name; } - const PvlKeyword &GetNameKeyword() const { - return p_name; + const PvlKeyword &nameKeyword() const { + return m_name; } const PvlContainer &operator=(const PvlContainer &other); protected: - QString p_filename; /** p_keywords; /** m_keywords; /**addLayout(buttonLayout); setLayout(vLayout); - QString titleBar = "Pvl File: " + QString(pvl.FileName()) ; + QString titleBar = "Pvl File: " + QString(pvl.fileName()) ; setWindowTitle(titleBar); // Add functionality to buttons @@ -123,7 +123,7 @@ namespace Isis { // convert QString to std::string needed to open file stream QString saveFile = pvlFile; try { - pvl.Write(saveFile); + pvl.write(saveFile); } catch(IException &e) { // report exception(s) to mesage box diff --git a/isis/src/base/objs/PvlEditDialog/PvlEditDialog.h b/isis/src/base/objs/PvlEditDialog/PvlEditDialog.h index 1f0812dccbcec3d8c0d87762ec458ab0985e935b..cfe47d72c592293f9418bdda2b1d4e24a0ebc18b 100644 --- a/isis/src/base/objs/PvlEditDialog/PvlEditDialog.h +++ b/isis/src/base/objs/PvlEditDialog/PvlEditDialog.h @@ -32,8 +32,8 @@ namespace Isis { * fixed bugs arising from moving this class from * Qisis and to Isis. Added moc commands to Makefile. * @history 2008-12-15 Jeannie Walldren - Added a verification - * that the edited file is in Pvl format. Replaced - * error throws with QMessage warning boxes. + * that the edited file is in Pvl format. Replaced + * error throws with QMessage warning boxes. */ class PvlEditDialog : public QDialog { Q_OBJECT diff --git a/isis/src/base/objs/PvlFormat/PvlFormat.cpp b/isis/src/base/objs/PvlFormat/PvlFormat.cpp index 17991c5021425feba0e152c10792237421728a87..a9bae7138730bb3c1594462975f56c953532d351 100644 --- a/isis/src/base/objs/PvlFormat/PvlFormat.cpp +++ b/isis/src/base/objs/PvlFormat/PvlFormat.cpp @@ -37,7 +37,7 @@ namespace Isis { * Constructs an empty PvlFormat */ PvlFormat::PvlFormat() { - Init(); + init(); } @@ -50,8 +50,8 @@ namespace Isis { * keyword in this PvlKeyword and TYPE is one of [QString | integer | float ] */ PvlFormat::PvlFormat(const QString &file) { - Init(); - Add(file); + init(); + add(file); } @@ -63,16 +63,16 @@ namespace Isis { * keyword in a PvlKeyword and type is one of [QString | integer | float ] */ PvlFormat::PvlFormat(Pvl &keywordType) { - Init(); - Add(keywordType); + init(); + add(keywordType); } //! Clears all PvlFormat data. - void PvlFormat::Init() { - p_keywordMap.Clear(); - p_keywordMapFile.clear(); - p_charLimit = 80; + void PvlFormat::init() { + m_keywordMap.clear(); + m_keywordMapFile.clear(); + m_charLimit = 80; } @@ -81,13 +81,13 @@ namespace Isis { * contain KEYWORD=TYPE (one per line), where TYPE is one of the QStrings * KeywordType can convert. */ - void PvlFormat::Add(const QString &file) { - p_keywordMapFile = file; + void PvlFormat::add(const QString &file) { + m_keywordMapFile = file; // Open the file and internalize it into the Pvl map try { Pvl pvl(file); - Add(pvl); + add(pvl); } catch(IException &e) { QString msg; @@ -103,18 +103,18 @@ namespace Isis { * contain KEYWORD=TYPE, where TYPE is one of the QStrings KeywordType can * convert. */ - void PvlFormat::Add(Pvl &pvl) { - for(int i = 0; i < pvl.Keywords(); ++i) { + void PvlFormat::add(Pvl &pvl) { + for(int i = 0; i < pvl.keywords(); ++i) { PvlKeyword &key = pvl[i]; - QString name = key.Name().toUpper(); + QString name = key.name().toUpper(); QString type = key[0].toUpper(); PvlKeyword newKey(name, type); - for(int j = 1; j < key.Size(); ++j) newKey.AddValue(key[j]); + for(int j = 1; j < key.size(); ++j) newKey.addValue(key[j]); // Make sure we don't duplicate Keys - if (p_keywordMap.HasKeyword(name)) { - p_keywordMap.DeleteKeyword(name); + if (m_keywordMap.hasKeyword(name)) { + m_keywordMap.deleteKeyword(name); } - p_keywordMap.AddKeyword(newKey); + m_keywordMap.addKeyword(newKey); } } @@ -124,11 +124,11 @@ namespace Isis { * * @param keyword The PvlKeyword to have its type returned */ - KeywordType PvlFormat::Type(const PvlKeyword &keyword) { - QString name = keyword.Name().toUpper(); - if(p_keywordMap.HasKeyword(name)) { - PvlKeyword &key = p_keywordMap.FindKeyword(name); - return ToKeywordType(key[0]); + KeywordType PvlFormat::type(const PvlKeyword &keyword) { + QString name = keyword.name().toUpper(); + if(m_keywordMap.hasKeyword(name)) { + PvlKeyword &key = m_keywordMap.findKeyword(name); + return toKeywordType(key[0]); } return NoTypeKeyword; } @@ -142,11 +142,11 @@ namespace Isis { * @return The number of decimal places to be output. If this number is not * available in keyword map return -1. */ - int PvlFormat::Accuracy(const PvlKeyword &keyword) { - QString name = keyword.Name().toUpper(); - if(p_keywordMap.HasKeyword(name)) { - PvlKeyword &key = p_keywordMap.FindKeyword(name); - if(key.Size() > 1) { + int PvlFormat::accuracy(const PvlKeyword &keyword) { + QString name = keyword.name().toUpper(); + if(m_keywordMap.hasKeyword(name)) { + PvlKeyword &key = m_keywordMap.findKeyword(name); + if(key.size() > 1) { return toInt(key[1]); } } @@ -160,16 +160,16 @@ namespace Isis { * @param keyword The PvlKeyword to be formatted * @param num Use the ith value of the keyword */ - QString PvlFormat::FormatValue(const PvlKeyword &keyword, int num) { + QString PvlFormat::formatValue(const PvlKeyword &keyword, int num) { QString val; val.clear(); // Find out if the units are the same for all values - bool singleUnit = IsSingleUnit(keyword); + bool singleUnit = isSingleUnit(keyword); // Create a Null value if the value index is greater than the number of values - if(num >= keyword.Size()) { + if(num >= keyword.size()) { return "Null"; } @@ -181,31 +181,31 @@ namespace Isis { val += keyword[num]; } - val = AddQuotes(val); + val = addQuotes(val); // If it is an array start it off with a paren - if((keyword.Size() > 1) && (num == 0)) { + if((keyword.size() > 1) && (num == 0)) { val = "(" + val; } // Add the units to this value - if((!singleUnit) && (keyword.Unit(num).size() > 0)) { - val += " <" + keyword.Unit(num) + ">"; + if((!singleUnit) && (keyword.unit(num).size() > 0)) { + val += " <" + keyword.unit(num) + ">"; } // Add a comma for arrays - if(num != keyword.Size() - 1) { + if(num != keyword.size() - 1) { val += ", "; } // If it is an array close it off - else if(keyword.Size() > 1) { + else if(keyword.size() > 1) { val += ")"; } // Add the units to the end if all values have the same units - if((singleUnit) && (num == keyword.Size() - 1) && - (keyword.Unit(num).size() > 0)) { - val += " <" + keyword.Unit(num) + ">"; + if((singleUnit) && (num == keyword.size() - 1) && + (keyword.unit(num).size() > 0)) { + val += " <" + keyword.unit(num) + ">"; } return val; @@ -217,8 +217,8 @@ namespace Isis { * * @param keyword The PvlContainer being closed. */ - QString PvlFormat::FormatName(const PvlKeyword &keyword) { - return keyword.Name(); + QString PvlFormat::formatName(const PvlKeyword &keyword) { + return keyword.name(); } @@ -228,10 +228,10 @@ namespace Isis { * @param name The text used to signify the end of a container * @param keyword The PvlContainer being closed. */ - QString PvlFormat::FormatEnd(const QString name, + QString PvlFormat::formatEnd(const QString name, const PvlKeyword &keyword) { - return "End_" + FormatName(keyword); - }; + return "End_" + formatName(keyword); + } /* @@ -240,7 +240,7 @@ namespace Isis { * * @param value The PvlKeyword value to be quoted if necessary. */ - QString PvlFormat::AddQuotes(const QString value) { + QString PvlFormat::addQuotes(const QString value) { QString val = value; bool needQuotes = false; @@ -303,12 +303,12 @@ namespace Isis { * * @param keyword The PvlKeyword to be formatted */ - bool PvlFormat::IsSingleUnit(const PvlKeyword &keyword) { + bool PvlFormat::isSingleUnit(const PvlKeyword &keyword) { // See if the units are all the same bool singleUnit = true; - for(int i = 0; i < keyword.Size(); i ++) { - if(!keyword.StringEqual(keyword.Unit(i), keyword.Unit(0))) { + for(int i = 0; i < keyword.size(); i ++) { + if(!keyword.stringEqual(keyword.unit(i), keyword.unit(0))) { singleUnit = false; } } diff --git a/isis/src/base/objs/PvlFormat/PvlFormat.h b/isis/src/base/objs/PvlFormat/PvlFormat.h index cf90d12ec9ad7639683a8f690886109274423ba1..1d16257143d0c28769068b5da1824137da527e8a 100644 --- a/isis/src/base/objs/PvlFormat/PvlFormat.h +++ b/isis/src/base/objs/PvlFormat/PvlFormat.h @@ -51,7 +51,7 @@ namespace Isis { * @param type The string to be converted. * @return The corresponding KeywordType enum. */ - inline KeywordType ToKeywordType(const QString type) { + inline KeywordType toKeywordType(const QString type) { QString t(type); t = t.remove(QRegExp("[\\w_-\"'")).toUpper(); @@ -115,6 +115,8 @@ namespace Isis { * keyword value is output to the next line down. * @history 2010-12-09 Steven Lambright - Values ending in '-' no longer fail * to be quoted properly + * @history 2013-03-11 Steven Lambright and Mathew Eis - Brought method names and member variable + * names up to the current Isis 3 coding standards. Fixes #1533. */ class PvlFormat { @@ -125,8 +127,8 @@ namespace Isis { PvlFormat(Pvl &keymap); virtual ~PvlFormat() {}; - void Add(const QString &file); - void Add(Pvl &keymap); + void add(const QString &file); + void add(Pvl &keymap); /** * Sets the maximum number of characters in a keyword value that @@ -135,8 +137,8 @@ namespace Isis { * * @param limit The new character limit. */ - void SetCharLimit(const unsigned int limit) { - p_charLimit = limit; + void setCharLimit(const unsigned int limit) { + m_charLimit = limit; }; /** @@ -146,35 +148,35 @@ namespace Isis { * * @return unsigned int Maximum number of characters. */ - unsigned int CharLimit() const { - return p_charLimit; + unsigned int charLimit() const { + return m_charLimit; }; - virtual QString FormatValue(const PvlKeyword &keyword, + virtual QString formatValue(const PvlKeyword &keyword, int valueIndex = 0); - virtual QString FormatName(const PvlKeyword &keyword); - virtual QString FormatEnd(const QString name, + virtual QString formatName(const PvlKeyword &keyword); + virtual QString formatEnd(const QString name, const PvlKeyword &keyword); - virtual QString FormatEOL() { + virtual QString formatEOL() { return "\n"; } - virtual KeywordType Type(const PvlKeyword &keyword); - virtual int Accuracy(const PvlKeyword &keyword); + virtual KeywordType type(const PvlKeyword &keyword); + virtual int accuracy(const PvlKeyword &keyword); protected: - virtual QString AddQuotes(const QString value); - bool IsSingleUnit(const PvlKeyword &keyword); + virtual QString addQuotes(const QString value); + bool isSingleUnit(const PvlKeyword &keyword); - QString p_keywordMapFile; - Pvl p_keywordMap; + QString m_keywordMapFile; + Pvl m_keywordMap; //! Maximum number of characters on a single line of a keyword value. - unsigned int p_charLimit; + unsigned int m_charLimit; private: - void Init(); + void init(); }; }; diff --git a/isis/src/base/objs/PvlFormat/unitTest.cpp b/isis/src/base/objs/PvlFormat/unitTest.cpp index 7981bcd77fd5626a9219cb8779677f697ad5e8eb..e6055b02f4e1b7127e38c6045c851c6d0fe0ebac 100644 --- a/isis/src/base/objs/PvlFormat/unitTest.cpp +++ b/isis/src/base/objs/PvlFormat/unitTest.cpp @@ -61,7 +61,7 @@ int main() { grp += Isis::PvlKeyword("myfloat", "12345.67e+89"); grp += Isis::PvlKeyword("myarray", "(12345,\"a short string\",1.234)"); Isis::PvlObject obj("Object1"); - obj.AddGroup(grp); + obj.addGroup(grp); Isis::PvlObject obj2("Object2"); obj2 += Isis::PvlKeyword("mystring", "stringval"); @@ -69,7 +69,7 @@ int main() { obj2 += Isis::PvlKeyword("myint", "12345"); obj2 += Isis::PvlKeyword("myfloat", "12345.67e+89"); obj2 += Isis::PvlKeyword("myarray", "(12345,\"a short string\",1.234)"); - obj.AddObject(obj2); + obj.addObject(obj2); cout << obj << endl; } diff --git a/isis/src/base/objs/PvlFormatPds/PvlFormatPds.cpp b/isis/src/base/objs/PvlFormatPds/PvlFormatPds.cpp index 6ac91e47b6ccbab0f39330c5ac5d800586c455b1..b1ee26cfafe34ba8cfe05d56b9b93ad425e8e2c8 100644 --- a/isis/src/base/objs/PvlFormatPds/PvlFormatPds.cpp +++ b/isis/src/base/objs/PvlFormatPds/PvlFormatPds.cpp @@ -42,7 +42,7 @@ namespace Isis { * Constructs an empty PvlFormatPds */ PvlFormatPds::PvlFormatPds() { - Init(); + init(); } @@ -54,7 +54,7 @@ namespace Isis { * keyword and TYPE is one of [string | integer | float | ...] */ PvlFormatPds::PvlFormatPds(const QString &file) : PvlFormat(file) { - Init(); + init(); } @@ -66,12 +66,12 @@ namespace Isis { * keyword in a PvlKeyword and type is one of [string | integer | float ] */ PvlFormatPds::PvlFormatPds(Pvl &keywordType) : PvlFormat(keywordType) { - Init(); + init(); } //! Clears all PvlFormatPds specific data. - void PvlFormatPds::Init() { + void PvlFormatPds::init() { } @@ -81,52 +81,52 @@ namespace Isis { * @param keyword The PvlKeyword to be formatted * @param num Use the ith value of the keyword */ - QString PvlFormatPds::FormatValue(const PvlKeyword &keyword, int num) { + QString PvlFormatPds::formatValue(const PvlKeyword &keyword, int num) { - QString name = keyword.Name().toUpper(); + QString name = keyword.name().toUpper(); if(name == "OBJECT" || (name == "GROUP")) { QString val = (QString)keyword; return val.toUpper(); } // Find out what type this keyword is - KeywordType type = Type(keyword); + KeywordType keyType = type(keyword); - switch(type) { + switch(keyType) { case StringKeyword: - return FormatString(keyword, num); + return formatString(keyword, num); break; case RealKeyword: - return FormatReal(keyword, num, Accuracy(keyword)); + return formatReal(keyword, num, accuracy(keyword)); break; case IntegerKeyword: - return FormatInteger(keyword, num, Accuracy(keyword)); + return formatInteger(keyword, num, accuracy(keyword)); break; case HexKeyword: - return FormatHex(keyword, num, Accuracy(keyword)); + return formatHex(keyword, num, accuracy(keyword)); break; case BinaryKeyword: - return FormatBinary(keyword, num, Accuracy(keyword)); + return formatBinary(keyword, num, accuracy(keyword)); break; case EnumKeyword: - return FormatEnum(keyword, num); + return formatEnum(keyword, num); break; case BoolKeyword: - return FormatBool(keyword, num); + return formatBool(keyword, num); break; case NoTypeKeyword: default: - return FormatUnknown(keyword, num); + return formatUnknown(keyword, num); break; } - return FormatUnknown(keyword, num); + return formatUnknown(keyword, num); } @@ -141,13 +141,13 @@ namespace Isis { * the if portion of the code already * adds quotes automatically */ - QString PvlFormatPds::FormatString(const PvlKeyword &keyword, int num) { + QString PvlFormatPds::formatString(const PvlKeyword &keyword, int num) { QString val; bool singleUnit = false; // Create a Null value if the value index is greater than the number of values - if((num >= keyword.Size()) || (keyword[num].size() == 0)) { + if((num >= keyword.size()) || (keyword[num].size() == 0)) { return "NULL"; } @@ -158,36 +158,36 @@ namespace Isis { } else { val += keyword[num]; - val = AddQuotes(val); + val = addQuotes(val); } // If it is an array start it off with a paren - if((keyword.Size() > 1) && (num == 0)) { + if((keyword.size() > 1) && (num == 0)) { val = "(" + val; } // Add the units to this value - if((!singleUnit) && (keyword.Unit(num).size() > 0)) { - QString unit = keyword.Unit(num); + if((!singleUnit) && (keyword.unit(num).size() > 0)) { + QString unit = keyword.unit(num); // For now PDS units are case sensitive, so we should not UpCase them // unit.UpCase(); val += " <" + unit + ">"; } // Add a comma for arrays - if(num != keyword.Size() - 1) { + if(num != keyword.size() - 1) { val += ", "; } // If it is an array, close it off - else if(keyword.Size() > 1) { + else if(keyword.size() > 1) { val += ")"; } // Add the units to the end if all values have the same units - if((singleUnit) && (num == keyword.Size() - 1) && - (keyword.Unit(num).size() > 0)) { - QString unit = keyword.Unit(num); + if((singleUnit) && (num == keyword.size() - 1) && + (keyword.unit(num).size() > 0)) { + QString unit = keyword.unit(num); // For now PDS units are case sensitive, so we should not UpCase them // unit.UpCase(); val += " <" + unit + ">"; @@ -203,7 +203,7 @@ namespace Isis { * @param keyword The PvlKeyword to be formatted * @param num Use the ith value of the keyword */ - QString PvlFormatPds::FormatReal(const PvlKeyword &keyword, int num, + QString PvlFormatPds::formatReal(const PvlKeyword &keyword, int num, int places) { QString val; @@ -211,12 +211,12 @@ namespace Isis { bool singleUnit = false; // Create a Null value if the value index is greater than the number of values - if((num >= keyword.Size()) || (keyword[num].size() == 0)) { + if((num >= keyword.size()) || (keyword[num].size() == 0)) { return "NULL"; } // If it is an array start it off with a paren - if((keyword.Size() > 1) && (num == 0)) { + if((keyword.size() > 1) && (num == 0)) { val += "("; } @@ -235,25 +235,25 @@ namespace Isis { } // Add the units to this value - if((!singleUnit) && (keyword.Unit(num).size() > 0)) { - QString unit = keyword.Unit(num); + if((!singleUnit) && (keyword.unit(num).size() > 0)) { + QString unit = keyword.unit(num); // unit.UpCase(); val += " <" + unit + ">"; } // Add a comma for arrays - if(num != keyword.Size() - 1) { + if(num != keyword.size() - 1) { val += ", "; } // If it is an array, close it off - else if(keyword.Size() > 1) { + else if(keyword.size() > 1) { val += ")"; } // Add the units to the end if all values have the same units - if((singleUnit) && (num == keyword.Size() - 1) && - (keyword.Unit(num).size() > 0)) { - QString unit = keyword.Unit(num); + if((singleUnit) && (num == keyword.size() - 1) && + (keyword.unit(num).size() > 0)) { + QString unit = keyword.unit(num); // unit.UpCase(); val += " <" + unit + ">"; } @@ -268,19 +268,19 @@ namespace Isis { * @param keyword The PvlKeyword to be formatted * @param num Use the ith value of the keyword */ - QString PvlFormatPds::FormatEnum(const PvlKeyword &keyword, int num) { + QString PvlFormatPds::formatEnum(const PvlKeyword &keyword, int num) { QString val; val.clear(); bool singleUnit = false; // Create a Null value if the value index is greater than the number of values - if((num >= keyword.Size()) || (keyword[num].size() == 0)) { + if((num >= keyword.size()) || (keyword[num].size() == 0)) { return "NULL"; } // If it is an array start it off with a paren - if((keyword.Size() > 1) && (num == 0)) { + if((keyword.size() > 1) && (num == 0)) { val += "("; } @@ -294,25 +294,25 @@ namespace Isis { } // Add the units to this value - if((!singleUnit) && (keyword.Unit(num).size() > 0)) { - QString unit = keyword.Unit(num); + if((!singleUnit) && (keyword.unit(num).size() > 0)) { + QString unit = keyword.unit(num); // unit.UpCase(); val += " <" + unit + ">"; } // Add a comma for arrays - if(num != keyword.Size() - 1) { + if(num != keyword.size() - 1) { val += ", "; } // If it is an array, close it off - else if(keyword.Size() > 1) { + else if(keyword.size() > 1) { val += ")"; } // Add the units to the end if all values have the same units - if((singleUnit) && (num == keyword.Size() - 1) && - (keyword.Unit(num).size() > 0)) { - QString unit = keyword.Unit(num); + if((singleUnit) && (num == keyword.size() - 1) && + (keyword.unit(num).size() > 0)) { + QString unit = keyword.unit(num); // unit.UpCase(); val += " <" + unit + ">"; } @@ -332,14 +332,14 @@ namespace Isis { * the if portion of the code already * adds quotes automatically */ - QString PvlFormatPds::FormatUnknown(const PvlKeyword &keyword, int num) { + QString PvlFormatPds::formatUnknown(const PvlKeyword &keyword, int num) { QString val; val.clear(); bool singleUnit = false; // Create a Null value if the value index is greater than the number of values - if((num >= keyword.Size()) || (keyword[num].size() == 0)) { + if((num >= keyword.size()) || (keyword[num].size() == 0)) { return "NULL"; } @@ -350,35 +350,35 @@ namespace Isis { } else { val += keyword[num]; - val = PvlFormat::AddQuotes(val); + val = PvlFormat::addQuotes(val); } // If it is an array start it off with a paren - if((keyword.Size() > 1) && (num == 0)) { + if((keyword.size() > 1) && (num == 0)) { val = "(" + val; } // Add the units to this value - if((!singleUnit) && (keyword.Unit(num).size() > 0)) { - QString unit = keyword.Unit(num); + if((!singleUnit) && (keyword.unit(num).size() > 0)) { + QString unit = keyword.unit(num); // unit.UpCase(); val += " <" + unit + ">"; } // Add a comma for arrays - if(num != keyword.Size() - 1) { + if(num != keyword.size() - 1) { val += ", "; } // If it is an array, close it off - else if(keyword.Size() > 1) { + else if(keyword.size() > 1) { val += ")"; } // Add the units to the end if all values have the same units - if((singleUnit) && (num == keyword.Size() - 1) && - (keyword.Unit(num).size() > 0)) { - QString unit = keyword.Unit(num); + if((singleUnit) && (num == keyword.size() - 1) && + (keyword.unit(num).size() > 0)) { + QString unit = keyword.unit(num); // unit.UpCase(); val += " <" + unit + ">"; } @@ -393,19 +393,19 @@ namespace Isis { * @param keyword The PvlKeyword to be formatted * @param num Use the ith value of the keyword */ - QString PvlFormatPds::FormatInteger(const PvlKeyword &keyword, int num, int bytes) { + QString PvlFormatPds::formatInteger(const PvlKeyword &keyword, int num, int bytes) { QString val; val.clear(); bool singleUnit = false; // Create a Null value if the value index is greater than the number of values - if((num >= keyword.Size()) || (keyword[num].size() == 0)) { + if((num >= keyword.size()) || (keyword[num].size() == 0)) { return "NULL"; } // If it is an array start it off with a paren - if((keyword.Size() > 1) && (num == 0)) { + if((keyword.size() > 1) && (num == 0)) { val += "("; } @@ -419,25 +419,25 @@ namespace Isis { } // Add the units to this value - if((!singleUnit) && (keyword.Unit(num).size() > 0)) { - QString unit = keyword.Unit(num); + if((!singleUnit) && (keyword.unit(num).size() > 0)) { + QString unit = keyword.unit(num); // unit.UpCase(); val += " <" + unit + ">"; } // Add a comma for arrays - if(num != keyword.Size() - 1) { + if(num != keyword.size() - 1) { val += ", "; } // If it is an array, close it off - else if(keyword.Size() > 1) { + else if(keyword.size() > 1) { val += ")"; } // Add the units to the end if all values have the same units - if((singleUnit) && (num == keyword.Size() - 1) && - (keyword.Unit(num).size() > 0)) { - QString unit = keyword.Unit(num); + if((singleUnit) && (num == keyword.size() - 1) && + (keyword.unit(num).size() > 0)) { + QString unit = keyword.unit(num); // unit.UpCase(); val += " <" + unit + ">"; } @@ -452,7 +452,7 @@ namespace Isis { * @param keyword The PvlKeyword to be formatted * @param num Use the ith value of the keyword */ - QString PvlFormatPds::FormatBinary(const PvlKeyword &keyword, int num, int bits) { + QString PvlFormatPds::formatBinary(const PvlKeyword &keyword, int num, int bits) { QString val; val.clear(); @@ -460,12 +460,12 @@ namespace Isis { // Create a Null value if the value index is greater than the number of values stringstream ss; - if((num >= keyword.Size()) || (keyword[num].size() == 0)) { + if((num >= keyword.size()) || (keyword[num].size() == 0)) { return "NULL"; } // If it is an array start it off with a paren - if((keyword.Size() > 1) && (num == 0)) { + if((keyword.size() > 1) && (num == 0)) { val += "("; } @@ -490,25 +490,25 @@ namespace Isis { } // Add the units to this value - if((!singleUnit) && (keyword.Unit(num).size() > 0)) { - QString unit = keyword.Unit(num); + if((!singleUnit) && (keyword.unit(num).size() > 0)) { + QString unit = keyword.unit(num); // unit.UpCase(); val += " <" + unit + ">"; } // Add a comma for arrays - if(num != keyword.Size() - 1) { + if(num != keyword.size() - 1) { val += ", "; } // If it is an array, close it off - else if(keyword.Size() > 1) { + else if(keyword.size() > 1) { val += ")"; } // Add the units to the end if all values have the same units - if((singleUnit) && (num == keyword.Size() - 1) && - (keyword.Unit(num).size() > 0)) { - QString unit = keyword.Unit(num); + if((singleUnit) && (num == keyword.size() - 1) && + (keyword.unit(num).size() > 0)) { + QString unit = keyword.unit(num); // unit.UpCase(); val += " <" + unit + ">"; } @@ -525,19 +525,19 @@ namespace Isis { */ - QString PvlFormatPds::FormatHex(const PvlKeyword &keyword, int num, int bytes) { + QString PvlFormatPds::formatHex(const PvlKeyword &keyword, int num, int bytes) { QString val; val.clear(); bool singleUnit = false; // Create a Null value if the value index is greater than the number of values - if((num >= keyword.Size()) || (keyword[num].size() == 0)) { + if((num >= keyword.size()) || (keyword[num].size() == 0)) { return "NULL"; } // If it is an array start it off with a paren - if((keyword.Size() > 1) && (num == 0)) { + if((keyword.size() > 1) && (num == 0)) { val += "("; } @@ -563,25 +563,25 @@ namespace Isis { } // Add the units to this value - if((!singleUnit) && (keyword.Unit(num).size() > 0)) { - QString unit = keyword.Unit(num); + if((!singleUnit) && (keyword.unit(num).size() > 0)) { + QString unit = keyword.unit(num); // unit.UpCase(); val += " <" + unit + ">"; } // Add a comma for arrays - if(num != keyword.Size() - 1) { + if(num != keyword.size() - 1) { val += ", "; } // If it is an array, close it off - else if(keyword.Size() > 1) { + else if(keyword.size() > 1) { val += ")"; } // Add the units to the end if all values have the same units - if((singleUnit) && (num == keyword.Size() - 1) && - (keyword.Unit(num).size() > 0)) { - QString unit = keyword.Unit(num); + if((singleUnit) && (num == keyword.size() - 1) && + (keyword.unit(num).size() > 0)) { + QString unit = keyword.unit(num); // unit.UpCase(); val += " <" + unit + ">"; } @@ -596,18 +596,18 @@ namespace Isis { * @param keyword The PvlKeyword to be formatted * @param num Use the ith value of the keyword */ - QString PvlFormatPds::FormatBool(const PvlKeyword &keyword, int num) { + QString PvlFormatPds::formatBool(const PvlKeyword &keyword, int num) { QString val; val.clear(); // Create a Null value if the value index is greater than the number of values - if((num >= keyword.Size()) || (keyword[num].size() == 0)) { + if((num >= keyword.size()) || (keyword[num].size() == 0)) { return "NULL"; } // If it is an array start it off with a paren - if((keyword.Size() > 1) && (num == 0)) { + if((keyword.size() > 1) && (num == 0)) { val += "("; } @@ -622,11 +622,11 @@ namespace Isis { } // Add a comma for arrays - if(num != keyword.Size() - 1) { + if(num != keyword.size() - 1) { val += ", "; } // If it is an array, close it off - else if(keyword.Size() > 1) { + else if(keyword.size() > 1) { val += ")"; } @@ -641,8 +641,8 @@ namespace Isis { * * @param keyword The keyword (i.e., the Object or Group) */ - QString PvlFormatPds::FormatName(const PvlKeyword &keyword) { - QString text = keyword.Name(); + QString PvlFormatPds::formatName(const PvlKeyword &keyword) { + QString text = keyword.name(); text = text.toUpper(); return text; }; @@ -654,7 +654,7 @@ namespace Isis { * @param name A string representing the end text. * @param keyword The keyword (i.e., the Object or Group) that is ending */ - QString PvlFormatPds::FormatEnd(const QString name, + QString PvlFormatPds::formatEnd(const QString name, const PvlKeyword &keyword) { QString left = name.toUpper(); left += " = "; @@ -674,7 +674,7 @@ namespace Isis { * the first character of the * string is " or ' */ - QString PvlFormatPds::AddQuotes(const QString value) { + QString PvlFormatPds::addQuotes(const QString value) { QString val = value; diff --git a/isis/src/base/objs/PvlFormatPds/PvlFormatPds.h b/isis/src/base/objs/PvlFormatPds/PvlFormatPds.h index 9d31cf043941f59c2a3b7f21668c35a981e09db7..653b134258338190e826b15caf4a5d388ba3a25c 100644 --- a/isis/src/base/objs/PvlFormatPds/PvlFormatPds.h +++ b/isis/src/base/objs/PvlFormatPds/PvlFormatPds.h @@ -54,6 +54,8 @@ namespace Isis { * value. These changes were made in * AddQuotes(), FormatString() and * FormatUnknown() methods. + * @history 2013-03-11 Steven Lambright and Mathew Eis - Brought method names and member variable + * names up to the current Isis 3 coding standards. Fixes #1533. */ class PvlFormatPds : public PvlFormat { @@ -65,29 +67,29 @@ namespace Isis { PvlFormatPds(Pvl &keymap); virtual ~PvlFormatPds() {}; - virtual QString FormatValue(const PvlKeyword &keyword, + virtual QString formatValue(const PvlKeyword &keyword, int valueIndex = 0); - virtual QString FormatName(const PvlKeyword &keyword); - virtual QString FormatEnd(const QString name, + virtual QString formatName(const PvlKeyword &keyword); + virtual QString formatEnd(const QString name, const PvlKeyword &keyword); - virtual QString FormatEOL() { + virtual QString formatEOL() { return "\015\012"; } protected: - virtual QString AddQuotes(const QString value); + virtual QString addQuotes(const QString value); - QString FormatString(const PvlKeyword &keyword, int num); - QString FormatInteger(const PvlKeyword &keyword, int num, int bytes); - QString FormatReal(const PvlKeyword &keyword, int num, int precision); - QString FormatEnum(const PvlKeyword &keyword, int num); - QString FormatBinary(const PvlKeyword &keyword, int num, int bytes); - QString FormatHex(const PvlKeyword &keyword, int num, int bytes); - QString FormatBool(const PvlKeyword &keyword, int num); - QString FormatUnknown(const PvlKeyword &keyword, int num); + QString formatString(const PvlKeyword &keyword, int num); + QString formatInteger(const PvlKeyword &keyword, int num, int bytes); + QString formatReal(const PvlKeyword &keyword, int num, int precision); + QString formatEnum(const PvlKeyword &keyword, int num); + QString formatBinary(const PvlKeyword &keyword, int num, int bytes); + QString formatHex(const PvlKeyword &keyword, int num, int bytes); + QString formatBool(const PvlKeyword &keyword, int num); + QString formatUnknown(const PvlKeyword &keyword, int num); private: - void Init(); + void init(); }; }; diff --git a/isis/src/base/objs/PvlFormatPds/unitTest.cpp b/isis/src/base/objs/PvlFormatPds/unitTest.cpp index ddcb07b7d5110b376d1a423beaf2b7c15854e7ea..c81abb92cc48b1ddcb1158d25c8c7d08481560fb 100644 --- a/isis/src/base/objs/PvlFormatPds/unitTest.cpp +++ b/isis/src/base/objs/PvlFormatPds/unitTest.cpp @@ -40,7 +40,7 @@ int main() { } { PvlKeyword key("fkey2", "rEaL"); - key.AddValue(toString(2)); + key.addValue(toString(2)); out << key << endl; } { @@ -49,7 +49,7 @@ int main() { } { PvlKeyword key("fkey0", "real"); - key.AddValue(toString(0)); + key.addValue(toString(0)); out << key << endl; } { @@ -66,22 +66,22 @@ int main() { } { PvlKeyword key("hkey2", "hEX"); - key.AddValue(toString(2)); + key.addValue(toString(2)); out << key << endl; } { PvlKeyword key("hkey4", "hEX"); - key.AddValue(toString(4)); + key.addValue(toString(4)); out << key << endl; } { PvlKeyword key("binkey", "binary"); - key.AddValue(toString(7)); + key.addValue(toString(7)); out << key << endl; } { PvlKeyword key("binkey16", "binary"); - key.AddValue(toString(16)); + key.addValue(toString(16)); out << key << endl; } { @@ -90,7 +90,7 @@ int main() { } { PvlKeyword key("dblkeyarray", "rEaL"); - key.AddValue(toString(2)); + key.addValue(toString(2)); out << key << endl; } { @@ -112,181 +112,181 @@ int main() { { PvlKeyword key("skey", "somestringval"); cout << key << endl; - key.SetFormat(pdsFormatter); - cout << key << pdsFormatter->FormatEOL(); + key.setFormat(pdsFormatter); + cout << key << pdsFormatter->formatEOL(); } { PvlKeyword key("skey", "string val", "chars"); cout << key << endl; - key.SetFormat(pdsFormatter); - cout << key << pdsFormatter->FormatEOL(); + key.setFormat(pdsFormatter); + cout << key << pdsFormatter->formatEOL(); } { PvlKeyword key("sNAstring", "N/A"); cout << key << endl; - key.SetFormat(pdsFormatter); - cout << key << pdsFormatter->FormatEOL(); + key.setFormat(pdsFormatter); + cout << key << pdsFormatter->formatEOL(); } { PvlKeyword key("sUNKquote", "\"UNK\""); cout << key << endl; - key.SetFormat(pdsFormatter); - cout << key << pdsFormatter->FormatEOL(); + key.setFormat(pdsFormatter); + cout << key << pdsFormatter->formatEOL(); } { PvlKeyword key("ssinglequote", "\'NA\'"); cout << key << endl; - key.SetFormat(pdsFormatter); - cout << key << pdsFormatter->FormatEOL(); + key.setFormat(pdsFormatter); + cout << key << pdsFormatter->formatEOL(); } { PvlKeyword key("notinmap", "junk string"); cout << key << endl; - key.SetFormat(pdsFormatter); - cout << key << pdsFormatter->FormatEOL(); + key.setFormat(pdsFormatter); + cout << key << pdsFormatter->formatEOL(); } { PvlKeyword key("myint", "12345"); cout << key << endl; - key.SetFormat(pdsFormatter); - cout << key << pdsFormatter->FormatEOL(); + key.setFormat(pdsFormatter); + cout << key << pdsFormatter->formatEOL(); } { PvlKeyword key("myfloat", toString(-12345.67e+89), "degrees"); cout << key << endl; - key.SetFormat(pdsFormatter); - cout << key << pdsFormatter->FormatEOL(); + key.setFormat(pdsFormatter); + cout << key << pdsFormatter->formatEOL(); } { PvlKeyword key("fkey", toString(-12345.6789)); cout << key << endl; - key.SetFormat(pdsFormatter); - cout << key << pdsFormatter->FormatEOL(); + key.setFormat(pdsFormatter); + cout << key << pdsFormatter->formatEOL(); } { PvlKeyword key("fkey0", toString(-9876.543)); cout << key << endl; - key.SetFormat(pdsFormatter); - cout << key << pdsFormatter->FormatEOL(); + key.setFormat(pdsFormatter); + cout << key << pdsFormatter->formatEOL(); } { PvlKeyword key("fkey0", toString(-9876.543e-99)); cout << key << endl; - key.SetFormat(pdsFormatter); - cout << key << pdsFormatter->FormatEOL(); + key.setFormat(pdsFormatter); + cout << key << pdsFormatter->formatEOL(); } { PvlKeyword key("fkey2", toString(0.123456)); cout << key << endl; - key.SetFormat(pdsFormatter); - cout << key << pdsFormatter->FormatEOL(); + key.setFormat(pdsFormatter); + cout << key << pdsFormatter->formatEOL(); } { PvlKeyword key("fkey2", toString(0.123456), "goofys"); - key.AddValue(toString(987.123), "goofys"); + key.addValue(toString(987.123), "goofys"); cout << key << endl; - key.SetFormat(pdsFormatter); - cout << key << pdsFormatter->FormatEOL(); + key.setFormat(pdsFormatter); + cout << key << pdsFormatter->formatEOL(); } { PvlKeyword key("fkey2", toString(0.123456), "goofys"); - key.AddValue(toString(987.123)); + key.addValue(toString(987.123)); cout << key << endl; - key.SetFormat(pdsFormatter); - cout << key << pdsFormatter->FormatEOL(); + key.setFormat(pdsFormatter); + cout << key << pdsFormatter->formatEOL(); } { PvlKeyword key("ekey", "unsigned"); cout << key << endl; - key.SetFormat(pdsFormatter); - cout << key << pdsFormatter->FormatEOL(); + key.setFormat(pdsFormatter); + cout << key << pdsFormatter->formatEOL(); } { PvlKeyword key("myarray", "(12345,\"a short string\",1.234)"); cout << key << endl; - key.SetFormat(pdsFormatter); - cout << key << pdsFormatter->FormatEOL(); + key.setFormat(pdsFormatter); + cout << key << pdsFormatter->formatEOL(); } { PvlKeyword key("hkey0", toString((BigInt)0x123456789abcdeffLL)); cout << key << endl; - key.SetFormat(pdsFormatter); - cout << key << pdsFormatter->FormatEOL(); + key.setFormat(pdsFormatter); + cout << key << pdsFormatter->formatEOL(); } { PvlKeyword key("hkey2", toString(0x7a8b)); cout << key << endl; - key.SetFormat(pdsFormatter); - cout << key << pdsFormatter->FormatEOL(); + key.setFormat(pdsFormatter); + cout << key << pdsFormatter->formatEOL(); } { PvlKeyword key("hkey4", toString(0x1a2b3c4d)); cout << key << endl; - key.SetFormat(pdsFormatter); - cout << key << pdsFormatter->FormatEOL(); + key.setFormat(pdsFormatter); + cout << key << pdsFormatter->formatEOL(); } { PvlKeyword key("binkey", toString(0xA)); cout << key << endl; - key.SetFormat(pdsFormatter); - cout << key << pdsFormatter->FormatEOL(); + key.setFormat(pdsFormatter); + cout << key << pdsFormatter->formatEOL(); } { PvlKeyword key("binkey16", toString(0xffff)); cout << key << endl; - key.SetFormat(pdsFormatter); - cout << key << pdsFormatter->FormatEOL(); + key.setFormat(pdsFormatter); + cout << key << pdsFormatter->formatEOL(); } { PvlKeyword key("intkeyarray", toString(1)); - key.AddValue("NULL"); - key.AddValue("3"); - key.AddValue("NULL"); + key.addValue("NULL"); + key.addValue("3"); + key.addValue("NULL"); cout << key << endl; - key.SetFormat(pdsFormatter); - cout << key << pdsFormatter->FormatEOL(); + key.setFormat(pdsFormatter); + cout << key << pdsFormatter->formatEOL(); } { PvlKeyword key("intkeyarray", toString(1), "m"); - key.AddValue("NULL", "m"); - key.AddValue("3", "m"); - key.AddValue("N/A"); - key.AddValue("UNK"); + key.addValue("NULL", "m"); + key.addValue("3", "m"); + key.addValue("N/A"); + key.addValue("UNK"); cout << key << endl; - key.SetFormat(pdsFormatter); - cout << key << pdsFormatter->FormatEOL(); + key.setFormat(pdsFormatter); + cout << key << pdsFormatter->formatEOL(); } { PvlKeyword key("dblkeyarray", toString(1.01)); - key.AddValue("NULL"); - key.AddValue("3.4"); - key.AddValue("UNK"); + key.addValue("NULL"); + key.addValue("3.4"); + key.addValue("UNK"); cout << key << endl; - key.SetFormat(pdsFormatter); - cout << key << pdsFormatter->FormatEOL(); + key.setFormat(pdsFormatter); + cout << key << pdsFormatter->formatEOL(); } @@ -303,9 +303,9 @@ int main() { grp += PvlKeyword("myarray", "(12345,\"a short string\",1.234)"); cout << "=============================== Before" << endl; cout << grp << endl; - grp.SetFormat(pdsFormatter); + grp.setFormat(pdsFormatter); cout << "=============================== After" << endl; - cout << grp << pdsFormatter->FormatEOL(); + cout << grp << pdsFormatter->formatEOL(); } @@ -321,7 +321,7 @@ int main() { grp += PvlKeyword("myfloat", toString(12345.67e+89)); grp += PvlKeyword("myarray", "(12345,\"a short string\",1.234)"); PvlObject obj("Object1"); - obj.AddGroup(grp); + obj.addGroup(grp); PvlObject obj2("Object2"); obj2 += PvlKeyword("skey", "stringval"); @@ -332,7 +332,7 @@ int main() { obj2 += PvlKeyword("myint", toString(12345)); obj2 += PvlKeyword("myfloat", toString(12345.67e+89)); obj2 += PvlKeyword("myarray", "(12345,\"a short string\",1.234)"); - obj.AddObject(obj2); + obj.addObject(obj2); obj += PvlKeyword("skey", "stringval"); obj += PvlKeyword("mystring", "string val"); @@ -346,9 +346,9 @@ int main() { cout << "=============================== Before" << endl; cout << obj << endl; - obj.SetFormat(pdsFormatter); + obj.setFormat(pdsFormatter); cout << "=============================== After" << endl; - cout << obj << pdsFormatter->FormatEOL(); + cout << obj << pdsFormatter->formatEOL(); } @@ -367,7 +367,7 @@ int main() { grp += PvlKeyword("myint", toString(12345)); grp += PvlKeyword("myfloat", toString(12345.67e+89)); grp += PvlKeyword("myarray", "(12345,\"a short string\",1.234)"); - obj.AddGroup(grp); + obj.addGroup(grp); PvlObject obj2("Object2"); obj2 += PvlKeyword("skey", "stringval"); @@ -379,7 +379,7 @@ int main() { obj2 += PvlKeyword("myfloat", toString(12345.67e+89)); obj2 += PvlKeyword("myarray", "(12345,\"a short string\",1.234)"); obj2 += PvlKeyword("binkey16", toString(0x01f0)); - obj.AddObject(obj2); + obj.addObject(obj2); obj += PvlKeyword("skey", "stringval"); obj += PvlKeyword("mystring", "string val"); @@ -399,7 +399,7 @@ int main() { pvl += PvlKeyword("myfloat", toString(12345.67e+89)); pvl += PvlKeyword("myarray", "(12345,\"a short string\",1.234)"); - pvl.AddObject(obj); + pvl.addObject(obj); PvlGroup grp2("Group2"); grp2 += PvlKeyword("skey", "stringval"); @@ -415,29 +415,29 @@ int main() { "Repunzel Repunzel let down your hair. The little toy dog is covered with dust," " but sturdy and staunch he stands; and the little toy soldier is red with rust."); PvlKeyword key(PvlKeyword("array", toString(12345))); - key.AddValue(toString(67890)); - key.AddValue(toString(12345)); - key.AddValue(toString(67890)); - key.AddValue(toString(12345)); - key.AddValue(toString(67890)); - key.AddValue(toString(12345)); - key.AddValue(toString(67890)); - key.AddValue(toString(12345)); - key.AddValue(toString(67890)); - key.AddValue(toString(12345)); - key.AddValue(toString(67890)); - key.AddValue(toString(12345)); - key.AddValue(toString(67890)); - key.AddValue(toString(12345)); + key.addValue(toString(67890)); + key.addValue(toString(12345)); + key.addValue(toString(67890)); + key.addValue(toString(12345)); + key.addValue(toString(67890)); + key.addValue(toString(12345)); + key.addValue(toString(67890)); + key.addValue(toString(12345)); + key.addValue(toString(67890)); + key.addValue(toString(12345)); + key.addValue(toString(67890)); + key.addValue(toString(12345)); + key.addValue(toString(67890)); + key.addValue(toString(12345)); grp2 += key; - pvl.AddGroup(grp2); + pvl.addGroup(grp2); cout << "=============================== Before" << endl; cout << pvl << endl; - pvl.SetFormat(pdsFormatter); + pvl.setFormat(pdsFormatter); cout << "=============================== After" << endl; - cout << pvl << pdsFormatter->FormatEOL(); + cout << pvl << pdsFormatter->formatEOL(); } diff --git a/isis/src/base/objs/PvlGroup/PvlGroup.cpp b/isis/src/base/objs/PvlGroup/PvlGroup.cpp index 5e70e195d422a7d92aae69130121a17c8694c7cb..39fc8076cd424aef716158868d3d63d816f508ab 100644 --- a/isis/src/base/objs/PvlGroup/PvlGroup.cpp +++ b/isis/src/base/objs/PvlGroup/PvlGroup.cpp @@ -70,13 +70,13 @@ namespace Isis { is.seekg(beforeKeywordPos, ios::beg); QString msg = "Expected PVL keyword named [Group], found keyword named ["; - msg += readKeyword.Name(); + msg += readKeyword.name(); msg += "] when reading PVL"; throw IException(IException::Unknown, msg, _FILEINFO_); } - if(readKeyword.Size() == 1) { - result.SetName(readKeyword[0]); + if(readKeyword.size() == 1) { + result.setName(readKeyword[0]); } else { if(is.eof() && !is.bad()) { @@ -87,7 +87,7 @@ namespace Isis { QString msg = "Expected a single value for group name, found [("; - for(int i = 0; i < readKeyword.Size(); i++) { + for(int i = 0; i < readKeyword.size(); i++) { if(i != 0) msg += ", "; msg += readKeyword[i]; @@ -98,8 +98,8 @@ namespace Isis { } - for(int comment = 0; comment < readKeyword.Comments(); comment++) { - result.AddComment(readKeyword.Comment(comment)); + for(int comment = 0; comment < readKeyword.comments(); comment++) { + result.addComment(readKeyword.comment(comment)); } readKeyword = PvlKeyword(); @@ -119,15 +119,15 @@ namespace Isis { is.seekg(beforeKeywordPos, ios::beg); QString msg = "Unexpected ["; - msg += readKeyword.Name(); + msg += readKeyword.name(); msg += "] in Group ["; - msg += result.Name(); + msg += result.name(); msg += "] when reading PVL"; throw IException(IException::Unknown, msg, _FILEINFO_); } } - result.AddKeyword(readKeyword); + result.addKeyword(readKeyword); readKeyword = PvlKeyword(); beforeKeywordPos = is.tellg(); @@ -142,7 +142,7 @@ namespace Isis { is.seekg(beforeKeywordPos, ios::beg); - QString msg = "Group [" + result.Name(); + QString msg = "Group [" + result.name(); msg += "] EndGroup not found before end of file when reading PVL"; throw IException(IException::Unknown, msg, _FILEINFO_); } @@ -159,40 +159,40 @@ namespace Isis { // Set up a Formatter bool removeFormatter = false; - if(group.GetFormat() == NULL) { - group.SetFormat(new PvlFormat()); + if(group.format() == NULL) { + group.setFormat(new PvlFormat()); removeFormatter = true; } Isis::PvlGroup temp("DEFAULT"); - if(group.HasFormatTemplate()) temp = *(Isis::PvlGroup *)group.FormatTemplate(); + if(group.hasFormatTemplate()) temp = *(Isis::PvlGroup *)group.formatTemplate(); // Output comment from the template - if(temp.Comments() > 0) { - for(int k = 0; k < temp.Comments(); k++) { - for(int l = 0; l < group.Indent(); l++) os << " "; - os << temp.Comment(k) << group.GetFormat()->FormatEOL(); + if(temp.comments() > 0) { + for(int k = 0; k < temp.comments(); k++) { + for(int l = 0; l < group.indent(); l++) os << " "; + os << temp.comment(k) << group.format()->formatEOL(); } -// os << group.GetFormat()->FormatEOL(); +// os << group.format()->formatEOL(); } // Output the group comments and name - os << group.GetNameKeyword() << group.GetFormat()->FormatEOL(); - group.SetIndent(group.Indent() + 2); + os << group.nameKeyword() << group.format()->formatEOL(); + group.setIndent(group.indent() + 2); // Output the keywords in this group - if(group.Keywords() > 0) { - os << (Isis::PvlContainer &) group << group.GetFormat()->FormatEOL(); + if(group.keywords() > 0) { + os << (Isis::PvlContainer &) group << group.format()->formatEOL(); } // Output the end of the group - group.SetIndent(group.Indent() - 2); - for(int i = 0; i < group.Indent(); i++) os << " "; - os << group.GetFormat()->FormatEnd("End_Group", group.GetNameKeyword()); + group.setIndent(group.indent() - 2); + for(int i = 0; i < group.indent(); i++) os << " "; + os << group.format()->formatEnd("End_Group", group.nameKeyword()); if(removeFormatter) { - delete group.GetFormat(); - group.SetFormat(NULL); + delete group.format(); + group.setFormat(NULL); } return os; @@ -217,15 +217,15 @@ namespace Isis { * * @param pPvlGrp - PvlGroup to be validated */ - void PvlGroup::ValidateGroup(PvlGroup & pPvlGrp) + void PvlGroup::validateGroup(PvlGroup & pPvlGrp) { // Group cannot be empty - needs to have a keyword - if(pPvlGrp.Keywords() <= 0) { - QString sErrMsg = "Group \"" + pPvlGrp.Name() + "\" has no Keywords\n"; + if(pPvlGrp.keywords() <= 0) { + QString sErrMsg = "Group \"" + pPvlGrp.name() + "\" has no Keywords\n"; throw IException(IException::User, sErrMsg, _FILEINFO_); } - ValidateAllKeywords((PvlContainer &)pPvlGrp); + validateAllKeywords((PvlContainer &)pPvlGrp); } } // end namespace isis diff --git a/isis/src/base/objs/PvlGroup/PvlGroup.h b/isis/src/base/objs/PvlGroup/PvlGroup.h index 63251216539022a6b6dbf263e5fcac635d2ad9de..7746cc05eb21f297decb1171c7b3f8bd407637ac 100644 --- a/isis/src/base/objs/PvlGroup/PvlGroup.h +++ b/isis/src/base/objs/PvlGroup/PvlGroup.h @@ -24,7 +24,7 @@ #include "PvlContainer.h" -namespace Isis { +namespace Isis { /** * @brief Contains multiple PvlContainers * @@ -49,7 +49,9 @@ namespace Isis { * @history 2010-04-13 Eric Hyer - Added copy constructor * Added assignment operator * @history 2010-09-27 Sharmila Prasad - Added API to Validate a PVLGroup - * + * @history 2013-03-11 Steven Lambright and Mathew Eis - Brought method names and member variable + * names up to the current Isis 3 coding standards. Fixes #1533. + * * @todo 2005-04-04 Needs coded example. */ class PvlGroup : public Isis::PvlContainer { @@ -59,19 +61,19 @@ namespace Isis { PvlGroup(const PvlGroup &other); //! Validate a Group comparing with the Template Group - void ValidateGroup(PvlGroup & pPvlGrp); - + void validateGroup(PvlGroup & pPvlGrp); + friend std::istream &operator>>(std::istream &is, PvlGroup &result); friend std::ostream &operator<<(std::ostream &os, PvlGroup &group); /** * Whenever the '==' operator is used on a PvlGroup object, it will call - * the StringEqual() method. This returns a boolean value. + * the stringEqual() method. This returns a boolean value. * @param group The PvlGroup object to compare. * @return True if the other PvlGroup has the same name as this one, false * if not. */ bool operator==(const PvlGroup &group) const { - return PvlKeyword::StringEqual(group.Name(), this->Name()); + return PvlKeyword::stringEqual(group.name(), this->name()); }; const PvlGroup &operator=(const PvlGroup &other); diff --git a/isis/src/base/objs/PvlGroup/unitTest.cpp b/isis/src/base/objs/PvlGroup/unitTest.cpp index 4da9be43613d61f60b6e08f9901bca3fb4b6d37e..67f855f536f18572416baeff98970658e93c2bab 100644 --- a/isis/src/base/objs/PvlGroup/unitTest.cpp +++ b/isis/src/base/objs/PvlGroup/unitTest.cpp @@ -14,12 +14,12 @@ int main() { Isis::PvlKeyword dog("DOG", toString(5.2), "meters"); Isis::PvlKeyword cat("CATTLE"); cat = "Meow"; - cat.AddComment("Cats shed"); + cat.addComment("Cats shed"); Isis::PvlGroup ani("Animals"); ani += dog; ani += cat; - ani.AddComment("/* Pets are cool"); + ani.addComment("/* Pets are cool"); cout << ani << endl; @@ -84,31 +84,31 @@ int main() { PvlGroup pvlTmplGrp("Point_ErrorMagnitude"); PvlKeyword pvlTmplKwrd("Point_ErrorMagnitude__Required", "false"); pvlTmplGrp += pvlTmplKwrd; - pvlTmplKwrd.Clear(); + pvlTmplKwrd.clear(); pvlTmplKwrd = PvlKeyword("LessThan", "double"); pvlTmplGrp += pvlTmplKwrd; - pvlTmplKwrd.Clear(); + pvlTmplKwrd.clear(); pvlTmplKwrd = PvlKeyword("LessThan__Required", "false"); pvlTmplGrp += pvlTmplKwrd; - pvlTmplKwrd.Clear(); + pvlTmplKwrd.clear(); pvlTmplKwrd = PvlKeyword("LessThan__Repeated", "false"); pvlTmplGrp += pvlTmplKwrd; - pvlTmplKwrd.Clear(); + pvlTmplKwrd.clear(); pvlTmplKwrd = PvlKeyword("GreaterThan", "double"); pvlTmplGrp += pvlTmplKwrd; - pvlTmplKwrd.Clear(); + pvlTmplKwrd.clear(); pvlTmplKwrd = PvlKeyword("GreaterThan__Required", "true"); pvlTmplGrp += pvlTmplKwrd; - pvlTmplKwrd.Clear(); + pvlTmplKwrd.clear(); pvlTmplKwrd = PvlKeyword("GreaterThan__Repeated", "true"); pvlTmplGrp += pvlTmplKwrd; - pvlTmplKwrd.Clear(); + pvlTmplKwrd.clear(); cout << "Template Group:\n" << pvlTmplGrp << endl << endl; // PvlGroup to be Validated @@ -116,7 +116,7 @@ int main() { PvlKeyword pvlKwrd("LessThan", toString(2.5)); try { - pvlTmplGrp.ValidateGroup(pvlGrp); + pvlTmplGrp.validateGroup(pvlGrp); } catch (IException &e) { cerr << "\n**Test1**RequiredKeyword\nResults Group:\n" << pvlGrp << endl; @@ -126,22 +126,22 @@ int main() { // Test Repeated values try { - pvlKwrd.Clear(); + pvlKwrd.clear(); PvlKeyword pvlKwrd("LessThan", toString(2.5)); pvlGrp += pvlKwrd; - pvlKwrd.Clear(); + pvlKwrd.clear(); pvlKwrd = PvlKeyword("GreaterThan", toString(3.5)); pvlGrp += pvlKwrd; - pvlKwrd.Clear(); + pvlKwrd.clear(); pvlKwrd = PvlKeyword("GreaterThan", toString(4.4545)); pvlGrp += pvlKwrd; - pvlKwrd.Clear(); + pvlKwrd.clear(); pvlKwrd = PvlKeyword("GreaterThan", toString(100.8988095)); pvlGrp += pvlKwrd; - pvlTmplGrp.ValidateGroup(pvlGrp); + pvlTmplGrp.validateGroup(pvlGrp); cout << "\n**Test2**\nRepeated values are allowed if Repeat flag is set\n"; cout << "Results Group:\n" << pvlGrp << endl; @@ -153,15 +153,15 @@ int main() { // Test for unvalidated elements try { - pvlKwrd.Clear(); + pvlKwrd.clear(); PvlKeyword pvlKwrd("Less123Than", toString(2.5)); pvlGrp += pvlKwrd; - pvlKwrd.Clear(); + pvlKwrd.clear(); pvlKwrd = PvlKeyword("GreaterThan", toString(3.5)); pvlGrp += pvlKwrd; - pvlTmplGrp.ValidateGroup(pvlGrp); + pvlTmplGrp.validateGroup(pvlGrp); cout << "\n**Test3**\nUnvalidated Keywords\n"; cout << "Results Group:\n" << pvlGrp << endl; diff --git a/isis/src/base/objs/PvlKeyword/PvlKeyword.cpp b/isis/src/base/objs/PvlKeyword/PvlKeyword.cpp index e83b5a7c77342d31483e6c51aebb5d20c06933d6..55617b540903d193b73559867aa774b52e4480d8 100644 --- a/isis/src/base/objs/PvlKeyword/PvlKeyword.cpp +++ b/isis/src/base/objs/PvlKeyword/PvlKeyword.cpp @@ -29,14 +29,14 @@ #include "IException.h" #include "Message.h" #include "IString.h" -#include "PvlSequence.h" #include "PvlFormat.h" +#include "PvlSequence.h" using namespace std; namespace Isis { //! Constructs a blank PvlKeyword object. PvlKeyword::PvlKeyword() { - Init(); + init(); } @@ -46,8 +46,8 @@ namespace Isis { * @param name The keyword name */ PvlKeyword::PvlKeyword(QString name) { - Init(); - SetName(name); + init(); + setName(name); } @@ -61,15 +61,15 @@ namespace Isis { */ PvlKeyword::PvlKeyword(QString name, QString value, QString unit) { - Init(); - SetName(name); - AddValue(value, unit); + init(); + setName(name); + addValue(value, unit); } //! Copy constructor PvlKeyword::PvlKeyword(const PvlKeyword &other) { - Init(); + init(); *this = other; } @@ -78,33 +78,33 @@ namespace Isis { * Destructs a PvlKeyword object. */ PvlKeyword::~PvlKeyword() { - if(p_units) { - delete p_units; - p_units = NULL; + if(m_units) { + delete m_units; + m_units = NULL; } - if(p_comments) { - delete p_comments; - p_comments = NULL; + if(m_comments) { + delete m_comments; + m_comments = NULL; } - if(p_name) { - delete [] p_name; - p_name = NULL; + if(m_name) { + delete [] m_name; + m_name = NULL; } } //! Clears all PvlKeyword data. - void PvlKeyword::Init() { - p_name = NULL; - p_units = NULL; - p_comments = NULL; - p_width = 0; - p_indent = 0; - p_formatter = NULL; - - Clear(); + void PvlKeyword::init() { + m_name = NULL; + m_units = NULL; + m_comments = NULL; + m_width = 0; + m_indent = 0; + m_formatter = NULL; + + clear(); } /** @@ -115,16 +115,16 @@ namespace Isis { * @return bool True if the value is null, false if it's * not. */ - bool PvlKeyword::IsNull(int index) const { - if(Size() == 0) return true; - if(index < 0 || index >= (int)p_values.size()) { + bool PvlKeyword::isNull(int index) const { + if(size() == 0) return true; + if(index < 0 || index >= (int)m_values.size()) { QString msg = Message::ArraySubscriptNotInRange(index); throw IException(IException::Programmer, msg, _FILEINFO_); } - if(StringEqual("NULL", p_values[index])) return true; - if(StringEqual("", p_values[index])) return true; - if(StringEqual("\"\"", p_values[index])) return true; - if(StringEqual("''", p_values[index])) return true; + if(stringEqual("NULL", m_values[index])) return true; + if(stringEqual("", m_values[index])) return true; + if(stringEqual("\"\"", m_values[index])) return true; + if(stringEqual("''", m_values[index])) return true; return false; } @@ -133,7 +133,7 @@ namespace Isis { * * @param name The new keyword name. */ - void PvlKeyword::SetName(QString name) { + void PvlKeyword::setName(QString name) { QString final = name.trimmed(); if(final.contains(QRegExp("\\s"))) { QString msg = "[" + name + "] is invalid. Keyword name cannot "; @@ -141,15 +141,15 @@ namespace Isis { throw IException(IException::User, msg, _FILEINFO_); } - if(p_name) { - delete [] p_name; - p_name = NULL; + if(m_name) { + delete [] m_name; + m_name = NULL; } if(final != "") { QByteArray finalAscii = final.toAscii(); - p_name = new char[finalAscii.size() + 1]; - strncpy(p_name, finalAscii.data(), final.size() + 1); + m_name = new char[finalAscii.size() + 1]; + strncpy(m_name, finalAscii.data(), final.size() + 1); } } @@ -158,19 +158,19 @@ namespace Isis { * * If no current value exists, this method sets the given value * to the PvlKeyword. Otherwise, it clears any existing values - * and resets to the value given using AddValue(). Defaults to + * and resets to the value given using addValue(). Defaults to * unit = "" (empty QString). * * @param value New value to be assigned. * @param unit Units of measurement corresponding to the value. * - * @see AddValue() + * @see addValue() * @see operator= * @see operator+= */ - void PvlKeyword::SetValue(QString value, QString unit) { - Clear(); - AddValue(value, unit); + void PvlKeyword::setValue(QString value, QString unit) { + clear(); + addValue(value, unit); } @@ -179,15 +179,15 @@ namespace Isis { * * @param units New units to be assigned. */ - void PvlKeyword::SetUnits(QString units) { - if(!p_units) { - p_units = new std::vector(); + void PvlKeyword::setUnits(QString units) { + if(!m_units) { + m_units = new std::vector(); } - p_units->clear(); + m_units->clear(); - for(int i = 0; i < p_values.size(); i++) { - p_units->push_back(units); + for(int i = 0; i < m_values.size(); i++) { + m_units->push_back(units); } } @@ -200,27 +200,27 @@ namespace Isis { * * @throws Isis::iException::Programmer - Given value must exist */ - void PvlKeyword::SetUnits(QString value, QString units) { + void PvlKeyword::setUnits(QString value, QString units) { bool found = false; int i = -1; - while(!found && ++i < (int) p_values.size()) { - if(value == p_values[i]) { + while(!found && ++i < (int) m_values.size()) { + if(value == m_values[i]) { found = true; } } if(found) { - if(!p_units) { - p_units = new std::vector(p_values.size()); + if(!m_units) { + m_units = new std::vector(m_values.size()); } else { - p_units->resize(p_values.size()); + m_units->resize(m_values.size()); } - ASSERT(i < (int) p_units->size()); + ASSERT(i < (int) m_units->size()); - (*p_units)[i] = units; + (*m_units)[i] = units; } else { IString msg = "PvlKeyword::SetUnits called with value [" + value + @@ -233,20 +233,20 @@ namespace Isis { * * Sets new values. * - * Overwrites the '=' operator to add a new value using AddValue(). Like - * SetValue(), this method clears any previously existing values and resets to + * Overwrites the '=' operator to add a new value using addValue(). Like + * setValue(), this method clears any previously existing values and resets to * the given value with unit = "" (empty QString). * * @param value The value to be added. * @return PvlKeyword& Reference to PvlKeyword object. * - * @see AddValue() - * @see SetValue() + * @see addValue() + * @see setValue() * @see operator+= */ PvlKeyword &PvlKeyword::operator=(QString value) { - Clear(); - AddValue(value); + clear(); + addValue(value); return *this; } @@ -261,25 +261,25 @@ namespace Isis { * @param value New value to be assigned. * @param unit Units of measurement corresponding to the value. * - * @see SetValue() + * @see setValue() * @see operator= * @see operator+= */ - void PvlKeyword::AddValue(QString value, QString unit) { - p_values.append(value); + void PvlKeyword::addValue(QString value, QString unit) { + m_values.append(value); if(unit != "") { - if(!p_units) { - p_units = new std::vector(p_values.size()); + if(!m_units) { + m_units = new std::vector(m_values.size()); } else { - p_units->resize(p_values.size()); + m_units->resize(m_values.size()); } - (*p_units)[p_units->size() - 1] = unit; + (*m_units)[m_units->size() - 1] = unit; } - else if(p_units) { - p_units->push_back(""); + else if(m_units) { + m_units->push_back(""); } } @@ -287,29 +287,29 @@ namespace Isis { * Adds a value. * * Overwrites the '+=' operators to add a new value. Like - * AddValue(), this method keeps any previously existing values + * addValue(), this method keeps any previously existing values * and adds the new value with unit = "" (empty QString) to the * array of values for this PvlKeyword object. * * @param value The new value. * @return PvlKeyword& Reference to PvlKeyword object. * - * @see AddValue() - * @see SetValue() + * @see addValue() + * @see setValue() * @see operator= */ PvlKeyword &PvlKeyword::operator+=(QString value) { - AddValue(value); + addValue(value); return *this; } //! Clears all values and units for this PvlKeyword object. - void PvlKeyword::Clear() { - p_values.clear(); + void PvlKeyword::clear() { + m_values.clear(); - if(p_units) { - delete p_units; - p_units = NULL; + if(m_units) { + delete m_units; + m_units = NULL; } } @@ -332,13 +332,13 @@ namespace Isis { * @see const operator[] */ QString &PvlKeyword::operator[](int index) { - if(index < 0 || index >= (int)p_values.size()) { + if(index < 0 || index >= (int)m_values.size()) { QString msg = (Message::ArraySubscriptNotInRange(index)) + - "for Keyword [" + toString(p_name) + "]"; + "for Keyword [" + toString(m_name) + "]"; throw IException(IException::Programmer, msg, _FILEINFO_); } - return p_values[index]; + return m_values[index]; } /** @@ -354,11 +354,11 @@ namespace Isis { * @see operator[] */ const QString &PvlKeyword::operator[](int index) const { - if(index < 0 || index >= (int)p_values.size()) { + if(index < 0 || index >= (int)m_values.size()) { QString msg = Message::ArraySubscriptNotInRange(index); throw IException(IException::Programmer, msg, _FILEINFO_); } - return p_values[index]; + return m_values[index]; } /** @@ -370,14 +370,14 @@ namespace Isis { * @return QString The unit at the index. * @throws iException ArraySubscriptNotInRange (index) Index out of bounds. */ - QString PvlKeyword::Unit(int index) const { - if(!p_units) return ""; + QString PvlKeyword::unit(int index) const { + if(!m_units) return ""; - if(index < 0 || index >= (int)p_units->size()) { + if(index < 0 || index >= (int)m_units->size()) { QString msg = Message::ArraySubscriptNotInRange(index); throw IException(IException::Programmer, msg, _FILEINFO_); } - return (*p_units)[index]; + return (*m_units)[index]; } /** @@ -385,32 +385,32 @@ namespace Isis { * * @param comment The new comment. * - * @see AddCommentWrapped() - * @see AddComments() - * @see ClearComments() + * @see addCommentWrapped() + * @see addComments() + * @see clearComment() */ - void PvlKeyword::AddComment(QString comment) { - if(!p_comments) { - p_comments = new std::vector(); + void PvlKeyword::addComment(QString comment) { + if(!m_comments) { + m_comments = new std::vector(); } if(comment.size() == 0) { - p_comments->push_back("#"); + m_comments->push_back("#"); } if(comment[0] == '#') { - p_comments->push_back(comment); + m_comments->push_back(comment); } else if(comment.size() == 1) { - p_comments->push_back("# " + comment); + m_comments->push_back("# " + comment); } else if((comment[0] == '/') && (comment[1] == '*')) { - p_comments->push_back(comment); + m_comments->push_back(comment); } else if((comment[0] == '/') && (comment[1] == '/')) { - p_comments->push_back(comment); + m_comments->push_back(comment); } else { - p_comments->push_back("# " + comment); + m_comments->push_back("# " + comment); } } @@ -419,11 +419,11 @@ namespace Isis { * * @param comment The new comment to add * - * @see AddComment() - * @see AddComments() - * @see ClearComments() + * @see addComment() + * @see addComments() + * @see clearComment() */ - void PvlKeyword::AddCommentWrapped(QString comment) { + void PvlKeyword::addCommentWrapped(QString comment) { IString cmt = comment; IString token = cmt.Token(" "); while(cmt != "") { @@ -435,16 +435,16 @@ namespace Isis { token = cmt.Token(" "); length = temp.size() + token.size() + 1; } - AddComment(temp.c_str()); + addComment(temp.c_str()); } - if(token.size() != 0) AddComment(token.c_str()); + if(token.size() != 0) addComment(token.c_str()); } //! Clears the current comments. - void PvlKeyword::ClearComments() { - if(p_comments) { - delete p_comments; - p_comments = NULL; + void PvlKeyword::clearComment() { + if(m_comments) { + delete m_comments; + m_comments = NULL; } } @@ -454,14 +454,14 @@ namespace Isis { * @return QString The comment at the index. * @throws iException ArraySubscriptNotInRange (index) Index out of bounds. */ - QString PvlKeyword::Comment(int index) const { - if(!p_comments) return ""; + QString PvlKeyword::comment(int index) const { + if(!m_comments) return ""; - if(index < 0 || index >= (int)p_comments->size()) { + if(index < 0 || index >= (int)m_comments->size()) { QString msg = Message::ArraySubscriptNotInRange(index); throw IException(IException::Programmer, msg, _FILEINFO_); } - return (*p_comments)[index]; + return (*m_comments)[index]; }; /** @@ -471,13 +471,13 @@ namespace Isis { * @return QString The value in its proper format (iPVL or * PVL). */ - QString PvlKeyword::Reform(const QString &value) const { + QString PvlKeyword::reform(const QString &value) const { #if 0 static bool firstTime = true; static bool iPVL = true; if(firstTime) { firstTime = false; - Isis::PvlGroup &g = Isis::Preference::Preferences().FindGroup( + Isis::PvlGroup &g = Isis::Preference::Preferences().findGroup( "UserInterface", Isis::Pvl::Traverse); Isis::IString s = (QString) g["PvlFormat"]; @@ -485,9 +485,9 @@ namespace Isis { if(s == "PVL") iPVL = false; } - if(iPVL) return ToIPvl(value); + if(iPVL) return toIPvl(value); #endif - return ToPvl(value); + return toPvl(value); } /** @@ -495,7 +495,7 @@ namespace Isis { * @param value The value to be converted. * @return QString The value in iPVL format. */ - QString PvlKeyword::ToIPvl(const QString &value) const { + QString PvlKeyword::toIPvl(const QString &value) const { QString out; bool upcase = true; bool lastlower = true; @@ -523,7 +523,7 @@ namespace Isis { * @param value The value to be converted. * @return QString The value in PVL format. */ - QString PvlKeyword::ToPvl(const QString &value) const { + QString PvlKeyword::toPvl(const QString &value) const { QString out; bool lastlower = false; for(int i = 0; i < value.size(); i++) { @@ -548,7 +548,7 @@ namespace Isis { * @return bool True or false, depending on whether * the QString values are equal. */ - bool PvlKeyword::StringEqual(const QString &QString1, + bool PvlKeyword::stringEqual(const QString &QString1, const QString &QString2) { Isis::IString s1(QString1); Isis::IString s2(QString2); @@ -575,13 +575,13 @@ namespace Isis { * false if they're not. * @throws iException ArraySubscriptNotInRange (index) Index out of bounds. */ - bool PvlKeyword::IsEquivalent(QString QString1, int index) const { - if(index < 0 || index >= (int)p_values.size()) { + bool PvlKeyword::isEquivalent(QString QString1, int index) const { + if(index < 0 || index >= (int)m_values.size()) { QString msg = Message::ArraySubscriptNotInRange(index); throw IException(IException::Programmer, msg, _FILEINFO_); } - return StringEqual(p_values[index], QString1); + return stringEqual(m_values[index], QString1); } /** @@ -590,7 +590,7 @@ namespace Isis { * @return PvlKeyword& Reference to PvlKeyword object. */ PvlKeyword &PvlKeyword::operator=(Isis::PvlSequence &seq) { - Clear(); + clear(); for(int i = 0; i < seq.Size(); i++) { QString temp = "("; for(int j = 0; j < (int)seq[i].size(); j++) { @@ -624,7 +624,7 @@ namespace Isis { * @return ostream& Reference to ostream. * @see operator<< */ - ostream &PvlKeyword::WriteWithWrap(std::ostream &os, + ostream &PvlKeyword::writeWithWrap(std::ostream &os, const QString &textToWrite, int startColumn, PvlFormat &format) const { @@ -677,7 +677,7 @@ namespace Isis { // Position set QString remainingText = textToWrite; - int spaceForText = format.CharLimit() - 1 - format.FormatEOL().length() - startColumn; + int spaceForText = format.charLimit() - 1 - format.formatEOL().length() - startColumn; // indexOf quote positions to better determine which line to put the // QString on. Data structure: vector< startPos, endPos > where @@ -853,8 +853,8 @@ namespace Isis { // we wrote as much as possible, do a newline and repeat if(!remainingText.isEmpty()) { - os << format.FormatEOL(); - WriteSpaces(os, startColumn); + os << format.formatEOL(); + writeSpaces(os, startColumn); // dont allow spaces to begin the next line inside what we're printing if(remainingText[0] == ' ') { @@ -876,7 +876,7 @@ namespace Isis { * @param os Stream to write to * @param numSpaces number of spaces to write */ - void PvlKeyword::WriteSpaces(std::ostream &os, int numSpaces) const { + void PvlKeyword::writeSpaces(std::ostream &os, int numSpaces) const { for(int space = 0; space < numSpaces; space ++) { os << " "; } @@ -889,8 +889,8 @@ namespace Isis { * * @param formatter A pointer to the formatter to be used */ - void PvlKeyword::SetFormat(PvlFormat *formatter) { - p_formatter = formatter; + void PvlKeyword::setFormat(PvlFormat *formatter) { + m_formatter = formatter; } @@ -900,8 +900,8 @@ namespace Isis { * @return PvlFormat* Pointer to PvlFormat. * */ - PvlFormat *PvlKeyword::GetFormat() { - return p_formatter; + PvlFormat *PvlKeyword::format() { + return m_formatter; }; /** @@ -925,7 +925,7 @@ namespace Isis { while(!error && !keywordDone) { istream::pos_type beforeLine = is.tellg(); - line = PvlKeyword::ReadLine(is, multiLineComment); + line = PvlKeyword::readLine(is, multiLineComment); // We read an empty line (failed to read next non-empty line) // and didnt complete our keyword, essentially we hit the implicit @@ -1011,7 +1011,7 @@ namespace Isis { bool attemptedRead = false; try { - attemptedRead = PvlKeyword::ReadCleanKeyword(keywordString, + attemptedRead = PvlKeyword::readCleanKeyword(keywordString, keywordComments, keywordName, keywordValues); @@ -1040,11 +1040,11 @@ namespace Isis { continue; } - result.SetName(keywordName); - result.AddComments(keywordComments); + result.setName(keywordName); + result.addComments(keywordComments); for(unsigned int value = 0; value < keywordValues.size(); value++) { - result.AddValue(keywordValues[value].first, + result.addValue(keywordValues[value].first, keywordValues[value].second); } @@ -1106,9 +1106,9 @@ namespace Isis { * * @param comments Comments to associate with this keyword */ - void PvlKeyword::AddComments(const std::vector &comments) { + void PvlKeyword::addComments(const std::vector &comments) { for(unsigned int i = 0; i < comments.size(); i++) { - AddComment(comments[i]); + addComment(comments[i]); } } @@ -1127,7 +1127,7 @@ namespace Isis { * @return bool false if it is invalid but could become valid given more data, * true if it is a valid keyword and successful */ - bool PvlKeyword::ReadCleanKeyword(QString keyword, + bool PvlKeyword::readCleanKeyword(QString keyword, std::vector< QString > &keywordComments, QString &keywordName, std::vector< std::pair > &keywordValues) { @@ -1329,7 +1329,7 @@ namespace Isis { */ // Get the keyword name - keywordName = ReadValue(keyword, explicitIncomplete); + keywordName = readValue(keyword, explicitIncomplete); // we have taken the name; if nothing remains then it is value-less // and we are done. @@ -1398,7 +1398,7 @@ namespace Isis { bool foundComma = false; // keyword should be of the format: VALUE ,....) // Read VALUE from it - QString nextItem = ReadValue(keyword, explicitIncomplete, extraDelims); + QString nextItem = readValue(keyword, explicitIncomplete, extraDelims); if(!keyword.isEmpty() && keyword[0] == wrongClosingParen) { @@ -1421,7 +1421,7 @@ namespace Isis { // Now there's 2 possibilities: units or no units -> // if we have units, read them if(!keyword.isEmpty() && keyword[0] == '<') { - QString unitsValue = ReadValue(keyword, explicitIncomplete); + QString unitsValue = readValue(keyword, explicitIncomplete); keywordValue.second = unitsValue; } @@ -1481,7 +1481,7 @@ namespace Isis { // Read units here if they exist and apply them // case: (A,B,C) if(!keyword.isEmpty() && keyword[0] == '<') { - QString units = ReadValue(keyword, explicitIncomplete); + QString units = readValue(keyword, explicitIncomplete); for(unsigned int val = 0; val < keywordValues.size(); val++) { if(keywordValues[val].second.isEmpty()) { keywordValues[val].second = units; @@ -1499,10 +1499,10 @@ namespace Isis { We need to read the single value/unit in the keywordValues array. */ pair keywordValue; - keywordValue.first = ReadValue(keyword, explicitIncomplete); + keywordValue.first = readValue(keyword, explicitIncomplete); if(!keyword.isEmpty() && keyword[0] == '<') { - keywordValue.second = ReadValue(keyword, explicitIncomplete); + keywordValue.second = readValue(keyword, explicitIncomplete); } keywordValues.push_back(keywordValue); @@ -1550,10 +1550,10 @@ namespace Isis { } - QString PvlKeyword::ReadValue(QString &keyword, bool "eProblem) { + QString PvlKeyword::readValue(QString &keyword, bool "eProblem) { std::vector< std::pair > otherDelims; - return ReadValue(keyword, quoteProblem, otherDelims); + return readValue(keyword, quoteProblem, otherDelims); } /** @@ -1572,7 +1572,7 @@ namespace Isis { * * @return QString The stripped out token. */ - QString PvlKeyword::ReadValue(QString &keyword, bool "eProblem, + QString PvlKeyword::readValue(QString &keyword, bool "eProblem, const std::vector< std::pair > & otherDelimiters) { QString value = ""; @@ -1707,7 +1707,7 @@ namespace Isis { * * @return QString The first encountered line of data */ - QString PvlKeyword::ReadLine(std::istream &is, bool insideComment) { + QString PvlKeyword::readLine(std::istream &is, bool insideComment) { QString lineOfData; while(is.good() && lineOfData.isEmpty()) { @@ -1767,11 +1767,11 @@ namespace Isis { * @param os The output stream. * @param keyword The PvlKeyword object to output. * @return ostream& Reference to ostream. - * @see WriteWithWrap() + * @see writeWithWrap() */ ostream &operator<<(std::ostream &os, const Isis::PvlKeyword &keyword) { // Set up a Formatter - PvlFormat *tempFormat = keyword.p_formatter; + PvlFormat *tempFormat = keyword.m_formatter; bool removeFormatter = false; if(tempFormat == NULL) { tempFormat = new PvlFormat(); @@ -1779,23 +1779,23 @@ namespace Isis { } // Write out the comments - for(int i = 0; i < keyword.Comments(); i++) { - for(int j = 0; j < keyword.Indent(); j++) os << " "; - os << keyword.Comment(i) << tempFormat->FormatEOL(); + for(int i = 0; i < keyword.comments(); i++) { + for(int j = 0; j < keyword.indent(); j++) os << " "; + os << keyword.comment(i) << tempFormat->formatEOL(); } // Write the keyword name & add length to startColumn. int startColumn = 0; - for(int i = 0; i < keyword.Indent(); i++) { + for(int i = 0; i < keyword.indent(); i++) { os << " "; ++startColumn; } - QString keyname = tempFormat->FormatName(keyword); + QString keyname = tempFormat->formatName(keyword); os << keyname; startColumn += keyname.length(); // Add padding and then write equal sign. - for(int i = 0; i < keyword.Width() - (int)keyname.size(); ++i) { + for(int i = 0; i < keyword.width() - (int)keyname.size(); ++i) { os << " "; ++startColumn; } @@ -1803,17 +1803,17 @@ namespace Isis { startColumn += 3; // If it has no value then write a NULL - if(keyword.Size() == 0) { - os << tempFormat->FormatValue(keyword); + if(keyword.size() == 0) { + os << tempFormat->formatValue(keyword); } // Loop and write each array value QString stringToWrite; - for(int i = 0; i < keyword.Size(); i ++) { - stringToWrite += tempFormat->FormatValue(keyword, i); + for(int i = 0; i < keyword.size(); i ++) { + stringToWrite += tempFormat->formatValue(keyword, i); } - keyword.WriteWithWrap(os, + keyword.writeWithWrap(os, stringToWrite, startColumn, *tempFormat); @@ -1827,39 +1827,39 @@ namespace Isis { //! This is an assignment operator const PvlKeyword &PvlKeyword::operator=(const PvlKeyword &other) { if(this != &other) { - p_formatter = other.p_formatter; + m_formatter = other.m_formatter; - if(p_name) { - delete [] p_name; - p_name = NULL; + if(m_name) { + delete [] m_name; + m_name = NULL; } - if(other.p_name) { - SetName(other.p_name); + if(other.m_name) { + setName(other.m_name); } - p_values = other.p_values; + m_values = other.m_values; - if(p_units) { - delete p_units; - p_units = NULL; + if(m_units) { + delete m_units; + m_units = NULL; } - if(other.p_units) { - p_units = new std::vector(*other.p_units); + if(other.m_units) { + m_units = new std::vector(*other.m_units); } - if(p_comments) { - delete p_comments; - p_comments = NULL; + if(m_comments) { + delete m_comments; + m_comments = NULL; } - if(other.p_comments) { - p_comments = new std::vector(*other.p_comments); + if(other.m_comments) { + m_comments = new std::vector(*other.m_comments); } - p_width = other.p_width; - p_indent = other.p_indent; + m_width = other.m_width; + m_indent = other.m_indent; } return *this; @@ -1877,11 +1877,11 @@ namespace Isis { * @param psValueType - Value Type (positive / negative) for numbers * @param pvlKwrdValue - Template Keyword __Value or __Range to validate keyword's value */ - void PvlKeyword::ValidateKeyword(PvlKeyword & pvlKwrd, QString psValueType, PvlKeyword* pvlKwrdValue) + void PvlKeyword::validateKeyword(PvlKeyword & pvlKwrd, QString psValueType, PvlKeyword* pvlKwrdValue) { - int iSize = pvlKwrd.Size(); + int iSize = pvlKwrd.size(); - QString sType = p_values[0].toLower(); + QString sType = m_values[0].toLower(); // Value type if(psValueType.length()) { @@ -1892,7 +1892,7 @@ namespace Isis { bool bRange = false; bool bValue = false; if(pvlKwrdValue != NULL) { - QString sValueName = pvlKwrdValue->Name(); + QString sValueName = pvlKwrdValue->name(); // Check for Range if(sValueName.contains("__Range")) { @@ -1914,30 +1914,30 @@ namespace Isis { try { iValue = toInt(sValue); } catch(IException & e) { - QString sErrMsg = "\"" +pvlKwrd.Name() +"\" expects an Integer value"; + QString sErrMsg = "\"" +pvlKwrd.name() +"\" expects an Integer value"; throw IException(e, IException::User, sErrMsg, _FILEINFO_); } if(bRange && (iValue < dRangeMin || iValue > dRangeMax)) { - QString sErrMsg = "\"" +pvlKwrd.Name() +"\" is not in the specified Range"; + QString sErrMsg = "\"" +pvlKwrd.name() +"\" is not in the specified Range"; throw IException(IException::User, sErrMsg, _FILEINFO_); } if(bValue) { bool bFound = false; - for(int j=0; jSize(); j++) { + for(int j=0; jsize(); j++) { if(iValue == toInt((*pvlKwrdValue)[j])) { bFound = true; break; } } if(!bFound) { - QString sErrMsg = "\"" +pvlKwrd.Name() +"\" has value not in the accepted list"; + QString sErrMsg = "\"" +pvlKwrd.name() +"\" has value not in the accepted list"; throw IException(IException::User, sErrMsg, _FILEINFO_); } } // Type is specified (positive / negative) if(psValueType.length()) { if((psValueType == "positive" && iValue < 0) || (psValueType == "negative" && iValue >= 0) ) { - QString sErrMsg = "\"" +pvlKwrd.Name() +"\" has invalid value"; + QString sErrMsg = "\"" +pvlKwrd.name() +"\" has invalid value"; throw IException(IException::User, sErrMsg, _FILEINFO_); } } @@ -1953,26 +1953,26 @@ namespace Isis { if(sValue != "null"){ double dValue = toDouble(sValue); if(bRange && (dValue < dRangeMin || dValue > dRangeMax)) { - QString sErrMsg = "\"" +pvlKwrd.Name() +"\" is not in the specified Range"; + QString sErrMsg = "\"" +pvlKwrd.name() +"\" is not in the specified Range"; throw IException(IException::User, sErrMsg, _FILEINFO_); } if(bValue) { bool bFound = false; - for(int j=0; jSize(); j++) { + for(int j=0; jsize(); j++) { if(dValue == toDouble((*pvlKwrdValue)[j])) { bFound = true; break; } } if(!bFound) { - QString sErrMsg = "\"" +pvlKwrd.Name() +"\" has value not in the accepted list"; + QString sErrMsg = "\"" +pvlKwrd.name() +"\" has value not in the accepted list"; throw IException(IException::User, sErrMsg, _FILEINFO_); } } // Type is specified (positive / negative) if(psValueType.length()) { if((psValueType == "positive" && dValue < 0) || (psValueType == "negative" && dValue >= 0) ) { - QString sErrMsg = "\"" +pvlKwrd.Name() +"\" has invalid value"; + QString sErrMsg = "\"" +pvlKwrd.name() +"\" has invalid value"; throw IException(IException::User, sErrMsg, _FILEINFO_); } } @@ -1986,7 +1986,7 @@ namespace Isis { for(int i=0; iSize(); i++) { + for(int i=0; isize(); i++) { if(sValue == (*pvlKwrdValue)[i].toLower()) { bValFound = true; break; } } if(!bValFound) { - QString sErrMsg = "Wrong Type of value in the Keyword \"" + Name() + "\" \n"; + QString sErrMsg = "Wrong Type of value in the Keyword \"" + name() + "\" \n"; throw IException(IException::User, sErrMsg, _FILEINFO_); } } diff --git a/isis/src/base/objs/PvlKeyword/PvlKeyword.h b/isis/src/base/objs/PvlKeyword/PvlKeyword.h index a10a262dbfc62ff1a9014dbdd23f3c7a7e89b623..6c724f328ac5002f081b7f98077989d336404708 100644 --- a/isis/src/base/objs/PvlKeyword/PvlKeyword.h +++ b/isis/src/base/objs/PvlKeyword/PvlKeyword.h @@ -50,7 +50,7 @@ namespace Isis { * * @internal * @history 2005-04-08 Leah Dahmer - wrote class documentation. - * @history 2005-04-08 Leah Dahmer - added the WriteWithWrap() method so + * @history 2005-04-08 Leah Dahmer - added the writeWithWrap() method so * keyword values will now be wrapped when * the length exceeds 80 characters. * @history 2005-05-18 Jeff Anderson - Fixed minor problems with wrapping code @@ -65,10 +65,10 @@ namespace Isis { * statement lines in a row are over 78 characters * long. * @history 2008-07-03 Steven Lambright - Added const functionality - * @history 2008-07-10 Steven Lambright - StringEqual is now static, all + * @history 2008-07-10 Steven Lambright - stringEqual is now static, all * AddComments methods are public * @history 2008-09-30 Christopher Austin - replaced all std::endl in the << - * operator as well as WriteWithWrap() with PvlFormat.FormatEOL(), and + * operator as well as writeWithWrap() with PvlFormat.FormatEOL(), and * formatted wraps accordingly * @history 2009-08-18 Eric Hyer - Added both SetUnits methods and ASSERT macro * @history 2009-09-09 Steven Lambright - Removed ASSERT macro, fixed @@ -87,10 +87,12 @@ namespace Isis { * @history 2010-09-27 Sharmila Prasad - API to Validate a Keyword for type and values * @history 2010-10-18 Sharmila Prasad - Added more options for the keyword validation * @history 2011-04-12 Steven Lambright - Lessened the memory footprint by - * changing p_comments and p_units to pointers, p_values to a - * QVarLengthArray and p_name to a char *. - * @history 2011-07-07 Sharmila Prasad - While validating keyword, display appropriate + * changing m_comments and m_units to pointers, m_values to a + * QVarLengthArray and m_name to a char *. + * @history 2011-07-07 Sharmila Prasad - While validating keyword, display appropriate * error msg when converting string to integer which has a double value. + * @history 2013-03-11 Steven Lambright and Mathew Eis - Brought method names and member variable + * names up to the current Isis 3 coding standards. Fixes #1533. */ class PvlKeyword { public: @@ -101,16 +103,16 @@ namespace Isis { PvlKeyword(const PvlKeyword &other); ~PvlKeyword(); - void SetName(QString name); + void setName(QString name); /** * Returns the keyword name. * * @return The name of the keyword. */ - QString Name() const { - if(p_name) - return p_name; + QString name() const { + if(m_name) + return m_name; else return ""; }; @@ -120,26 +122,26 @@ namespace Isis { * @param name The name of the keyword to compare with this one. * @return True if the names are equal, false if not. */ - bool IsNamed(QString name) const { - return StringEqual(name, Name()); + bool isNamed(QString name) const { + return stringEqual(name, this->name()); }; - void SetValue(QString value, QString unit = ""); + void setValue(QString value, QString unit = ""); - void SetUnits(QString units); - void SetUnits(QString value, QString units); + void setUnits(QString units); + void setUnits(QString value, QString units); PvlKeyword &operator=(QString value); - void AddValue(QString value, QString unit = ""); + void addValue(QString value, QString unit = ""); PvlKeyword &operator+=(QString value); //! Returns the number of values stored in this keyword - int Size() const { - return p_values.size(); + int size() const { + return m_values.size(); }; - bool IsNull(const int index = 0) const; - void Clear(); + bool isNull(const int index = 0) const; + void clear(); friend std::istream &operator>>(std::istream &is, PvlKeyword &result); friend std::ostream &operator<<(std::ostream &os, @@ -162,19 +164,19 @@ namespace Isis { const QString &operator[](int index) const; QString &operator[](int index); - QString Unit(const int index = 0) const; + QString unit(const int index = 0) const; - void AddComment(QString comment); - void AddCommentWrapped(QString comment); + void addComment(QString comment); + void addCommentWrapped(QString comment); - void AddComments(const std::vector &comments); + void addComments(const std::vector &comments); //! Returns the number of lines of comments associated with this keyword - int Comments() const { - return (p_comments ? p_comments->size() : 0); + int comments() const { + return (m_comments ? m_comments->size() : 0); }; - QString Comment(const int index) const; - void ClearComments(); + QString comment(const int index) const; + void clearComment(); /** * Returns true of the keyword names match @@ -182,10 +184,10 @@ namespace Isis { * @param key The keyword to compare names with */ bool operator==(const PvlKeyword &key) const { - if(!p_name && !key.p_name) return true; - if(!p_name || !key.p_name) return false; + if(!m_name && !key.m_name) return true; + if(!m_name || !key.m_name) return false; - return (StringEqual(p_name, key.p_name)); + return (stringEqual(m_name, key.m_name)); }; /** @@ -197,15 +199,15 @@ namespace Isis { return !(*this == key); }; - bool IsEquivalent(QString string1, int index = 0) const; + bool isEquivalent(QString string1, int index = 0) const; /** * The width of the longest keyword name (for formatting) * * @param width the new width */ - void SetWidth(int width) { - p_width = width; + void setWidth(int width) { + m_width = width; }; /** @@ -213,62 +215,62 @@ namespace Isis { * * @param indent The new indent */ - void SetIndent(int indent) { - p_indent = indent; + void setIndent(int indent) { + m_indent = indent; }; //! Returns the current set longest keyword name - int Width() const { - return p_width; + int width() const { + return m_width; }; //! Returns the current indent level - int Indent() const { - return p_indent; + int indent() const { + return m_indent; }; PvlKeyword &operator=(Isis::PvlSequence &seq); - void SetFormat(PvlFormat *formatter); - PvlFormat *GetFormat(); + void setFormat(PvlFormat *formatter); + PvlFormat *format(); - static bool StringEqual(const QString &string1, + static bool stringEqual(const QString &string1, const QString &string2); - static QString ReadLine(std::istream &is, bool insideComment); + static QString readLine(std::istream &is, bool insideComment); - static bool ReadCleanKeyword(QString keyword, + static bool readCleanKeyword(QString keyword, std::vector< QString > &keywordComments, QString &keywordName, std::vector< std::pair > &keywordValues); - static QString ReadValue(QString &keyword, bool "eProblem); - static QString ReadValue(QString &keyword, bool "eProblem, + static QString readValue(QString &keyword, bool "eProblem); + static QString readValue(QString &keyword, bool "eProblem, const std::vector< std::pair > & otherDelimiters); const PvlKeyword &operator=(const PvlKeyword &other); //! Validate Keyword for type and required values - void ValidateKeyword(PvlKeyword & pvlKwrd, QString psValueType="", PvlKeyword* pvlKwrdRange=NULL); + void validateKeyword(PvlKeyword & pvlKwrd, QString psValueType="", PvlKeyword* pvlKwrdRange=NULL); protected: - QString Reform(const QString &value) const; - QString ToPvl(const QString &value) const; - QString ToIPvl(const QString &value) const; - std::ostream &WriteWithWrap(std::ostream &os, + QString reform(const QString &value) const; + QString toPvl(const QString &value) const; + QString toIPvl(const QString &value) const; + std::ostream &writeWithWrap(std::ostream &os, const QString &textToWrite, int startColumn, PvlFormat &format) const; //! Formatter object - PvlFormat *p_formatter; + PvlFormat *m_formatter; private: //! The keyword's name... This is a c-string for memory efficiency - char * p_name; + char * m_name; /** * The values in the keyword. This is a QVarLengthArray purely for @@ -278,28 +280,28 @@ namespace Isis { * of the time we have one value per keyword so that is what we're * allocating by default with this variable. */ - QVarLengthArray p_values; + QVarLengthArray m_values; //! The units for the values. - std::vector *p_units; + std::vector *m_units; //! The comments for the keyword. - std::vector *p_comments; + std::vector *m_comments; - void Init(); + void init(); - void WriteSpaces(std::ostream &, int) const; + void writeSpaces(std::ostream &, int) const; /** * The width of the longest keyword. This is used for spacing out the * equals signs on output. */ - int p_width; + int m_width; /** * The number of indentations to make. This is based on whether the * keyword is in a group, etc. */ - int p_indent; + int m_indent; }; }; diff --git a/isis/src/base/objs/PvlKeyword/unitTest.cpp b/isis/src/base/objs/PvlKeyword/unitTest.cpp index 6c1a85f8bf7651c31c79f91992dbbc74e0c474f5..d5570e135571e725e347d6b4faa078d857d6d8b0 100644 --- a/isis/src/base/objs/PvlKeyword/unitTest.cpp +++ b/isis/src/base/objs/PvlKeyword/unitTest.cpp @@ -85,7 +85,7 @@ int main() { bool result = false; try { - result = keyword.ReadCleanKeyword(keywordsToTry[key], + result = keyword.readCleanKeyword(keywordsToTry[key], keywordComments, keywordName, keywordValues); @@ -166,8 +166,8 @@ int main() { cout << keyZRead << endl; Isis::PvlKeyword keyU("ARRAY_TEST", toString(5.87), "lightyears"); - keyU.AddValue("5465.6", "lightyears"); - keyU.AddValue("574.6", "lightyears"); + keyU.addValue("5465.6", "lightyears"); + keyU.addValue("574.6", "lightyears"); PvlKeyword keyURead; stringstream streamU; @@ -228,12 +228,12 @@ int main() { key2 += "5"; key2 += QString(""); - key2.AddValue("3.3", "feet"); - key2.AddValue("Hello World!"); + key2.addValue("3.3", "feet"); + key2.addValue("Hello World!"); QString str = "Hello World! This is a really really long comment that needs to" " be wrapped onto several different lines to make the PVL file " "look really pretty!"; - key2.AddCommentWrapped(str); + key2.addCommentWrapped(str); cout << key2 << endl; cout << key2[1] << endl; @@ -252,16 +252,16 @@ int main() { // Test SetUnits methods k = Isis::PvlKeyword("k", "radius", "meters"); - k.AddValue("circumference", "meters"); + k.addValue("circumference", "meters"); cout << "\n\n" << "Test SetUnits methods:\n\n" << " original condition of Keyword k :\n" << " " << k << "\n\n" << " after k.SetUnits(\"circumference\", \"Fathoms\") :\n"; - k.SetUnits("circumference", "Fathoms"); + k.setUnits("circumference", "Fathoms"); cout << " " << k << "\n\n" << " after k.SetUnits(\"TeraFathoms\") :\n"; - k.SetUnits("TeraFathoms"); + k.setUnits("TeraFathoms"); cout << " " << k << "\n\n\n"; //Test casting operators @@ -307,15 +307,15 @@ int main() { // Template Keyword PvlKeyword pvlTmplKwrd("KeyName", "integer"); PvlKeyword pvlKwrd("KeyName", "3"); - pvlTmplKwrd.ValidateKeyword(pvlKwrd); - pvlKwrd.Clear(); + pvlTmplKwrd.validateKeyword(pvlKwrd); + pvlKwrd.clear(); pvlKwrd=PvlKeyword("KeyName", "null"); - pvlTmplKwrd.ValidateKeyword(pvlKwrd); - pvlKwrd.Clear(); + pvlTmplKwrd.validateKeyword(pvlKwrd); + pvlKwrd.clear(); pvlKwrd=PvlKeyword("KeyName", toString(3.5)); - pvlTmplKwrd.ValidateKeyword(pvlKwrd); + pvlTmplKwrd.validateKeyword(pvlKwrd); } catch(Isis::IException &e) { cerr << "Invalid Keyword Type: Integer Expected" << endl; @@ -325,7 +325,7 @@ int main() { try { PvlKeyword pvlTmplKwrd("KeyName", "integer"); PvlKeyword pvlKwrd("KeyName", toString(-3)); - pvlTmplKwrd.ValidateKeyword(pvlKwrd, "positive"); + pvlTmplKwrd.validateKeyword(pvlKwrd, "positive"); } catch(Isis::IException &e) { cerr <<"Positive number Expected" << endl; } @@ -335,7 +335,7 @@ int main() { PvlKeyword pvlTmplKwrd("KeyName", "integer"); PvlKeyword pvlTmplKwrdRange("KeyName__Range", toString(0-10)); PvlKeyword pvlKwrd("KeyName", toString(11)); - pvlTmplKwrd.ValidateKeyword(pvlKwrd, "", &pvlTmplKwrdRange); + pvlTmplKwrd.validateKeyword(pvlKwrd, "", &pvlTmplKwrdRange); } catch(Isis::IException &e) { cerr <<"Integer not in the Range. Expected (0-10)" << endl; } @@ -344,15 +344,15 @@ int main() { try { PvlKeyword pvlTmplKwrd("KeyName", "string"); PvlKeyword pvlTmplKwrdValue("KeyName__Value", "value0"); - pvlTmplKwrdValue.AddValue("value1"); - pvlTmplKwrdValue.AddValue("value2"); - pvlTmplKwrdValue.AddValue("value3"); + pvlTmplKwrdValue.addValue("value1"); + pvlTmplKwrdValue.addValue("value2"); + pvlTmplKwrdValue.addValue("value3"); PvlKeyword pvlKwrd("KeyName", "VALUe3"); - pvlTmplKwrd.ValidateKeyword(pvlKwrd, "", &pvlTmplKwrdValue); - pvlKwrd.Clear(); + pvlTmplKwrd.validateKeyword(pvlKwrd, "", &pvlTmplKwrdValue); + pvlKwrd.clear(); pvlKwrd=PvlKeyword("KeyName", "value"); - pvlTmplKwrd.ValidateKeyword(pvlKwrd, "", &pvlTmplKwrdValue); + pvlTmplKwrd.validateKeyword(pvlKwrd, "", &pvlTmplKwrdValue); } catch(Isis::IException &e) { cerr << "Invalid Keyword Value: Expected values \"value1\", \"value2\", \"value3\"" << endl; @@ -362,15 +362,15 @@ int main() { try { PvlKeyword pvlTmplKwrd("KeyName", "boolean"); PvlKeyword pvlKwrd("KeyName", "true"); - pvlTmplKwrd.ValidateKeyword(pvlKwrd); - pvlKwrd.Clear(); + pvlTmplKwrd.validateKeyword(pvlKwrd); + pvlKwrd.clear(); pvlKwrd=PvlKeyword("KeyName", "null"); - pvlTmplKwrd.ValidateKeyword(pvlKwrd); - pvlKwrd.Clear(); + pvlTmplKwrd.validateKeyword(pvlKwrd); + pvlKwrd.clear(); pvlKwrd=PvlKeyword("KeyName", "value"); - pvlTmplKwrd.ValidateKeyword(pvlKwrd); + pvlTmplKwrd.validateKeyword(pvlKwrd); } catch(Isis::IException &e) { cerr << "Invalid Keyword Type: Expected Boolean values \"true\", \"false\", \"null\"" << endl; diff --git a/isis/src/base/objs/PvlObject/PvlObject.cpp b/isis/src/base/objs/PvlObject/PvlObject.cpp index a9af2781e1aeae85071bc93b4ad7ccc2cd79b2f7..2b644a6650091141f3a22ed7e37755d97b4839c0 100644 --- a/isis/src/base/objs/PvlObject/PvlObject.cpp +++ b/isis/src/base/objs/PvlObject/PvlObject.cpp @@ -19,6 +19,7 @@ * http://isis.astrogeology.usgs.gov, and the USGS privacy and disclaimers on * http://www.usgs.gov/privacy.html. */ +#include "PvlObject.h" #include "FileName.h" #include "Pvl.h" @@ -26,7 +27,6 @@ #include "IString.h" #include "Message.h" #include "PvlFormat.h" -#include "PvlObject.h" #include @@ -54,8 +54,8 @@ namespace Isis { //! Copy constructor PvlObject::PvlObject(const PvlObject &other) : PvlContainer::PvlContainer(other) { - p_objects = other.p_objects; - p_groups = other.p_groups; + m_objects = other.m_objects; + m_groups = other.m_groups; } @@ -69,27 +69,27 @@ namespace Isis { * * @throws IException */ - Isis::PvlGroup &PvlObject::FindGroup(const QString &name, + Isis::PvlGroup &PvlObject::findGroup(const QString &name, PvlObject::FindOptions opts) { vector searchList; searchList.push_back(this); while(searchList.size() > 0) { PvlGroupIterator it = - searchList[0]->FindGroup(name, - searchList[0]->BeginGroup(), - searchList[0]->EndGroup()); - if(it != searchList[0]->EndGroup()) return *it; + searchList[0]->findGroup(name, + searchList[0]->beginGroup(), + searchList[0]->endGroup()); + if(it != searchList[0]->endGroup()) return *it; if(opts == Traverse) { - for(int i = 0; i < searchList[0]->Objects(); i++) { - searchList.push_back(&searchList[0]->Object(i)); + for(int i = 0; i < searchList[0]->objects(); i++) { + searchList.push_back(&searchList[0]->object(i)); } } searchList.erase(searchList.begin()); } QString msg = "Unable to find PVL group [" + name + "]"; - if(p_filename.size() > 0) msg += " in file [" + p_filename + "]"; + if(m_filename.size() > 0) msg += " in file [" + m_filename + "]"; throw IException(IException::Unknown, msg, _FILEINFO_); } @@ -104,34 +104,34 @@ namespace Isis { * * @throws IException */ - const Isis::PvlGroup &PvlObject::FindGroup(const QString &name, + const Isis::PvlGroup &PvlObject::findGroup(const QString &name, PvlObject::FindOptions opts) const { vector searchList; searchList.push_back(this); while(searchList.size() > 0) { ConstPvlGroupIterator it = - searchList[0]->FindGroup(name, - searchList[0]->BeginGroup(), - searchList[0]->EndGroup()); - if(it != searchList[0]->EndGroup()) return *it; + searchList[0]->findGroup(name, + searchList[0]->beginGroup(), + searchList[0]->endGroup()); + if(it != searchList[0]->endGroup()) return *it; if(opts == Traverse) { - for(int i = 0; i < searchList[0]->Objects(); i++) { - searchList.push_back(&searchList[0]->Object(i)); + for(int i = 0; i < searchList[0]->objects(); i++) { + searchList.push_back(&searchList[0]->object(i)); } } searchList.erase(searchList.begin()); } QString msg = "Unable to find PVL group [" + name + "]"; - if(p_filename.size() > 0) msg += " in file [" + p_filename + "]"; + if(m_filename.size() > 0) msg += " in file [" + m_filename + "]"; throw IException(IException::Unknown, msg, _FILEINFO_); } /** * Finds a keyword in the current PvlObject, or deeper inside - * other PvlObjects and PvlGroups within this one. Note: This + * other PvlObjects and Pvlgroups within this one. Note: This * member has the same name as the PvlContainer and hides those * implementations, but with the using statement the parents * FindKeyword members ar made visible. Note: If more than one @@ -145,11 +145,11 @@ namespace Isis { * * @throws IException */ - PvlKeyword &PvlObject::FindKeyword(const QString &kname, + PvlKeyword &PvlObject::findKeyword(const QString &kname, FindOptions opts) { // Call the parent's version if they don't want to dig deeper - if(opts == None) return FindKeyword(kname); + if(opts == None) return findKeyword(kname); // Search this PvlObject, and all PvlObjects and PvlContainers within // it for the first occurrence of the requested keyword. @@ -158,27 +158,27 @@ namespace Isis { while(searchList.size() > 0) { PvlKeywordIterator it = - searchList[0]->FindKeyword(kname, searchList[0]->Begin(), - searchList[0]->End()); - if(it != searchList[0]->End()) { + searchList[0]->findKeyword(kname, searchList[0]->begin(), + searchList[0]->end()); + if(it != searchList[0]->end()) { return *it; } // See if the keyword is inside a Group of this Object - for(int g = 0; g < searchList[0]->Groups(); g++) { + for(int g = 0; g < searchList[0]->groups(); g++) { PvlKeywordIterator it = - searchList[0]->Group(g).FindKeyword(kname, - searchList[0]->Group(g).Begin(), - searchList[0]->Group(g).End()); - if(it != searchList[0]->Group(g).End()) { + searchList[0]->group(g).findKeyword(kname, + searchList[0]->group(g).begin(), + searchList[0]->group(g).end()); + if(it != searchList[0]->group(g).end()) { return *it; } } - // It's not in this Object or any Groups in this Object, so + // It's not in this Object or any groups in this Object, so // add all Objects inside this Object to the search list - for(int i = 0; i < searchList[0]->Objects(); i++) { - searchList.push_back(&searchList[0]->Object(i)); + for(int i = 0; i < searchList[0]->objects(); i++) { + searchList.push_back(&searchList[0]->object(i)); } // This Object has been searched to remove it from the list @@ -187,14 +187,14 @@ namespace Isis { // No where else to look for the Keyword so throw an error QString msg = "Unable to find PVL keyword [" + kname + "]"; - if(p_filename.size() > 0) msg += " in file [" + p_filename + "]"; + if(m_filename.size() > 0) msg += " in file [" + m_filename + "]"; throw IException(IException::Unknown, msg, _FILEINFO_); } /** * See if a keyword is in the current PvlObject, or deeper inside - * other PvlObjects and PvlGroups within this one. Note: This + * other PvlObjects and Pvlgroups within this one. Note: This * member has the same name as the PvlContainer and hides those * implementations, but with the using statement the parents * FindKeyword members ar made visible. @@ -204,11 +204,11 @@ namespace Isis { * * @return True if the Keyword exists False otherwise. */ - bool PvlObject::HasKeyword(const QString &kname, + bool PvlObject::hasKeyword(const QString &kname, FindOptions opts) const { // Call the parent's version if they don't want to dig deeper - if(opts == None) return HasKeyword(kname); + if(opts == None) return hasKeyword(kname); // Search this PvlObject, and all PvlObjects and PvlContainers within // it for the first occurrence of the requested keyword. @@ -217,28 +217,28 @@ namespace Isis { while(searchList.size() > 0) { ConstPvlKeywordIterator it = - searchList[0]->FindKeyword(kname, searchList[0]->Begin(), - searchList[0]->End()); - if(it != searchList[0]->End()) { + searchList[0]->findKeyword(kname, searchList[0]->begin(), + searchList[0]->end()); + if(it != searchList[0]->end()) { return true; } // See if the keyword is inside a Group of this Object - for(int g = 0; g < searchList[0]->Groups(); g++) { + for(int g = 0; g < searchList[0]->groups(); g++) { ConstPvlKeywordIterator it = - searchList[0]->Group(g).FindKeyword(kname, - searchList[0]->Group(g).Begin(), - searchList[0]->Group(g).End()); + searchList[0]->group(g).findKeyword(kname, + searchList[0]->group(g).begin(), + searchList[0]->group(g).end()); - if(it != searchList[0]->Group(g).End()) { + if(it != searchList[0]->group(g).end()) { return true; } } - // It's not in this Object or any Groups in this Object, so + // It's not in this Object or any groups in this Object, so // add all Objects inside this Object to the search list - for(int i = 0; i < searchList[0]->Objects(); i++) { - searchList.push_back(&searchList[0]->Object(i)); + for(int i = 0; i < searchList[0]->objects(); i++) { + searchList.push_back(&searchList[0]->object(i)); } // This Object has been searched to remove it from the list @@ -258,27 +258,27 @@ namespace Isis { * * @throws IException */ - PvlObject &PvlObject::FindObject(const QString &name, + PvlObject &PvlObject::findObject(const QString &name, PvlObject::FindOptions opts) { vector searchList; searchList.push_back(this); while(searchList.size() > 0) { PvlObjectIterator it = - searchList[0]->FindObject(name, - searchList[0]->BeginObject(), - searchList[0]->EndObject()); - if(it != searchList[0]->EndObject()) return *it; + searchList[0]->findObject(name, + searchList[0]->beginObject(), + searchList[0]->endObject()); + if(it != searchList[0]->endObject()) return *it; if(opts == Traverse) { - for(int i = 0; i < searchList[0]->Objects(); i++) { - searchList.push_back(&searchList[0]->Object(i)); + for(int i = 0; i < searchList[0]->objects(); i++) { + searchList.push_back(&searchList[0]->object(i)); } } searchList.erase(searchList.begin()); } QString msg = "Unable to find PVL object [" + name + "]"; - if(p_filename.size() > 0) msg += " in file [" + p_filename + "]"; + if(m_filename.size() > 0) msg += " in file [" + m_filename + "]"; throw IException(IException::Unknown, msg, _FILEINFO_); } @@ -293,24 +293,24 @@ namespace Isis { * * @throws IException */ - const PvlObject &PvlObject::FindObject(const QString &name, + const PvlObject &PvlObject::findObject(const QString &name, FindOptions opts) const { vector searchList; searchList.push_back(this); while(searchList.size() > 0) { ConstPvlObjectIterator it = - searchList[0]->FindObject(name, - searchList[0]->BeginObject(), - searchList[0]->EndObject()); + searchList[0]->findObject(name, + searchList[0]->beginObject(), + searchList[0]->endObject()); - if(it != searchList[0]->EndObject()) { + if(it != searchList[0]->endObject()) { return *it; } if(opts == Traverse) { - for(int i = 0; i < searchList[0]->Objects(); i++) { - searchList.push_back(&searchList[0]->Object(i)); + for(int i = 0; i < searchList[0]->objects(); i++) { + searchList.push_back(&searchList[0]->object(i)); } } @@ -319,8 +319,8 @@ namespace Isis { QString msg = "Unable to find PVL object [" + name + "]"; - if(p_filename.size() > 0) { - msg += " in file [" + p_filename + "]"; + if(m_filename.size() > 0) { + msg += " in file [" + m_filename + "]"; } throw IException(IException::Unknown, msg, _FILEINFO_); @@ -334,16 +334,16 @@ namespace Isis { * * @throws IException */ - void PvlObject::DeleteObject(const QString &name) { - PvlObjectIterator key = FindObject(name, BeginObject(), EndObject()); - if(key == EndObject()) { - QString msg = "Unable to find PVL object [" + name + "] in " + Type() + - " [" + Name() + "]"; - if(p_filename.size() > 0) msg += " in file [" + p_filename + "]"; + void PvlObject::deleteObject(const QString &name) { + PvlObjectIterator key = findObject(name, beginObject(), endObject()); + if(key == endObject()) { + QString msg = "Unable to find PVL object [" + name + "] in " + type() + + " [" + this->name() + "]"; + if(m_filename.size() > 0) msg += " in file [" + m_filename + "]"; throw IException(IException::Unknown, msg, _FILEINFO_); } - p_objects.erase(key); + m_objects.erase(key); } @@ -354,18 +354,18 @@ namespace Isis { * * @throws IException */ - void PvlObject::DeleteObject(const int index) { - if(index >= (int)p_objects.size() || index < 0) { - QString msg = "The specified index is out of bounds in PVL " + Type() + - " [" + Name() + "]"; - if(p_filename.size() > 0) msg += " in file [" + p_filename + "]"; + void PvlObject::deleteObject(const int index) { + if(index >= (int)m_objects.size() || index < 0) { + QString msg = "The specified index is out of bounds in PVL " + type() + + " [" + name() + "]"; + if(m_filename.size() > 0) msg += " in file [" + m_filename + "]"; throw IException(IException::Unknown, msg, _FILEINFO_); } - PvlObjectIterator key = BeginObject(); + PvlObjectIterator key = beginObject(); for(int i = 0; i < index; i++) key++; - p_objects.erase(key); + m_objects.erase(key); } @@ -376,16 +376,16 @@ namespace Isis { * * @throws IException */ - void PvlObject::DeleteGroup(const QString &name) { - PvlGroupIterator key = FindGroup(name, BeginGroup(), EndGroup()); - if(key == EndGroup()) { - QString msg = "Unable to find PVL group [" + name + "] in " + Type() + - " [" + Name() + "]"; - if(p_filename.size() > 0) msg += " in file [" + p_filename + "]"; + void PvlObject::deleteGroup(const QString &name) { + PvlGroupIterator key = findGroup(name, beginGroup(), endGroup()); + if(key == endGroup()) { + QString msg = "Unable to find PVL group [" + name + "] in " + type() + + " [" + this->name() + "]"; + if(m_filename.size() > 0) msg += " in file [" + m_filename + "]"; throw IException(IException::Unknown, msg, _FILEINFO_); } - p_groups.erase(key); + m_groups.erase(key); } @@ -396,18 +396,18 @@ namespace Isis { * * @throws IException */ - void PvlObject::DeleteGroup(const int index) { - if(index >= (int)p_groups.size() || index < 0) { - QString msg = "The specified index is out of bounds in PVL " + Type() + - " [" + Name() + "]"; - if(p_filename.size() > 0) msg += " in file [" + p_filename + "]"; + void PvlObject::deleteGroup(const int index) { + if(index >= (int)m_groups.size() || index < 0) { + QString msg = "The specified index is out of bounds in PVL " + type() + + " [" + name() + "]"; + if(m_filename.size() > 0) msg += " in file [" + m_filename + "]"; throw IException(IException::Unknown, msg, _FILEINFO_); } - PvlGroupIterator key = BeginGroup(); + PvlGroupIterator key = beginGroup(); for(int i = 0; i < index; i++) key++; - p_groups.erase(key); + m_groups.erase(key); } @@ -420,13 +420,13 @@ namespace Isis { * * @throws IException */ - Isis::PvlGroup &PvlObject::Group(const int index) { - if(index < 0 || index >= (int)p_groups.size()) { + Isis::PvlGroup &PvlObject::group(const int index) { + if(index < 0 || index >= (int)m_groups.size()) { QString msg = Message::ArraySubscriptNotInRange(index); throw IException(IException::Programmer, msg, _FILEINFO_); } - return p_groups[index]; + return m_groups[index]; } @@ -439,13 +439,13 @@ namespace Isis { * * @throws IException */ - const Isis::PvlGroup &PvlObject::Group(const int index) const { - if(index < 0 || index >= (int)p_groups.size()) { + const Isis::PvlGroup &PvlObject::group(const int index) const { + if(index < 0 || index >= (int)m_groups.size()) { QString msg = Message::ArraySubscriptNotInRange(index); throw IException(IException::Programmer, msg, _FILEINFO_); } - return p_groups[index]; + return m_groups[index]; } /** @@ -457,13 +457,13 @@ namespace Isis { * * @throws IException::Programmer */ - PvlObject &PvlObject::Object(const int index) { - if(index < 0 || index >= (int)p_objects.size()) { + PvlObject &PvlObject::object(const int index) { + if(index < 0 || index >= (int)m_objects.size()) { QString msg = Message::ArraySubscriptNotInRange(index); throw IException(Isis::IException::Programmer, msg, _FILEINFO_); } - return p_objects[index]; + return m_objects[index]; } /** @@ -475,13 +475,13 @@ namespace Isis { * * @throws IException::Programmer */ - const PvlObject &PvlObject::Object(const int index) const { - if(index < 0 || index >= (int)p_objects.size()) { + const PvlObject &PvlObject::object(const int index) const { + if(index < 0 || index >= (int)m_objects.size()) { QString msg = Message::ArraySubscriptNotInRange(index); throw IException(IException::Programmer, msg, _FILEINFO_); } - return p_objects[index]; + return m_objects[index]; } @@ -495,26 +495,26 @@ namespace Isis { // Set up a Formatter bool removeFormatter = false; - if(object.GetFormat() == NULL) { - object.SetFormat(new PvlFormat()); + if(object.format() == NULL) { + object.setFormat(new PvlFormat()); removeFormatter = true; } Isis::PvlObject outTemplate("DEFAULT"); - if(object.HasFormatTemplate()) - outTemplate = *(Isis::PvlObject *)object.FormatTemplate(); + if(object.hasFormatTemplate()) + outTemplate = *(Isis::PvlObject *)object.formatTemplate(); // Look for and process all include files and remove duplicates - Isis::PvlObject newTemp(outTemplate.Name()); + Isis::PvlObject newTemp(outTemplate.name()); // Make sure the new template has all the original's comments - for(int i = 0; i < outTemplate.Comments(); i++) { - newTemp.AddComment(outTemplate.Comment(i)); + for(int i = 0; i < outTemplate.comments(); i++) { + newTemp.addComment(outTemplate.comment(i)); } // Include files take precedence to all other objects and groups - for(int i = 0; i < outTemplate.Keywords(); i++) { - if(outTemplate[i].IsNamed("Isis:PvlTemplate:File")) { + for(int i = 0; i < outTemplate.keywords(); i++) { + if(outTemplate[i].isNamed("Isis:PvlTemplate:File")) { QString filename = outTemplate[i]; Isis::FileName file(filename); if(!file.fileExists()) { @@ -525,144 +525,144 @@ namespace Isis { Isis::Pvl include(file.expanded()); - for(int j = 0; j < include.Keywords(); j++) { - if(!newTemp.HasKeyword(include[j].Name())) - newTemp.AddKeyword(include[j]); + for(int j = 0; j < include.keywords(); j++) { + if(!newTemp.hasKeyword(include[j].name())) + newTemp.addKeyword(include[j]); } - for(int j = 0; j < include.Objects(); j++) { - if(!newTemp.HasObject(include.Object(j).Name())) - newTemp.AddObject(include.Object(j)); + for(int j = 0; j < include.objects(); j++) { + if(!newTemp.hasObject(include.object(j).name())) + newTemp.addObject(include.object(j)); } - for(int j = 0; j < include.Groups(); j++) { - if(!newTemp.HasGroup(include.Group(j).Name())) - newTemp.AddGroup(include.Group(j)); + for(int j = 0; j < include.groups(); j++) { + if(!newTemp.hasGroup(include.group(j).name())) + newTemp.addGroup(include.group(j)); } } // If it is not an include file keyword add it in place - else if(!newTemp.HasKeyword(outTemplate[i].Name())) - newTemp.AddKeyword(outTemplate[i]); + else if(!newTemp.hasKeyword(outTemplate[i].name())) + newTemp.addKeyword(outTemplate[i]); } // Copy over the objects - for(int i = 0; i < outTemplate.Objects(); i++) { - if(!newTemp.HasObject(outTemplate.Object(i).Name())) - newTemp.AddObject(outTemplate.Object(i)); + for(int i = 0; i < outTemplate.objects(); i++) { + if(!newTemp.hasObject(outTemplate.object(i).name())) + newTemp.addObject(outTemplate.object(i)); } // Copy over the groups - for(int i = 0; i < outTemplate.Groups(); i++) { - if(!newTemp.HasGroup(outTemplate.Group(i).Name())) - newTemp.AddGroup(outTemplate.Group(i)); + for(int i = 0; i < outTemplate.groups(); i++) { + if(!newTemp.hasGroup(outTemplate.group(i).name())) + newTemp.addGroup(outTemplate.group(i)); } outTemplate = newTemp; // Write out comments for this Object that were in the template - if(outTemplate.Comments() > 0) { - for(int k = 0; k < outTemplate.Comments(); k++) { - for(int l = 0; l < object.Indent(); l++) os << " "; - os << outTemplate.Comment(k) << object.GetFormat()->FormatEOL(); + if(outTemplate.comments() > 0) { + for(int k = 0; k < outTemplate.comments(); k++) { + for(int l = 0; l < object.indent(); l++) os << " "; + os << outTemplate.comment(k) << object.format()->formatEOL(); } - //os << object.GetFormat()->FormatEOL(); + //os << object.format()->FormatEOL(); } // Output the object comments and name - os << object.GetNameKeyword() << object.GetFormat()->FormatEOL(); - object.SetIndent(object.Indent() + 2); + os << object.nameKeyword() << object.format()->formatEOL(); + object.setIndent(object.indent() + 2); // Output the keywords in this Object - if(object.Keywords() > 0) { - os << (Isis::PvlContainer &) object << object.GetFormat()->FormatEOL(); + if(object.keywords() > 0) { + os << (Isis::PvlContainer &) object << object.format()->formatEOL(); } // This number keeps track of the number of objects have been written int numObjects = 0; // Output the Objects within this Object using the format template - for(int i = 0; i < outTemplate.Objects(); i++) { - for(int j = 0; j < object.Objects(); j++) { - if(outTemplate.Object(i).Name() != object.Object(j).Name()) continue; - if(j == 0 && object.Keywords() > 0) - os << object.GetFormat()->FormatEOL(); - - object.Object(j).SetIndent(object.Indent()); - object.Object(j).SetFormatTemplate(outTemplate.Object(i)); - object.Object(j).SetFormat(object.GetFormat()); - os << object.Object(j) << object.GetFormat()->FormatEOL(); - object.Object(j).SetFormat(NULL); - object.Object(j).SetIndent(0); - - if(++numObjects < object.Objects()) - os << object.GetFormat()->FormatEOL(); + for(int i = 0; i < outTemplate.objects(); i++) { + for(int j = 0; j < object.objects(); j++) { + if(outTemplate.object(i).name() != object.object(j).name()) continue; + if(j == 0 && object.keywords() > 0) + os << object.format()->formatEOL(); + + object.object(j).setIndent(object.indent()); + object.object(j).setFormatTemplate(outTemplate.object(i)); + object.object(j).setFormat(object.format()); + os << object.object(j) << object.format()->formatEOL(); + object.object(j).setFormat(NULL); + object.object(j).setIndent(0); + + if(++numObjects < object.objects()) + os << object.format()->formatEOL(); } } // Output the Objects within this Object that were not included in the // format template pvl - for(int i = 0; i < object.Objects(); i++) { - if(outTemplate.HasObject(object.Object(i).Name())) continue; - if(i == 0 && object.Keywords() > 0) - os << object.GetFormat()->FormatEOL(); - - object.Object(i).SetIndent(object.Indent()); - object.Object(i).SetFormat(object.GetFormat()); - os << object.Object(i) << object.GetFormat()->FormatEOL(); - object.Object(i).SetFormat(NULL); - object.Object(i).SetIndent(0); - - if(++numObjects < object.Objects()) - os << object.GetFormat()->FormatEOL(); - - } - - // This number keeps track of the number of Groups that have been written - int numGroups = 0; - - // Output the Groups within this Object using the format template - for(int i = 0; i < outTemplate.Groups(); i++) { - for(int j = 0; j < object.Groups(); j++) { - if(outTemplate.Group(i).Name() != object.Group(j).Name()) continue; - if((numGroups == 0) && - (object.Objects() > 0 || object.Keywords() > 0)) - os << object.GetFormat()->FormatEOL(); - - object.Group(j).SetIndent(object.Indent()); - object.Group(j).SetFormatTemplate(outTemplate.Group(i)); - object.Group(j).SetFormat(object.GetFormat()); - os << object.Group(j) << object.GetFormat()->FormatEOL(); - object.Group(j).SetFormat(NULL); - object.Group(j).SetIndent(0); - if(++numGroups < object.Groups()) os << object.GetFormat()->FormatEOL(); + for(int i = 0; i < object.objects(); i++) { + if(outTemplate.hasObject(object.object(i).name())) continue; + if(i == 0 && object.keywords() > 0) + os << object.format()->formatEOL(); + + object.object(i).setIndent(object.indent()); + object.object(i).setFormat(object.format()); + os << object.object(i) << object.format()->formatEOL(); + object.object(i).setFormat(NULL); + object.object(i).setIndent(0); + + if(++numObjects < object.objects()) + os << object.format()->formatEOL(); + + } + + // This number keeps track of the number of groups that have been written + int numgroups = 0; + + // Output the groups within this Object using the format template + for(int i = 0; i < outTemplate.groups(); i++) { + for(int j = 0; j < object.groups(); j++) { + if(outTemplate.group(i).name() != object.group(j).name()) continue; + if((numgroups == 0) && + (object.objects() > 0 || object.keywords() > 0)) + os << object.format()->formatEOL(); + + object.group(j).setIndent(object.indent()); + object.group(j).setFormatTemplate(outTemplate.group(i)); + object.group(j).setFormat(object.format()); + os << object.group(j) << object.format()->formatEOL(); + object.group(j).setFormat(NULL); + object.group(j).setIndent(0); + if(++numgroups < object.groups()) os << object.format()->formatEOL(); } } // Output the groups that were not in the format template - for(int i = 0; i < object.Groups(); i++) { - if(outTemplate.HasGroup(object.Group(i).Name())) continue; - if((numGroups == 0) && - (object.Objects() > 0 || object.Keywords() > 0)) - os << object.GetFormat()->FormatEOL(); + for(int i = 0; i < object.groups(); i++) { + if(outTemplate.hasGroup(object.group(i).name())) continue; + if((numgroups == 0) && + (object.objects() > 0 || object.keywords() > 0)) + os << object.format()->formatEOL(); - object.Group(i).SetIndent(object.Indent()); - object.Group(i).SetFormat(object.GetFormat()); - os << object.Group(i) << object.GetFormat()->FormatEOL(); - object.Group(i).SetFormat(NULL); - object.Group(i).SetIndent(0); + object.group(i).setIndent(object.indent()); + object.group(i).setFormat(object.format()); + os << object.group(i) << object.format()->formatEOL(); + object.group(i).setFormat(NULL); + object.group(i).setIndent(0); - if(++numGroups < object.Groups()) - os << object.GetFormat()->FormatEOL(); + if(++numgroups < object.groups()) + os << object.format()->formatEOL(); } // Output the end of the object - object.SetIndent(object.Indent() - 2); - for(int i = 0; i < object.Indent(); i++) os << " "; - os << object.GetFormat()->FormatEnd("End_Object", object.GetNameKeyword()); + object.setIndent(object.indent() - 2); + for(int i = 0; i < object.indent(); i++) os << " "; + os << object.format()->formatEnd("End_Object", object.nameKeyword()); if(removeFormatter) { - delete object.GetFormat(); - object.SetFormat(NULL); + delete object.format(); + object.setFormat(NULL); } return os; @@ -693,20 +693,20 @@ namespace Isis { is.seekg(beforeKeywordPos, ios::beg); QString msg = "Expected PVL keyword named [Object], found keyword named ["; - msg += readKeyword.Name(); + msg += readKeyword.name(); msg += "]"; throw IException(IException::Programmer, msg, _FILEINFO_); } - if(readKeyword.Size() == 1) { - result.SetName(readKeyword[0]); + if(readKeyword.size() == 1) { + result.setName(readKeyword[0]); } else { is.seekg(beforeKeywordPos, ios::beg); QString msg = "Expected a single value for PVL object name, found [("; - for(int i = 0; i < readKeyword.Size(); i++) { + for(int i = 0; i < readKeyword.size(); i++) { if(i != 0) msg += ", "; msg += readKeyword[i]; @@ -716,8 +716,8 @@ namespace Isis { throw IException(IException::Unknown, msg, _FILEINFO_); } - for(int comment = 0; comment < readKeyword.Comments(); comment++) { - result.AddComment(readKeyword.Comment(comment)); + for(int comment = 0; comment < readKeyword.comments(); comment++) { + result.addComment(readKeyword.comment(comment)); } readKeyword = PvlKeyword(); @@ -736,9 +736,9 @@ namespace Isis { is.seekg(beforeKeywordPos, ios::beg); QString msg = "Unexpected ["; - msg += readKeyword.Name(); + msg += readKeyword.name(); msg += "] in PVL Object ["; - msg += result.Name(); + msg += result.name(); msg += "]"; throw IException(IException::Unknown, msg, _FILEINFO_); } @@ -748,16 +748,16 @@ namespace Isis { is.seekg(beforeKeywordPos); PvlGroup newGroup; is >> newGroup; - result.AddGroup(newGroup); + result.addGroup(newGroup); } else if(readKeyword == PvlKeyword("Object")) { is.seekg(beforeKeywordPos); PvlObject newObject; is >> newObject; - result.AddObject(newObject); + result.addObject(newObject); } else { - result.AddKeyword(readKeyword); + result.addKeyword(readKeyword); } readKeyword = PvlKeyword(); @@ -779,7 +779,7 @@ namespace Isis { is.seekg(beforeKeywordPos, ios::beg); - QString msg = "PVL Object [" + result.Name(); + QString msg = "PVL Object [" + result.name(); msg += "] EndObject not found before end of file"; throw IException(IException::Unknown, msg, _FILEINFO_); } @@ -792,8 +792,8 @@ namespace Isis { const PvlObject &PvlObject::operator=(const PvlObject &other) { this->PvlContainer::operator=(other); - p_objects = other.p_objects; - p_groups = other.p_groups; + m_objects = other.m_objects; + m_groups = other.m_groups; return *this; } @@ -809,31 +809,31 @@ namespace Isis { * * @param pvlObj- PvlObject to be validated */ - void PvlObject::ValidateObject(PvlObject & pPvlObj) + void PvlObject::validateObject(PvlObject & pPvlObj) { // Validate the current object - int iObjSize = Objects(); + int iObjSize = objects(); for(int i=0; i + #include "PvlContainer.h" #include "PvlGroup.h" @@ -63,6 +64,8 @@ namespace Isis { * Added assignment operator * @history 2010-09-27 Sharmila Prasad - Validate an Object comparing with the * corresponding Template Object + * @history 2013-03-11 Steven Lambright and Mathew Eis - Brought method names and member variable + * names up to the current Isis 3 coding standards. Fixes #1533. */ class PvlObject : public Isis::PvlContainer { public: @@ -77,12 +80,12 @@ namespace Isis { * Returns the number of groups contained. * @return The number of groups. */ - int Groups() const { - return p_groups.size(); + int groups() const { + return m_groups.size(); }; - PvlGroup &Group(const int index); - const PvlGroup &Group(const int index) const; + PvlGroup &group(const int index); + const PvlGroup &group(const int index) const; //! The counter for groups. typedef QList::iterator PvlGroupIterator; @@ -93,8 +96,8 @@ namespace Isis { * Returns the beginning group index. * @return The iterator of the beginning group.. */ - PvlGroupIterator BeginGroup() { - return p_groups.begin(); + PvlGroupIterator beginGroup() { + return m_groups.begin(); }; @@ -102,8 +105,8 @@ namespace Isis { * Returns the beginning group index. * @return The iterator of the beginning group.. */ - ConstPvlGroupIterator BeginGroup() const { - return p_groups.begin(); + ConstPvlGroupIterator beginGroup() const { + return m_groups.begin(); }; @@ -111,8 +114,8 @@ namespace Isis { * Returns the ending group index. * @return The iterator of the ending group. */ - PvlGroupIterator EndGroup() { - return p_groups.end(); + PvlGroupIterator endGroup() { + return m_groups.end(); }; @@ -120,8 +123,8 @@ namespace Isis { * Returns the const ending group index. * @return The iterator of the ending group. */ - ConstPvlGroupIterator EndGroup() const { - return p_groups.end(); + ConstPvlGroupIterator endGroup() const { + return m_groups.end(); }; @@ -131,7 +134,7 @@ namespace Isis { * @param beg The lower index * @param end The higher index */ - PvlGroupIterator FindGroup(const QString &name, + PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end) { Isis::PvlGroup temp(name); @@ -145,7 +148,7 @@ namespace Isis { * @param beg The lower index * @param end The higher index */ - ConstPvlGroupIterator FindGroup(const QString &name, + ConstPvlGroupIterator findGroup(const QString &name, ConstPvlGroupIterator beg, ConstPvlGroupIterator end) const { Isis::PvlGroup temp(name); @@ -166,44 +169,44 @@ namespace Isis { // The using statements below are used to make the PvlContainer's version // of FindKeyword and HasKeyword vissible to other code that otherwise would not be // able to see those versions. - using PvlContainer::FindKeyword; + using PvlContainer::findKeyword; - PvlKeyword &FindKeyword(const QString &kname, + PvlKeyword &findKeyword(const QString &kname, FindOptions opts); - using PvlContainer::HasKeyword; + using PvlContainer::hasKeyword; - bool HasKeyword(const QString &kname, + bool hasKeyword(const QString &kname, FindOptions opts) const; - Isis::PvlGroup &FindGroup(const QString &name, + Isis::PvlGroup &findGroup(const QString &name, FindOptions opts = None); - const Isis::PvlGroup &FindGroup(const QString &name, + const Isis::PvlGroup &findGroup(const QString &name, FindOptions opts = None) const; /** * Add a group to the object. * @param group The PvlGroup object to add. */ - void AddGroup(const Isis::PvlGroup &group) { - p_groups.push_back(group); - //p_groups[p_groups.size()-1].SetFileName(FileName()); + void addGroup(const Isis::PvlGroup &group) { + m_groups.push_back(group); + //m_groups[m_groups.size()-1].SetFileName(FileName()); }; using PvlContainer::operator+=; void operator+= (const Isis::PvlGroup &group) { - AddGroup(group); + addGroup(group); } void operator+= (const Isis::PvlObject &obj) { - AddObject(obj); + addObject(obj); } - void DeleteGroup(const QString &name); + void deleteGroup(const QString &name); - void DeleteGroup(const int index); + void deleteGroup(const int index); /** @@ -212,8 +215,8 @@ namespace Isis { * @param name The name of the group to look for. * @return True if the object has the group, false if not. */ - bool HasGroup(const QString &name) const { - if(FindGroup(name, BeginGroup(), EndGroup()) == EndGroup()) return false; + bool hasGroup(const QString &name) const { + if(findGroup(name, beginGroup(), endGroup()) == endGroup()) return false; return true; } @@ -221,12 +224,12 @@ namespace Isis { * Returns the number of objects. * @return The number of objects. */ - int Objects() const { - return p_objects.size(); + int objects() const { + return m_objects.size(); }; - PvlObject &Object(const int index); - const PvlObject &Object(const int index) const; + PvlObject &object(const int index); + const PvlObject &object(const int index) const; //! The counter for objects. typedef QList::iterator PvlObjectIterator; @@ -237,8 +240,8 @@ namespace Isis { * Returns the index of the beginning object. * @return The beginning object's index. */ - PvlObjectIterator BeginObject() { - return p_objects.begin(); + PvlObjectIterator beginObject() { + return m_objects.begin(); }; @@ -246,8 +249,8 @@ namespace Isis { * Returns the const index of the beginning object. * @return The beginning object's index. */ - ConstPvlObjectIterator BeginObject() const { - return p_objects.begin(); + ConstPvlObjectIterator beginObject() const { + return m_objects.begin(); }; @@ -255,8 +258,8 @@ namespace Isis { * Returns the index of the ending object. * @return The ending object's index. */ - PvlObjectIterator EndObject() { - return p_objects.end(); + PvlObjectIterator endObject() { + return m_objects.end(); }; @@ -264,8 +267,8 @@ namespace Isis { * Returns the const index of the ending object. * @return The ending object's index. */ - ConstPvlObjectIterator EndObject() const { - return p_objects.end(); + ConstPvlObjectIterator endObject() const { + return m_objects.end(); }; @@ -276,7 +279,7 @@ namespace Isis { * @param end The higher index. * @return The index of the object. */ - PvlObjectIterator FindObject(const QString &name, + PvlObjectIterator findObject(const QString &name, PvlObjectIterator beg, PvlObjectIterator end) { PvlObject temp(name); @@ -291,7 +294,7 @@ namespace Isis { * @param end The higher index. * @return The index of the object. */ - ConstPvlObjectIterator FindObject(const QString &name, + ConstPvlObjectIterator findObject(const QString &name, ConstPvlObjectIterator beg, ConstPvlObjectIterator end) const { PvlObject temp(name); @@ -299,23 +302,23 @@ namespace Isis { } - PvlObject &FindObject(const QString &name, + PvlObject &findObject(const QString &name, FindOptions opts = None); - const PvlObject &FindObject(const QString &name, + const PvlObject &findObject(const QString &name, FindOptions opts = None) const; /** * Add a PvlObject. * @param object The PvlObject to add. */ - void AddObject(const PvlObject &object) { - p_objects.push_back(object); - p_objects[p_objects.size()-1].SetFileName(FileName()); + void addObject(const PvlObject &object) { + m_objects.push_back(object); + m_objects[m_objects.size()-1].setFileName(fileName()); } - void DeleteObject(const QString &name); - void DeleteObject(const int index); + void deleteObject(const QString &name); + void deleteObject(const int index); /** @@ -325,8 +328,8 @@ namespace Isis { * @return True if the current PvlObject has the specified object, false * if it does not. */ - bool HasObject(const QString &name) const { - if(FindObject(name, BeginObject(), EndObject()) == EndObject()) return false; + bool hasObject(const QString &name) const { + if(findObject(name, beginObject(), endObject()) == endObject()) return false; return true; } @@ -338,26 +341,26 @@ namespace Isis { * @return True if they are equal, false if not. */ bool operator==(const PvlObject &object) const { - return PvlKeyword::StringEqual(object.Name(), this->Name()); + return PvlKeyword::stringEqual(object.name(), this->name()); } //! Remove everything from the current PvlObject. - void Clear() { - Isis::PvlContainer::Clear(); - p_objects.clear(); - p_groups.clear(); + void clear() { + Isis::PvlContainer::clear(); + m_objects.clear(); + m_groups.clear(); } const PvlObject &operator=(const PvlObject &other); - + //! Validate Object - void ValidateObject(PvlObject & pPvlObj); - + void validateObject(PvlObject & pPvlObj); + private: - QList p_objects; /** m_objects; /** p_groups;/** m_groups;/**operator+=(key[i]); } return *this; @@ -59,7 +59,7 @@ namespace Isis { str >> pvl; PvlKeyword &key = pvl["temp"]; std::vector temp; - for(int i = 0; i < key.Size(); i++) { + for(int i = 0; i < key.size(); i++) { temp.push_back(key[i]); } p_sequence.push_back(temp); diff --git a/isis/src/base/objs/PvlToken/PvlToken.cpp b/isis/src/base/objs/PvlToken/PvlToken.cpp index 6e071f758c521683ea46b274c3dc18a3a0877ddc..14b56b93aa17c39c9664df62285826e53008832f 100644 --- a/isis/src/base/objs/PvlToken/PvlToken.cpp +++ b/isis/src/base/objs/PvlToken/PvlToken.cpp @@ -32,19 +32,19 @@ namespace Isis { * @param k Value of the keyword */ PvlToken::PvlToken(const QString &k) { - SetKey(k); - ValueClear(); + setKey(k); + valueClear(); } //! Constructs a Token with NULL for both the keyword and value list. PvlToken::PvlToken() { - ValueClear(); + valueClear(); } //! Destroys the Token object PvlToken::~PvlToken() { - key.clear(); - ValueClear(); + m_key.clear(); + valueClear(); } /** @@ -52,8 +52,8 @@ namespace Isis { * * @param k IString to load into the token keyword */ - void PvlToken::SetKey(const QString &k) { - key = k; + void PvlToken::setKey(const QString &k) { + m_key = k; }; /** @@ -61,8 +61,8 @@ namespace Isis { * * @return QString */ - QString PvlToken::GetKey() const { - return key; + QString PvlToken::key() const { + return m_key; }; /** @@ -70,13 +70,13 @@ namespace Isis { * * @return QString */ - QString PvlToken::GetKeyUpper() const { - return key.toUpper(); + QString PvlToken::keyUpper() const { + return m_key.toUpper(); } //! Removes all elements from the value-vector - void PvlToken::ValueClear() { - value.clear(); + void PvlToken::valueClear() { + m_value.clear(); } /** @@ -84,8 +84,8 @@ namespace Isis { * * @return int */ - int PvlToken::ValueSize() const { - return value.size(); + int PvlToken::valueSize() const { + return m_value.size(); } /** @@ -94,8 +94,8 @@ namespace Isis { * * @param v IString add to the value-vector list */ - void PvlToken::AddValue(const QString &v) { - value.push_back(v); + void PvlToken::addValue(const QString &v) { + m_value.push_back(v); } /** @@ -107,12 +107,12 @@ namespace Isis { * * @throws Isis::IException::Programmer */ - QString PvlToken::GetValue(const int index) const { - if((index < 0) || (index >= (int) value.size())) { + QString PvlToken::value(const int index) const { + if((index < 0) || (index >= (int) m_value.size())) { QString message = Isis::Message::ArraySubscriptNotInRange(index); throw IException(IException::Programmer, message, _FILEINFO_); } - return value[index]; + return m_value[index]; } /** @@ -124,12 +124,12 @@ namespace Isis { * * @throws Isis::IException::Programmer */ - QString PvlToken::GetValueUpper(int index) const { - if((index < 0) || (index >= (int) value.size())) { + QString PvlToken::valueUpper(int index) const { + if((index < 0) || (index >= (int) m_value.size())) { QString message = Isis::Message::ArraySubscriptNotInRange(index); throw IException(IException::Programmer, message, _FILEINFO_); } - return value[index].toUpper(); + return m_value[index].toUpper(); } } // end namespace isis diff --git a/isis/src/base/objs/PvlToken/PvlToken.h b/isis/src/base/objs/PvlToken/PvlToken.h index 979c4da4eeb813875d7d3679759302c66f328ad4..2790d901c46628a1b211aaf3b6fba1ccf07d1e6f 100644 --- a/isis/src/base/objs/PvlToken/PvlToken.h +++ b/isis/src/base/objs/PvlToken/PvlToken.h @@ -43,6 +43,8 @@ namespace Isis { * @history 2003-05-16 Stuart Sides - Modified schema from astrogeology... * isis.astrogeology... * @history 2005-02-14 Elizabeth Ribelin - Modified file to support Doxygen + * @history 2013-03-11 Steven Lambright and Mathew Eis - Brought method names and member variable + * names up to the current Isis 3 coding standards. Fixes #1533. * documentation * * @todo 2005-02-14 Jeff Anderson - add coded and implemetation example to @@ -51,8 +53,8 @@ namespace Isis { class PvlToken { private: - QString key; //!< Storage for the keyword name - std::vector value; /** m_value; /** &ValueVector() const { - return value; + inline const std::vector &valueVector() const { + return m_value; }; }; }; diff --git a/isis/src/base/objs/PvlToken/unitTest.cpp b/isis/src/base/objs/PvlToken/unitTest.cpp index 6af6a75dfc2eb37372c90ba5e0bc5c5b51cdae95..1c8fc0512f61d22bf8a0335647e19ac8bfaf95d5 100644 --- a/isis/src/base/objs/PvlToken/unitTest.cpp +++ b/isis/src/base/objs/PvlToken/unitTest.cpp @@ -10,39 +10,39 @@ int main(int argc, char *argv[]) { Preference::Preferences(true); PvlToken dog("Dog"); - dog.AddValue("drools"); + dog.addValue("drools"); cout << "Info on dog" << endl; - cout << " key: " << dog.GetKey() << endl; - cout << " upperkey: " << dog.GetKeyUpper() << endl; - cout << " valuesize: " << dog.ValueSize() << endl; - cout << " value: " << dog.GetValue() << endl; - cout << " uppervalue: " << dog.GetValueUpper() << endl; + cout << " key: " << dog.key() << endl; + cout << " upperkey: " << dog.keyUpper() << endl; + cout << " valuesize: " << dog.valueSize() << endl; + cout << " value: " << dog.value() << endl; + cout << " uppervalue: " << dog.valueUpper() << endl; cout << endl; cout << "Adding another value to dog" << endl; - dog.AddValue("wags tail"); - cout << " valuesize: " << dog.ValueSize() << endl; - cout << " value: " << dog.GetValue(1) << endl; - cout << " uppervalue: " << dog.GetValueUpper(1) << endl; + dog.addValue("wags tail"); + cout << " valuesize: " << dog.valueSize() << endl; + cout << " value: " << dog.value(1) << endl; + cout << " uppervalue: " << dog.valueUpper(1) << endl; cout << endl; cout << "Clearing dog values" << endl; - dog.ValueClear(); - cout << " valuesize: " << dog.ValueSize() << endl; + dog.valueClear(); + cout << " valuesize: " << dog.valueSize() << endl; cout << endl; cout << "Testing Throws in dog" << endl; try { - dog.GetValue(-1); + dog.value(-1); } catch(IException &e) { e.print(); } try { - dog.GetValue(1); + dog.value(1); } catch(IException &e) { e.print(); diff --git a/isis/src/base/objs/PvlTokenizer/PvlTokenizer.cpp b/isis/src/base/objs/PvlTokenizer/PvlTokenizer.cpp index d6edbfdd7c7d7dc5bff894c8a0472418e1ce76ec..485d051c8c92fa6ba4e14c2e97337fd8fd08eda5 100644 --- a/isis/src/base/objs/PvlTokenizer/PvlTokenizer.cpp +++ b/isis/src/base/objs/PvlTokenizer/PvlTokenizer.cpp @@ -75,9 +75,9 @@ namespace Isis { if(c == '#') { s = ReadComment(stream); Isis::PvlToken t("_COMMENT_"); - t.AddValue(s); + t.addValue(s); - if(newlineFound || tokens.size() == 0 || tokens[tokens.size()-1].ValueSize() == 0) { + if(newlineFound || tokens.size() == 0 || tokens[tokens.size()-1].valueSize() == 0) { // applies to next pvl item tokens.push_back(t); } @@ -98,9 +98,9 @@ namespace Isis { if(c == '*') { s = ReadComment(stream); Isis::PvlToken t("_COMMENT_"); - t.AddValue(s); + t.addValue(s); - if(newlineFound || tokens.size() == 0 || tokens[tokens.size()-1].ValueSize() == 0) { + if(newlineFound || tokens.size() == 0 || tokens[tokens.size()-1].valueSize() == 0) { // applies to next pvl item tokens.push_back(t); } @@ -117,7 +117,7 @@ namespace Isis { s = ReadToken(stream); Isis::PvlToken t(s); - if(t.GetKeyUpper() == upTerminator) { + if(t.keyUpper() == upTerminator) { tokens.push_back(t); return; } @@ -132,7 +132,7 @@ namespace Isis { if(c != '=') { tokens.push_back(t); - if(t.GetKeyUpper() == upTerminator) return; + if(t.keyUpper() == upTerminator) return; continue; } @@ -153,7 +153,7 @@ namespace Isis { ParseCommaList(t, s); } catch(IException &e) { - QString message = Isis::Message::KeywordValueBad(t.GetKey()); + QString message = Isis::Message::KeywordValueBad(t.key()); throw IException(e, IException::Unknown, message, _FILEINFO_); } tokens.push_back(t); @@ -167,7 +167,7 @@ namespace Isis { ParseCommaList(t, s); } catch(IException &e) { - QString message = Isis::Message::KeywordValueBad(t.GetKey()); + QString message = Isis::Message::KeywordValueBad(t.key()); throw IException(e, IException::Unknown, message, _FILEINFO_); } tokens.push_back(t); @@ -180,10 +180,10 @@ namespace Isis { s = ReadToDoubleQuote(stream); } catch(IException &e) { - QString message = Isis::Message::KeywordValueBad(t.GetKey()); + QString message = Isis::Message::KeywordValueBad(t.key()); throw IException(e, IException::Unknown, message, _FILEINFO_); } - t.AddValue(s); + t.addValue(s); tokens.push_back(t); continue; } @@ -194,17 +194,17 @@ namespace Isis { s = ReadToSingleQuote(stream); } catch(IException &e) { - QString message = Isis::Message::KeywordValueBad(t.GetKey()); + QString message = Isis::Message::KeywordValueBad(t.key()); throw IException(IException::Unknown, message, _FILEINFO_); } - t.AddValue(s); + t.addValue(s); tokens.push_back(t); continue; } s = ReadToken(stream); - t.AddValue(s); + t.addValue(s); tokens.push_back(t); continue; } @@ -486,7 +486,7 @@ namespace Isis { s += "}"; } else if(c == ',') { - t.AddValue(s); + t.addValue(s); s.clear(); } else if(c != EOF) { @@ -495,7 +495,7 @@ namespace Isis { } while(c != EOF); - t.AddValue(s); + t.addValue(s); } diff --git a/isis/src/base/objs/PvlTokenizer/unitTest.cpp b/isis/src/base/objs/PvlTokenizer/unitTest.cpp index 7c4c5a050beeeeeda4994a21225e5ae651f9c838..94d1377738e8a4d0efc82fdf299020df0b669a7d 100644 --- a/isis/src/base/objs/PvlTokenizer/unitTest.cpp +++ b/isis/src/base/objs/PvlTokenizer/unitTest.cpp @@ -50,9 +50,9 @@ int main(void) { cout << "TESTING TOKENIZER" << endl; int i, j; for(i = 0; i < (int)t.size(); i++) { - cout << t[i].GetKey() << " is "; - for(j = 0; j < t[i].ValueSize(); j++) { - cout << t[i].GetValue(j) << " "; + cout << t[i].key() << " is "; + for(j = 0; j < t[i].valueSize(); j++) { + cout << t[i].value(j) << " "; } cout << endl; } diff --git a/isis/src/base/objs/PvlTranslationManager/PvlTranslationManager.cpp b/isis/src/base/objs/PvlTranslationManager/PvlTranslationManager.cpp index 67cacc3efd0f63d84bf6fc49b1a8e03d75dd1edb..e48388e505f90a8238bbcf1fb9eeb6f0229b0413 100644 --- a/isis/src/base/objs/PvlTranslationManager/PvlTranslationManager.cpp +++ b/isis/src/base/objs/PvlTranslationManager/PvlTranslationManager.cpp @@ -84,9 +84,9 @@ namespace Isis { int inst = 0; PvlKeyword grp; - while((grp = InputGroup(nName, inst++)).Name() != "") { + while((grp = InputGroup(nName, inst++)).name() != "") { if((con = GetContainer(grp)) != NULL) { - if(con->HasKeyword(InputKeywordName(nName))) { + if(con->hasKeyword(InputKeywordName(nName))) { return PvlTranslationTable::Translate(nName, (*con)[InputKeywordName(nName)][findex]); } @@ -113,15 +113,15 @@ namespace Isis { int inst = 0; PvlKeyword grp; - while((grp = InputGroup(nName, inst++)).Name() != "") { + while((grp = InputGroup(nName, inst++)).name() != "") { if((con = GetContainer(grp)) != NULL) { - if(con->HasKeyword(InputKeywordName(nName))) { - key.SetName(OutputName(nName)); + if(con->hasKeyword(InputKeywordName(nName))) { + key.setName(OutputName(nName)); - for(int v = 0; v < (*con)[(InputKeywordName(nName))].Size(); v++) { - key.AddValue(Isis::PvlTranslationTable::Translate(nName, + for(int v = 0; v < (*con)[(InputKeywordName(nName))].size(); v++) { + key.addValue(Isis::PvlTranslationTable::Translate(nName, (*con)[InputKeywordName(nName)][v]), - (*con)[InputKeywordName(nName)].Unit(v)); + (*con)[InputKeywordName(nName)].unit(v)); } return key; @@ -141,15 +141,15 @@ namespace Isis { // Store the translated key, value pairs in the argument pvl void PvlTranslationManager::Auto(Isis::Pvl &outputLabel) { // Attempt to translate every group in the translation table - for(int i = 0; i < TranslationTable().Groups(); i++) { - Isis::PvlGroup &g = TranslationTable().Group(i); - if(IsAuto(g.Name())) { + for(int i = 0; i < TranslationTable().groups(); i++) { + Isis::PvlGroup &g = TranslationTable().group(i); + if(IsAuto(g.name())) { try { - Isis::PvlContainer *con = CreateContainer(g.Name(), outputLabel); - (*con) += PvlTranslationManager::DoTranslation(g.Name()); + Isis::PvlContainer *con = CreateContainer(g.name(), outputLabel); + (*con) += PvlTranslationManager::DoTranslation(g.name()); } catch(IException &e) { - if(!IsOptional(g.Name())) { + if(!IsOptional(g.name())) { throw; } } @@ -173,13 +173,13 @@ namespace Isis { PvlKeyword inputGroupKeyword = InputGroup(nName, instanceNumber); bool anInputGroupFound = false; - while(inputGroupKeyword.Name() != "") { + while(inputGroupKeyword.name() != "") { const PvlContainer *containingGroup = GetContainer(inputGroupKeyword); if(containingGroup != NULL) { anInputGroupFound = true; - if(containingGroup->HasKeyword(InputKeywordName(nName))) { - return containingGroup->FindKeyword(InputKeywordName(nName)); + if(containingGroup->hasKeyword(InputKeywordName(nName))) { + return containingGroup->findKeyword(InputKeywordName(nName)); } } @@ -189,20 +189,20 @@ namespace Isis { if(anInputGroupFound) { QString msg = "Unable to find input keyword [" + InputKeywordName(nName) + - "] for output name [" + nName + "] in file [" + TranslationTable().FileName() + "]"; + "] for output name [" + nName + "] in file [" + TranslationTable().fileName() + "]"; throw IException(IException::Programmer, msg, _FILEINFO_); } else { QString container = ""; - for(int i = 0; i < InputGroup(nName).Size(); i++) { + for(int i = 0; i < InputGroup(nName).size(); i++) { if(i > 0) container += ","; container += InputGroup(nName)[i]; } QString msg = "Unable to find input group [" + container + - "] for output name [" + nName + "] in file [" + TranslationTable().FileName() + "]"; + "] for output name [" + nName + "] in file [" + TranslationTable().fileName() + "]"; throw IException(IException::Programmer, msg, _FILEINFO_); } } @@ -224,9 +224,9 @@ namespace Isis { //if ((con = GetContainer (InputGroup(nName))) != NULL) { PvlKeyword grp; - while((grp = InputGroup(nName, inst++)).Name() != "") { + while((grp = InputGroup(nName, inst++)).name() != "") { if((con = GetContainer(grp)) != NULL) { - if(con->HasKeyword(InputKeywordName(nName))) return true; + if(con->hasKeyword(InputKeywordName(nName))) return true; } } @@ -255,8 +255,8 @@ namespace Isis { // Return the root container if "ROOT" is the ONLY thing in the list - if(inputGroup.Size() == 1 && - PvlKeyword::StringEqual(inputGroup[0], "ROOT")) { + if(inputGroup.size() == 1 && + PvlKeyword::stringEqual(inputGroup[0], "ROOT")) { return &p_fLabel; } @@ -265,10 +265,10 @@ namespace Isis { // Search for object containing our solution int objectIndex; for(objectIndex = 0; - objectIndex < inputGroup.Size() - 1; + objectIndex < inputGroup.size() - 1; objectIndex ++) { - if(currentObject->HasObject(inputGroup[objectIndex])) { - currentObject = ¤tObject->FindObject(inputGroup[objectIndex]); + if(currentObject->hasObject(inputGroup[objectIndex])) { + currentObject = ¤tObject->findObject(inputGroup[objectIndex]); } else { return NULL; @@ -276,11 +276,11 @@ namespace Isis { } // Our solution can be an object or a group - if(currentObject->HasObject(inputGroup[objectIndex])) { - return ¤tObject->FindObject(inputGroup[objectIndex]); + if(currentObject->hasObject(inputGroup[objectIndex])) { + return ¤tObject->findObject(inputGroup[objectIndex]); } - else if(currentObject->HasGroup(inputGroup[objectIndex])) { - return ¤tObject->FindGroup(inputGroup[objectIndex]); + else if(currentObject->hasGroup(inputGroup[objectIndex])) { + return ¤tObject->findGroup(inputGroup[objectIndex]); } else { return NULL; @@ -300,22 +300,22 @@ namespace Isis { Isis::PvlObject *obj = &pvl; // Look at every pair in the output position - for(int c = 0; c < np.Size(); c += 2) { + for(int c = 0; c < np.size(); c += 2) { // If this pair is an object if(np[c].toUpper() == "OBJECT") { // If the object doesn't exist create it - if(!obj->HasObject(np[c+1])) { - obj->AddObject(np[c+1]); + if(!obj->hasObject(np[c+1])) { + obj->addObject(np[c+1]); } - obj = &(obj->FindObject(np[c+1])); + obj = &(obj->findObject(np[c+1])); } // If this pair is a group else if(np[c].toUpper() == "GROUP") { // If the group doesn't exist create it - if(!obj->HasGroup(np[c+1])) { - obj->AddGroup(np[c+1]); + if(!obj->hasGroup(np[c+1])) { + obj->addGroup(np[c+1]); } - return (Isis::PvlContainer *) & (obj->FindGroup(np[c+1])); + return (Isis::PvlContainer *) & (obj->findGroup(np[c+1])); } } diff --git a/isis/src/base/objs/PvlTranslationManager/unitTest.cpp b/isis/src/base/objs/PvlTranslationManager/unitTest.cpp index 565d5f568245c19fc7caabf05c2cb21f1ad4e7a6..c4bf92b803de0f552f5cd0d67f506c09b6cb20ee 100644 --- a/isis/src/base/objs/PvlTranslationManager/unitTest.cpp +++ b/isis/src/base/objs/PvlTranslationManager/unitTest.cpp @@ -180,18 +180,18 @@ int main(void) { cout << endl; cout << " Testing InputUnits member" << endl; - cout << " PixelResolution = " << transMgr.InputKeyword("PixelResolution").Unit() << endl; - cout << " NumberOfBands = " << transMgr.InputKeyword("NumberOfBands").Unit() << endl; + cout << " PixelResolution = " << transMgr.InputKeyword("PixelResolution").unit() << endl; + cout << " NumberOfBands = " << transMgr.InputKeyword("NumberOfBands").unit() << endl; cout << " Error messages:" << endl; try { - transMgr.InputKeyword("BadGroup").Unit(); + transMgr.InputKeyword("BadGroup").unit(); } catch(IException &e) { cerr << " "; e.print(); } try { - transMgr.InputKeyword("GoodGroupBadKey").Unit(); + transMgr.InputKeyword("GoodGroupBadKey").unit(); } catch(IException &e) { cerr << " "; @@ -200,18 +200,18 @@ int main(void) { cout << endl; cout << " Testing InputSize member" << endl; - cout << " BandName = " << transMgr.InputKeyword("BandName").Size() << endl; - cout << " PixelResolution = " << transMgr.InputKeyword("PixelResolution").Size() << endl; + cout << " BandName = " << transMgr.InputKeyword("BandName").size() << endl; + cout << " PixelResolution = " << transMgr.InputKeyword("PixelResolution").size() << endl; cout << " Error messages:" << endl; try { - transMgr.InputKeyword("BadGroup").Size(); + transMgr.InputKeyword("BadGroup").size(); } catch(IException &e) { cerr << " "; e.print(); } try { - transMgr.InputKeyword("GoodGroupBadKey").Size(); + transMgr.InputKeyword("GoodGroupBadKey").size(); } catch(IException &e) { cerr << " "; diff --git a/isis/src/base/objs/PvlTranslationTable/PvlTranslationTable.cpp b/isis/src/base/objs/PvlTranslationTable/PvlTranslationTable.cpp index db963aee1debb9cec3a9e16ecc7c50280266e542..7426720d66d9c59a26ce4f091b6685c024045eb4 100644 --- a/isis/src/base/objs/PvlTranslationTable/PvlTranslationTable.cpp +++ b/isis/src/base/objs/PvlTranslationTable/PvlTranslationTable.cpp @@ -64,7 +64,7 @@ namespace Isis { * @throws IException::Io */ void PvlTranslationTable::AddTable(const QString &transFile) { - p_trnsTbl.Read(FileName(transFile).expanded()); + p_trnsTbl.read(FileName(transFile).expanded()); } /** @@ -77,13 +77,13 @@ namespace Isis { void PvlTranslationTable::AddTable(std::istream &transStm) { transStm >> p_trnsTbl; - for(int i = 0; i < p_trnsTbl.Groups(); i++) { - PvlGroup currGrp = p_trnsTbl.Group(i); + for(int i = 0; i < p_trnsTbl.groups(); i++) { + PvlGroup currGrp = p_trnsTbl.group(i); - if(!currGrp.HasKeyword("InputKey")) { + if(!currGrp.hasKeyword("InputKey")) { QString message = "Unable to find InputKey for group [" - + currGrp.Name() + "] in file [" + - p_trnsTbl.FileName() + "]"; + + currGrp.name() + "] in file [" + + p_trnsTbl.fileName() + "]"; throw IException(IException::User, message, _FILEINFO_); } @@ -101,7 +101,7 @@ namespace Isis { validKeywords.push_back(pair("InputKey", 1)); validKeywords.push_back(pair("InputDefault", -1)); - for(int j = 0; j < currGrp.Keywords(); j++) { + for(int j = 0; j < currGrp.keywords(); j++) { bool validKeyword = false; bool keywordSizeMismatch = false; @@ -113,16 +113,16 @@ namespace Isis { key++) { // If this is the right keyword (names match) then test sizes - if(currKey.Name() == validKeywords[key].first) { + if(currKey.name() == validKeywords[key].first) { // if -1 then test that size() > 0 if(validKeywords[key].second == -1) { - if(currKey.Size() > 0) { + if(currKey.size() > 0) { validKeyword = true; } } // otherwise should exact match - else if(currKey.Size() == validKeywords[key].second) { + else if(currKey.size() == validKeywords[key].second) { validKeyword = true; } else { @@ -135,16 +135,16 @@ namespace Isis { // if we had an error report it if(!validKeyword) { if(!keywordSizeMismatch) { - QString message = "Keyword [" + currKey.Name(); + QString message = "Keyword [" + currKey.name(); message += "] is not a valid keyword."; - message += " Error in file [" + p_trnsTbl.FileName() + "]" ; + message += " Error in file [" + p_trnsTbl.fileName() + "]" ; throw IException(IException::User, message, _FILEINFO_); } else { - QString message = "Keyword [" + currKey.Name(); + QString message = "Keyword [" + currKey.name(); message += "] does not have the correct number of elements."; - message += " Error in file [" + p_trnsTbl.FileName() + "]" ; + message += " Error in file [" + p_trnsTbl.fileName() + "]" ; throw IException(IException::User, message, _FILEINFO_); } @@ -167,36 +167,36 @@ namespace Isis { */ QString PvlTranslationTable::Translate(const QString nName, const QString fValue) const { - if(!p_trnsTbl.HasGroup(nName)) { + if(!p_trnsTbl.hasGroup(nName)) { QString msg = "Unable to find translation group [" + - nName + "] in file [" + p_trnsTbl.FileName() + "]"; + nName + "] in file [" + p_trnsTbl.fileName() + "]"; throw IException(IException::Programmer, msg, _FILEINFO_); } - const PvlGroup &tgrp = p_trnsTbl.FindGroup(nName); + const PvlGroup &tgrp = p_trnsTbl.findGroup(nName); // If no input value was passed in search using the input default QString tmpFValue = fValue; if(tmpFValue.isEmpty()) { - if(tgrp.HasKeyword("InputDefault")) { + if(tgrp.hasKeyword("InputDefault")) { tmpFValue = (QString) tgrp["InputDefault"]; } else { QString msg = "No value or default value to translate for "; msg += "translation group ["; msg += nName; - msg += "] in file [" + p_trnsTbl.FileName() + "]"; + msg += "] in file [" + p_trnsTbl.fileName() + "]"; throw IException(IException::Programmer, msg, _FILEINFO_); } } // Search the Translation keywords for a match to the input value - Pvl::ConstPvlKeywordIterator it = tgrp.FindKeyword("Translation", - tgrp.Begin(), - tgrp.End()); + Pvl::ConstPvlKeywordIterator it = tgrp.findKeyword("Translation", + tgrp.begin(), + tgrp.end()); - while(it != tgrp.End()) { + while(it != tgrp.end()) { const PvlKeyword &key = *it; if((QString) key[1] == tmpFValue) { return key[0]; @@ -210,12 +210,12 @@ namespace Isis { } } - it = tgrp.FindKeyword("Translation", it + 1, tgrp.End()); + it = tgrp.findKeyword("Translation", it + 1, tgrp.end()); } QString msg = "Unable to find a translation value for [" + nName + ", " + fValue + "] in file [" + - p_trnsTbl.FileName() + "]"; + p_trnsTbl.fileName() + "]"; throw IException(IException::Programmer, msg, _FILEINFO_); } @@ -235,36 +235,36 @@ namespace Isis { PvlKeyword PvlTranslationTable::InputGroup(const QString nName, const int inst) const { - if(!p_trnsTbl.HasGroup(nName)) { + if(!p_trnsTbl.hasGroup(nName)) { QString msg = "Unable to find translation group [" + - nName + "] in file [" + p_trnsTbl.FileName() + "]"; + nName + "] in file [" + p_trnsTbl.fileName() + "]"; throw IException(IException::Programmer, msg, _FILEINFO_); } - const PvlGroup &transGrp = p_trnsTbl.FindGroup(nName); + const PvlGroup &transGrp = p_trnsTbl.findGroup(nName); //bool foundLegalInputGroup = false; - Pvl::ConstPvlKeywordIterator it = transGrp.FindKeyword("InputPosition", - transGrp.Begin(), - transGrp.End()); + Pvl::ConstPvlKeywordIterator it = transGrp.findKeyword("InputPosition", + transGrp.begin(), + transGrp.end()); int currentInstance = 0; // If no InputGroup keywords exist, the answer is root - if(inst == 0 && it == transGrp.End()) { + if(inst == 0 && it == transGrp.end()) { PvlKeyword root("InputPosition"); root += "ROOT"; return root; } - while(it != transGrp.End()) { + while(it != transGrp.end()) { const PvlKeyword &result = *it; // This check is to prevent backtracking to the old "value,value" way of // doing translation file input groups for the new keyword. Flag it // immediately to give a good error message. - if(result.Size() == 1 && result[0].contains(",")) { + if(result.size() == 1 && result[0].contains(",")) { QString msg = "Keyword [InputPosition] cannot have a comma [,] in "; msg += " the value ["; msg += result[0]; @@ -281,7 +281,7 @@ namespace Isis { currentInstance ++; } - it = transGrp.FindKeyword("InputPosition", it + 1, transGrp.End()); + it = transGrp.findKeyword("InputPosition", it + 1, transGrp.end()); } /* Error if no containers were listed @@ -310,14 +310,14 @@ namespace Isis { */ QString PvlTranslationTable::InputKeywordName(const QString nName) const { - if(!p_trnsTbl.HasGroup(nName)) { + if(!p_trnsTbl.hasGroup(nName)) { QString msg = "Unable to find translation group [" + - nName + "] in file [" + p_trnsTbl.FileName() + "]"; + nName + "] in file [" + p_trnsTbl.fileName() + "]"; throw IException(IException::Programmer, msg, _FILEINFO_); } - Isis::PvlGroup tgrp = p_trnsTbl.FindGroup(nName); - if(tgrp.HasKeyword("InputKey")) return tgrp["InputKey"]; + Isis::PvlGroup tgrp = p_trnsTbl.findGroup(nName); + if(tgrp.hasKeyword("InputKey")) return tgrp["InputKey"]; return ""; } @@ -334,56 +334,56 @@ namespace Isis { */ QString PvlTranslationTable::InputDefault(const QString nName) const { - if(!p_trnsTbl.HasGroup(nName)) { + if(!p_trnsTbl.hasGroup(nName)) { QString msg = "Unable to find translation group [" + - nName + "] in file [" + p_trnsTbl.FileName() + "]"; + nName + "] in file [" + p_trnsTbl.fileName() + "]"; throw IException(IException::Programmer, msg, _FILEINFO_); } - Isis::PvlGroup tgrp = p_trnsTbl.FindGroup(nName); - if(tgrp.HasKeyword("InputDefault")) return tgrp["InputDefault"]; + Isis::PvlGroup tgrp = p_trnsTbl.findGroup(nName); + if(tgrp.hasKeyword("InputDefault")) return tgrp["InputDefault"]; return ""; } bool PvlTranslationTable::IsAuto(const QString nName) { - if(!p_trnsTbl.HasGroup(nName)) { + if(!p_trnsTbl.hasGroup(nName)) { QString msg = "Unable to find translation group [" + nName + - "] in file [" + p_trnsTbl.FileName() + "]"; + "] in file [" + p_trnsTbl.fileName() + "]"; throw IException(IException::Programmer, msg, _FILEINFO_); } - Isis::PvlGroup &tgrp = p_trnsTbl.FindGroup(nName); - if(tgrp.HasKeyword("Auto")) return true; + Isis::PvlGroup &tgrp = p_trnsTbl.findGroup(nName); + if(tgrp.hasKeyword("Auto")) return true; return false; } bool PvlTranslationTable::IsOptional(const QString nName) { - if(!p_trnsTbl.HasGroup(nName)) { + if(!p_trnsTbl.hasGroup(nName)) { QString msg = "Unable to find translation group [" + nName + - "] in file [" + p_trnsTbl.FileName() + "]"; + "] in file [" + p_trnsTbl.fileName() + "]"; throw IException(IException::Programmer, msg, _FILEINFO_); } - Isis::PvlGroup &tgrp = p_trnsTbl.FindGroup(nName); - if(tgrp.HasKeyword("Optional")) return true; + Isis::PvlGroup &tgrp = p_trnsTbl.findGroup(nName); + if(tgrp.hasKeyword("Optional")) return true; return false; } Isis::PvlKeyword &PvlTranslationTable::OutputPosition( const QString nName) { - if(!p_trnsTbl.HasGroup(nName)) { + if(!p_trnsTbl.hasGroup(nName)) { QString msg = "Unable to find translation group [" + - nName + "] in file [" + p_trnsTbl.FileName() + "]"; + nName + "] in file [" + p_trnsTbl.fileName() + "]"; throw IException(IException::Programmer, msg, _FILEINFO_); } - Isis::PvlGroup &tgrp = p_trnsTbl.FindGroup(nName); - if(!tgrp.HasKeyword("OutputPosition")) { + Isis::PvlGroup &tgrp = p_trnsTbl.findGroup(nName); + if(!tgrp.hasKeyword("OutputPosition")) { QString msg = "Unable to find translation keyword [OutputPostion] in [" + - nName + "] in file [" + p_trnsTbl.FileName() + "]"; + nName + "] in file [" + p_trnsTbl.fileName() + "]"; throw IException(IException::Programmer, msg, _FILEINFO_); } @@ -393,14 +393,14 @@ namespace Isis { QString PvlTranslationTable::OutputName(const QString nName) { - if(!p_trnsTbl.HasGroup(nName)) { + if(!p_trnsTbl.hasGroup(nName)) { QString msg = "Unable to find translation group [" + nName + - "] in file [" + p_trnsTbl.FileName() + "]"; + "] in file [" + p_trnsTbl.fileName() + "]"; throw IException(IException::Programmer, msg, _FILEINFO_); } - Isis::PvlGroup tgrp = p_trnsTbl.FindGroup(nName); - if(tgrp.HasKeyword("OutputName")) { + Isis::PvlGroup tgrp = p_trnsTbl.findGroup(nName); + if(tgrp.hasKeyword("OutputName")) { return tgrp["OutputName"]; } diff --git a/isis/src/base/objs/ReseauDistortionMap/ReseauDistortionMap.cpp b/isis/src/base/objs/ReseauDistortionMap/ReseauDistortionMap.cpp index 668e6e8ac54eccac1b1ea358bcab5272f04adfad..eb6c953f01352dbfe2b36050688dedd5cdb7da03 100644 --- a/isis/src/base/objs/ReseauDistortionMap/ReseauDistortionMap.cpp +++ b/isis/src/base/objs/ReseauDistortionMap/ReseauDistortionMap.cpp @@ -45,16 +45,16 @@ namespace Isis { CameraDistortionMap(parent, 1.0) { // Set up distortion coefficients Pvl mast(fname); - PvlGroup dim = mast.FindGroup("Dimensions"); - p_distortedLines = dim.FindKeyword("DistortedLines"); - p_distortedSamps = dim.FindKeyword("DistortedSamples"); - p_undistortedLines = dim.FindKeyword("UndistortedLines"); - p_undistortedSamps = dim.FindKeyword("UndistortedSamples"); - PvlGroup mastRes = mast.FindGroup("MasterReseaus"); - PvlKeyword mline = mastRes.FindKeyword("Line"); - PvlKeyword msamp = mastRes.FindKeyword("Sample"); - p_numRes = mline.Size(); - if(mline.Size() != msamp.Size()) { + PvlGroup dim = mast.findGroup("Dimensions"); + p_distortedLines = dim.findKeyword("DistortedLines"); + p_distortedSamps = dim.findKeyword("DistortedSamples"); + p_undistortedLines = dim.findKeyword("UndistortedLines"); + p_undistortedSamps = dim.findKeyword("UndistortedSamples"); + PvlGroup mastRes = mast.findGroup("MasterReseaus"); + PvlKeyword mline = mastRes.findKeyword("Line"); + PvlKeyword msamp = mastRes.findKeyword("Sample"); + p_numRes = mline.size(); + if(mline.size() != msamp.size()) { string msg = "The number of lines and samples for the master reseaus are"; msg += "not equal, the data file may be bad"; throw IException(IException::User, msg, _FILEINFO_); @@ -65,10 +65,10 @@ namespace Isis { } p_pixelPitch = parent->PixelPitch(); - PvlGroup refRes = labels.FindGroup("Reseaus", Pvl::Traverse); - PvlKeyword rline = refRes.FindKeyword("Line"); - PvlKeyword rsamp = refRes.FindKeyword("Sample"); - if(rline.Size() != rsamp.Size()) { + PvlGroup refRes = labels.findGroup("Reseaus", Pvl::Traverse); + PvlKeyword rline = refRes.findKeyword("Line"); + PvlKeyword rsamp = refRes.findKeyword("Sample"); + if(rline.size() != rsamp.size()) { string msg = "The number of lines and samples for the refined reseaus are"; msg += "not equal, the data file may be bad"; throw IException(IException::User, msg, _FILEINFO_); diff --git a/isis/src/base/objs/Robinson/Robinson.cpp b/isis/src/base/objs/Robinson/Robinson.cpp index 82f2dff9e88ef4decdceb1b8bfd27da209075be5..9fc8063f93a765c121b93f097d8689bf373d41fc 100644 --- a/isis/src/base/objs/Robinson/Robinson.cpp +++ b/isis/src/base/objs/Robinson/Robinson.cpp @@ -103,11 +103,11 @@ namespace Isis { 0.5322; // Try to read the mapping group - PvlGroup &mapGroup = label.FindGroup("Mapping", Pvl::Traverse); + PvlGroup &mapGroup = label.findGroup("Mapping", Pvl::Traverse); // Compute and write the default center longitude if allowed and // necessary - if ((allowDefaults) && (!mapGroup.HasKeyword("CenterLongitude"))) { + if ((allowDefaults) && (!mapGroup.hasKeyword("CenterLongitude"))) { double lon = (m_minimumLongitude + m_maximumLongitude) / 2.0; mapGroup += PvlKeyword("CenterLongitude", toString(lon)); } diff --git a/isis/src/base/objs/Robinson/unitTest.cpp b/isis/src/base/objs/Robinson/unitTest.cpp index c88f6e102bcc1004db076200ff47ea9d7d5196b1..513a6683e14d2dad1793a0fa60ced1a04c646c6f 100644 --- a/isis/src/base/objs/Robinson/unitTest.cpp +++ b/isis/src/base/objs/Robinson/unitTest.cpp @@ -16,8 +16,8 @@ int main(int argc, char *argv[]) { cout << "Unit Test For Robinson Projection" << endl << endl; Pvl lab; - lab.AddGroup(PvlGroup("Mapping")); - PvlGroup &mapGroup = lab.FindGroup("Mapping"); + lab.addGroup(PvlGroup("Mapping")); + PvlGroup &mapGroup = lab.findGroup("Mapping"); mapGroup += PvlKeyword("EquatorialRadius", "1.0"); mapGroup += PvlKeyword("PolarRadius", "1.0"); mapGroup += PvlKeyword("LatitudeType", "Planetocentric"); @@ -80,7 +80,7 @@ int main(int argc, char *argv[]) { cout << endl; cout << "Test default computation ... " << endl; - mapGroup.DeleteKeyword("CenterLongitude"); + mapGroup.deleteKeyword("CenterLongitude"); Robinson p2(lab, true); cout << lab << endl; cout << endl; @@ -90,9 +90,9 @@ int main(int argc, char *argv[]) { Pvl tmp1; Pvl tmp2; Pvl tmp3; - tmp1.AddGroup(p->Mapping()); - tmp2.AddGroup(p->MappingLatitudes()); - tmp3.AddGroup(p->MappingLongitudes()); + tmp1.addGroup(p->Mapping()); + tmp2.addGroup(p->MappingLatitudes()); + tmp3.addGroup(p->MappingLongitudes()); cout << "Mapping() = " << endl; cout << tmp1 << endl; @@ -108,7 +108,7 @@ int main(int argc, char *argv[]) { e.print(); } - mapGroup.AddKeyword(PvlKeyword("EquatorialRadius", "6370997.0"), Pvl::Replace); + mapGroup.addKeyword(PvlKeyword("EquatorialRadius", "6370997.0"), Pvl::Replace); try { Projection *p = ProjectionFactory::Create(lab); cout << endl; diff --git a/isis/src/base/objs/Selection/Selection.cpp b/isis/src/base/objs/Selection/Selection.cpp index 588cca7eccfc65d007bb09fe904e5f77e062f4f6..bad3943491be67fcbfb8de65db6ba57d88be8ae5 100644 --- a/isis/src/base/objs/Selection/Selection.cpp +++ b/isis/src/base/objs/Selection/Selection.cpp @@ -160,7 +160,7 @@ namespace Isis { dpt[1] = double(j) ; if (!pointInEllipse(&ellBest,dpt,play)) { //if the point isn't within play pixles of being within the elipse - //selectionChip->SetValue(i,j,0.0); + //selectionChip->setValue(i,j,0.0); selectionChip->SetValue(i,j,0.0); } @@ -323,7 +323,7 @@ namespace Isis { if (pointInEllipse(ell, ptc, 0.0)) { //if the point is within the elipse ellipsePixels++; //increment the number of points if (selectionChip->GetValue(i,j) == 1) ellipsePixelsSelected++; //increment the number selected within the ellipse; - //else temp.SetValue(i,j,3.0);//debug + //else temp.setValue(i,j,3.0);//debug } else if (selectionChip->GetValue(i,j) == 1) outsideEllipsePixelsSelected++; //increment the number selected outside the ellipse; diff --git a/isis/src/base/objs/Sensor/unitTest.cpp b/isis/src/base/objs/Sensor/unitTest.cpp index 55e7476815e5dd8932629ed2afbab5a1e1f370cc..1edc5f2d26c7bea0a2731c30d8621efd96ca08d0 100644 --- a/isis/src/base/objs/Sensor/unitTest.cpp +++ b/isis/src/base/objs/Sensor/unitTest.cpp @@ -54,7 +54,7 @@ int main(int argc, char *argv[]) { Isis::Pvl lab; Isis::PvlGroup inst("INSTRUMENT"); inst += Isis::PvlKeyword("TargetName", "Mars"); - lab.AddGroup(inst); + lab.addGroup(inst); Isis::PvlGroup kern("Kernels"); Isis::FileName f("$base/testData/kernels"); @@ -71,7 +71,7 @@ int main(int argc, char *argv[]) { kern += Isis::PvlKeyword("InstrumentPosition", dir + "moc.bsp"); kern += Isis::PvlKeyword("InstrumentPointing", dir + "moc.bc"); kern += Isis::PvlKeyword("Frame", ""); - lab.AddGroup(kern); + lab.addGroup(kern); // Setup double startTime = -69382819.0; @@ -193,7 +193,7 @@ int main(int argc, char *argv[]) { << endl << endl; Isis::Pvl lab2; - lab2.AddGroup(inst); + lab2.addGroup(inst); Isis::PvlGroup kern2("Kernels"); @@ -210,7 +210,7 @@ int main(int argc, char *argv[]) { kern2 += Isis::PvlKeyword("Frame", ""); kern2 += Isis::PvlKeyword("ShapeModel", "$ISIS3DATA/base/dems/molaMarsPlanetaryRadius0004.cub"); - lab2.AddGroup(kern2); + lab2.addGroup(kern2); // Setup Isis::Sensor spi2(lab2); diff --git a/isis/src/base/objs/SerialNumber/SerialNumber.cpp b/isis/src/base/objs/SerialNumber/SerialNumber.cpp index ccf4558b74db1b5c09a66c17da347d7a64684c18..0c146419b6d6a4d655d73623178063ec02cb07d4 100644 --- a/isis/src/base/objs/SerialNumber/SerialNumber.cpp +++ b/isis/src/base/objs/SerialNumber/SerialNumber.cpp @@ -40,7 +40,7 @@ namespace Isis { if(def2filename) { // Try to return the filename if it exists in the label, otherwise use // "Unknown" as a last resort. - QString snTemp = label.FileName(); + QString snTemp = label.fileName(); if(!snTemp.isEmpty()) { sn = FileName(snTemp).name(); } @@ -90,7 +90,7 @@ namespace Isis { */ PvlGroup SerialNumber::FindSerialTranslation(Pvl &label) { Pvl outLabel; - static PvlGroup dataDir(Preference::Preferences().FindGroup("DataDirectory")); + static PvlGroup dataDir(Preference::Preferences().findGroup("DataDirectory")); // Get the mission name static QString missionTransFile = (QString) dataDir["base"] + "/translations/MissionName2DataDir.trn"; @@ -137,8 +137,8 @@ namespace Isis { translationIterator->second.SetLabel(label); translationIterator->second.Auto(outLabel); - PvlGroup snGroup = outLabel.FindGroup("SerialNumberKeywords"); - snGroup += PvlKeyword("ObservationKeys", toString(snGroup.Keywords())); + PvlGroup snGroup = outLabel.findGroup("SerialNumberKeywords"); + snGroup += PvlKeyword("ObservationKeys", toString(snGroup.keywords())); return snGroup; } diff --git a/isis/src/base/objs/SerialNumber/unitTest.cpp b/isis/src/base/objs/SerialNumber/unitTest.cpp index c57f4863b61468263bf24929e05d89bcfc0b6ae4..559b0ac19a7942200595b0b3c0d14c6dbc19c252 100644 --- a/isis/src/base/objs/SerialNumber/unitTest.cpp +++ b/isis/src/base/objs/SerialNumber/unitTest.cpp @@ -18,14 +18,14 @@ int main(int argc, char *argv[]) { g += PvlKeyword("SpacecraftClockCount", "987654321"); PvlObject o("IsisCube"); - o.AddGroup(g); + o.addGroup(g); Pvl p; - p.AddObject(o); + p.addObject(o); cout << SerialNumber::Compose(p) << endl; - p.FindGroup("Instrument", Pvl::Traverse).DeleteKeyword("InstrumentId"); + p.findGroup("Instrument", Pvl::Traverse).deleteKeyword("InstrumentId"); cout << SerialNumber::Compose(p) << endl; Cube cube; diff --git a/isis/src/base/objs/SerialNumberList/SerialNumberList.cpp b/isis/src/base/objs/SerialNumberList/SerialNumberList.cpp index 965b80b6e1371ef4131e7e84da17d2f638be5440..b4473116c8ff08acc68bcf9f5f137de9010930ae 100644 --- a/isis/src/base/objs/SerialNumberList/SerialNumberList.cpp +++ b/isis/src/base/objs/SerialNumberList/SerialNumberList.cpp @@ -104,19 +104,19 @@ namespace Isis { void SerialNumberList::Add(const QString &filename, bool def2filename) { Pvl p(Isis::FileName(filename).expanded()); - PvlObject cubeObj = p.FindObject("IsisCube"); + PvlObject cubeObj = p.findObject("IsisCube"); try { // Test the target name if desired if (p_checkTarget) { QString target; PvlGroup targetGroup; - if (cubeObj.HasGroup("Instrument")) { - targetGroup = cubeObj.FindGroup("Instrument"); + if (cubeObj.hasGroup("Instrument")) { + targetGroup = cubeObj.findGroup("Instrument"); } else if (def2filename) { // No instrument, try Mapping - if (cubeObj.HasGroup("Mapping")) { - targetGroup = cubeObj.FindGroup("Mapping"); + if (cubeObj.hasGroup("Mapping")) { + targetGroup = cubeObj.findGroup("Mapping"); } else { QString msg = "Unable to find Instrument or Mapping group in "; @@ -193,19 +193,19 @@ namespace Isis { void SerialNumberList::Add(const QString &serialNumber, const QString &filename) { Pvl p(Isis::FileName(filename).expanded()); - PvlObject cubeObj = p.FindObject("IsisCube"); + PvlObject cubeObj = p.findObject("IsisCube"); try { // Test the target name if desired if (p_checkTarget) { QString target; PvlGroup targetGroup; - if (cubeObj.HasGroup("Instrument")) { - targetGroup = cubeObj.FindGroup("Instrument"); + if (cubeObj.hasGroup("Instrument")) { + targetGroup = cubeObj.findGroup("Instrument"); } - else if (cubeObj.HasGroup("Mapping")) { + else if (cubeObj.hasGroup("Mapping")) { // No instrument, try Mapping - if (cubeObj.HasGroup("Mapping")) { - targetGroup = cubeObj.FindGroup("Mapping"); + if (cubeObj.hasGroup("Mapping")) { + targetGroup = cubeObj.findGroup("Mapping"); } else { QString msg = "Unable to find Instrument or Mapping group in "; diff --git a/isis/src/base/objs/SessionLog/SessionLog.cpp b/isis/src/base/objs/SessionLog/SessionLog.cpp index 3eba6b491edf2a2de8c2c054974bb249d65c4bc9..3672166eb80cc6a1deb2ecdef5d1aa4171f7e5eb 100644 --- a/isis/src/base/objs/SessionLog/SessionLog.cpp +++ b/isis/src/base/objs/SessionLog/SessionLog.cpp @@ -30,17 +30,17 @@ namespace Isis { // Constructor SessionLog::SessionLog() { // Grab the user preferences for logging - Isis::PvlGroup &slog = Isis::Preference::Preferences().FindGroup("SessionLog"); + Isis::PvlGroup &slog = Isis::Preference::Preferences().findGroup("SessionLog"); p_termOutput = ((QString)slog["TerminalOutput"]).toUpper() == "ON"; p_fileOutput = ((QString)slog["FileOutput"]).toUpper() == "ON"; p_outputFile = (QString) slog["FileName"]; p_access = ((QString) slog["FileAccess"]).toUpper(); // Add root - this->AddObject(Isis::iApp->History()); + this->addObject(Isis::iApp->History()); p_errorAdded = false; p_acctAdded = false; - p_root = &this->Object(0); + p_root = &this->object(0); atexit(Shutdown); } @@ -71,13 +71,13 @@ namespace Isis { // See if we should write to the print file if(p_fileOutput) { - SetTerminator("\n"); + setTerminator("\n"); try { if(p_access == "OVERWRITE") { - this->Isis::Pvl::Write(p_outputFile); + this->Isis::Pvl::write(p_outputFile); } else { - this->Append(p_outputFile); + this->append(p_outputFile); } } catch(...) { @@ -86,7 +86,7 @@ namespace Isis { << std::endl; exit(1); } - SetTerminator("End"); + setTerminator("End"); } } @@ -94,16 +94,16 @@ namespace Isis { // Update accounting if no errors if(p_acctAdded) return; if(!p_errorAdded) { - p_root->AddGroup(Isis::iApp->Accounting()); + p_root->addGroup(Isis::iApp->Accounting()); } p_acctAdded = true; } // Add an error message void SessionLog::AddError(Isis::Pvl &e) { - for(int i = 0; i < e.Groups(); i++) { - if(e.Group(i).IsNamed("Error")) { - p_root->AddGroup(e.Group(i)); + for(int i = 0; i < e.groups(); i++) { + if(e.group(i).isNamed("Error")) { + p_root->addGroup(e.group(i)); p_errorAdded = true; } } @@ -111,7 +111,7 @@ namespace Isis { // Add results from an application void SessionLog::AddResults(Isis::PvlGroup &results) { - p_root->AddGroup(results); + p_root->addGroup(results); } std::ostream &operator<<(std::ostream &os, Isis::SessionLog &log) { diff --git a/isis/src/base/objs/SessionLog/unitTest.cpp b/isis/src/base/objs/SessionLog/unitTest.cpp index e62e3adac46e13d5f42be74d37e929c52157417c..b1cc96e0970134cc96a6be029c03ef8d19a29ffc 100644 --- a/isis/src/base/objs/SessionLog/unitTest.cpp +++ b/isis/src/base/objs/SessionLog/unitTest.cpp @@ -12,13 +12,13 @@ using namespace std; int main(int argc, char *argv[]) { Preference::Preferences(true); - PvlGroup &g = Preference::Preferences().FindGroup("SessionLog"); + PvlGroup &g = Preference::Preferences().findGroup("SessionLog"); g["TerminalOutput"] = "On"; try { PvlGroup results("Results");; - results.AddComment("// This is an example of the results group"); + results.addComment("// This is an example of the results group"); results += PvlKeyword("Average", toString(13.5), "Meters"); - results[0].AddComment("// Average size of a rock"); + results[0].addComment("// Average size of a rock"); Pvl error; PvlGroup temp("Error"); @@ -28,7 +28,7 @@ int main(int argc, char *argv[]) { temp += PvlKeyword("Message", "Unable to open file"); temp += PvlKeyword("File", "unitTest.cpp"); temp += PvlKeyword("Line", toString(501)); - error.AddGroup(temp); + error.addGroup(temp); char **s_argv; s_argv = new char*[10]; s_argv[0] = new char[32]; diff --git a/isis/src/base/objs/Shade/Shade.cpp b/isis/src/base/objs/Shade/Shade.cpp index 6390a10204aab96529649b52515e288815e45df3..f280a9f621d0e34a1daf8497d7f93468ba193dbb 100644 --- a/isis/src/base/objs/Shade/Shade.cpp +++ b/isis/src/base/objs/Shade/Shade.cpp @@ -6,29 +6,29 @@ namespace Isis { Shade::Shade(Pvl &pvl, PhotoModel &pmodel) : NormModel(pvl, pmodel) { - PvlGroup &algorithm = pvl.FindObject("NormalizationModel").FindGroup("Algorithm", Pvl::Traverse); + PvlGroup &algorithm = pvl.findObject("NormalizationModel").findGroup("Algorithm", Pvl::Traverse); SetNormPharef(0.0); SetNormIncref(0.0); SetNormEmaref(0.0); SetNormAlbedo(1.0); - if(algorithm.HasKeyword("Incref")) { + if(algorithm.hasKeyword("Incref")) { SetNormIncref(algorithm["Incref"]); } - if(algorithm.HasKeyword("Pharef")) { + if(algorithm.hasKeyword("Pharef")) { SetNormPharef(algorithm["Pharef"]); } else { p_normPharef = p_normIncref; } - if(algorithm.HasKeyword("Emaref")) { + if(algorithm.hasKeyword("Emaref")) { SetNormEmaref(algorithm["Emaref"]); } - if(algorithm.HasKeyword("Albedo")) { + if(algorithm.hasKeyword("Albedo")) { SetNormAlbedo(algorithm["Albedo"]); } } diff --git a/isis/src/base/objs/Shade/unitTest.cpp b/isis/src/base/objs/Shade/unitTest.cpp index efff92021787df478b017a5c8e2d1101dac89970..5300c5aef26d1e3f0efcf35b4065edb8eeb8e753 100644 --- a/isis/src/base/objs/Shade/unitTest.cpp +++ b/isis/src/base/objs/Shade/unitTest.cpp @@ -24,18 +24,18 @@ int main() { algp += PvlKeyword("Name", "Lambert"); PvlObject op("PhotometricModel"); - op.AddGroup(algp); + op.addGroup(algp); PvlGroup algn("Algorithm"); algn += PvlKeyword("Name", "Shade"); algn += PvlKeyword("Albedo", ".0690507"); PvlObject on("NormalizationModel"); - on.AddGroup(algn); + on.addGroup(algn); Pvl pvl; - pvl.AddObject(op); - pvl.AddObject(on); + pvl.addObject(op); + pvl.addObject(on); std::cout << pvl << std::endl << std::endl; diff --git a/isis/src/base/objs/ShadeAtm/ShadeAtm.cpp b/isis/src/base/objs/ShadeAtm/ShadeAtm.cpp index 8ad0ef426d4d83394e412d3197ca1861165c087c..ed5706988032500fae37fb0e0b7db1ba0c1651f0 100644 --- a/isis/src/base/objs/ShadeAtm/ShadeAtm.cpp +++ b/isis/src/base/objs/ShadeAtm/ShadeAtm.cpp @@ -6,28 +6,28 @@ namespace Isis { ShadeAtm::ShadeAtm(Pvl &pvl, PhotoModel &pmodel, AtmosModel &amodel) : NormModel(pvl, pmodel, amodel) { - PvlGroup &algorithm = pvl.FindObject("NormalizationModel").FindGroup("Algorithm", Pvl::Traverse); + PvlGroup &algorithm = pvl.findObject("NormalizationModel").findGroup("Algorithm", Pvl::Traverse); SetNormPharef(0.0); SetNormIncref(0.0); SetNormEmaref(0.0); SetNormAlbedo(1.0); - if(algorithm.HasKeyword("Incref")) { + if(algorithm.hasKeyword("Incref")) { SetNormIncref(algorithm["Incref"]); } - if(algorithm.HasKeyword("Pharef")) { + if(algorithm.hasKeyword("Pharef")) { SetNormPharef(algorithm["Pharef"]); } else { p_normPharef = p_normIncref; } - if(algorithm.HasKeyword("Emaref")) { + if(algorithm.hasKeyword("Emaref")) { SetNormEmaref(algorithm["Emaref"]); } - if(algorithm.HasKeyword("Albedo")) { + if(algorithm.hasKeyword("Albedo")) { SetNormAlbedo(algorithm["Albedo"]); } } diff --git a/isis/src/base/objs/ShadeAtm/unitTest.cpp b/isis/src/base/objs/ShadeAtm/unitTest.cpp index f54a6d0b3f1fac465c621996f106e053565a9c7f..3a4fe966933f511634790012fefb731589d83206 100644 --- a/isis/src/base/objs/ShadeAtm/unitTest.cpp +++ b/isis/src/base/objs/ShadeAtm/unitTest.cpp @@ -27,26 +27,26 @@ int main() { algp += PvlKeyword("Name", "Lambert"); PvlObject op("PhotometricModel"); - op.AddGroup(algp); + op.addGroup(algp); PvlGroup alga("Algorithm"); alga += PvlKeyword("Name", "Anisotropic1"); alga += PvlKeyword("Bha", "0.85"); PvlObject oa("AtmosphericModel"); - oa.AddGroup(alga); + oa.addGroup(alga); PvlGroup algn("Algorithm"); algn += PvlKeyword("Name", "ShadeAtm"); algn += PvlKeyword("Albedo", "0.0690507"); PvlObject on("NormalizationModel"); - on.AddGroup(algn); + on.addGroup(algn); Pvl pvl; - pvl.AddObject(op); - pvl.AddObject(oa); - pvl.AddObject(on); + pvl.addObject(op); + pvl.addObject(oa); + pvl.addObject(on); std::cout << pvl << std::endl << std::endl; diff --git a/isis/src/base/objs/ShapeModelFactory/ShapeModelFactory.cpp b/isis/src/base/objs/ShapeModelFactory/ShapeModelFactory.cpp index 9ec9b2fb06105b2dada14b79428018e26322623c..92a04e7da67474b6b4d760c5587417c8c5faa2bd 100644 --- a/isis/src/base/objs/ShapeModelFactory/ShapeModelFactory.cpp +++ b/isis/src/base/objs/ShapeModelFactory/ShapeModelFactory.cpp @@ -44,7 +44,7 @@ namespace Isis { ShapeModel *ShapeModelFactory::create(Target *target, Pvl &pvl) { // get kernels and instrument Pvl groups - PvlGroup &kernelsPvlGroup = pvl.FindGroup("Kernels", Pvl::Traverse); + PvlGroup &kernelsPvlGroup = pvl.findGroup("Kernels", Pvl::Traverse); // Do we need a sky shape model, member variable, or neither? For now treat sky as ellipsoid bool skyTarget = target->isSky(); @@ -62,12 +62,12 @@ namespace Isis { if (skyTarget) { // Sky targets are ellipsoid shapes } - else if (kernelsPvlGroup.HasKeyword("ElevationModel") && - !kernelsPvlGroup["ElevationModel"].IsNull()) {//&& + else if (kernelsPvlGroup.hasKeyword("ElevationModel") && + !kernelsPvlGroup["ElevationModel"].isNull()) {//&& shapeModelFilenames = (QString) kernelsPvlGroup["ElevationModel"]; } - else if (kernelsPvlGroup.HasKeyword("ShapeModel") && - !kernelsPvlGroup["ShapeModel"].IsNull()) {//&& + else if (kernelsPvlGroup.hasKeyword("ShapeModel") && + !kernelsPvlGroup["ShapeModel"].isNull()) {//&& shapeModelFilenames = (QString) kernelsPvlGroup["ShapeModel"]; } diff --git a/isis/src/base/objs/ShapeModelFactory/unitTest.cpp b/isis/src/base/objs/ShapeModelFactory/unitTest.cpp index d1ae9500127a5f13494e8d05ec2e7fcbbfc6b6b5..781ee4a65c9908edca138c428b9c09e10f43a6e1 100644 --- a/isis/src/base/objs/ShapeModelFactory/unitTest.cpp +++ b/isis/src/base/objs/ShapeModelFactory/unitTest.cpp @@ -58,16 +58,16 @@ int main() { kern1 += PvlKeyword("EndPadding", toString(slope)); Pvl lab1; - lab1.AddGroup(inst1); - lab1.AddGroup(kern1); + lab1.addGroup(inst1); + lab1.addGroup(kern1); // Test ShapeModel keyword cout << endl << " Testing ShapeModel keyword..." << endl; PvlGroup kern2 = kern1; kern2 += PvlKeyword("ShapeModel", dir2 + "molaMarsPlanetaryRadius0005.cub"); Pvl lab2; - lab2.AddGroup(inst2); - lab2.AddGroup(kern2); + lab2.addGroup(inst2); + lab2.addGroup(kern2); Spice spiSh(lab2); Target targSh(&spiSh, lab2); ShapeModel *smSh = ShapeModelFactory::create(&targSh, lab2); @@ -79,8 +79,8 @@ int main() { PvlGroup kern3 = kern1; kern3 += PvlKeyword("ElevationModel", dir2 + "molaMarsPlanetaryRadius0005.cub"); Pvl lab3; - lab3.AddGroup(inst2); - lab3.AddGroup(kern3); + lab3.addGroup(inst2); + lab3.addGroup(kern3); Spice spiEl(lab3); Target targEl(&spiEl, lab3); ShapeModel *smEl = ShapeModelFactory::create(&targEl, lab3); @@ -92,8 +92,8 @@ int main() { PvlGroup kern4 = kern1;; kern4 += PvlKeyword("ShapeModel", "Null"); Pvl lab4; - lab4.AddGroup(inst2); - lab4.AddGroup(kern4); + lab4.addGroup(inst2); + lab4.addGroup(kern4); Spice spiElNull(lab4); Target targElNull(&spiElNull, lab4); ShapeModel *smElNull = ShapeModelFactory::create(&targElNull, lab4); @@ -112,8 +112,8 @@ int main() { PvlGroup kern5 = kern1; kern5 += PvlKeyword("ShapeModel", "NotAFile"); Pvl lab5; - lab5.AddGroup(inst2); - lab5.AddGroup(kern5); + lab5.addGroup(inst2); + lab5.addGroup(kern5); Spice spiBadFile(lab5); Target targBadFile(&spiBadFile, lab5); ShapeModel *smBadFile = ShapeModelFactory::create(&targBadFile, lab4); @@ -130,8 +130,8 @@ int main() { PvlGroup kern5 = kern1; kern5 += PvlKeyword("ShapeModel", dir3 + "ab102401.cub"); Pvl lab5; - lab5.AddGroup(inst2); - lab5.AddGroup(kern5); + lab5.addGroup(inst2); + lab5.addGroup(kern5); Spice spiBadFile(lab5); Target targBadFile(&spiBadFile, lab5); ShapeModel *smBadFile = ShapeModelFactory::create(&targBadFile, lab4); @@ -148,8 +148,8 @@ int main() { PvlGroup kern5 = kern1; kern5 += PvlKeyword("ShapeModel", dir3 + "ab102402.lev2.cub"); Pvl lab5; - lab5.AddGroup(inst2); - lab5.AddGroup(kern5); + lab5.addGroup(inst2); + lab5.addGroup(kern5); Spice spiDem(lab5); Target targDem(&spiDem, lab5); ShapeModel *smDem = ShapeModelFactory::create(&targDem, lab5); diff --git a/isis/src/base/objs/SimpleCylindrical/SimpleCylindrical.cpp b/isis/src/base/objs/SimpleCylindrical/SimpleCylindrical.cpp index 33065b01b1969525ffe6a6fd32530b18d1f4a452..9049cc75be7b4b5a66af55c3b41fb30c34f79709 100644 --- a/isis/src/base/objs/SimpleCylindrical/SimpleCylindrical.cpp +++ b/isis/src/base/objs/SimpleCylindrical/SimpleCylindrical.cpp @@ -55,10 +55,10 @@ namespace Isis { Projection::Projection(label) { try { // Try to read the mapping group - PvlGroup &mapGroup = label.FindGroup("Mapping", Pvl::Traverse); + PvlGroup &mapGroup = label.findGroup("Mapping", Pvl::Traverse); // Compute the default value if allowed and needed - if ((allowDefaults) && (!mapGroup.HasKeyword("CenterLongitude"))) { + if ((allowDefaults) && (!mapGroup.hasKeyword("CenterLongitude"))) { double lon = (m_minimumLongitude + m_maximumLongitude) / 2.0; mapGroup += PvlKeyword("CenterLongitude", toString(lon)); } diff --git a/isis/src/base/objs/SimpleCylindrical/unitTest.cpp b/isis/src/base/objs/SimpleCylindrical/unitTest.cpp index ee41d03cb0456d64ffbc3e533a4432f88e0fd526..668bfe2560bddbacfc1a5f7d4cb10299ca011dbb 100644 --- a/isis/src/base/objs/SimpleCylindrical/unitTest.cpp +++ b/isis/src/base/objs/SimpleCylindrical/unitTest.cpp @@ -14,8 +14,8 @@ int main(int argc, char *argv[]) { cout << "UNIT TEST FOR SimpleCylindrical" << endl << endl; Pvl lab; - lab.AddGroup(PvlGroup("Mapping")); - PvlGroup &mapGrp = lab.FindGroup("Mapping"); + lab.addGroup(PvlGroup("Mapping")); + PvlGroup &mapGrp = lab.findGroup("Mapping"); mapGrp += PvlKeyword("EquatorialRadius", toString(1.0)); mapGrp += PvlKeyword("PolarRadius", toString(1.0)); mapGrp += PvlKeyword("LatitudeType", "Planetocentric"); @@ -76,7 +76,7 @@ int main(int argc, char *argv[]) { cout << endl; cout << "Testing default option ... " << endl; - mapGrp.DeleteKeyword("CenterLongitude"); + mapGrp.deleteKeyword("CenterLongitude"); SimpleCylindrical p2(lab, true); cout << lab << endl; cout << endl; @@ -86,9 +86,9 @@ int main(int argc, char *argv[]) { Pvl tmp1; Pvl tmp2; Pvl tmp3; - tmp1.AddGroup(p.Mapping()); - tmp2.AddGroup(p.MappingLatitudes()); - tmp3.AddGroup(p.MappingLongitudes()); + tmp1.addGroup(p.Mapping()); + tmp2.addGroup(p.MappingLatitudes()); + tmp3.addGroup(p.MappingLongitudes()); cout << "Mapping() = " << endl; cout << tmp1 << endl; diff --git a/isis/src/base/objs/Sinusoidal/Sinusoidal.cpp b/isis/src/base/objs/Sinusoidal/Sinusoidal.cpp index 213f2e438488033b39d55c21bf0a06635bc0ba0c..863982870c2b01db0885da92f8a946068fa85c99 100644 --- a/isis/src/base/objs/Sinusoidal/Sinusoidal.cpp +++ b/isis/src/base/objs/Sinusoidal/Sinusoidal.cpp @@ -55,11 +55,11 @@ namespace Isis { Projection::Projection(label) { try { // Try to read the mapping group - PvlGroup &mapGroup = label.FindGroup("Mapping", Pvl::Traverse); + PvlGroup &mapGroup = label.findGroup("Mapping", Pvl::Traverse); // Compute and write the default center longitude if allowed and // necessary - if ((allowDefaults) && (!mapGroup.HasKeyword("CenterLongitude"))) { + if ((allowDefaults) && (!mapGroup.hasKeyword("CenterLongitude"))) { double lon = (m_minimumLongitude + m_maximumLongitude) / 2.0; mapGroup += PvlKeyword("CenterLongitude", toString(lon)); } diff --git a/isis/src/base/objs/Sinusoidal/unitTest.cpp b/isis/src/base/objs/Sinusoidal/unitTest.cpp index 9a996d5839ebdbab83b106a84b626ef8fbb1f1cc..08fabe2de1b10c30c5d2160ae7d7988d0f10e203 100644 --- a/isis/src/base/objs/Sinusoidal/unitTest.cpp +++ b/isis/src/base/objs/Sinusoidal/unitTest.cpp @@ -14,8 +14,8 @@ int main(int argc, char *argv[]) { cout << "Unit Test For Sinusodial" << endl << endl; Pvl lab; - lab.AddGroup(PvlGroup("Mapping")); - PvlGroup &mapGroup = lab.FindGroup("Mapping"); + lab.addGroup(PvlGroup("Mapping")); + PvlGroup &mapGroup = lab.findGroup("Mapping"); mapGroup += PvlKeyword("EquatorialRadius", toString(1.0)); mapGroup += PvlKeyword("PolarRadius", toString(1.0)); mapGroup += PvlKeyword("LatitudeType", "Planetocentric"); @@ -78,7 +78,7 @@ int main(int argc, char *argv[]) { cout << endl; cout << "Test default computation ... " << endl; - mapGroup.DeleteKeyword("CenterLongitude"); + mapGroup.deleteKeyword("CenterLongitude"); Sinusoidal p2(lab, true); cout << lab << endl; cout << endl; @@ -88,9 +88,9 @@ int main(int argc, char *argv[]) { Pvl tmp1; Pvl tmp2; Pvl tmp3; - tmp1.AddGroup(p.Mapping()); - tmp2.AddGroup(p.MappingLatitudes()); - tmp3.AddGroup(p.MappingLongitudes()); + tmp1.addGroup(p.Mapping()); + tmp2.addGroup(p.MappingLatitudes()); + tmp3.addGroup(p.MappingLongitudes()); cout << "Mapping() = " << endl; cout << tmp1 << endl; diff --git a/isis/src/base/objs/Spice/Spice.cpp b/isis/src/base/objs/Spice/Spice.cpp index 78648c74548f2155aba9c1e3122b97d2dcc64909..01e43db02389d7cef16bb818293490276e729420 100644 --- a/isis/src/base/objs/Spice/Spice.cpp +++ b/isis/src/base/objs/Spice/Spice.cpp @@ -69,7 +69,7 @@ namespace Isis { // TODO: DOCUMENT EVERYTHING Spice::Spice(Pvl &lab) { - PvlGroup kernels = lab.FindGroup("Kernels", Pvl::Traverse); + PvlGroup kernels = lab.findGroup("Kernels", Pvl::Traverse); bool hasTables = (kernels["TargetPosition"][0] == "Table"); init(lab, !hasTables); @@ -136,24 +136,24 @@ namespace Isis { // m_sky = false; // Get the kernel group and load main kernels - PvlGroup kernels = lab.FindGroup("Kernels", Pvl::Traverse); + PvlGroup kernels = lab.findGroup("Kernels", Pvl::Traverse); // Get the time padding first - if (kernels.HasKeyword("StartPadding")) { + if (kernels.hasKeyword("StartPadding")) { *m_startTimePadding = toDouble(kernels["StartPadding"][0]); } else { *m_startTimePadding = 0.0; } - if (kernels.HasKeyword("EndPadding")) { + if (kernels.hasKeyword("EndPadding")) { *m_endTimePadding = toDouble(kernels["EndPadding"][0]); } else { *m_endTimePadding = 0.0; } - m_usingNaif = !lab.HasObject("NaifKeywords") || noTables; + m_usingNaif = !lab.hasObject("NaifKeywords") || noTables; // Modified to load planetary ephemeris SPKs before s/c SPKs since some // missions (e.g., MESSENGER) may augment the s/c SPK with new planet @@ -165,31 +165,31 @@ namespace Isis { load(kernels["InstrumentPointing"], noTables); } - if (kernels.HasKeyword("Frame")) { + if (kernels.hasKeyword("Frame")) { load(kernels["Frame"], noTables); } load(kernels["TargetAttitudeShape"], noTables); - if (kernels.HasKeyword("Instrument")) { + if (kernels.hasKeyword("Instrument")) { load(kernels["Instrument"], noTables); } // Always load after instrument - if (kernels.HasKeyword("InstrumentAddendum")) { + if (kernels.hasKeyword("InstrumentAddendum")) { load(kernels["InstrumentAddendum"], noTables); } load(kernels["LeapSecond"], noTables); - if ( kernels.HasKeyword("SpacecraftClock")) { + if ( kernels.hasKeyword("SpacecraftClock")) { load(kernels["SpacecraftClock"], noTables); } // Modified to load extra kernels last to allow overriding default values // (2010-04-07) (DAC) - if (kernels.HasKeyword("Extra")) { + if (kernels.hasKeyword("Extra")) { load(kernels["Extra"], noTables); } } else { - *m_naifKeywords = lab.FindObject("NaifKeywords"); + *m_naifKeywords = lab.findObject("NaifKeywords"); } // Get NAIF ik, spk, sclk, and ck codes @@ -208,7 +208,7 @@ namespace Isis { // Use spkbodycode to read body position from spk QString trykey = "NaifIkCode"; - if (kernels.HasKeyword("NaifFrameCode")) trykey = "NaifFrameCode"; + if (kernels.hasKeyword("NaifFrameCode")) trykey = "NaifFrameCode"; *m_ikCode = toInt(kernels[trykey][0]); *m_spkCode = *m_ikCode / 1000; @@ -227,20 +227,20 @@ namespace Isis { *m_spkBodyCode = m_target->naifBodyCode(); // Override them if they exist in the labels - if (kernels.HasKeyword("NaifSpkCode")) { + if (kernels.hasKeyword("NaifSpkCode")) { *m_spkCode = (int) kernels["NaifSpkCode"]; } - if (kernels.HasKeyword("NaifCkCode")) { + if (kernels.hasKeyword("NaifCkCode")) { *m_ckCode = (int) kernels["NaifCkCode"]; } - if (kernels.HasKeyword("NaifSclkCode")) { + if (kernels.hasKeyword("NaifSclkCode")) { *m_sclkCode = (int) kernels["NaifSclkCode"]; } if (!m_target->isSky()) { - if (kernels.HasKeyword("NaifSpkBodyCode")) { + if (kernels.hasKeyword("NaifSpkBodyCode")) { *m_spkBodyCode = (int) kernels["NaifSpkBodyCode"]; } } @@ -254,7 +254,7 @@ namespace Isis { // JAA - Modified to stored and look for the frame body code in the // cube labels SpiceInt frameCode; - if ((m_usingNaif) || (!m_naifKeywords->HasKeyword("BODY_FRAME_CODE"))) { + if ((m_usingNaif) || (!m_naifKeywords->hasKeyword("BODY_FRAME_CODE"))) { char frameName[32]; SpiceBoolean found; cidfrm_c(*m_spkBodyCode, sizeof(frameName), &frameCode, frameName, @@ -298,12 +298,12 @@ namespace Isis { // Check to see if we have nadir pointing that needs to be computed & // See if we have table blobs to load if (kernels["TargetPosition"][0].toUpper() == "TABLE") { - Table t("SunPosition", lab.FileName(), lab); + Table t("SunPosition", lab.fileName(), lab); m_sunPosition->LoadCache(t); - Table t2("BodyRotation", lab.FileName(), lab); + Table t2("BodyRotation", lab.fileName(), lab); m_bodyRotation->LoadCache(t2); - if (t2.Label().HasKeyword("SolarLongitude")) { + if (t2.Label().hasKeyword("SolarLongitude")) { *m_solarLongitude = Longitude(t2.Label()["SolarLongitude"], Angle::Degrees); } @@ -318,7 +318,7 @@ namespace Isis { // Table option, so we don't need to check for Table under the old // keywords. - if (kernels["InstrumentPointing"].Size() == 0) { + if (kernels["InstrumentPointing"].size() == 0) { throw IException(IException::Unknown, "No camera pointing available", _FILEINFO_); @@ -335,18 +335,18 @@ namespace Isis { m_instrumentRotation = new SpiceRotation(*m_ikCode, *m_spkBodyCode); } else if (kernels["InstrumentPointing"][0].toUpper() == "TABLE") { - Table t("InstrumentPointing", lab.FileName(), lab); + Table t("InstrumentPointing", lab.fileName(), lab); m_instrumentRotation->LoadCache(t); } - if (kernels["InstrumentPosition"].Size() == 0) { + if (kernels["InstrumentPosition"].size() == 0) { throw IException(IException::Unknown, "No instrument position available", _FILEINFO_); } if (kernels["InstrumentPosition"][0].toUpper() == "TABLE") { - Table t("InstrumentPosition", lab.FileName(), lab); + Table t("InstrumentPosition", lab.fileName(), lab); m_instrumentPosition->LoadCache(t); } @@ -365,7 +365,7 @@ namespace Isis { void Spice::load(PvlKeyword &key, bool noTables) { NaifStatus::CheckErrors(); - for (int i = 0; i < key.Size(); i++) { + for (int i = 0; i < key.size(); i++) { if (key[i] == "") continue; if (IString(key[i]).UpCase() == "NULL") break; if (IString(key[i]).UpCase() == "NADIR") break; @@ -1024,14 +1024,14 @@ namespace Isis { void Spice::storeValue(QString key, int index, SpiceValueType type, QVariant value) { - if (!m_naifKeywords->HasKeyword(key)) { - m_naifKeywords->AddKeyword(PvlKeyword(key)); + if (!m_naifKeywords->hasKeyword(key)) { + m_naifKeywords->addKeyword(PvlKeyword(key)); } - PvlKeyword &storedKey = m_naifKeywords->FindKeyword(key); + PvlKeyword &storedKey = m_naifKeywords->findKeyword(key); - while(index >= storedKey.Size()) { - storedKey.AddValue(""); + while(index >= storedKey.size()) { + storedKey.addValue(""); } if (type == SpiceByteCodeType) { @@ -1058,8 +1058,8 @@ namespace Isis { // Read from PvlObject that is our naif keywords QVariant result; - if (m_naifKeywords->HasKeyword(key) && !m_usingNaif) { - PvlKeyword &storedKeyword = m_naifKeywords->FindKeyword(key); + if (m_naifKeywords->hasKeyword(key) && !m_usingNaif) { + PvlKeyword &storedKeyword = m_naifKeywords->findKeyword(key); try { if (type == SpiceDoubleType) { @@ -1302,29 +1302,29 @@ namespace Isis { bool Spice::hasKernels(Pvl &lab) { // Get the kernel group and check main kernels - PvlGroup kernels = lab.FindGroup("Kernels", Pvl::Traverse); + PvlGroup kernels = lab.findGroup("Kernels", Pvl::Traverse); std::vector keywords; keywords.push_back("TargetPosition"); - if (kernels.HasKeyword("SpacecraftPosition")) { + if (kernels.hasKeyword("SpacecraftPosition")) { keywords.push_back("SpacecraftPosition"); } else { keywords.push_back("InstrumentPosition"); } - if (kernels.HasKeyword("SpacecraftPointing")) { + if (kernels.hasKeyword("SpacecraftPointing")) { keywords.push_back("SpacecraftPointing"); } else { keywords.push_back("InstrumentPointing"); } - if (kernels.HasKeyword("Frame")) { + if (kernels.hasKeyword("Frame")) { keywords.push_back("Frame"); } - if (kernels.HasKeyword("Extra")) { + if (kernels.hasKeyword("Extra")) { keywords.push_back("Extra"); } @@ -1332,7 +1332,7 @@ namespace Isis { for (int ikey = 0; ikey < (int) keywords.size(); ikey++) { key = kernels[ikey]; - for (int i = 0; i < key.Size(); i++) { + for (int i = 0; i < key.size(); i++) { if (key[i] == "") return false; if (IString(key[i]).UpCase() == "NULL") return false; if (IString(key[i]).UpCase() == "NADIR") return false; diff --git a/isis/src/base/objs/Spice/unitTest.cpp b/isis/src/base/objs/Spice/unitTest.cpp index 081f5dd9905a692b99aa2bdd5e8600fb1eb8931f..9332b6ba601427e2e4d02e660e2b9cfd96dc66f7 100644 --- a/isis/src/base/objs/Spice/unitTest.cpp +++ b/isis/src/base/objs/Spice/unitTest.cpp @@ -130,8 +130,8 @@ int main(int argc, char *argv[]) { kern += PvlKeyword("EndPadding", toString(slope)); Pvl lab; - lab.AddGroup(inst); - lab.AddGroup(kern); + lab.addGroup(inst); + lab.addGroup(kern); // Test bad target try { @@ -144,8 +144,8 @@ int main(int argc, char *argv[]) { } // Test bad getInteger - PvlGroup &temp = lab.FindGroup("Instrument"); - temp.AddKeyword(PvlKeyword("TargetName", "Mars"), Pvl::Replace); + PvlGroup &temp = lab.findGroup("Instrument"); + temp.addKeyword(PvlKeyword("TargetName", "Mars"), Pvl::Replace); cout << "Creating Spice object ..." << endl; MySpice spi(lab); spi.instrumentRotation()->SetTimeBias(-1.15); @@ -251,8 +251,8 @@ int main(int argc, char *argv[]) { cout << endl; PvlObject naifKeywords(spi.getStoredNaifKeywords()); cout << "Get Stored Naif Keywords..." << endl; - cout << "Object = " << naifKeywords.Name() << endl; - for (int i = 0; i < naifKeywords.Keywords(); i++) { + cout << "Object = " << naifKeywords.name() << endl; + for (int i = 0; i < naifKeywords.keywords(); i++) { cout << " " << naifKeywords[i] << endl; } cout << "EndObject" << endl; diff --git a/isis/src/base/objs/SpicePosition/SpicePosition.cpp b/isis/src/base/objs/SpicePosition/SpicePosition.cpp index a31ec5308643271d3b24457f6a2f96466580f52e..ab7ed79f1571d71e533df17386898bfb5193e9cb 100644 --- a/isis/src/base/objs/SpicePosition/SpicePosition.cpp +++ b/isis/src/base/objs/SpicePosition/SpicePosition.cpp @@ -368,30 +368,30 @@ namespace Isis { } // Load the full cache time information from the label if available - if(table.Label().HasKeyword("SpkTableStartTime")) { - p_fullCacheStartTime = toDouble(table.Label().FindKeyword("SpkTableStartTime")[0]); + if(table.Label().hasKeyword("SpkTableStartTime")) { + p_fullCacheStartTime = toDouble(table.Label().findKeyword("SpkTableStartTime")[0]); } - if(table.Label().HasKeyword("SpkTableEndTime")) { - p_fullCacheEndTime = toDouble(table.Label().FindKeyword("SpkTableEndTime")[0]); + if(table.Label().hasKeyword("SpkTableEndTime")) { + p_fullCacheEndTime = toDouble(table.Label().findKeyword("SpkTableEndTime")[0]); } - if(table.Label().HasKeyword("SpkTableOriginalSize")) { - p_fullCacheSize = toDouble(table.Label().FindKeyword("SpkTableOriginalSize")[0]); + if(table.Label().hasKeyword("SpkTableOriginalSize")) { + p_fullCacheSize = toDouble(table.Label().findKeyword("SpkTableOriginalSize")[0]); } // set source type by table's label keyword - if(!table.Label().HasKeyword("CacheType")) { + if(!table.Label().hasKeyword("CacheType")) { p_source = Memcache; } - else if(table.Label().FindKeyword("CacheType")[0] == "Linear") { + else if(table.Label().findKeyword("CacheType")[0] == "Linear") { p_source = Memcache; } - else if(table.Label().FindKeyword("CacheType")[0] == "HermiteSpline") { + else if(table.Label().findKeyword("CacheType")[0] == "HermiteSpline") { p_source = HermiteCache; p_overrideTimeScale = 1.; p_override = ScaleOnly; } - else if(table.Label().FindKeyword("CacheType")[0] == "PolyFunction") { + else if(table.Label().findKeyword("CacheType")[0] == "PolyFunction") { p_source = PolyFunction; } else { @@ -605,15 +605,15 @@ namespace Isis { // Write original time coverage if(p_fullCacheStartTime != 0) { table.Label() += PvlKeyword("SpkTableStartTime"); - table.Label()["SpkTableStartTime"].AddValue(toString(p_fullCacheStartTime)); + table.Label()["SpkTableStartTime"].addValue(toString(p_fullCacheStartTime)); } if(p_fullCacheEndTime != 0) { table.Label() += PvlKeyword("SpkTableEndTime"); - table.Label()["SpkTableEndTime"].AddValue(toString(p_fullCacheEndTime)); + table.Label()["SpkTableEndTime"].addValue(toString(p_fullCacheEndTime)); } if(p_fullCacheSize != 0) { table.Label() += PvlKeyword("SpkTableOriginalSize"); - table.Label()["SpkTableOriginalSize"].AddValue(toString(p_fullCacheSize)); + table.Label()["SpkTableOriginalSize"].addValue(toString(p_fullCacheSize)); } } diff --git a/isis/src/base/objs/SpicePosition/unitTest.cpp b/isis/src/base/objs/SpicePosition/unitTest.cpp index 2ee8304ada47cf748ad8e7c9ba7fe322edc68e4f..0cc935ed0d03e981cbb8e31b51b0b98620b05184 100644 --- a/isis/src/base/objs/SpicePosition/unitTest.cpp +++ b/isis/src/base/objs/SpicePosition/unitTest.cpp @@ -204,11 +204,11 @@ int main(int argc, char *argv[]) { // Add table label table.Label() += PvlKeyword("CacheType", "HermiteSpline"); table.Label() += PvlKeyword("SpkTableStartTime"); - table.Label()["SpkTableStartTime"].AddValue(toString(-69382819.360519)); + table.Label()["SpkTableStartTime"].addValue(toString(-69382819.360519)); table.Label() += PvlKeyword("SpkTableEndTime"); - table.Label()["SpkTableEndTime"].AddValue(toString(-69382512.160519)); + table.Label()["SpkTableEndTime"].addValue(toString(-69382512.160519)); table.Label() += PvlKeyword("SpkTableOriginalSize"); - table.Label()["SpkTableOriginalSize"].AddValue(toString(769)); + table.Label()["SpkTableOriginalSize"].addValue(toString(769)); // Load table into the object pos4.LoadCache(table); diff --git a/isis/src/base/objs/SpiceRotation/SpiceRotation.cpp b/isis/src/base/objs/SpiceRotation/SpiceRotation.cpp index a04eecf1b975b4a222acae25e91f653fcec4dd0a..815c99b4c2f3665b170631ad1971ea2463124521 100644 --- a/isis/src/base/objs/SpiceRotation/SpiceRotation.cpp +++ b/isis/src/base/objs/SpiceRotation/SpiceRotation.cpp @@ -333,9 +333,9 @@ namespace Isis { p_hasAngularVelocity = false; // Load the constant and time-based frame traces and the constant rotation - if(table.Label().HasKeyword("TimeDependentFrames")) { + if(table.Label().hasKeyword("TimeDependentFrames")) { PvlKeyword labelTimeFrames = table.Label()["TimeDependentFrames"]; - for(int i = 0; i < labelTimeFrames.Size(); i++) { + for(int i = 0; i < labelTimeFrames.size(); i++) { p_timeFrames.push_back(toInt(labelTimeFrames[i])); } } @@ -344,16 +344,16 @@ namespace Isis { p_timeFrames.push_back(J2000Code); } - if(table.Label().HasKeyword("ConstantRotation")) { + if(table.Label().hasKeyword("ConstantRotation")) { PvlKeyword labelConstantFrames = table.Label()["ConstantFrames"]; p_constantFrames.clear(); - for(int i = 0; i < labelConstantFrames.Size(); i++) { + for(int i = 0; i < labelConstantFrames.size(); i++) { p_constantFrames.push_back(toInt(labelConstantFrames[i])); } PvlKeyword labelConstantRotation = table.Label()["ConstantRotation"]; - for(int i = 0; i < labelConstantRotation.Size(); i++) { + for(int i = 0; i < labelConstantRotation.size(); i++) { p_TC.push_back(toDouble(labelConstantRotation[i])); } } @@ -363,14 +363,14 @@ namespace Isis { } // Load the full cache time information from the label if available - if(table.Label().HasKeyword("CkTableStartTime")) { - p_fullCacheStartTime = toDouble(table.Label().FindKeyword("CkTableStartTime")[0]); + if(table.Label().hasKeyword("CkTableStartTime")) { + p_fullCacheStartTime = toDouble(table.Label().findKeyword("CkTableStartTime")[0]); } - if(table.Label().HasKeyword("CkTableEndTime")) { - p_fullCacheEndTime = toDouble(table.Label().FindKeyword("CkTableEndTime")[0]); + if(table.Label().hasKeyword("CkTableEndTime")) { + p_fullCacheEndTime = toDouble(table.Label().findKeyword("CkTableEndTime")[0]); } - if(table.Label().HasKeyword("CkTableOriginalSize")) { - p_fullCacheSize = toInt(table.Label().FindKeyword("CkTableOriginalSize")[0]); + if(table.Label().hasKeyword("CkTableOriginalSize")) { + p_fullCacheSize = toInt(table.Label().findKeyword("CkTableOriginalSize")[0]); } int recFields = table[0].Fields(); @@ -700,7 +700,7 @@ namespace Isis { table.Label() += PvlKeyword("TimeDependentFrames"); for(int i = 0; i < (int) p_timeFrames.size(); i++) { - table.Label()["TimeDependentFrames"].AddValue(toString(p_timeFrames[i])); + table.Label()["TimeDependentFrames"].addValue(toString(p_timeFrames[i])); } } @@ -708,28 +708,28 @@ namespace Isis { table.Label() += PvlKeyword("ConstantFrames"); for(int i = 0; i < (int) p_constantFrames.size(); i++) { - table.Label()["ConstantFrames"].AddValue(toString(p_constantFrames[i])); + table.Label()["ConstantFrames"].addValue(toString(p_constantFrames[i])); } table.Label() += PvlKeyword("ConstantRotation"); for(int i = 0; i < (int) p_TC.size(); i++) { - table.Label()["ConstantRotation"].AddValue(toString(p_TC[i])); + table.Label()["ConstantRotation"].addValue(toString(p_TC[i])); } } // Write original time coverage if(p_fullCacheStartTime != 0) { table.Label() += PvlKeyword("CkTableStartTime"); - table.Label()["CkTableStartTime"].AddValue(toString(p_fullCacheStartTime)); + table.Label()["CkTableStartTime"].addValue(toString(p_fullCacheStartTime)); } if(p_fullCacheEndTime != 0) { table.Label() += PvlKeyword("CkTableEndTime"); - table.Label()["CkTableEndTime"].AddValue(toString(p_fullCacheEndTime)); + table.Label()["CkTableEndTime"].addValue(toString(p_fullCacheEndTime)); } if(p_fullCacheSize != 0) { table.Label() += PvlKeyword("CkTableOriginalSize"); - table.Label()["CkTableOriginalSize"].AddValue(toString(p_fullCacheSize)); + table.Label()["CkTableOriginalSize"].addValue(toString(p_fullCacheSize)); } NaifStatus::CheckErrors(); } diff --git a/isis/src/base/objs/StandardDeviationOperator/unitTest.cpp b/isis/src/base/objs/StandardDeviationOperator/unitTest.cpp index 6032a6895bcf7264d5e8c5676ff9530086c4bdc1..f6866020e5ccfdd8d7b6dcb774e0b0038453a549 100644 --- a/isis/src/base/objs/StandardDeviationOperator/unitTest.cpp +++ b/isis/src/base/objs/StandardDeviationOperator/unitTest.cpp @@ -35,11 +35,11 @@ int main() { opv += PvlKeyword("MaxIncidence", "135.0"); PvlObject o("InterestOperator"); - o.AddGroup(op); - o.AddGroup(opv); + o.addGroup(op); + o.addGroup(opv); Pvl pvl; - pvl.AddObject(o); + pvl.addObject(o); std::cout << pvl << std::endl; InterestOperator *iop = InterestOperatorFactory::Create(pvl); diff --git a/isis/src/base/objs/StreamExporter/StreamExporter.cpp b/isis/src/base/objs/StreamExporter/StreamExporter.cpp index c4132be4aec970f1feab34971b7f14592b8aedb9..0e77d17823e892b4096277314e2d6c15ce76f80d 100644 --- a/isis/src/base/objs/StreamExporter/StreamExporter.cpp +++ b/isis/src/base/objs/StreamExporter/StreamExporter.cpp @@ -78,7 +78,7 @@ namespace Isis { */ void StreamExporter::setType(ExportDescription &desc) { ProcessExport &p = getProcess(); - p.SetFormat(ProcessExport::BIL); + p.setFormat(ProcessExport::BIL); m_type = desc.getPixelType(); createBuffer(); diff --git a/isis/src/base/objs/Stretch/Stretch.cpp b/isis/src/base/objs/Stretch/Stretch.cpp index a1583d0a82cb878d40425ac9438439cde897c9db..24458fd21eff1626485ccb11dc716c0734c06a86 100644 --- a/isis/src/base/objs/Stretch/Stretch.cpp +++ b/isis/src/base/objs/Stretch/Stretch.cpp @@ -355,15 +355,15 @@ namespace Isis { * keywords from */ void Stretch::Load(Isis::Pvl &pvl, QString &grpName) { - PvlGroup grp = pvl.FindGroup(grpName, Isis::PvlObject::Traverse); - PvlKeyword inputs = grp.FindKeyword("Input"); - PvlKeyword outputs = grp.FindKeyword("Output"); + PvlGroup grp = pvl.findGroup(grpName, Isis::PvlObject::Traverse); + PvlKeyword inputs = grp.findKeyword("Input"); + PvlKeyword outputs = grp.findKeyword("Output"); - if(inputs.Size() != outputs.Size()) { + if(inputs.size() != outputs.size()) { QString msg = "Invalid Pvl file: The number of Input values must equal the number of Output values"; throw IException(IException::User, msg, _FILEINFO_); } - for(int i = 0; i < inputs.Size(); i++) { + for(int i = 0; i < inputs.size(); i++) { AddPair(toDouble(inputs[i]), toDouble(outputs[i])); } } @@ -382,7 +382,7 @@ namespace Isis { void Stretch::Save(QString &file, QString &grpName) { Pvl p; Save(p, grpName); - p.Write(file); + p.write(file); } void Stretch::Save(Isis::Pvl &pvl, QString &grpName) { @@ -390,12 +390,12 @@ namespace Isis { PvlKeyword inputs("Input"); PvlKeyword outputs("Output"); for(int i = 0; i < Pairs(); i++) { - inputs.AddValue(toString(Input(i))); - outputs.AddValue(toString(Output(i))); + inputs.addValue(toString(Input(i))); + outputs.addValue(toString(Output(i))); } - grp->AddKeyword(inputs); - grp->AddKeyword(outputs); - pvl.AddGroup(*grp); + grp->addKeyword(inputs); + grp->addKeyword(outputs); + pvl.addGroup(*grp); } /** diff --git a/isis/src/base/objs/StripPolygonSeeder/StripPolygonSeeder.cpp b/isis/src/base/objs/StripPolygonSeeder/StripPolygonSeeder.cpp index 8b4a06f8d610c367eeb701b861e24ca53dc25a7d..cba3f71048775ab99ae14dd0e4a50e17734ad079 100644 --- a/isis/src/base/objs/StripPolygonSeeder/StripPolygonSeeder.cpp +++ b/isis/src/base/objs/StripPolygonSeeder/StripPolygonSeeder.cpp @@ -128,39 +128,39 @@ namespace Isis { // Pull parameters specific to this algorithm out try { // Get info from Algorithm group - PvlGroup &algo = pvl.FindGroup("PolygonSeederAlgorithm", Pvl::Traverse); - PvlGroup &invalgo = invalidInput->FindGroup("PolygonSeederAlgorithm", + PvlGroup &algo = pvl.findGroup("PolygonSeederAlgorithm", Pvl::Traverse); + PvlGroup &invalgo = invalidInput->findGroup("PolygonSeederAlgorithm", Pvl::Traverse); // Set the spacing p_Xspacing = 0.0; - if(algo.HasKeyword("XSpacing")) { + if(algo.hasKeyword("XSpacing")) { p_Xspacing = (double) algo["XSpacing"]; - if(invalgo.HasKeyword("XSpacing")) { - invalgo.DeleteKeyword("XSpacing"); + if(invalgo.hasKeyword("XSpacing")) { + invalgo.deleteKeyword("XSpacing"); } } else { QString msg = "PVL for StripSeeder must contain [XSpacing] in ["; - msg += pvl.FileName() + "]"; + msg += pvl.fileName() + "]"; throw IException(IException::User, msg, _FILEINFO_); } p_Yspacing = 0.0; - if(algo.HasKeyword("YSpacing")) { + if(algo.hasKeyword("YSpacing")) { p_Yspacing = (double) algo["YSpacing"]; - if(invalgo.HasKeyword("YSpacing")) { - invalgo.DeleteKeyword("YSpacing"); + if(invalgo.hasKeyword("YSpacing")) { + invalgo.deleteKeyword("YSpacing"); } } else { QString msg = "PVL for StripSeeder must contain [YSpacing] in ["; - msg += pvl.FileName() + "]"; + msg += pvl.fileName() + "]"; throw IException(IException::User, msg, _FILEINFO_); } } catch(IException &e) { - QString msg = "Improper format for PolygonSeeder PVL [" + pvl.FileName() + "]"; + QString msg = "Improper format for PolygonSeeder PVL [" + pvl.fileName() + "]"; throw IException(IException::User, msg, _FILEINFO_); } @@ -183,11 +183,11 @@ namespace Isis { PvlKeyword xSpac("XSpacing", toString(p_Xspacing)); PvlKeyword ySpac("YSpacing", toString(p_Yspacing)); - pluginInfo.AddKeyword(name); - pluginInfo.AddKeyword(minThickness); - pluginInfo.AddKeyword(minArea); - pluginInfo.AddKeyword(xSpac); - pluginInfo.AddKeyword(ySpac); + pluginInfo.addKeyword(name); + pluginInfo.addKeyword(minThickness); + pluginInfo.addKeyword(minArea); + pluginInfo.addKeyword(xSpac); + pluginInfo.addKeyword(ySpac); return pluginInfo; } diff --git a/isis/src/base/objs/StripPolygonSeeder/unitTest.cpp b/isis/src/base/objs/StripPolygonSeeder/unitTest.cpp index 914d35866a1cbd5c434c8ad73575a169262a36d9..867c52af7d5ca84d2d0efe3496f52992ba870613 100644 --- a/isis/src/base/objs/StripPolygonSeeder/unitTest.cpp +++ b/isis/src/base/objs/StripPolygonSeeder/unitTest.cpp @@ -27,7 +27,7 @@ int main() { PvlGroup alg("PolygonSeederAlgorithm"); - if(!alg.HasKeyword("Name")) { + if(!alg.hasKeyword("Name")) { cout << "Test without subgrid" << endl; alg += PvlKeyword("Name", "Strip"); alg += PvlKeyword("MinimumThickness", toString(0.3)); @@ -37,10 +37,10 @@ int main() { } PvlObject o("AutoSeed"); - o.AddGroup(alg); + o.addGroup(alg); Pvl pvl; - pvl.AddObject(o); + pvl.addObject(o); cout << pvl << endl << endl; PolygonSeeder *ps = PolygonSeederFactory::Create(pvl); @@ -72,8 +72,8 @@ int main() { // Create the projection necessary for seeding PvlGroup radii = Projection::TargetRadii("MARS"); Isis::Pvl maplab; - maplab.AddGroup(Isis::PvlGroup("Mapping")); - Isis::PvlGroup &mapGroup = maplab.FindGroup("Mapping"); + maplab.addGroup(Isis::PvlGroup("Mapping")); + Isis::PvlGroup &mapGroup = maplab.findGroup("Mapping"); mapGroup += Isis::PvlKeyword("EquatorialRadius", (QString)radii["EquatorialRadius"]); mapGroup += Isis::PvlKeyword("PolarRadius", (QString)radii["PolarRadius"]); mapGroup += Isis::PvlKeyword("LatitudeType", "Planetocentric"); @@ -149,8 +149,8 @@ int main() { // Create the projection necessary for seeding PvlGroup radii = Projection::TargetRadii("MARS"); Isis::Pvl maplab; - maplab.AddGroup(Isis::PvlGroup("Mapping")); - Isis::PvlGroup &mapGroup = maplab.FindGroup("Mapping"); + maplab.addGroup(Isis::PvlGroup("Mapping")); + Isis::PvlGroup &mapGroup = maplab.findGroup("Mapping"); mapGroup += Isis::PvlKeyword("EquatorialRadius", (QString)radii["EquatorialRadius"]); mapGroup += Isis::PvlKeyword("PolarRadius", (QString)radii["PolarRadius"]); mapGroup += Isis::PvlKeyword("LatitudeType", "Planetocentric"); diff --git a/isis/src/base/objs/SubArea/SubArea.cpp b/isis/src/base/objs/SubArea/SubArea.cpp index 074ff115e64407312d63bd603d789cf5816842a3..205579cd2855b5c137f568601602c022c21b6199 100644 --- a/isis/src/base/objs/SubArea/SubArea.cpp +++ b/isis/src/base/objs/SubArea/SubArea.cpp @@ -145,62 +145,62 @@ namespace Isis { // If the linc and sinc are not equal, then the Instrument and // Mapping groups are no longer valid. if(p_linc != p_sinc) { - if(inlabel.FindObject("IsisCube").HasGroup("Mapping")) { - inlabel.FindObject("IsisCube").DeleteGroup("Mapping"); + if(inlabel.findObject("IsisCube").hasGroup("Mapping")) { + inlabel.findObject("IsisCube").deleteGroup("Mapping"); results += PvlKeyword("MappingGroupDeleted", "True"); // We don't want to think our projected cube is unprojected, so if we // delete a mapping group and we have a camera there is a problem. // Remove the camera. - if(inlabel.FindObject("IsisCube").HasGroup("Instrument")) { - inlabel.FindObject("IsisCube").DeleteGroup("Instrument"); + if(inlabel.findObject("IsisCube").hasGroup("Instrument")) { + inlabel.findObject("IsisCube").deleteGroup("Instrument"); results += PvlKeyword("InstrumentGroupDeleted", "True"); } } } - if(inlabel.FindObject("IsisCube").HasGroup("Mapping")) { + if(inlabel.findObject("IsisCube").hasGroup("Mapping")) { // Update the upper left corner X,Y values if the starting line or // starting sample are changed. if(p_sl != 1 || p_ss != 1) { Projection &proj = *icube->projection(); proj.SetWorld(p_ss - 0.5, p_sl - 0.5); - PvlGroup &mapgroup = inlabel.FindObject("IsisCube").FindGroup("Mapping", Pvl::Traverse); - mapgroup.AddKeyword(PvlKeyword("UpperLeftCornerX", toString(proj.XCoord())), + PvlGroup &mapgroup = inlabel.findObject("IsisCube").findGroup("Mapping", Pvl::Traverse); + mapgroup.addKeyword(PvlKeyword("UpperLeftCornerX", toString(proj.XCoord())), Pvl::Replace); - mapgroup.AddKeyword(PvlKeyword("UpperLeftCornerY", toString(proj.YCoord())), + mapgroup.addKeyword(PvlKeyword("UpperLeftCornerY", toString(proj.YCoord())), Pvl::Replace); } // If the linc and sinc are not equal to 1, then update the // mapping scale and resolution. if(p_linc == p_sinc && p_linc != 1.0) { - PvlGroup &mapgroup = inlabel.FindObject("IsisCube").FindGroup("Mapping", Pvl::Traverse); - QString pixresUnit = mapgroup["PixelResolution"].Unit(); + PvlGroup &mapgroup = inlabel.findObject("IsisCube").findGroup("Mapping", Pvl::Traverse); + QString pixresUnit = mapgroup["PixelResolution"].unit(); double pixres = toDouble(mapgroup["PixelResolution"][0]); mapgroup["PixelResolution"] = toString(pixres * p_linc); - mapgroup["PixelResolution"].SetUnits(pixresUnit); - QString scaleUnit = mapgroup["Scale"].Unit(); + mapgroup["PixelResolution"].setUnits(pixresUnit); + QString scaleUnit = mapgroup["Scale"].unit(); double scale = mapgroup["Scale"]; mapgroup["Scale"] = toString(scale / p_linc); - mapgroup["Scale"].SetUnits(scaleUnit); + mapgroup["Scale"].setUnits(scaleUnit); } // If the outer bounds of the image are changed, then the // latitude,longitude range is no longer valid. if(p_sl != 1 || p_ss != 1 || p_el != p_nl || p_es != p_ns) { - PvlGroup &mapgroup = inlabel.FindObject("IsisCube").FindGroup("Mapping", Pvl::Traverse); - if(mapgroup.HasKeyword("MinimumLatitude")) { - mapgroup.DeleteKeyword("MinimumLatitude"); + PvlGroup &mapgroup = inlabel.findObject("IsisCube").findGroup("Mapping", Pvl::Traverse); + if(mapgroup.hasKeyword("MinimumLatitude")) { + mapgroup.deleteKeyword("MinimumLatitude"); } - if(mapgroup.HasKeyword("MaximumLatitude")) { - mapgroup.DeleteKeyword("MaximumLatitude"); + if(mapgroup.hasKeyword("MaximumLatitude")) { + mapgroup.deleteKeyword("MaximumLatitude"); } - if(mapgroup.HasKeyword("MinimumLongitude")) { - mapgroup.DeleteKeyword("MinimumLongitude"); + if(mapgroup.hasKeyword("MinimumLongitude")) { + mapgroup.deleteKeyword("MinimumLongitude"); } - if(mapgroup.HasKeyword("MaximumLongitude")) { - mapgroup.DeleteKeyword("MaximumLongitude"); + if(mapgroup.hasKeyword("MaximumLongitude")) { + mapgroup.deleteKeyword("MaximumLongitude"); } } } @@ -209,18 +209,18 @@ namespace Isis { if(ocube->hasGroup("Instrument")) { ocube->deleteGroup("Instrument"); } - if(inlabel.FindObject("IsisCube").HasGroup("Instrument")) { + if(inlabel.findObject("IsisCube").hasGroup("Instrument")) { PvlGroup inst; - inst = inlabel.FindObject("IsisCube").FindGroup("Instrument"); + inst = inlabel.findObject("IsisCube").findGroup("Instrument"); ocube->putGroup(inst); } if(ocube->hasGroup("Mapping")) { ocube->deleteGroup("Mapping"); } - if(inlabel.FindObject("IsisCube").HasGroup("Mapping")) { + if(inlabel.findObject("IsisCube").hasGroup("Mapping")) { PvlGroup mapgrp; - mapgrp = inlabel.FindObject("IsisCube").FindGroup("Mapping"); + mapgrp = inlabel.findObject("IsisCube").findGroup("Mapping"); ocube->putGroup(mapgrp); } diff --git a/isis/src/base/objs/SubArea/unitTest.cpp b/isis/src/base/objs/SubArea/unitTest.cpp index 4604df240809aa9e24be5fd7d99f029dec8787e6..6c9ee5ed521b7ad8ef9f5bc748f5225fcfa8068d 100644 --- a/isis/src/base/objs/SubArea/unitTest.cpp +++ b/isis/src/base/objs/SubArea/unitTest.cpp @@ -58,15 +58,15 @@ void IsisMain() { cout << "Input unprojected cube label: " << endl << endl; inlabel = *inomapcube.label(); - cout << inlabel.FindObject("IsisCube").FindObject("Core").FindGroup("Dimensions") << endl << endl; - if(inlabel.FindObject("IsisCube").HasGroup("Instrument")) { - cout << inlabel.FindObject("IsisCube").FindGroup("Instrument") << endl << endl; + cout << inlabel.findObject("IsisCube").findObject("Core").findGroup("Dimensions") << endl << endl; + if(inlabel.findObject("IsisCube").hasGroup("Instrument")) { + cout << inlabel.findObject("IsisCube").findGroup("Instrument") << endl << endl; } - if(inlabel.FindObject("IsisCube").HasGroup("Mapping")) { - cout << inlabel.FindObject("IsisCube").FindGroup("Mapping") << endl << endl; + if(inlabel.findObject("IsisCube").hasGroup("Mapping")) { + cout << inlabel.findObject("IsisCube").findGroup("Mapping") << endl << endl; } - if(inlabel.FindObject("IsisCube").HasGroup("AlphaCube")) { - cout << inlabel.FindObject("IsisCube").FindGroup("AlphaCube") << endl << endl; + if(inlabel.findObject("IsisCube").hasGroup("AlphaCube")) { + cout << inlabel.findObject("IsisCube").findGroup("AlphaCube") << endl << endl; } cout << "Testing no change in image area for unprojected cube..." << endl << endl; @@ -77,21 +77,21 @@ void IsisMain() { cout << "Output cube label: " << endl << endl; QString file = ui.GetFileName("TO"); Pvl label(file); - cout << label.FindObject("IsisCube").FindObject("Core").FindGroup("Dimensions") << endl << endl; - if(label.FindObject("IsisCube").HasGroup("Instrument")) { - cout << label.FindObject("IsisCube").FindGroup("Instrument") << endl << endl; + cout << label.findObject("IsisCube").findObject("Core").findGroup("Dimensions") << endl << endl; + if(label.findObject("IsisCube").hasGroup("Instrument")) { + cout << label.findObject("IsisCube").findGroup("Instrument") << endl << endl; } - if(label.FindObject("IsisCube").HasGroup("Mapping")) { - cout << label.FindObject("IsisCube").FindGroup("Mapping") << endl << endl; + if(label.findObject("IsisCube").hasGroup("Mapping")) { + cout << label.findObject("IsisCube").findGroup("Mapping") << endl << endl; } - if(label.FindObject("IsisCube").HasGroup("AlphaCube")) { - cout << label.FindObject("IsisCube").FindGroup("AlphaCube") << endl << endl; + if(label.findObject("IsisCube").hasGroup("AlphaCube")) { + cout << label.findObject("IsisCube").findGroup("AlphaCube") << endl << endl; } cube.open(file); cube.close(true); - results.Clear(); + results.clear(); ProcessByLine p2; p2.SetInputCube("FROM1"); @@ -126,18 +126,18 @@ void IsisMain() { cube.open(file); label = *cube.label(); cube.close(true); - cout << label.FindObject("IsisCube").FindObject("Core").FindGroup("Dimensions") << endl << endl; - if(label.FindObject("IsisCube").HasGroup("Instrument")) { - cout << label.FindObject("IsisCube").FindGroup("Instrument") << endl << endl; + cout << label.findObject("IsisCube").findObject("Core").findGroup("Dimensions") << endl << endl; + if(label.findObject("IsisCube").hasGroup("Instrument")) { + cout << label.findObject("IsisCube").findGroup("Instrument") << endl << endl; } - if(label.FindObject("IsisCube").HasGroup("Mapping")) { - cout << label.FindObject("IsisCube").FindGroup("Mapping") << endl << endl; + if(label.findObject("IsisCube").hasGroup("Mapping")) { + cout << label.findObject("IsisCube").findGroup("Mapping") << endl << endl; } - if(label.FindObject("IsisCube").HasGroup("AlphaCube")) { - cout << label.FindObject("IsisCube").FindGroup("AlphaCube") << endl << endl; + if(label.findObject("IsisCube").hasGroup("AlphaCube")) { + cout << label.findObject("IsisCube").findGroup("AlphaCube") << endl << endl; } - results.Clear(); + results.clear(); ProcessByLine p3; p3.SetInputCube("FROM1"); @@ -172,18 +172,18 @@ void IsisMain() { cube.open(file); label = *cube.label(); cube.close(true); - cout << label.FindObject("IsisCube").FindObject("Core").FindGroup("Dimensions") << endl << endl; - if(label.FindObject("IsisCube").HasGroup("Instrument")) { - cout << label.FindObject("IsisCube").FindGroup("Instrument") << endl << endl; + cout << label.findObject("IsisCube").findObject("Core").findGroup("Dimensions") << endl << endl; + if(label.findObject("IsisCube").hasGroup("Instrument")) { + cout << label.findObject("IsisCube").findGroup("Instrument") << endl << endl; } - if(label.FindObject("IsisCube").HasGroup("Mapping")) { - cout << label.FindObject("IsisCube").FindGroup("Mapping") << endl << endl; + if(label.findObject("IsisCube").hasGroup("Mapping")) { + cout << label.findObject("IsisCube").findGroup("Mapping") << endl << endl; } - if(label.FindObject("IsisCube").HasGroup("AlphaCube")) { - cout << label.FindObject("IsisCube").FindGroup("AlphaCube") << endl << endl; + if(label.findObject("IsisCube").hasGroup("AlphaCube")) { + cout << label.findObject("IsisCube").findGroup("AlphaCube") << endl << endl; } - results.Clear(); + results.clear(); ProcessByLine p4; p4.SetInputCube("FROM1"); @@ -222,18 +222,18 @@ void IsisMain() { cube.open(file); label = *cube.label(); cube.close(true); - cout << label.FindObject("IsisCube").FindObject("Core").FindGroup("Dimensions") << endl << endl; - if(label.FindObject("IsisCube").HasGroup("Instrument")) { - cout << label.FindObject("IsisCube").FindGroup("Instrument") << endl << endl; + cout << label.findObject("IsisCube").findObject("Core").findGroup("Dimensions") << endl << endl; + if(label.findObject("IsisCube").hasGroup("Instrument")) { + cout << label.findObject("IsisCube").findGroup("Instrument") << endl << endl; } - if(label.FindObject("IsisCube").HasGroup("Mapping")) { - cout << label.FindObject("IsisCube").FindGroup("Mapping") << endl << endl; + if(label.findObject("IsisCube").hasGroup("Mapping")) { + cout << label.findObject("IsisCube").findGroup("Mapping") << endl << endl; } - if(label.FindObject("IsisCube").HasGroup("AlphaCube")) { - cout << label.FindObject("IsisCube").FindGroup("AlphaCube") << endl << endl; + if(label.findObject("IsisCube").hasGroup("AlphaCube")) { + cout << label.findObject("IsisCube").findGroup("AlphaCube") << endl << endl; } - results.Clear(); + results.clear(); ProcessByLine p5; p5.SetInputCube("FROM1"); @@ -268,20 +268,20 @@ void IsisMain() { cube.open(file); label = *cube.label(); cube.close(true); - cout << label.FindObject("IsisCube").FindObject("Core").FindGroup("Dimensions") << endl << endl; - if(label.FindObject("IsisCube").HasGroup("Instrument")) { - cout << label.FindObject("IsisCube").FindGroup("Instrument") << endl << endl; + cout << label.findObject("IsisCube").findObject("Core").findGroup("Dimensions") << endl << endl; + if(label.findObject("IsisCube").hasGroup("Instrument")) { + cout << label.findObject("IsisCube").findGroup("Instrument") << endl << endl; } - if(label.FindObject("IsisCube").HasGroup("Mapping")) { - cout << label.FindObject("IsisCube").FindGroup("Mapping") << endl << endl; + if(label.findObject("IsisCube").hasGroup("Mapping")) { + cout << label.findObject("IsisCube").findGroup("Mapping") << endl << endl; } - if(label.FindObject("IsisCube").HasGroup("AlphaCube")) { - cout << label.FindObject("IsisCube").FindGroup("AlphaCube") << endl << endl; + if(label.findObject("IsisCube").hasGroup("AlphaCube")) { + cout << label.findObject("IsisCube").findGroup("AlphaCube") << endl << endl; } inomapcube.close(); - results.Clear(); + results.clear(); ProcessByLine p6; p6.SetInputCube("FROM2"); @@ -316,15 +316,15 @@ void IsisMain() { cout << "Input projected cube label: " << endl << endl; inlabel = *imapcube.label(); - cout << inlabel.FindObject("IsisCube").FindObject("Core").FindGroup("Dimensions") << endl << endl; - if(inlabel.FindObject("IsisCube").HasGroup("Instrument")) { - cout << inlabel.FindObject("IsisCube").FindGroup("Instrument") << endl << endl; + cout << inlabel.findObject("IsisCube").findObject("Core").findGroup("Dimensions") << endl << endl; + if(inlabel.findObject("IsisCube").hasGroup("Instrument")) { + cout << inlabel.findObject("IsisCube").findGroup("Instrument") << endl << endl; } - if(inlabel.FindObject("IsisCube").HasGroup("Mapping")) { - cout << inlabel.FindObject("IsisCube").FindGroup("Mapping") << endl << endl; + if(inlabel.findObject("IsisCube").hasGroup("Mapping")) { + cout << inlabel.findObject("IsisCube").findGroup("Mapping") << endl << endl; } - if(inlabel.FindObject("IsisCube").HasGroup("AlphaCube")) { - cout << inlabel.FindObject("IsisCube").FindGroup("AlphaCube") << endl << endl; + if(inlabel.findObject("IsisCube").hasGroup("AlphaCube")) { + cout << inlabel.findObject("IsisCube").findGroup("AlphaCube") << endl << endl; } cout << "Testing no change in image area for projected cube..." << endl; @@ -336,18 +336,18 @@ void IsisMain() { cube.open(file); label = *cube.label(); cube.close(true); - cout << label.FindObject("IsisCube").FindObject("Core").FindGroup("Dimensions") << endl << endl; - if(label.FindObject("IsisCube").HasGroup("Instrument")) { - cout << label.FindObject("IsisCube").FindGroup("Instrument") << endl << endl; + cout << label.findObject("IsisCube").findObject("Core").findGroup("Dimensions") << endl << endl; + if(label.findObject("IsisCube").hasGroup("Instrument")) { + cout << label.findObject("IsisCube").findGroup("Instrument") << endl << endl; } - if(label.FindObject("IsisCube").HasGroup("Mapping")) { - cout << label.FindObject("IsisCube").FindGroup("Mapping") << endl << endl; + if(label.findObject("IsisCube").hasGroup("Mapping")) { + cout << label.findObject("IsisCube").findGroup("Mapping") << endl << endl; } - if(label.FindObject("IsisCube").HasGroup("AlphaCube")) { - cout << label.FindObject("IsisCube").FindGroup("AlphaCube") << endl << endl; + if(label.findObject("IsisCube").hasGroup("AlphaCube")) { + cout << label.findObject("IsisCube").findGroup("AlphaCube") << endl << endl; } - results.Clear(); + results.clear(); ProcessByLine p7; p7.SetInputCube("FROM2"); @@ -382,18 +382,18 @@ void IsisMain() { cube.open(file); label = *cube.label(); cube.close(true); - cout << label.FindObject("IsisCube").FindObject("Core").FindGroup("Dimensions") << endl << endl; - if(label.FindObject("IsisCube").HasGroup("Instrument")) { - cout << label.FindObject("IsisCube").FindGroup("Instrument") << endl << endl; + cout << label.findObject("IsisCube").findObject("Core").findGroup("Dimensions") << endl << endl; + if(label.findObject("IsisCube").hasGroup("Instrument")) { + cout << label.findObject("IsisCube").findGroup("Instrument") << endl << endl; } - if(label.FindObject("IsisCube").HasGroup("Mapping")) { - cout << label.FindObject("IsisCube").FindGroup("Mapping") << endl << endl; + if(label.findObject("IsisCube").hasGroup("Mapping")) { + cout << label.findObject("IsisCube").findGroup("Mapping") << endl << endl; } - if(label.FindObject("IsisCube").HasGroup("AlphaCube")) { - cout << label.FindObject("IsisCube").FindGroup("AlphaCube") << endl << endl; + if(label.findObject("IsisCube").hasGroup("AlphaCube")) { + cout << label.findObject("IsisCube").findGroup("AlphaCube") << endl << endl; } - results.Clear(); + results.clear(); ProcessByLine p8; p8.SetInputCube("FROM2"); @@ -428,18 +428,18 @@ void IsisMain() { cube.open(file); label = *cube.label(); cube.close(true); - cout << label.FindObject("IsisCube").FindObject("Core").FindGroup("Dimensions") << endl << endl; - if(label.FindObject("IsisCube").HasGroup("Instrument")) { - cout << label.FindObject("IsisCube").FindGroup("Instrument") << endl << endl; + cout << label.findObject("IsisCube").findObject("Core").findGroup("Dimensions") << endl << endl; + if(label.findObject("IsisCube").hasGroup("Instrument")) { + cout << label.findObject("IsisCube").findGroup("Instrument") << endl << endl; } - if(label.FindObject("IsisCube").HasGroup("Mapping")) { - cout << label.FindObject("IsisCube").FindGroup("Mapping") << endl << endl; + if(label.findObject("IsisCube").hasGroup("Mapping")) { + cout << label.findObject("IsisCube").findGroup("Mapping") << endl << endl; } - if(label.FindObject("IsisCube").HasGroup("AlphaCube")) { - cout << label.FindObject("IsisCube").FindGroup("AlphaCube") << endl << endl; + if(label.findObject("IsisCube").hasGroup("AlphaCube")) { + cout << label.findObject("IsisCube").findGroup("AlphaCube") << endl << endl; } - results.Clear(); + results.clear(); ProcessByLine p9; p9.SetInputCube("FROM2"); @@ -478,18 +478,18 @@ void IsisMain() { cube.open(file); label = *cube.label(); cube.close(true); - cout << label.FindObject("IsisCube").FindObject("Core").FindGroup("Dimensions") << endl << endl; - if(label.FindObject("IsisCube").HasGroup("Instrument")) { - cout << label.FindObject("IsisCube").FindGroup("Instrument") << endl << endl; + cout << label.findObject("IsisCube").findObject("Core").findGroup("Dimensions") << endl << endl; + if(label.findObject("IsisCube").hasGroup("Instrument")) { + cout << label.findObject("IsisCube").findGroup("Instrument") << endl << endl; } - if(label.FindObject("IsisCube").HasGroup("Mapping")) { - cout << label.FindObject("IsisCube").FindGroup("Mapping") << endl << endl; + if(label.findObject("IsisCube").hasGroup("Mapping")) { + cout << label.findObject("IsisCube").findGroup("Mapping") << endl << endl; } - if(label.FindObject("IsisCube").HasGroup("AlphaCube")) { - cout << label.FindObject("IsisCube").FindGroup("AlphaCube") << endl << endl; + if(label.findObject("IsisCube").hasGroup("AlphaCube")) { + cout << label.findObject("IsisCube").findGroup("AlphaCube") << endl << endl; } - results.Clear(); + results.clear(); ProcessByLine p10; p10.SetInputCube("FROM2"); @@ -524,18 +524,18 @@ void IsisMain() { cube.open(file); label = *cube.label(); cube.close(true); - cout << label.FindObject("IsisCube").FindObject("Core").FindGroup("Dimensions") << endl << endl; - if(label.FindObject("IsisCube").HasGroup("Instrument")) { - cout << label.FindObject("IsisCube").FindGroup("Instrument") << endl << endl; + cout << label.findObject("IsisCube").findObject("Core").findGroup("Dimensions") << endl << endl; + if(label.findObject("IsisCube").hasGroup("Instrument")) { + cout << label.findObject("IsisCube").findGroup("Instrument") << endl << endl; } - if(label.FindObject("IsisCube").HasGroup("Mapping")) { - cout << label.FindObject("IsisCube").FindGroup("Mapping") << endl << endl; + if(label.findObject("IsisCube").hasGroup("Mapping")) { + cout << label.findObject("IsisCube").findGroup("Mapping") << endl << endl; } - if(label.FindObject("IsisCube").HasGroup("AlphaCube")) { - cout << label.FindObject("IsisCube").FindGroup("AlphaCube") << endl << endl; + if(label.findObject("IsisCube").hasGroup("AlphaCube")) { + cout << label.findObject("IsisCube").findGroup("AlphaCube") << endl << endl; } imapcube.close(); - results.Clear(); + results.clear(); } diff --git a/isis/src/base/objs/Table/Table.cpp b/isis/src/base/objs/Table/Table.cpp index 40cb4eb271b93ed3cc6c77b861e4c1df55b6496f..62991e0f39a9d44b4415fe0a12295923c5cb46f4 100644 --- a/isis/src/base/objs/Table/Table.cpp +++ b/isis/src/base/objs/Table/Table.cpp @@ -49,7 +49,7 @@ namespace Isis { p_assoc = Table::None; p_blobPvl += Isis::PvlKeyword("Records", 0); p_blobPvl += Isis::PvlKeyword("ByteOrder", "NULL"); - for (int f = 0; f < rec.Fields(); f++) p_blobPvl.AddGroup(rec[f].pvlGroup()); + for (int f = 0; f < rec.Fields(); f++) p_blobPvl.addGroup(rec[f].pvlGroup()); p_record = rec; } @@ -319,16 +319,16 @@ namespace Isis { p_records = p_blobPvl["Records"]; Isis::TableRecord rec; - for (int g = 0; g < p_blobPvl.Groups(); g++) { - if (p_blobPvl.Group(g).IsNamed("Field")) { - Isis::TableField f(p_blobPvl.Group(g)); + for (int g = 0; g < p_blobPvl.groups(); g++) { + if (p_blobPvl.group(g).isNamed("Field")) { + Isis::TableField f(p_blobPvl.group(g)); rec += f; } } p_record = rec; - if (p_blobPvl.HasKeyword("Association")) { + if (p_blobPvl.hasKeyword("Association")) { QString temp = (QString) p_blobPvl["Association"]; temp = temp.toUpper(); if (temp == "SAMPLES") p_assoc = Table::Samples; @@ -389,8 +389,8 @@ namespace Isis { p_blobPvl["ByteOrder"] = Isis::ByteOrderName(Isis::Msb); } - if (p_blobPvl.HasKeyword("Association")) { - p_blobPvl.DeleteKeyword("Association"); + if (p_blobPvl.hasKeyword("Association")) { + p_blobPvl.deleteKeyword("Association"); } if (p_assoc == Samples) { p_blobPvl += Isis::PvlKeyword("Association", "Samples"); diff --git a/isis/src/base/objs/Target/Target.cpp b/isis/src/base/objs/Target/Target.cpp index fd9a575453a0b71d74272cd2806c7587a69bf04b..e6f97ef3c1efe752bf879e1be83aa46de31e18fd 100644 --- a/isis/src/base/objs/Target/Target.cpp +++ b/isis/src/base/objs/Target/Target.cpp @@ -55,13 +55,13 @@ namespace Isis { m_spice = spice; // If we get this far, we know we have a kernels group. Spice requires it. - PvlGroup &kernels = lab.FindGroup("Kernels", Pvl::Traverse); + PvlGroup &kernels = lab.findGroup("Kernels", Pvl::Traverse); - PvlGroup &inst = lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup &inst = lab.findGroup("Instrument", Pvl::Traverse); m_name = new QString; *m_name = inst["TargetName"][0]; QString trykey = "NaifIkCode"; - if (kernels.HasKeyword("NaifFrameCode")) trykey = "NaifFrameCode"; + if (kernels.hasKeyword("NaifFrameCode")) trykey = "NaifFrameCode"; if (name().toUpper() == "SKY") { m_radii[0] = m_radii[1] = m_radii[2] = Distance(1000.0, Distance::Meters); @@ -69,7 +69,7 @@ namespace Isis { int ikCode = toInt(kernels[trykey][0]); *m_bodyCode = ikCode / 1000; // Check for override in kernel group - if (kernels.HasKeyword("NaifSpkCode")) + if (kernels.hasKeyword("NaifSpkCode")) *m_bodyCode = (int) kernels["NaifSpkCode"]; } else { @@ -81,7 +81,7 @@ namespace Isis { // m_radii[2] = Distance(getDouble(radiiKey, 2), Distance::Kilometers); } // Override it if it exists in the labels - if (kernels.HasKeyword("NaifBodyCode")) + if (kernels.hasKeyword("NaifBodyCode")) *m_bodyCode = (int) kernels["NaifBodyCode"]; m_shape = ShapeModelFactory::create(this, lab); } diff --git a/isis/src/base/objs/Target/unitTest.cpp b/isis/src/base/objs/Target/unitTest.cpp index 9dd328a4d959176718002a2e7b5c590c2ca73c9e..7f1ac6bb93987f4181d440e10dca052636ee3e10 100644 --- a/isis/src/base/objs/Target/unitTest.cpp +++ b/isis/src/base/objs/Target/unitTest.cpp @@ -106,8 +106,8 @@ int main(int argc, char *argv[]) { kern1 += PvlKeyword("EndPadding", toString(slope)); Pvl lab1; - lab1.AddGroup(inst1); - lab1.AddGroup(kern1); + lab1.addGroup(inst1); + lab1.addGroup(kern1); // Create a Spice object to test radii Spice spi(lab1); @@ -128,8 +128,8 @@ int main(int argc, char *argv[]) { // Test Sky Pvl lab2; - lab2.AddGroup(inst2); - lab2.AddGroup(kern1); + lab2.addGroup(inst2); + lab2.addGroup(kern1); Target tSky(&spi, lab2); cout << endl; cout << " Testing Sky..." << endl; @@ -142,8 +142,8 @@ int main(int argc, char *argv[]) { PvlGroup kern4 = kern1; kern4 += PvlKeyword("NaifSpkCode", "-93"); Pvl lab3; - lab3.AddGroup(inst2); - lab3.AddGroup(kern4); + lab3.addGroup(inst2); + lab3.addGroup(kern4); Target tSky2(&spi, lab3); cout << endl; cout << " Testing Sky with NaifSpkCode..." << endl; @@ -157,7 +157,7 @@ int main(int argc, char *argv[]) { try { cout << endl; cout << " Testing no instrument group ..." << endl; - lab4.AddGroup(kern2); + lab4.addGroup(kern2); Target tNoInstrument(&spi, lab4); } catch(IException &e) { @@ -166,7 +166,7 @@ int main(int argc, char *argv[]) { } Pvl lab5; - lab4.AddGroup(inst3); + lab4.addGroup(inst3); // Test without kernels group try { @@ -191,8 +191,8 @@ int main(int argc, char *argv[]) { } // Test case with override of body code - // lab5.AddGroup(inst2); - // lab5.AddGroup(kern4); + // lab5.addGroup(inst2); + // lab5.addGroup(kern4); // Target tOverrideBodyCode(&spi, lab5); // cout << endl; // cout << " Testing case with bodycode override" << endl; @@ -200,8 +200,8 @@ int main(int argc, char *argv[]) { // Test methods setShapeEllipsoid and restoreShape Pvl lab6; - lab6.AddGroup(inst1); - lab6.AddGroup(kern3); + lab6.addGroup(inst1); + lab6.addGroup(kern3); Spice spi3(lab6); cout << endl << " Testing methods setShapeEllipsoid and restoreShape..." << endl; cout << " Original shape is " << spi3.target()->shape()->name() << endl; diff --git a/isis/src/base/objs/Topo/Topo.cpp b/isis/src/base/objs/Topo/Topo.cpp index 593b0f6959489368b4bfdd26da5fc3713cc6ae09..ba587146110fb6624e9f7c8ed4b02d15f798d942 100644 --- a/isis/src/base/objs/Topo/Topo.cpp +++ b/isis/src/base/objs/Topo/Topo.cpp @@ -7,7 +7,7 @@ using std::max; namespace Isis { Topo::Topo(Pvl &pvl, PhotoModel &pmodel) : NormModel(pvl, pmodel) { - PvlGroup &algorithm = pvl.FindObject("NormalizationModel").FindGroup("Algorithm", Pvl::Traverse); + PvlGroup &algorithm = pvl.findObject("NormalizationModel").findGroup("Algorithm", Pvl::Traverse); SetNormPharef(0.0); SetNormIncref(0.0); @@ -15,25 +15,25 @@ namespace Isis { SetNormThresh(30.0); SetNormAlbedo(1.0); - if(algorithm.HasKeyword("Incref")) { + if(algorithm.hasKeyword("Incref")) { SetNormIncref(algorithm["Incref"]); } - if(algorithm.HasKeyword("Pharef")) { + if(algorithm.hasKeyword("Pharef")) { SetNormPharef(algorithm["Pharef"]); } else { p_normPharef = p_normIncref; } - if(algorithm.HasKeyword("Emaref")) { + if(algorithm.hasKeyword("Emaref")) { SetNormEmaref(algorithm["Emaref"]); } - if(algorithm.HasKeyword("Thresh")) { + if(algorithm.hasKeyword("Thresh")) { SetNormThresh(algorithm["Thresh"]); } - if(algorithm.HasKeyword("Albedo")) { + if(algorithm.hasKeyword("Albedo")) { SetNormAlbedo(algorithm["Albedo"]); } } diff --git a/isis/src/base/objs/Topo/unitTest.cpp b/isis/src/base/objs/Topo/unitTest.cpp index 3bea0ab04ca1151f66d50ac04eda02b9c7f08090..16ef42af3eda4e4573f8e1ccd8d37197c136bd93 100644 --- a/isis/src/base/objs/Topo/unitTest.cpp +++ b/isis/src/base/objs/Topo/unitTest.cpp @@ -25,7 +25,7 @@ int main() { algp += PvlKeyword("Name", "Lambert"); PvlObject op("PhotometricModel"); - op.AddGroup(algp); + op.addGroup(algp); PvlGroup algn("Algorithm"); algn += PvlKeyword("Name", "Topo"); @@ -33,11 +33,11 @@ int main() { algn += PvlKeyword("Incref", "30.0"); PvlObject on("NormalizationModel"); - on.AddGroup(algn); + on.addGroup(algn); Pvl pvl; - pvl.AddObject(op); - pvl.AddObject(on); + pvl.addObject(op); + pvl.addObject(on); std::cout << pvl << std::endl << std::endl; try { diff --git a/isis/src/base/objs/TopoAtm/TopoAtm.cpp b/isis/src/base/objs/TopoAtm/TopoAtm.cpp index 8bc4d718b9bb977649753fad9c92e17111360a3f..735d314e0de81c8161cb08b9a821f857b245ae50 100644 --- a/isis/src/base/objs/TopoAtm/TopoAtm.cpp +++ b/isis/src/base/objs/TopoAtm/TopoAtm.cpp @@ -21,29 +21,29 @@ namespace Isis { double transs; double sbar; - PvlGroup &algorithm = pvl.FindObject("NormalizationModel").FindGroup("Algorithm", Pvl::Traverse); + PvlGroup &algorithm = pvl.findObject("NormalizationModel").findGroup("Algorithm", Pvl::Traverse); SetNormPharef(0.0); SetNormIncref(0.0); SetNormEmaref(0.0); SetNormAlbedo(1.0); - if(algorithm.HasKeyword("Incref")) { + if(algorithm.hasKeyword("Incref")) { SetNormIncref(algorithm["Incref"]); } - if(algorithm.HasKeyword("Pharef")) { + if(algorithm.hasKeyword("Pharef")) { SetNormPharef(algorithm["Pharef"]); } else { p_normPharef = p_normIncref; } - if(algorithm.HasKeyword("Emaref")) { + if(algorithm.hasKeyword("Emaref")) { SetNormEmaref(algorithm["Emaref"]); } - if(algorithm.HasKeyword("Albedo")) { + if(algorithm.hasKeyword("Albedo")) { SetNormAlbedo(algorithm["Albedo"]); } diff --git a/isis/src/base/objs/TopoAtm/unitTest.cpp b/isis/src/base/objs/TopoAtm/unitTest.cpp index a5b1ccf24897f7b7b6ba6a8886a5f471ff55f9a1..244ca89398599a507ee66c19c7ef3162eafc0fba 100644 --- a/isis/src/base/objs/TopoAtm/unitTest.cpp +++ b/isis/src/base/objs/TopoAtm/unitTest.cpp @@ -26,14 +26,14 @@ int main() { algp += PvlKeyword("Name", "Lambert"); PvlObject op("PhotometricModel"); - op.AddGroup(algp); + op.addGroup(algp); PvlGroup alga("Algorithm"); alga += PvlKeyword("Name", "Anisotropic1"); alga += PvlKeyword("Bha", "0.85"); PvlObject oa("AtmosphericModel"); - oa.AddGroup(alga); + oa.addGroup(alga); PvlGroup algn("Algorithm"); algn += PvlKeyword("Name", "TopoAtm"); @@ -41,12 +41,12 @@ int main() { algn += PvlKeyword("Incref", "30.0"); PvlObject on("NormalizationModel"); - on.AddGroup(algn); + on.addGroup(algn); Pvl pvl; - pvl.AddObject(op); - pvl.AddObject(oa); - pvl.AddObject(on); + pvl.addObject(op); + pvl.addObject(oa); + pvl.addObject(on); std::cout << pvl << std::endl << std::endl; diff --git a/isis/src/base/objs/TransverseMercator/TransverseMercator.cpp b/isis/src/base/objs/TransverseMercator/TransverseMercator.cpp index 428d44f8f4c61b9ca8ed37b2c2de5cfd8a4968a3..3bdefcb683f556f87c1656a7643e0576d975a9d3 100644 --- a/isis/src/base/objs/TransverseMercator/TransverseMercator.cpp +++ b/isis/src/base/objs/TransverseMercator/TransverseMercator.cpp @@ -56,18 +56,18 @@ namespace Isis { Projection::Projection(label) { try { // Try to read the mapping group - PvlGroup &mapGroup = label.FindGroup("Mapping", Pvl::Traverse); + PvlGroup &mapGroup = label.findGroup("Mapping", Pvl::Traverse); // Compute and write the default center longitude if allowed and // necessary - if ((allowDefaults) && (!mapGroup.HasKeyword("CenterLongitude"))) { + if ((allowDefaults) && (!mapGroup.hasKeyword("CenterLongitude"))) { double lon = (m_minimumLongitude + m_maximumLongitude) / 2.0; mapGroup += PvlKeyword("CenterLongitude", toString(lon)); } // Compute and write the default center latitude if allowed and // necessary - if ((allowDefaults) && (!mapGroup.HasKeyword("CenterLatitude"))) { + if ((allowDefaults) && (!mapGroup.hasKeyword("CenterLatitude"))) { double lat = (m_minimumLatitude + m_maximumLatitude) / 2.0; mapGroup += PvlKeyword("CenterLatitude", toString(lat)); } @@ -116,7 +116,7 @@ namespace Isis { } // Get the scale factor - if ((allowDefaults) && (!mapGroup.HasKeyword("ScaleFactor"))) { + if ((allowDefaults) && (!mapGroup.hasKeyword("ScaleFactor"))) { mapGroup += PvlKeyword("ScaleFactor", toString(1.0)); } m_scalefactor = mapGroup["ScaleFactor"]; diff --git a/isis/src/base/objs/TransverseMercator/unitTest.cpp b/isis/src/base/objs/TransverseMercator/unitTest.cpp index 00594b64e27d60267b891bf585d84675fece379d..f0ff65434c3a088e085909947b0c40938aa0c7a8 100644 --- a/isis/src/base/objs/TransverseMercator/unitTest.cpp +++ b/isis/src/base/objs/TransverseMercator/unitTest.cpp @@ -17,8 +17,8 @@ int main(int argc, char *argv[]) { cout << "Part 1: Sphere..." << endl; Pvl lab; - lab.AddGroup(PvlGroup("Mapping")); - PvlGroup &mapGroup = lab.FindGroup("Mapping"); + lab.addGroup(PvlGroup("Mapping")); + PvlGroup &mapGroup = lab.findGroup("Mapping"); mapGroup += PvlKeyword("EquatorialRadius", toString(1.0)); mapGroup += PvlKeyword("PolarRadius", toString(1.0)); mapGroup += PvlKeyword("LatitudeType", "Planetographic"); @@ -103,9 +103,9 @@ int main(int argc, char *argv[]) { cout << endl; cout << "Test default computation ... " << endl; - mapGroup.DeleteKeyword("CenterLongitude"); - mapGroup.DeleteKeyword("CenterLatitude"); - mapGroup.DeleteKeyword("ScaleFactor"); + mapGroup.deleteKeyword("CenterLongitude"); + mapGroup.deleteKeyword("CenterLatitude"); + mapGroup.deleteKeyword("ScaleFactor"); TransverseMercator p2(lab, true); cout << lab << endl; cout << endl; @@ -122,8 +122,8 @@ int main(int argc, char *argv[]) { cout << endl << "Part 2: Ellipsoid..." << endl; Pvl lab2; - lab2.AddGroup(PvlGroup("Mapping")); - PvlGroup &mapGroup2 = lab2.FindGroup("Mapping"); + lab2.addGroup(PvlGroup("Mapping")); + PvlGroup &mapGroup2 = lab2.findGroup("Mapping"); mapGroup2 += PvlKeyword("EquatorialRadius", toString(6378206.4)); mapGroup2 += PvlKeyword("PolarRadius", toString(6356583.8)); mapGroup2 += PvlKeyword("LatitudeType", "Planetographic"); @@ -177,9 +177,9 @@ int main(int argc, char *argv[]) { Pvl tmp1; Pvl tmp2; Pvl tmp3; - tmp1.AddGroup(p.Mapping()); - tmp2.AddGroup(p.MappingLatitudes()); - tmp3.AddGroup(p.MappingLongitudes()); + tmp1.addGroup(p.Mapping()); + tmp2.addGroup(p.MappingLatitudes()); + tmp3.addGroup(p.MappingLongitudes()); cout << "Mapping() = " << endl; cout << tmp1 << endl; diff --git a/isis/src/base/objs/UniversalGroundMap/UniversalGroundMap.cpp b/isis/src/base/objs/UniversalGroundMap/UniversalGroundMap.cpp index 700e2326301bce77d30089140502bc91f0ade1be..6ef55eb1aa5fb1f89e92e94f82e97c9e32ba8076 100644 --- a/isis/src/base/objs/UniversalGroundMap/UniversalGroundMap.cpp +++ b/isis/src/base/objs/UniversalGroundMap/UniversalGroundMap.cpp @@ -66,7 +66,7 @@ namespace Isis { catch (IException &secondError) { p_projection = NULL; QString msg = "Could not create camera or projection for [" + - pvl.FileName() + "]"; + pvl.fileName() + "]"; IException realError(IException::Unknown, msg, _FILEINFO_); realError.append(firstError); realError.append(secondError); @@ -353,10 +353,10 @@ namespace Isis { else if (HasProjection()) { // Footprint failed, look in the mapping group PvlGroup mappingGrp = p_projection->Mapping(); - if (mappingGrp.HasKeyword("MinimumLatitude") && - mappingGrp.HasKeyword("MaximumLatitude") && - mappingGrp.HasKeyword("MinimumLongitude") && - mappingGrp.HasKeyword("MaximumLongitude")) { + if (mappingGrp.hasKeyword("MinimumLatitude") && + mappingGrp.hasKeyword("MaximumLatitude") && + mappingGrp.hasKeyword("MinimumLongitude") && + mappingGrp.hasKeyword("MaximumLongitude")) { minLat = Latitude(mappingGrp["MinimumLatitude"], mappingGrp, Angle::Degrees); diff --git a/isis/src/base/objs/UserInterface/UserInterface.cpp b/isis/src/base/objs/UserInterface/UserInterface.cpp index 05d935cc3934e8255a6e2a91c50e2547698b7c28..fc800bc1b4cdd5bb1932ce1101a6574028a79bc6 100644 --- a/isis/src/base/objs/UserInterface/UserInterface.cpp +++ b/isis/src/base/objs/UserInterface/UserInterface.cpp @@ -478,7 +478,7 @@ namespace Isis { LoadBatchList(value); } else if(name == "-LAST") { - PvlGroup &grp = p.FindGroup("UserInterface", Isis::Pvl::Traverse); + PvlGroup &grp = p.findGroup("UserInterface", Isis::Pvl::Traverse); QString histFile = grp["HistoryPath"][0] + "/" + FileName( p_progName).name() + ".par"; @@ -488,7 +488,7 @@ namespace Isis { LoadHistory(value); } else if(name == "-WEBHELP") { - Isis::PvlGroup &pref = Isis::Preference::Preferences().FindGroup( + Isis::PvlGroup &pref = Isis::Preference::Preferences().findGroup( "UserInterface"); QString command = pref["GuiHelpBrowser"]; command += " $ISISROOT/doc/Application/presentation/Tabbed/"; @@ -508,7 +508,7 @@ namespace Isis { else if(name == "-HELP") { if(value.size() == 0) { Pvl params; - params.SetTerminator(""); + params.setTerminator(""); for(int k = 0; k < NumGroups(); k ++) { for(int j = 0; j < NumParams(k); j ++) { if(ParamListSize(k, j) == 0) { @@ -520,9 +520,9 @@ namespace Isis { QString def = ParamDefault(k, j); for(int l = 0; l < ParamListSize(k, j); l ++) { if(ParamListValue(k, j, l) == def) - key.AddValue("*" + def); + key.addValue("*" + def); else - key.AddValue(ParamListValue(k, j, l)); + key.addValue(ParamListValue(k, j, l)); } params += key; } @@ -532,7 +532,7 @@ namespace Isis { } else { Pvl param; - param.SetTerminator(""); + param.setTerminator(""); QString key = value; for(int k = 0; k < NumGroups(); k ++) { for(int j = 0; j < NumParams(k); j ++) { @@ -574,7 +574,7 @@ namespace Isis { if(ParamLessThanSize(k, j) > 0) { PvlKeyword key("LessThan"); for(int l = 0; l < ParamLessThanSize(k, j); l ++) { - key.AddValue(ParamLessThan(k, j, l)); + key.addValue(ParamLessThan(k, j, l)); } param += key; } @@ -582,7 +582,7 @@ namespace Isis { PvlKeyword key("LessThanOrEqual"); for(int l = 0; l < ParamLessThanOrEqualSize( k, j); l ++) { - key.AddValue( + key.addValue( ParamLessThanOrEqual(k, j, l)); } param += key; @@ -590,7 +590,7 @@ namespace Isis { if(ParamNotEqualSize(k, j) > 0) { PvlKeyword key("NotEqual"); for(int l = 0; l < ParamNotEqualSize(k, j); l ++) { - key.AddValue(ParamNotEqual(k, j, l)); + key.addValue(ParamNotEqual(k, j, l)); } param += key; } @@ -598,7 +598,7 @@ namespace Isis { PvlKeyword key("GreaterThan"); for(int l = 0; l < ParamGreaterThanSize(k, j); l ++) { - key.AddValue(ParamGreaterThan(k, j, l)); + key.addValue(ParamGreaterThan(k, j, l)); } param += key; } @@ -606,7 +606,7 @@ namespace Isis { PvlKeyword key("GreaterThanOrEqual"); for(int l = 0; l < ParamGreaterThanOrEqualSize(k, j); l ++) { - key.AddValue(ParamGreaterThanOrEqual(k, + key.addValue(ParamGreaterThanOrEqual(k, j, l)); } param += key; @@ -614,14 +614,14 @@ namespace Isis { if(ParamIncludeSize(k, j) > 0) { PvlKeyword key("Inclusions"); for(int l = 0; l < ParamIncludeSize(k, j); l ++) { - key.AddValue(ParamInclude(k, j, l)); + key.addValue(ParamInclude(k, j, l)); } param += key; } if(ParamExcludeSize(k, j) > 0) { PvlKeyword key("Exclusions"); for(int l = 0; l < ParamExcludeSize(k, j); l ++) { - key.AddValue(ParamExclude(k, j, l)); + key.addValue(ParamExclude(k, j, l)); } param += key; } @@ -637,7 +637,7 @@ namespace Isis { PvlKeyword include("Inclusions"); for(int m = 0; m < ParamListIncludeSize(k, j, l); m ++) { - include.AddValue(ParamListInclude( + include.addValue(ParamListInclude( k, j, l, m)); } grp += include; @@ -646,12 +646,12 @@ namespace Isis { PvlKeyword exclude("Exclusions"); for(int m = 0; m < ParamListExcludeSize(k, j, l); m ++) { - exclude.AddValue(ParamListExclude( + exclude.addValue(ParamListExclude( k, j, l, m)); } grp += exclude; } - param.AddGroup(grp); + param.addGroup(grp); } } cout << param; @@ -706,15 +706,15 @@ namespace Isis { } else if(name == "-LOG") { if(value.isEmpty()) { - p.FindGroup("SessionLog")["FileOutput"].SetValue("On"); + p.findGroup("SessionLog")["FileOutput"].setValue("On"); } else { - p.FindGroup("SessionLog")["FileOutput"].SetValue("On"); - p.FindGroup("SessionLog")["FileName"].SetValue(value); + p.findGroup("SessionLog")["FileOutput"].setValue("On"); + p.findGroup("SessionLog")["FileName"].setValue(value); } } else if(name == "-VERBOSE") { - p.FindGroup("SessionLog")["TerminalOutput"].SetValue("On"); + p.findGroup("SessionLog")["TerminalOutput"].setValue("On"); } // Can't have a parent id and the gui @@ -806,15 +806,15 @@ namespace Isis { try { Isis::Pvl lab(hist.expanded()); - int g = lab.Groups() - 1; - if(g >= 0 && lab.Group(g).IsNamed("UserParameters")) { - Isis::PvlGroup &up = lab.Group(g); - for(int k = 0; k < up.Keywords(); k ++) { - QString keyword = up[k].Name(); + int g = lab.groups() - 1; + if(g >= 0 && lab.group(g).isNamed("UserParameters")) { + Isis::PvlGroup &up = lab.group(g); + for(int k = 0; k < up.keywords(); k ++) { + QString keyword = up[k].name(); vector values; - for(int i = 0; i < up[k].Size(); i++) { + for(int i = 0; i < up[k].size(); i++) { values.push_back(up[k][i]); } @@ -840,14 +840,14 @@ namespace Isis { return; } - for(int o = lab.Objects() - 1; o >= 0; o --) { - if(lab.Object(o).IsNamed(ProgramName())) { - Isis::PvlObject &obj = lab.Object(o); - for(int g = obj.Groups() - 1; g >= 0; g --) { - Isis::PvlGroup &up = obj.Group(g); - if(up.IsNamed("UserParameters")) { - for(int k = 0; k < up.Keywords(); k ++) { - QString keyword = up[k].Name(); + for(int o = lab.objects() - 1; o >= 0; o --) { + if(lab.object(o).isNamed(ProgramName())) { + Isis::PvlObject &obj = lab.object(o); + for(int g = obj.groups() - 1; g >= 0; g --) { + Isis::PvlGroup &up = obj.group(g); + if(up.isNamed("UserParameters")) { + for(int k = 0; k < up.keywords(); k ++) { + QString keyword = up[k].name(); QString value = up[k][0]; PutAsString(keyword, value); } @@ -881,7 +881,7 @@ namespace Isis { // If history recording is off, return Preference &p = Preference::Preferences(); - PvlGroup &grp = p.FindGroup("UserInterface", Isis::Pvl::Traverse); + PvlGroup &grp = p.findGroup("UserInterface", Isis::Pvl::Traverse); if(grp["HistoryRecording"][0] == "Off") return; @@ -904,23 +904,23 @@ namespace Isis { // overwriten with the new entry. try { if(histFile.fileExists()) { - hist.Read(histFile.expanded()); + hist.read(histFile.expanded()); } } catch(IException &) { } // Add it - hist.AddGroup(cmdLine.FindGroup("UserParameters")); + hist.addGroup(cmdLine.findGroup("UserParameters")); // See if we have exceeded history length - while(hist.Groups() > toInt(grp["HistoryLength"][0])) { - hist.DeleteGroup("UserParameters"); + while(hist.groups() > toInt(grp["HistoryLength"][0])) { + hist.deleteGroup("UserParameters"); } // Write it try { - hist.Write(histFile.expanded()); + hist.write(histFile.expanded()); } catch(IException &) { } diff --git a/isis/src/base/objs/iTime/iTime.cpp b/isis/src/base/objs/iTime/iTime.cpp index a05b143cb5265f08269c68b128df95fa5a8988f5..fc6c89895f668adcfed5d881f67ae48418b3460a 100644 --- a/isis/src/base/objs/iTime/iTime.cpp +++ b/isis/src/base/objs/iTime/iTime.cpp @@ -419,7 +419,7 @@ namespace Isis { if(p_lpInitialized) return; // Get the leap second kernel file open - Isis::PvlGroup &dataDir = Isis::Preference::Preferences().FindGroup("DataDirectory"); + Isis::PvlGroup &dataDir = Isis::Preference::Preferences().findGroup("DataDirectory"); QString baseDir = dataDir["Base"]; baseDir += "/kernels/lsk/"; FileName leapSecond(baseDir + "naif????.tls"); diff --git a/isis/src/cassini/apps/ciss2isis/ciss2isis.cpp b/isis/src/cassini/apps/ciss2isis/ciss2isis.cpp index e2215baa1c5dc954775d5276c61195a9f2d2a05a..ed217ebc1edc4193dea70fd5c6d57273f153aa02 100644 --- a/isis/src/cassini/apps/ciss2isis/ciss2isis.cpp +++ b/isis/src/cassini/apps/ciss2isis/ciss2isis.cpp @@ -58,7 +58,7 @@ void IsisMain() { } //Checks if in file is rdr - if(label.HasObject("IMAGE_MAP_PROJECTION")) { + if(label.hasObject("IMAGE_MAP_PROJECTION")) { QString msg = "[" + in.name() + "] appears to be an rdr file."; msg += " Use pds2isis."; throw IException(IException::User, msg, _FILEINFO_); @@ -75,11 +75,11 @@ void IsisMain() { //Save off header (includes vicar labels and binary telemetry header) // No need to SetFileHeaderBytes() this is already done by ProcessImportPds automatically - int vicarLabelBytes = label.FindObject("IMAGE_HEADER").FindKeyword("BYTES"); + int vicarLabelBytes = label.findObject("IMAGE_HEADER").findKeyword("BYTES"); p.SaveFileHeader(); //Save off line prefix data, always 24 bytes of binary prefix per line,see SIS version 1.1 pg 103 - int linePrefixBytes = label.FindObject("IMAGE").FindKeyword("LINE_PREFIX_BYTES"); + int linePrefixBytes = label.findObject("IMAGE").findKeyword("LINE_PREFIX_BYTES"); p.SetDataPrefixBytes(linePrefixBytes); p.SaveDataPrefix(); @@ -99,10 +99,10 @@ void IsisMain() { // Pvl outputLabels; Pvl *outputLabel = ocube->label(); //Adjust Table-encoded values from 8 bit back to 12 bit. - PvlGroup &inst = outputLabel->FindGroup("Instrument", Pvl::Traverse); - double biasStripMean = inst.FindKeyword("BiasStripMean"); - inst.FindKeyword("BiasStripMean").SetValue(toString(stretch.Map(biasStripMean))); - inst.FindKeyword("BiasStripMean").AddComment("BiasStripMean value converted back to 12 bit."); + PvlGroup &inst = outputLabel->findGroup("Instrument", Pvl::Traverse); + double biasStripMean = inst.findKeyword("BiasStripMean"); + inst.findKeyword("BiasStripMean").setValue(toString(stretch.Map(biasStripMean))); + inst.findKeyword("BiasStripMean").addComment("BiasStripMean value converted back to 12 bit."); p.Progress()->SetText("Image was converted using 12-to-8 bit table. \nConverting prefix pixels back to 12 bit and saving line prefix data..."); } @@ -118,8 +118,8 @@ void IsisMain() { unsigned char *header = (unsigned char *) p.FileHeader(); int roo = *(header + 50 + vicarLabelBytes) / 32 % 2; //**** THIS MAY NEED TO BE CHANGED, // SEE BOTTOM OF THIS FILE FOR IN DEPTH COMMENTS ON READOUTORDER - PvlGroup &inst = ocube->label()->FindGroup("Instrument", Pvl::Traverse); - inst.AddKeyword(PvlKeyword("ReadoutOrder", toString(roo))); + PvlGroup &inst = ocube->label()->findGroup("Instrument", Pvl::Traverse); + inst.addKeyword(PvlKeyword("ReadoutOrder", toString(roo))); p.EndProcess(); // PROCESS 2 : Do 8 bit to 12 bit conversion for image ==============================================// @@ -208,7 +208,7 @@ vector ConvertLinePrefixPixels(unsigned char *data) { // author Jeannie Walldren 2008-08-21 void CreateStretchPairs() { // Set up the strech for the 8 to 12 bit conversion from file - PvlGroup &dataDir = Preference::Preferences().FindGroup("DataDirectory"); + PvlGroup &dataDir = Preference::Preferences().findGroup("DataDirectory"); QString missionDir = (QString) dataDir["Cassini"]; FileName *lutFile = new FileName(missionDir + "/calibration/lut/lut.tab"); CisscalFile *stretchPairs = new CisscalFile(lutFile->expanded()); @@ -269,7 +269,7 @@ void FixDns(Buffer &buf) { */ void TranslateCassIssLabels(FileName &labelFile, Cube *ocube) { // Get the directory where the CISS translation tables are. - PvlGroup &dataDir = Preference::Preferences().FindGroup("DataDirectory"); + PvlGroup &dataDir = Preference::Preferences().findGroup("DataDirectory"); QString missionDir = (QString) dataDir["Cassini"]; FileName transFile(missionDir + "/translations/cassiniIss.trn"); @@ -282,30 +282,30 @@ void TranslateCassIssLabels(FileName &labelFile, Cube *ocube) { labelXlater.Auto(*(outputLabel)); //Add needed keywords that are not in translation table to cube's instrument group - PvlGroup &inst = outputLabel->FindGroup("Instrument", Pvl::Traverse); - QString scc = inputLabel.FindKeyword("SPACECRAFT_CLOCK_CNT_PARTITION"); - scc += "/" + (QString) inputLabel.FindKeyword("SPACECRAFT_CLOCK_START_COUNT"); - inst.AddKeyword(PvlKeyword("SpacecraftClockCount", scc)); + PvlGroup &inst = outputLabel->findGroup("Instrument", Pvl::Traverse); + QString scc = inputLabel.findKeyword("SPACECRAFT_CLOCK_CNT_PARTITION"); + scc += "/" + (QString) inputLabel.findKeyword("SPACECRAFT_CLOCK_START_COUNT"); + inst.addKeyword(PvlKeyword("SpacecraftClockCount", scc)); //Add units of measurement to keywords from translation table - double exposureDuration = inst.FindKeyword("ExposureDuration"); - inst.FindKeyword("ExposureDuration").SetValue(toString(exposureDuration), "Milliseconds"); + double exposureDuration = inst.findKeyword("ExposureDuration"); + inst.findKeyword("ExposureDuration").setValue(toString(exposureDuration), "Milliseconds"); - int gainModeId = inst.FindKeyword("GainModeId"); - inst.FindKeyword("GainModeId").SetValue(toString(gainModeId), "ElectronsPerDN"); + int gainModeId = inst.findKeyword("GainModeId"); + inst.findKeyword("GainModeId").setValue(toString(gainModeId), "ElectronsPerDN"); - PvlKeyword opticsTemp = inst.FindKeyword("OpticsTemperature"); - inst.FindKeyword("OpticsTemperature").SetValue(opticsTemp[0]); - inst.FindKeyword("OpticsTemperature").AddValue(opticsTemp[1], "DegreesCelcius"); + PvlKeyword opticsTemp = inst.findKeyword("OpticsTemperature"); + inst.findKeyword("OpticsTemperature").setValue(opticsTemp[0]); + inst.findKeyword("OpticsTemperature").addValue(opticsTemp[1], "DegreesCelcius"); - double instDataRate = inst.FindKeyword("InstrumentDataRate"); - inst.FindKeyword("InstrumentDataRate").SetValue(toString(instDataRate), "KilobitsPerSecond"); + double instDataRate = inst.findKeyword("InstrumentDataRate"); + inst.findKeyword("InstrumentDataRate").setValue(toString(instDataRate), "KilobitsPerSecond"); // initialize global variables - dataConversionType = (QString) inst.FindKeyword("DataConversionType"); - sumMode = inst.FindKeyword("SummingMode"); - compressionType = (QString) inst.FindKeyword("CompressionType"); - IString fsw((QString) inst.FindKeyword("FlightSoftwareVersionId")); + dataConversionType = (QString) inst.findKeyword("DataConversionType"); + sumMode = inst.findKeyword("SummingMode"); + compressionType = (QString) inst.findKeyword("CompressionType"); + IString fsw((QString) inst.findKeyword("FlightSoftwareVersionId")); if(fsw == "Unknown") { flightSoftware = 0.0; } @@ -314,24 +314,24 @@ void TranslateCassIssLabels(FileName &labelFile, Cube *ocube) { } // Remove the trailing 'Z' in some pds labels - QString sUpdateTime = inst.FindKeyword("StartTime")[0]; + QString sUpdateTime = inst.findKeyword("StartTime")[0]; sUpdateTime.remove(QRegExp("[Zz]")); - inst.FindKeyword("StartTime").SetValue(sUpdateTime); + inst.findKeyword("StartTime").setValue(sUpdateTime); - sUpdateTime = inst.FindKeyword("StopTime")[0]; + sUpdateTime = inst.findKeyword("StopTime")[0]; sUpdateTime.remove(QRegExp("[Zz]")); - inst.FindKeyword("StopTime").SetValue(sUpdateTime); + inst.findKeyword("StopTime").setValue(sUpdateTime); - sUpdateTime = inst.FindKeyword("ImageTime")[0]; + sUpdateTime = inst.findKeyword("ImageTime")[0]; sUpdateTime.remove(QRegExp("[Zz]")); - inst.FindKeyword("ImageTime").SetValue(sUpdateTime); + inst.findKeyword("ImageTime").setValue(sUpdateTime); // create BandBin group - QString filter = inputLabel.FindKeyword("FilterName")[0] + "/" + - inputLabel.FindKeyword("FilterName")[1]; + QString filter = inputLabel.findKeyword("FilterName")[0] + "/" + + inputLabel.findKeyword("FilterName")[1]; - QString instrumentID = inst.FindKeyword("InstrumentId"); + QString instrumentID = inst.findKeyword("InstrumentId"); QString cameraAngleDefs; if(instrumentID.at(3) == 'N') { cameraAngleDefs = missionDir + "/translations/narrowAngle.def"; diff --git a/isis/src/cassini/apps/cisscal/DarkCurrent.cpp b/isis/src/cassini/apps/cisscal/DarkCurrent.cpp index 9c87861037e0c93fbaeb91373c4f76b37d93a660..5f6e8cddaf72d98de3243c685851e742da3c2594 100644 --- a/isis/src/cassini/apps/cisscal/DarkCurrent.cpp +++ b/isis/src/cassini/apps/cisscal/DarkCurrent.cpp @@ -1024,7 +1024,7 @@ namespace Isis { */ void DarkCurrent::FindDarkFiles() { // Get the directory where the CISS darkcurrent directory is - PvlGroup &dataDir = Preference::Preferences().FindGroup("DataDirectory"); + PvlGroup &dataDir = Preference::Preferences().findGroup("DataDirectory"); QString missionDir = (QString) dataDir["Cassini"]; QString darkDir(missionDir + "/calibration/darkcurrent/"); diff --git a/isis/src/cassini/apps/cisscal/cisscal.cpp b/isis/src/cassini/apps/cisscal/cisscal.cpp index 19347af9a92a72455fb48af0c94c88506edd307b..da04d2ff938d233250af5bbce472437d11863cd6 100644 --- a/isis/src/cassini/apps/cisscal/cisscal.cpp +++ b/isis/src/cassini/apps/cisscal/cisscal.cpp @@ -128,23 +128,23 @@ void IsisMain() { } // Add the radiometry group - gbl::calgrp.SetName("Radiometry"); + gbl::calgrp.setName("Radiometry"); // The first ProcessByLine pass will either compute bitweight values or copy input values // BITWEIGHT CORRECTION gbl::calgrp += PvlKeyword("BitweightCorrectionPerformed", "Yes"); - gbl::calgrp.FindKeyword("BitweightCorrectionPerformed").AddComment("Bitweight Correction Parameters"); + gbl::calgrp.findKeyword("BitweightCorrectionPerformed").addComment("Bitweight Correction Parameters"); // Bitweight correction is not applied to Lossy-compressed or Table-converted images if(gbl::cissLab->CompressionType() == "Lossy") { - gbl::calgrp.FindKeyword("BitweightCorrectionPerformed").SetValue("No: Lossy compressed"); + gbl::calgrp.findKeyword("BitweightCorrectionPerformed").setValue("No: Lossy compressed"); gbl::calgrp += PvlKeyword("BitweightFile", "Not applicable: No bitweight correction"); firstpass.Progress()->SetText("Lossy compressed: skip bitweight correction as insignificant.\nCopying input image..."); firstpass.StartProcess(gbl::CopyInput); firstpass.EndProcess(); } else if(gbl::cissLab->DataConversionType() == "Table") { - gbl::calgrp.FindKeyword("BitweightCorrectionPerformed").SetValue("No: Table converted"); + gbl::calgrp.findKeyword("BitweightCorrectionPerformed").setValue("No: Table converted"); gbl::calgrp += PvlKeyword("BitweightFile", "Not applicable: No bitweight correction"); firstpass.Progress()->SetText("Table converted: skip bitweight correction as insignificant.\nCopying input image..."); firstpass.StartProcess(gbl::CopyInput); @@ -153,7 +153,7 @@ void IsisMain() { // Skip bitweight correction for GainState==0, there is no data for this case, // see ground calibration report 5.1.9 Uneven Bit Weighting else if(gbl::cissLab->GainState() == 0) { - gbl::calgrp.FindKeyword("BitweightCorrectionPerformed").SetValue("No: No bitweight calibration file for GainState 0."); + gbl::calgrp.findKeyword("BitweightCorrectionPerformed").setValue("No: No bitweight calibration file for GainState 0."); gbl::calgrp += PvlKeyword("BitweightFile", "Not applicable: No bitweight correction."); firstpass.Progress()->SetText("No bitweight calibration file for GainState 0: skip bitweight correction.\nCopying input image..."); firstpass.StartProcess(gbl::CopyInput); @@ -185,7 +185,7 @@ void IsisMain() { DarkCurrent dark(*gbl::cissLab); gbl::dark_DN = dark.ComputeDarkDN(); gbl::calgrp += PvlKeyword("DarkSubtractionPerformed", "Yes"); - gbl::calgrp.FindKeyword("DarkSubtractionPerformed").AddComment("Dark Current Subtraction Parameters"); + gbl::calgrp.findKeyword("DarkSubtractionPerformed").addComment("Dark Current Subtraction Parameters"); gbl::calgrp += PvlKeyword("DarkParameterFile", dark.DarkParameterFile().expanded()); if(gbl::cissLab->NarrowAngle()) { gbl::calgrp += PvlKeyword("BiasDistortionTable", dark.BiasDistortionTable().expanded()); @@ -233,7 +233,7 @@ void IsisMain() { outcube->putGroup(gbl::calgrp); secondpass.StartProcess(gbl::Calibrate); secondpass.EndProcess(); - gbl::calgrp.Clear(); + gbl::calgrp.clear(); return; } //END MAIN @@ -519,7 +519,7 @@ FileName gbl::FindBitweightFile() { */ void gbl::ComputeBias() { gbl::calgrp += PvlKeyword("BiasSubtractionPerformed", "Yes"); - gbl::calgrp.FindKeyword("BiasSubtractionPerformed").AddComment("Bias Subtraction Parameters"); + gbl::calgrp.findKeyword("BiasSubtractionPerformed").addComment("Bias Subtraction Parameters"); QString fsw(gbl::cissLab->FlightSoftwareVersion()); double flightSoftwareVersion; @@ -546,7 +546,7 @@ void gbl::ComputeBias() { // 2009-04-27 Jeannie Walldren // following code comment out in new idl cisscal version, 3.6: if(gbl::cissLab->DataConversionType() == "Table") { // Lossy + Table = no debias - gbl::calgrp.FindKeyword("BiasSubtractionPerformed").SetValue("No: Table converted and Lossy compressed"); + gbl::calgrp.findKeyword("BiasSubtractionPerformed").setValue("No: Table converted and Lossy compressed"); gbl::calgrp += PvlKeyword("BiasSubtractionMethod", "Not applicable: No bias subtraction"); gbl::calgrp += PvlKeyword("NumberOfOverclocks", "Not applicable: No bias subtraction"); gbl::bias.resize(1); @@ -557,7 +557,7 @@ void gbl::ComputeBias() { // according to SIS if 1.2 or 1.3 and Lossy, ignore bias strip mean - invalid data if(flightSoftwareVersion <= 1.3) { // Lossy + 1.2 or 1.3 = no debias - gbl::calgrp.FindKeyword("BiasSubtractionPerformed").SetValue("No: Lossy compressed on CAS-ISS2 or CAS-ISS3"); + gbl::calgrp.findKeyword("BiasSubtractionPerformed").setValue("No: Lossy compressed on CAS-ISS2 or CAS-ISS3"); gbl::calgrp += PvlKeyword("BiasSubtractionMethod", "Not applicable: No bias subtraction"); gbl::calgrp += PvlKeyword("NumberOfOverclocks", "Not applicable: No bias subtraction"); gbl::bias.resize(1); @@ -721,7 +721,7 @@ void gbl::Linearize() { + linearLUT.expanded() + "*** not found.", _FILEINFO_); } gbl::calgrp += PvlKeyword("LinearityCorrectionPerformed", "Yes"); - gbl::calgrp.FindKeyword("LinearityCorrectionPerformed").AddComment("Linearity Correction Parameters"); + gbl::calgrp.findKeyword("LinearityCorrectionPerformed").addComment("Linearity Correction Parameters"); gbl::calgrp += PvlKeyword("LinearityCorrectionTable", linearLUT.expanded()); TextFile *pairs = new TextFile(linearLUT.expanded()); @@ -779,7 +779,7 @@ void gbl::FindDustRingParameters() { gbl::dustCorrection = false; gbl::mottleCorrection = false; gbl::calgrp += PvlKeyword("DustRingCorrectionPerformed", "No: ISSWA"); - gbl::calgrp.FindKeyword("DustRingCorrectionPerformed").AddComment("DustRing Correction Parameters"); + gbl::calgrp.findKeyword("DustRingCorrectionPerformed").addComment("DustRing Correction Parameters"); gbl::calgrp += PvlKeyword("DustRingFile", "Not applicable: No dustring correction"); gbl::calgrp += PvlKeyword("MottleCorrectionPerformed", "No: dustring correction"); gbl::calgrp += PvlKeyword("MottleFile", "Not applicable: No dustring correction"); @@ -791,7 +791,7 @@ void gbl::FindDustRingParameters() { // dustring correct for NAC gbl::dustCorrection = true; gbl::calgrp += PvlKeyword("DustRingCorrectionPerformed", "Yes"); - gbl::calgrp.FindKeyword("DustRingCorrectionPerformed").AddComment("DustRing Correction Parameters"); + gbl::calgrp.findKeyword("DustRingCorrectionPerformed").addComment("DustRing Correction Parameters"); // get name of dust file gbl::dustFile = (gbl::GetCalibrationDirectory("dustring") + "nac_dustring_venus." + gbl::cissLab->InstrumentModeId() + ".cub"); @@ -870,7 +870,7 @@ void gbl::FindDustRingParameters() { col5 = cols.takeFirst(); // effective wavelength if(col5 == "") { // Couldn't find a match in the database - gbl::calgrp.FindKeyword("MottleCorrectionPerformed").SetValue("Yes: EffectiveWavelengthFile contained no factor for filter combination, used strengthFactor of 1.0"); + gbl::calgrp.findKeyword("MottleCorrectionPerformed").setValue("Yes: EffectiveWavelengthFile contained no factor for filter combination, used strengthFactor of 1.0"); gbl::strengthFactor = 1.0; } else { @@ -890,7 +890,7 @@ void gbl::FindDustRingParameters() { } effwlDB->Close(); if(gbl::strengthFactor == 0.0) { - gbl::calgrp.FindKeyword("MottleCorrectionPerformed").SetValue("Yes: EffectiveWavelengthFile contained no factor for filter combination, used strengthFactor of 1.0"); + gbl::calgrp.findKeyword("MottleCorrectionPerformed").setValue("Yes: EffectiveWavelengthFile contained no factor for filter combination, used strengthFactor of 1.0"); gbl::strengthFactor = 1.0; } } @@ -987,7 +987,7 @@ FileName gbl::FindFlatFile() { + slopeDatabaseName.expanded() + "*** not found.", _FILEINFO_); } gbl::calgrp += PvlKeyword("FlatfieldCorrectionPerformed", "Yes"); - gbl::calgrp.FindKeyword("FlatfieldCorrectionPerformed").AddComment("Flatfield Correction Parameters"); + gbl::calgrp.findKeyword("FlatfieldCorrectionPerformed").addComment("Flatfield Correction Parameters"); gbl::calgrp += PvlKeyword("SlopeDataBase", slopeDatabaseName.expanded()); gbl::flatCorrection = true; @@ -1089,7 +1089,7 @@ FileName gbl::FindFlatFile() { */ void gbl::DNtoElectrons() { gbl::calgrp += PvlKeyword("DNtoFluxPerformed", "Yes"); - gbl::calgrp.FindKeyword("DNtoFluxPerformed").AddComment("DN to Flux Parameters"); + gbl::calgrp.findKeyword("DNtoFluxPerformed").addComment("DN to Flux Parameters"); gbl::calgrp += PvlKeyword("DNtoElectrons", "Yes"); // Gain used for an image is documented by the GainModID attribute // of the image. Nominal values are as follow: @@ -1555,7 +1555,7 @@ void gbl::FindCorrectionFactors() { + polarizationFactorFile.expanded() + "*** not found.", _FILEINFO_); } gbl::calgrp += PvlKeyword("PolarizationFactorPerformed", "Yes"); - gbl::calgrp.FindKeyword("PolarizationFactorPerformed").AddComment("Correction Factor Parameters"); + gbl::calgrp.findKeyword("PolarizationFactorPerformed").addComment("Correction Factor Parameters"); gbl::calgrp += PvlKeyword("PolarizationFactorFile", polarizationFactorFile.expanded()); CisscalFile *polFact = new CisscalFile(polarizationFactorFile.expanded()); gbl::polarizationFactor = 0.0; @@ -1575,7 +1575,7 @@ void gbl::FindCorrectionFactors() { if(col4 == "") { gbl::polarizationFactor = 1.0; // dividing by polarization factor of 1.0 implies this correction is not performed - gbl::calgrp.FindKeyword("PolarizationFactorPerformed").SetValue("No: PolarizationFactorFile contained no factor for filter combination"); + gbl::calgrp.findKeyword("PolarizationFactorPerformed").setValue("No: PolarizationFactorFile contained no factor for filter combination"); } else { gbl::polarizationFactor = toDouble(col4); @@ -1600,7 +1600,7 @@ void gbl::FindCorrectionFactors() { if(gbl::polarizationFactor == 0.0) { gbl::polarizationFactor = 1.0; // dividing by polarization factor of 1.0 implies this correction is not performed - gbl::calgrp.FindKeyword("PolarizationFactorPerformed").SetValue("No: PolarizationFactorFile contained no factor for filter combination"); + gbl::calgrp.findKeyword("PolarizationFactorPerformed").setValue("No: PolarizationFactorFile contained no factor for filter combination"); } else { // polarization factor is defined such that they are applied with the correction factor for the related CLR/Filter pair @@ -1617,7 +1617,7 @@ void gbl::FindCorrectionFactors() { else { // no polarization correction - gbl::polarizationFactor already initialized to 1 in main() gbl::calgrp += PvlKeyword("PolarizationFactorPerformed", "No"); - gbl::calgrp.FindKeyword("PolarizationFactorPerformed").AddComment("Correction Factor Parameters"); + gbl::calgrp.findKeyword("PolarizationFactorPerformed").addComment("Correction Factor Parameters"); } // Get the directory where the CISS calibration directories are. FileName correctionFactorFile(gbl::GetCalibrationDirectory("correction") + "correctionfactors_qecorr.tab"); @@ -1646,7 +1646,7 @@ void gbl::FindCorrectionFactors() { if(col4 == "") { gbl::correctionFactor = 1.0; // dividing by correction factor of 1.0 implies this correction is not performed - gbl::calgrp.FindKeyword("CorrectionFactorPerformed").SetValue("No: CorrectionFactorFile contained no factor for filter combination"); + gbl::calgrp.findKeyword("CorrectionFactorPerformed").setValue("No: CorrectionFactorFile contained no factor for filter combination"); } else { gbl::correctionFactor = toDouble(col4); @@ -1671,7 +1671,7 @@ void gbl::FindCorrectionFactors() { if(gbl::correctionFactor == 0.0) { gbl::correctionFactor = 1.0; // dividing by correction factor of 1.0 implies this correction is not performed - gbl::calgrp.FindKeyword("CorrectionFactorPerformed").SetValue("No: CorrectionFactorFile contained no factor for filter combination"); + gbl::calgrp.findKeyword("CorrectionFactorPerformed").setValue("No: CorrectionFactorFile contained no factor for filter combination"); } gbl::calgrp += PvlKeyword("CorrectionFactor", toString(gbl::correctionFactor)); return; @@ -1690,7 +1690,7 @@ void gbl::FindCorrectionFactors() { */ QString gbl::GetCalibrationDirectory(QString calibrationType) { // Get the directory where the CISS calibration directories are. - PvlGroup &dataDir = Preference::Preferences().FindGroup("DataDirectory"); + PvlGroup &dataDir = Preference::Preferences().findGroup("DataDirectory"); QString missionDir = (QString) dataDir["Cassini"]; return missionDir + "/calibration/" + calibrationType + "/"; } diff --git a/isis/src/cassini/apps/vims2isis/vims2isis.cpp b/isis/src/cassini/apps/vims2isis/vims2isis.cpp index 88bb26753dbb31d76a19363dab92eca80772e9ca..7b78c32feddd651c3ec41c99fcf9f723690b0fc8 100644 --- a/isis/src/cassini/apps/vims2isis/vims2isis.cpp +++ b/isis/src/cassini/apps/vims2isis/vims2isis.cpp @@ -46,7 +46,7 @@ void IsisMain() { Pvl lab(in.expanded()); //Checks if in file is rdr - if(lab.HasObject("IMAGE_MAP_PROJECTION")) { + if(lab.hasObject("IMAGE_MAP_PROJECTION")) { QString msg = "[" + in.name() + "] appears to be an rdr file."; msg += " Use pds2isis."; throw IException(IException::User, msg, _FILEINFO_); @@ -54,7 +54,7 @@ void IsisMain() { //Make sure it is a vims cube try { - PvlObject qube(lab.FindObject("QUBE")); + PvlObject qube(lab.findObject("QUBE")); QString id; id = (QString)qube["INSTRUMENT_ID"]; id = id.simplified().trimmed(); @@ -74,7 +74,7 @@ void IsisMain() { Pvl pdsLab(in.expanded()); // It's VIMS, let's figure out if it has the suffix data or not - if(toInt(lab.FindObject("QUBE")["SUFFIX_ITEMS"][0]) == 0) { + if(toInt(lab.findObject("QUBE")["SUFFIX_ITEMS"][0]) == 0) { // No suffix data, we can use processimportpds ProcessImportPds p; @@ -88,7 +88,7 @@ void IsisMain() { } else { // We do it the hard way - ReadVimsBIL(in.expanded(), lab.FindObject("QUBE")["SUFFIX_ITEMS"], tempname.name()); + ReadVimsBIL(in.expanded(), lab.findObject("QUBE")["SUFFIX_ITEMS"], tempname.name()); } // Create holder for original labels @@ -100,7 +100,7 @@ void IsisMain() { PvlGroup status("Results"); //VIS cube - const PvlObject &qube = lab.FindObject("Qube"); + const PvlObject &qube = lab.findObject("Qube"); if(qube["SAMPLING_MODE_ID"][1] != "N/A") { CubeAttributeInput inattvis = CubeAttributeInput("+1-96"); l.SetInputCube(tempname.name(), inattvis); @@ -156,7 +156,7 @@ void IsisMain() { * @param outFile FileName of the output file */ void ReadVimsBIL(QString inFileName, const PvlKeyword &suffixItems, QString outFile) { - Isis::PvlGroup &dataDir = Isis::Preference::Preferences().FindGroup("DataDirectory"); + Isis::PvlGroup &dataDir = Isis::Preference::Preferences().findGroup("DataDirectory"); QString transDir = (QString) dataDir["Base"]; Pvl pdsLabel(inFileName); @@ -443,17 +443,17 @@ void ProcessBands(Pvl &pdsLab, Cube *vimsCube, VimsType vtype) { vims.mi32BandCenterEnd = 352; vims.mi32NaifFrameCode = -82371; } - PvlObject qube(pdsLab.FindObject("Qube")); + PvlObject qube(pdsLab.findObject("Qube")); //Create the BandBin Group PvlGroup bandbin("BandBin"); PvlKeyword originalBand("OriginalBand"); for(int i = vims.mi32OrigBandStart; i <= vims.mi32OrigBinEnd; i++) { - originalBand.AddValue(toString(i)); + originalBand.addValue(toString(i)); } bandbin += originalBand; PvlKeyword center("Center"); - PvlGroup bbin(qube.FindGroup("BandBin")); + PvlGroup bbin(qube.findGroup("BandBin")); for(int i = vims.mi32BandCenterStart; i < vims.mi32BandCenterEnd; i++) { center += (QString) bbin["BandBinCenter"][i]; } @@ -484,11 +484,11 @@ void ProcessBands(Pvl &pdsLab, Cube *vimsCube, VimsType vtype) { //************************************************************ void TranslateVimsLabels(Pvl &pdsLab, Cube *vimscube, VimsType vType) { - Isis::PvlGroup &dataDir = Isis::Preference::Preferences().FindGroup("DataDirectory"); + Isis::PvlGroup &dataDir = Isis::Preference::Preferences().findGroup("DataDirectory"); QString transDir = (QString) dataDir["Cassini"]; Isis::FileName transFile(transDir + "/" + "translations/vimsPds.trn"); - PvlObject qube(pdsLab.FindObject("Qube")); + PvlObject qube(pdsLab.findObject("Qube")); Pvl pdsLabel(pdsLab); Isis::PvlTranslationManager labelXlater(pdsLabel, transFile.expanded()); @@ -496,13 +496,13 @@ void TranslateVimsLabels(Pvl &pdsLab, Cube *vimscube, VimsType vType) { labelXlater.Auto(outputLabel); //Add needed keywords that are not in translation table to cube's instrument group - PvlGroup &inst = outputLabel.FindGroup("Instrument", Pvl::Traverse); + PvlGroup &inst = outputLabel.findGroup("Instrument", Pvl::Traverse); //trim start and stop time - QString strTime = inst.FindKeyword("StartTime")[0]; - inst.FindKeyword("StartTime").SetValue(strTime.remove("Z")); + QString strTime = inst.findKeyword("StartTime")[0]; + inst.findKeyword("StartTime").setValue(strTime.remove("Z")); strTime = (QString)qube["StopTime"]; - inst.FindKeyword("StopTime").SetValue(strTime.remove("Z")); + inst.findKeyword("StopTime").setValue(strTime.remove("Z")); if(vType == IR) { inst += PvlKeyword("SamplingMode", (QString)qube["SamplingModeId"][0]); @@ -518,8 +518,8 @@ void TranslateVimsLabels(Pvl &pdsLab, Cube *vimscube, VimsType vType) { } PvlKeyword expDuration("ExposureDuration"); - expDuration.AddValue(qube["ExposureDuration"][0], "IR"); - expDuration.AddValue(qube["ExposureDuration"][1], "VIS"); + expDuration.addValue(qube["ExposureDuration"][0], "IR"); + expDuration.addValue(qube["ExposureDuration"][1], "VIS"); inst += expDuration; if(vType == IR) { @@ -532,7 +532,7 @@ void TranslateVimsLabels(Pvl &pdsLab, Cube *vimscube, VimsType vType) { vimscube->putGroup(inst); //Get Archive - PvlGroup &archive = outputLabel.FindGroup("Archive", Pvl::Traverse); + PvlGroup &archive = outputLabel.findGroup("Archive", Pvl::Traverse); vimscube->putGroup(archive); ProcessBands(pdsLab, vimscube, vType); diff --git a/isis/src/cassini/apps/vims2map/vims2map.cpp b/isis/src/cassini/apps/vims2map/vims2map.cpp index 2b19d7b6bd4207ab5d7e69bd15960a6ec250ac7e..bab752971abadcbef2d4e4c048bb75b4301aee5d 100644 --- a/isis/src/cassini/apps/vims2map/vims2map.cpp +++ b/isis/src/cassini/apps/vims2map/vims2map.cpp @@ -39,8 +39,8 @@ void IsisMain() { // Get the map projection file provided by the user UserInterface &ui = Application::GetUserInterface(); Pvl userMap; - userMap.Read(ui.GetFileName("MAP")); - PvlGroup &userGrp = userMap.FindGroup("Mapping", Pvl::Traverse); + userMap.read(ui.GetFileName("MAP")); + PvlGroup &userGrp = userMap.findGroup("Mapping", Pvl::Traverse); FileList list; list.read(ui.GetFileName("FROMLIST")); @@ -86,7 +86,7 @@ void IsisMain() { // Get the mapping group and the BandBin group Pvl camMap; incam->BasicMapping(camMap); - camGrp = camMap.FindGroup("Mapping"); + camGrp = camMap.findGroup("Mapping"); if(icube->hasGroup("BandBin")) { bandBinGrp = icube->group("BandBin"); @@ -110,97 +110,97 @@ void IsisMain() { } } //end for list.size - camGrp.AddKeyword(PvlKeyword("MinimumLatitude", toString(minlat)), Pvl::Replace); - camGrp.AddKeyword(PvlKeyword("MaximumLatitude", toString(maxlat)), Pvl::Replace); - camGrp.AddKeyword(PvlKeyword("MinimumLongitude", toString(minlon)), Pvl::Replace); - camGrp.AddKeyword(PvlKeyword("MaximumLongitude", toString(maxlon)), Pvl::Replace); + camGrp.addKeyword(PvlKeyword("MinimumLatitude", toString(minlat)), Pvl::Replace); + camGrp.addKeyword(PvlKeyword("MaximumLatitude", toString(maxlat)), Pvl::Replace); + camGrp.addKeyword(PvlKeyword("MinimumLongitude", toString(minlon)), Pvl::Replace); + camGrp.addKeyword(PvlKeyword("MaximumLongitude", toString(maxlon)), Pvl::Replace); // We want to delete the keywords we just added if the user wants the range // out of the mapfile, otherwise they will replace any keywords not in the // mapfile if(ui.GetString("DEFAULTRANGE") == "MAP") { - camGrp.DeleteKeyword("MinimumLatitude"); - camGrp.DeleteKeyword("MaximumLatitude"); - camGrp.DeleteKeyword("MinimumLongitude"); - camGrp.DeleteKeyword("MaximumLongitude"); + camGrp.deleteKeyword("MinimumLatitude"); + camGrp.deleteKeyword("MaximumLatitude"); + camGrp.deleteKeyword("MinimumLongitude"); + camGrp.deleteKeyword("MaximumLongitude"); } // Otherwise, remove the keywords from the map file so the camera keywords // will be propogated correctly else { - while(userGrp.HasKeyword("MinimumLatitude")) { - userGrp.DeleteKeyword("MinimumLatitude"); + while(userGrp.hasKeyword("MinimumLatitude")) { + userGrp.deleteKeyword("MinimumLatitude"); } - while(userGrp.HasKeyword("MinimumLongitude")) { - userGrp.DeleteKeyword("MinimumLongitude"); + while(userGrp.hasKeyword("MinimumLongitude")) { + userGrp.deleteKeyword("MinimumLongitude"); } - while(userGrp.HasKeyword("MaximumLatitude")) { - userGrp.DeleteKeyword("MaximumLatitude"); + while(userGrp.hasKeyword("MaximumLatitude")) { + userGrp.deleteKeyword("MaximumLatitude"); } - while(userGrp.HasKeyword("MaximumLongitude")) { - userGrp.DeleteKeyword("MaximumLongitude"); + while(userGrp.hasKeyword("MaximumLongitude")) { + userGrp.deleteKeyword("MaximumLongitude"); } } // If the user decided to enter a ground range then override if(ui.WasEntered("MINLON")) { - userGrp.AddKeyword(PvlKeyword("MinimumLongitude", + userGrp.addKeyword(PvlKeyword("MinimumLongitude", toString(ui.GetDouble("MINLON"))), Pvl::Replace); } if(ui.WasEntered("MAXLON")) { - userGrp.AddKeyword(PvlKeyword("MaximumLongitude", + userGrp.addKeyword(PvlKeyword("MaximumLongitude", toString(ui.GetDouble("MAXLON"))), Pvl::Replace); } if(ui.WasEntered("MINLAT")) { - userGrp.AddKeyword(PvlKeyword("MinimumLatitude", + userGrp.addKeyword(PvlKeyword("MinimumLatitude", toString(ui.GetDouble("MINLAT"))), Pvl::Replace); } if(ui.WasEntered("MAXLAT")) { - userGrp.AddKeyword(PvlKeyword("MaximumLatitude", + userGrp.addKeyword(PvlKeyword("MaximumLatitude", toString(ui.GetDouble("MAXLAT"))), Pvl::Replace); } // If they want the res. from the mapfile, delete it from the camera so // nothing gets overriden if(ui.GetString("PIXRES") == "MAP") { - camGrp.DeleteKeyword("PixelResolution"); + camGrp.deleteKeyword("PixelResolution"); } // Otherwise, delete any resolution keywords from the mapfile so the camera // info is propogated over else if(ui.GetString("PIXRES") == "CAMERA") { - if(userGrp.HasKeyword("Scale")) { - userGrp.DeleteKeyword("Scale"); + if(userGrp.hasKeyword("Scale")) { + userGrp.deleteKeyword("Scale"); } - if(userGrp.HasKeyword("PixelResolution")) { - userGrp.DeleteKeyword("PixelResolution"); + if(userGrp.hasKeyword("PixelResolution")) { + userGrp.deleteKeyword("PixelResolution"); } } // Copy any defaults that are not in the user map from the camera map file - for(int k = 0; k < camGrp.Keywords(); k++) { - if(!userGrp.HasKeyword(camGrp[k].Name())) { + for(int k = 0; k < camGrp.keywords(); k++) { + if(!userGrp.hasKeyword(camGrp[k].name())) { userGrp += camGrp[k]; } } // If the user decided to enter a resolution then override if(ui.GetString("PIXRES") == "MPP") { - userGrp.AddKeyword(PvlKeyword("PixelResolution", + userGrp.addKeyword(PvlKeyword("PixelResolution", toString(ui.GetDouble("RESOLUTION"))), Pvl::Replace); - if(userGrp.HasKeyword("Scale")) { - userGrp.DeleteKeyword("Scale"); + if(userGrp.hasKeyword("Scale")) { + userGrp.deleteKeyword("Scale"); } } else if(ui.GetString("PIXRES") == "PPD") { - userGrp.AddKeyword(PvlKeyword("Scale", + userGrp.addKeyword(PvlKeyword("Scale", toString(ui.GetDouble("RESOLUTION"))), Pvl::Replace); - if(userGrp.HasKeyword("PixelResolution")) { - userGrp.DeleteKeyword("PixelResolution"); + if(userGrp.hasKeyword("PixelResolution")) { + userGrp.deleteKeyword("PixelResolution"); } } @@ -209,32 +209,32 @@ void IsisMain() { if(incam->IntersectsLongitudeDomain(userMap)) { if(ui.GetString("LONSEAM") == "AUTO") { if((int) userGrp["LongitudeDomain"] == 360) { - userGrp.AddKeyword(PvlKeyword("LongitudeDomain", toString(180)), + userGrp.addKeyword(PvlKeyword("LongitudeDomain", toString(180)), Pvl::Replace); if(incam->IntersectsLongitudeDomain(userMap)) { // Its looks like a global image so switch back to the // users preference - userGrp.AddKeyword(PvlKeyword("LongitudeDomain", toString(360)), + userGrp.addKeyword(PvlKeyword("LongitudeDomain", toString(360)), Pvl::Replace); } } else { - userGrp.AddKeyword(PvlKeyword("LongitudeDomain", toString(360)), + userGrp.addKeyword(PvlKeyword("LongitudeDomain", toString(360)), Pvl::Replace); if(incam->IntersectsLongitudeDomain(userMap)) { // Its looks like a global image so switch back to the // users preference - userGrp.AddKeyword(PvlKeyword("LongitudeDomain", toString(180)), + userGrp.addKeyword(PvlKeyword("LongitudeDomain", toString(180)), Pvl::Replace); } } // Make the target info match the new longitude domain double minlat, maxlat, minlon, maxlon; incam->GroundRange(minlat, maxlat, minlon, maxlon, userMap); - userGrp.AddKeyword(PvlKeyword("MinimumLatitude", toString(minlat)), Pvl::Replace); - userGrp.AddKeyword(PvlKeyword("MaximumLatitude", toString(maxlat)), Pvl::Replace); - userGrp.AddKeyword(PvlKeyword("MinimumLongitude", toString(minlon)), Pvl::Replace); - userGrp.AddKeyword(PvlKeyword("MaximumLongitude", toString(maxlon)), Pvl::Replace); + userGrp.addKeyword(PvlKeyword("MinimumLatitude", toString(minlat)), Pvl::Replace); + userGrp.addKeyword(PvlKeyword("MaximumLatitude", toString(maxlat)), Pvl::Replace); + userGrp.addKeyword(PvlKeyword("MinimumLongitude", toString(minlon)), Pvl::Replace); + userGrp.addKeyword(PvlKeyword("MaximumLongitude", toString(maxlon)), Pvl::Replace); } else if(ui.GetString("LONSEAM") == "ERROR") { @@ -247,8 +247,8 @@ void IsisMain() { Pvl pvl; - pvl.AddGroup(userGrp); - pvl.AddGroup(bandBinGrp); + pvl.addGroup(userGrp); + pvl.addGroup(bandBinGrp); g_pgp.SetOutputCube("TO", pvl, g_bands); for(int f = 0; f < list.size(); f++) { @@ -276,8 +276,8 @@ void PrintMap() { // Get mapping group from map file Pvl userMap; - userMap.Read(ui.GetFileName("MAP")); - PvlGroup &userGrp = userMap.FindGroup("Mapping", Pvl::Traverse); + userMap.read(ui.GetFileName("MAP")); + PvlGroup &userGrp = userMap.findGroup("Mapping", Pvl::Traverse); //Write map file out to the log Isis::Application::GuiLog(userGrp); diff --git a/isis/src/cassini/apps/vimscal/vimscal.cpp b/isis/src/cassini/apps/vimscal/vimscal.cpp index b6bcca77e93b2c9da9e4085218050af4ae589c82..a7645c4b8349ca05f0dbf01e85042db95b2b85fc 100644 --- a/isis/src/cassini/apps/vimscal/vimscal.cpp +++ b/isis/src/cassini/apps/vimscal/vimscal.cpp @@ -74,7 +74,7 @@ void IsisMain() { bool isVims = true; try { - isVims = (icube->label()->FindGroup("Instrument", + isVims = (icube->label()->findGroup("Instrument", Pvl::Traverse)["InstrumentId"][0] == "VIMS"); } catch(IException &e) { @@ -86,7 +86,7 @@ void IsisMain() { throw IException(IException::User, msg, _FILEINFO_); } - if(icube->label()->FindObject("IsisCube").HasGroup("AlphaCube")) { + if(icube->label()->findObject("IsisCube").hasGroup("AlphaCube")) { QString msg = "The input cube [" + QString(ui.GetAsString("FROM")) + "] has had its dimensions modified and can not be calibrated"; throw IException(IException::User, msg, _FILEINFO_); } @@ -253,7 +253,7 @@ void calculateSolarRemove(Cube *icube, ProcessByLine *p) { } bool vis = (icube->label()-> - FindGroup("Instrument", Pvl::Traverse)["Channel"][0] != "IR"); + findGroup("Instrument", Pvl::Traverse)["Channel"][0] != "IR"); QString attributes; @@ -278,7 +278,7 @@ void calculateSolarRemove(Cube *icube, ProcessByLine *p) { * This calculates the coefficients for specific energy corrections */ void calculateSpecificEnergy(Cube *icube) { - PvlGroup &inst = icube->label()->FindGroup("Instrument", Pvl::Traverse); + PvlGroup &inst = icube->label()->findGroup("Instrument", Pvl::Traverse); bool vis = (inst["Channel"][0] != "IR"); double coefficient = 1.0; @@ -357,7 +357,7 @@ void calculateSpecificEnergy(Cube *icube) { * @param currCube */ void calculateDarkCurrent(Cube *icube) { - PvlGroup &inst = icube->label()->FindGroup("Instrument", Pvl::Traverse); + PvlGroup &inst = icube->label()->findGroup("Instrument", Pvl::Traverse); bool vis = (inst["Channel"][0] != "IR"); calibInfo += PvlKeyword("Vis", ((vis) ? "true" : "false")); @@ -379,7 +379,7 @@ void calculateDarkCurrent(Cube *icube) { * @param icube */ void calculateVisDarkCurrent(Cube *icube) { - PvlGroup &inst = icube->label()->FindGroup("Instrument", Pvl::Traverse); + PvlGroup &inst = icube->label()->findGroup("Instrument", Pvl::Traverse); // This is the dark current corrections for VIS bool hires = ((inst["SamplingMode"][0] == "HIGH") || (inst["SamplingMode"][0] == "HI-RES")); @@ -449,7 +449,7 @@ void calculateVisDarkCurrent(Cube *icube) { // If spectral summing is on, go in sets of 8 and set darks to the average /* - PvlGroup &archive = icube->Label()->FindGroup("Archive", Pvl::Traverse); + PvlGroup &archive = icube->Label()->findGroup("Archive", Pvl::Traverse); if(archive["SpectralSummingFlag"][0] == "ON") { for(int band = 1; band <= 96; band += 8) { for(int sample = 1; sample <= 64; sample++) { @@ -490,12 +490,12 @@ void calculateIrDarkCurrent(Cube *icube) { bool found = false; // verify if IR we have sideplane data - for(int obj = 0; !found && obj < icube->label()->Objects(); obj++) { - PvlObject &object = icube->label()->Object(obj); + for(int obj = 0; !found && obj < icube->label()->objects(); obj++) { + PvlObject &object = icube->label()->object(obj); - if(object.Name() != "Table") continue; + if(object.name() != "Table") continue; - if(object.HasKeyword("Name") && object["Name"][0] == "SideplaneIr") found = true; + if(object.hasKeyword("Name") && object["Name"][0] == "SideplaneIr") found = true; } if(!found) { @@ -507,7 +507,7 @@ void calculateIrDarkCurrent(Cube *icube) { // If spectal summing is on OR compressor_id isnt N/A then // just return. - PvlGroup &archive = icube->label()->FindGroup("Archive", Pvl::Traverse); + PvlGroup &archive = icube->label()->findGroup("Archive", Pvl::Traverse); // If dark subtracted (compressorid is valid) and cant do linear // correction (spectral editing flag on) then do not do dark @@ -609,7 +609,7 @@ void calculateIrDarkCurrent(Cube *icube) { * @param p */ void chooseFlatFile(Cube *icube, ProcessByLine *p) { - PvlGroup &inst = icube->label()->FindGroup("Instrument", Pvl::Traverse); + PvlGroup &inst = icube->label()->findGroup("Instrument", Pvl::Traverse); bool vis = (inst["Channel"][0] != "IR"); bool hires = ((inst["SamplingMode"][0] == "HIGH") || (inst["SamplingMode"][0] == "HI-RES")); @@ -673,7 +673,7 @@ QString createCroppedFile(Cube *icube, QString cubeFileName, bool flatFile) { } void GetOffsets(const Pvl &lab, int &finalSampOffset, int &finalLineOffset) { - const PvlGroup &inst = lab.FindGroup("Instrument", Pvl::Traverse); + const PvlGroup &inst = lab.findGroup("Instrument", Pvl::Traverse); // Get sample/line offsets int sampOffset = inst ["XOffset"]; diff --git a/isis/src/cassini/objs/CissLabels/CissLabels.cpp b/isis/src/cassini/objs/CissLabels/CissLabels.cpp index 1887c314e99a26ab68790b47fe5c6a096525651f..0c825e687d22266753a966e1a0e2bb9bc9ad244b 100644 --- a/isis/src/cassini/objs/CissLabels/CissLabels.cpp +++ b/isis/src/cassini/objs/CissLabels/CissLabels.cpp @@ -56,7 +56,7 @@ namespace Isis { */ void CissLabels::ReadLabels(Pvl &lab) { // Get values out of the instrument group - PvlGroup &inst = lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup &inst = lab.findGroup("Instrument", Pvl::Traverse); p_ABflag = (QString) inst["AntiBloomingStateFlag"]; //valid values: On, Off, Unknown p_biasStripMean = (double) inst["BiasStripMean"]; //valid values: real numbers p_compressionRatio = (QString) inst["CompressionRatio"]; //valid values: NotCompressed or real number @@ -76,10 +76,10 @@ namespace Isis { p_summingMode = (int) inst["SummingMode"]; //valid values: 1, 2, 4 p_frontOpticsTemp = toDouble(inst["OpticsTemperature"][0]); //valid values: real numbers // Get values out of the archive group - PvlGroup &arch = lab.FindGroup("Archive", Pvl::Traverse); + PvlGroup &arch = lab.findGroup("Archive", Pvl::Traverse); p_imageNumber = (double) arch["ImageNumber"]; // Get values out of the bandbin group - PvlGroup &bandbin = lab.FindGroup("BandBin", Pvl::Traverse); + PvlGroup &bandbin = lab.findGroup("BandBin", Pvl::Traverse); IString filter = (QString) bandbin["FilterName"]; p_filter.push_back(filter.Token("/").ToQt()); p_filter.push_back(filter.ToQt()); diff --git a/isis/src/cassini/objs/IssNACamera/IssNACamera.cpp b/isis/src/cassini/objs/IssNACamera/IssNACamera.cpp index bb0462ccc739e9baa727e386ce4524029e94bbc2..853fed6b151dddaadb3d78c8e442b50381a00451 100644 --- a/isis/src/cassini/objs/IssNACamera/IssNACamera.cpp +++ b/isis/src/cassini/objs/IssNACamera/IssNACamera.cpp @@ -48,7 +48,7 @@ namespace Isis { // use the default. double focalLength = 0.0; try { - PvlGroup bandBin = lab.FindGroup("BandBin", Pvl::Traverse); + PvlGroup bandBin = lab.findGroup("BandBin", Pvl::Traverse); QString key = QString("INS%1_%2_FOCAL_LENGTH"). arg(naifIkCode()).arg(bandBin["FilterName"][0]); key = key.replace("/", "_"); @@ -60,7 +60,7 @@ namespace Isis { focalLength = getDouble(key); } catch (IException &secondException) { - PvlGroup bandBin = lab.FindGroup("BandBin", Pvl::Traverse); + PvlGroup bandBin = lab.findGroup("BandBin", Pvl::Traverse); IException finalError(IException::Unknown, QString("Unable to find a focal length for the requested Cassini ISS NA " "filter combination [%1] or the default focal length") @@ -78,7 +78,7 @@ namespace Isis { instrumentRotation()->SetFrame(Spice::getInteger("INS_" + toString(naifIkCode()) + "_FRAME_ID")); // Get the start time in et - PvlGroup inst = lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup inst = lab.findGroup("Instrument", Pvl::Traverse); double et = iTime((QString)inst["StartTime"]).Et(); diff --git a/isis/src/cassini/objs/IssNACamera/unitTest.cpp b/isis/src/cassini/objs/IssNACamera/unitTest.cpp index a7bb64867d47530e2662cb8ca8f9abf08d3edc3a..228ec0d46ca9f77b7b7dd4d25b344dab456147cf 100644 --- a/isis/src/cassini/objs/IssNACamera/unitTest.cpp +++ b/isis/src/cassini/objs/IssNACamera/unitTest.cpp @@ -49,7 +49,7 @@ int main(void) { Pvl p("$cassini/testData/N1525100863_2.cub"); IssNACamera *cam = (IssNACamera *) CameraFactory::Create(p); - cout << "FileName: " << FileName(p.FileName()).name() << endl; + cout << "FileName: " << FileName(p.fileName()).name() << endl; cout << "CK Frame: " << cam->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); @@ -62,7 +62,7 @@ int main(void) { cout << "SPK Reference ID = " << cam->SpkReferenceId() << endl << endl; // Test Shutter Open/Close - const PvlGroup &inst = p.FindGroup("Instrument", Pvl::Traverse); + const PvlGroup &inst = p.findGroup("Instrument", Pvl::Traverse); double exposureDuration = ((double) inst["ExposureDuration"])/1000; QString stime = inst["StartTime"]; double et; // StartTime keyword is the center exposure time diff --git a/isis/src/cassini/objs/IssWACamera/IssWACamera.cpp b/isis/src/cassini/objs/IssWACamera/IssWACamera.cpp index 9906505adb957f9a6ceea687047bca907a9c3035..f2d72106ba8eb0aa70fe129c3b2cb7b97f529ad1 100644 --- a/isis/src/cassini/objs/IssWACamera/IssWACamera.cpp +++ b/isis/src/cassini/objs/IssWACamera/IssWACamera.cpp @@ -43,7 +43,7 @@ namespace Isis { */ IssWACamera::IssWACamera(Pvl &lab) : FramingCamera(lab) { NaifStatus::CheckErrors(); - PvlGroup bandBin = lab.FindGroup("BandBin", Pvl::Traverse); + PvlGroup bandBin = lab.findGroup("BandBin", Pvl::Traverse); // Get the camera characteristics QString key = "INS" + toString(naifIkCode()) + "_" + bandBin["FilterName"][0] + "_FOCAL_LENGTH"; key = key.replace("/", "_"); @@ -55,7 +55,7 @@ namespace Isis { // Get the start time in et - PvlGroup inst = lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup inst = lab.findGroup("Instrument", Pvl::Traverse); double et = iTime((QString)inst["StartTime"]).Et(); diff --git a/isis/src/cassini/objs/IssWACamera/unitTest.cpp b/isis/src/cassini/objs/IssWACamera/unitTest.cpp index b486409583b9bfc9707517fdc9cbf5c53fcaec06..ec57fef134a553a94ba4b4430fa53f638bcc710c 100644 --- a/isis/src/cassini/objs/IssWACamera/unitTest.cpp +++ b/isis/src/cassini/objs/IssWACamera/unitTest.cpp @@ -47,7 +47,7 @@ int main(void) { Pvl p("$cassini/testData/W1525116136_1.cub"); IssWACamera *cam = (IssWACamera *) CameraFactory::Create(p); - cout << "FileName: " << FileName(p.FileName()).name() << endl; + cout << "FileName: " << FileName(p.fileName()).name() << endl; cout << "CK Frame: " << cam->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); @@ -60,7 +60,7 @@ int main(void) { cout << "SPK Reference ID = " << cam->SpkReferenceId() << endl << endl; // Test Shutter Open/Close - const PvlGroup &inst = p.FindGroup("Instrument", Pvl::Traverse); + const PvlGroup &inst = p.findGroup("Instrument", Pvl::Traverse); double exposureDuration = ((double) inst["ExposureDuration"])/1000; QString stime = inst["StartTime"]; double et; // StartTime keyword is the center exposure time diff --git a/isis/src/cassini/objs/VimsCamera/VimsCamera.cpp b/isis/src/cassini/objs/VimsCamera/VimsCamera.cpp index 374d653e6e5ad4d836b4c6b2cf6fb6866ae97e25..8d8e4c8c548e1354c753d5f39ed2cd2eb7c2cd7b 100644 --- a/isis/src/cassini/objs/VimsCamera/VimsCamera.cpp +++ b/isis/src/cassini/objs/VimsCamera/VimsCamera.cpp @@ -57,7 +57,7 @@ namespace Isis { VimsCamera::VimsCamera(Pvl &lab) : Camera(lab) { NaifStatus::CheckErrors(); - PvlGroup inst = lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup inst = lab.findGroup("Instrument", Pvl::Traverse); QString channel = (QString) inst ["Channel"]; // Set Frame mounting diff --git a/isis/src/cassini/objs/VimsCamera/VimsGroundMap.cpp b/isis/src/cassini/objs/VimsCamera/VimsGroundMap.cpp index b7b7fc89ededda3da22fb29d0984c9e908ccc8a9..227200c9b9a58d89587d133f3d34b931ae32131f 100644 --- a/isis/src/cassini/objs/VimsCamera/VimsGroundMap.cpp +++ b/isis/src/cassini/objs/VimsCamera/VimsGroundMap.cpp @@ -134,7 +134,7 @@ namespace Isis { */ void VimsGroundMap::Init(Pvl &lab) { - PvlGroup inst = lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup inst = lab.findGroup("Instrument", Pvl::Traverse); // Vis or IR p_channel = (QString) inst ["Channel"]; diff --git a/isis/src/cassini/objs/VimsCamera/VimsSkyMap.cpp b/isis/src/cassini/objs/VimsCamera/VimsSkyMap.cpp index 9195cbf2caaf822a0f97de46a23095728e81bfec..d897f8139e4c9448d4dbfb02362f851752ca99ed 100644 --- a/isis/src/cassini/objs/VimsCamera/VimsSkyMap.cpp +++ b/isis/src/cassini/objs/VimsCamera/VimsSkyMap.cpp @@ -66,7 +66,7 @@ namespace Isis { */ void VimsSkyMap::Init(Pvl &lab) { - PvlGroup inst = lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup inst = lab.findGroup("Instrument", Pvl::Traverse); // Vis or IR p_channel = (QString) inst ["Channel"]; @@ -107,7 +107,7 @@ namespace Isis { //FileName vectorFile(Spice::getString(key,0)); //tack on _HR or _NY for other summing modes. // Get the directory for the unit vector files. - PvlGroup &dataDir = Preference::Preferences().FindGroup("DataDirectory"); + PvlGroup &dataDir = Preference::Preferences().findGroup("DataDirectory"); QString vecDir = (QString) dataDir["Cassini"] + "/unitVectors/"; FileName vectorFile; diff --git a/isis/src/cassini/objs/VimsCamera/unitTest.cpp b/isis/src/cassini/objs/VimsCamera/unitTest.cpp index dd9ff80f4fdd98c9e1065f6afb60c55b5852ddaf..4a383ced575575ac53d283c1aaa466042f2409c9 100644 --- a/isis/src/cassini/objs/VimsCamera/unitTest.cpp +++ b/isis/src/cassini/objs/VimsCamera/unitTest.cpp @@ -127,7 +127,7 @@ int main(void) { for(unsigned int i = 0; i < sizeof(knownLat) / sizeof(double); i++) { Pvl p(files[i]); Camera *cam = CameraFactory::Create(p); - cout << "FileName: " << FileName(p.FileName()).name() << endl; + cout << "FileName: " << FileName(p.fileName()).name() << endl; cout << "CK Frame: " << cam->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); @@ -181,7 +181,7 @@ int main(void) { //string file = "/usgs/cpkgs/isis3/data/cassini/testData/C1465336166_1.ir.cub"; Pvl p("/usgs/cpkgs/isis3/data/cassini/testData/C1465336166_1.ir.cub"); Camera *cam = CameraFactory::Create(p); - cout << "FileName: " << FileName(p.FileName()).name() << endl; + cout << "FileName: " << FileName(p.fileName()).name() << endl; cout << "CK Frame: " << cam->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); diff --git a/isis/src/clementine/apps/clem2isis/clem2isis.cpp b/isis/src/clementine/apps/clem2isis/clem2isis.cpp index c484ae48ee0b1c85322e9f09c4e53876849492b5..c91f0e083b80c85631f2747caa37cb5999b2602d 100644 --- a/isis/src/clementine/apps/clem2isis/clem2isis.cpp +++ b/isis/src/clementine/apps/clem2isis/clem2isis.cpp @@ -32,7 +32,7 @@ void IsisMain() { bool projected; try { Pvl lab(in.expanded()); - projected = lab.HasObject("IMAGE_MAP_PROJECTION"); + projected = lab.hasObject("IMAGE_MAP_PROJECTION"); QString id; id = (QString)lab["DATA_SET_ID"]; id = id.simplified().trimmed(); @@ -97,7 +97,7 @@ void WriteLine(Buffer &b) { void TranslateLabels(FileName in, Cube *ocube) { // Get the directory where the Clementine translation tables are. - PvlGroup &dataDir = Preference::Preferences().FindGroup("DataDirectory"); + PvlGroup &dataDir = Preference::Preferences().findGroup("DataDirectory"); // Transfer the instrument group to the output cube QString transDir = (QString) dataDir["clementine1"]; @@ -111,17 +111,17 @@ void TranslateLabels(FileName in, Cube *ocube) { labelXlater.Auto(*(outputLabel)); //Instrument group - PvlGroup inst = outputLabel->FindGroup("Instrument", Pvl::Traverse); + PvlGroup inst = outputLabel->findGroup("Instrument", Pvl::Traverse); - PvlKeyword &startTime = inst.FindKeyword("StartTime"); - startTime.SetValue(startTime[0].mid(0, startTime[0].size() - 1)); + PvlKeyword &startTime = inst.findKeyword("StartTime"); + startTime.setValue(startTime[0].mid(0, startTime[0].size() - 1)); // Old PDS labels used keyword INSTRUMENT_COMPRESSION_TYPE & PDS Labels now use ENCODING_TYPE - if(pdsLab.FindObject("Image").HasKeyword("InstrumentCompressionType")) { - inst += PvlKeyword("EncodingFormat", (QString) pdsLab.FindObject("Image")["InstrumentCompressionType"]); + if(pdsLab.findObject("Image").hasKeyword("InstrumentCompressionType")) { + inst += PvlKeyword("EncodingFormat", (QString) pdsLab.findObject("Image")["InstrumentCompressionType"]); } else { - inst += PvlKeyword("EncodingFormat", (QString) pdsLab.FindObject("Image")["EncodingType"]); + inst += PvlKeyword("EncodingFormat", (QString) pdsLab.findObject("Image")["EncodingType"]); } if(((QString)inst["InstrumentId"]) == "HIRES") { @@ -130,17 +130,17 @@ void TranslateLabels(FileName in, Cube *ocube) { ocube->putGroup(inst); - PvlGroup bBin = outputLabel->FindGroup("BandBin", Pvl::Traverse); + PvlGroup bBin = outputLabel->findGroup("BandBin", Pvl::Traverse); QString filter = pdsLab["FilterName"]; if(filter != "F") { //Band Bin group double center = pdsLab["CenterFilterWavelength"]; center /= 1000.0; - bBin.FindKeyword("Center").SetValue(toString(center), "micrometers"); + bBin.findKeyword("Center").setValue(toString(center), "micrometers"); } double width = pdsLab["Bandwidth"]; width /= 1000.0; - bBin.FindKeyword("Width").SetValue(toString(width), "micrometers"); + bBin.findKeyword("Width").setValue(toString(width), "micrometers"); ocube->putGroup(bBin); //Kernel group diff --git a/isis/src/clementine/apps/clemhirescal/clemhirescal.cpp b/isis/src/clementine/apps/clemhirescal/clemhirescal.cpp index 01b2f5a6a6ad0b01960c037e3ef98536411ecd6f..cd73c2e176861a9c88923edece8f3f1ecdee956c 100644 --- a/isis/src/clementine/apps/clemhirescal/clemhirescal.cpp +++ b/isis/src/clementine/apps/clemhirescal/clemhirescal.cpp @@ -25,7 +25,7 @@ void IsisMain() { // Check for filter type of A-D Pvl *label = input->label(); - QString wave = (QString)label->FindGroup("BandBin", Pvl::Traverse)["FilterName"]; + QString wave = (QString)label->findGroup("BandBin", Pvl::Traverse)["FilterName"]; if((wave != "A") && (wave != "B") && (wave != "C") && (wave != "D")) { QString message = "Invalid FilterName [" + wave + "], can only handle A-D filters"; throw IException(IException::Unknown, message, _FILEINFO_); @@ -38,7 +38,7 @@ void IsisMain() { p.SetInputCube(flatFile, cubeAtt); // Check the offset mode for validity - int index = label->FindGroup("Instrument", Pvl::Traverse)["OffsetModeID"]; + int index = label->findGroup("Instrument", Pvl::Traverse)["OffsetModeID"]; if(index < 0 || index > 5) { QString message = "Invalid OffsetModeID, can only handle offests 0-5"; throw IException(IException::Unknown, message, _FILEINFO_); @@ -54,7 +54,7 @@ void IsisMain() { UserInterface &ui = Application::GetUserInterface(); if(ui.GetString("KFROM").compare("COMPUTED") == 0) { wave = wave.toUpper(); - int MCP = label->FindGroup("Instrument", Pvl::Traverse)["MCPGainModeID"]; + int MCP = label->findGroup("Instrument", Pvl::Traverse)["MCPGainModeID"]; // Two possible MCP gains for filter A if(wave == "A") { if(MCP == 156) { diff --git a/isis/src/clementine/apps/clemnircal/clemnircal.cpp b/isis/src/clementine/apps/clemnircal/clemnircal.cpp index d9066908af2dbc74bec439d9bc9c22b918f308c7..deecab70c887310c283f5e708f888f8c5f9397c1 100644 --- a/isis/src/clementine/apps/clemnircal/clemnircal.cpp +++ b/isis/src/clementine/apps/clemnircal/clemnircal.cpp @@ -119,14 +119,14 @@ void IsisMain() { QString group = "GainModeID"; group += toString(gainModeID); - if(!gainFactorData.HasGroup(group)) { + if(!gainFactorData.hasGroup(group)) { QString err = "The Gain Factor for Gain Mode ID ["; err += toString(gainModeID); err += "] could not be found in clemnircal.def"; throw IException(IException::Programmer, err, _FILEINFO_); } - gainFactor = (gainFactorData.FindGroup(group))["GAIN"]; + gainFactor = (gainFactorData.findGroup(group))["GAIN"]; if(abs(gainFactor) < DBL_EPSILON) { QString err = "The Gain Factor for Gain Mode ID ["; diff --git a/isis/src/clementine/apps/clemuvviscal/clemuvviscal.cpp b/isis/src/clementine/apps/clemuvviscal/clemuvviscal.cpp index 94e5028cd8bb936e66f5262518af538c14d13f76..d6e18ab220b68cf93a168ab4877af38c7524a8b8 100644 --- a/isis/src/clementine/apps/clemuvviscal/clemuvviscal.cpp +++ b/isis/src/clementine/apps/clemuvviscal/clemuvviscal.cpp @@ -86,9 +86,9 @@ void IsisMain() { Cube *ocube = p.SetOutputCube("TO"); - avgFF = uvvisDef.FindGroup("Filter" + filter.toUpper())["AVGFF"]; - cr = uvvisDef.FindGroup("Filter" + filter.toUpper())["CO"]; - gain = uvvisDef.FindGroup(QString("GainModeID") + QString(icube->group("Instrument")["GainModeID"][0]))["GAIN"]; + avgFF = uvvisDef.findGroup("Filter" + filter.toUpper())["AVGFF"]; + cr = uvvisDef.findGroup("Filter" + filter.toUpper())["CO"]; + gain = uvvisDef.findGroup(QString("GainModeID") + QString(icube->group("Instrument")["GainModeID"][0]))["GAIN"]; useDcconst = ui.WasEntered("DCCONST"); if(useDcconst) { diff --git a/isis/src/clementine/objs/HiresCamera/HiresCamera.cpp b/isis/src/clementine/objs/HiresCamera/HiresCamera.cpp index 367f72d427f5418bc52dd97e09beca178e984dc5..493712fe8fd9b475671da04be8b3a72033f7288f 100644 --- a/isis/src/clementine/objs/HiresCamera/HiresCamera.cpp +++ b/isis/src/clementine/objs/HiresCamera/HiresCamera.cpp @@ -47,14 +47,14 @@ namespace Isis { HiresCamera::HiresCamera(Pvl &lab) : FramingCamera(lab) { NaifStatus::CheckErrors(); // Get the camera characteristics - QString filter = (QString)(lab.FindGroup("BandBin", Pvl::Traverse))["FilterName"]; + QString filter = (QString)(lab.findGroup("BandBin", Pvl::Traverse))["FilterName"]; filter = filter.toUpper(); SetFocalLength(); SetPixelPitch(); // Get the start time in et - PvlGroup inst = lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup inst = lab.findGroup("Instrument", Pvl::Traverse); // set variables startTime and exposureDuration double time = iTime((QString)inst["StartTime"]).Et(); diff --git a/isis/src/clementine/objs/HiresCamera/unitTest.cpp b/isis/src/clementine/objs/HiresCamera/unitTest.cpp index 176fd9e5f5786cdb79153f14915ec55bfe0a8f21..c7685ae824cd27059f839c189d4b6802f494920c 100644 --- a/isis/src/clementine/objs/HiresCamera/unitTest.cpp +++ b/isis/src/clementine/objs/HiresCamera/unitTest.cpp @@ -47,7 +47,7 @@ int main(void) { Pvl p("$clementine1/testData/lhd0147b.200.lev1.cub"); HiresCamera *cam = (HiresCamera *) CameraFactory::Create(p); - cout << "FileName: " << FileName(p.FileName()).name() << endl; + cout << "FileName: " << FileName(p.fileName()).name() << endl; cout << "CK Frame: " << cam->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); @@ -60,7 +60,7 @@ int main(void) { cout << "SPK Reference ID = " << cam->SpkReferenceId() << endl << endl; // Test Shutter Open/Close - const PvlGroup &inst = p.FindGroup("Instrument", Pvl::Traverse); + const PvlGroup &inst = p.findGroup("Instrument", Pvl::Traverse); double exposureDuration = ((double) inst["ExposureDuration"])/1000; QString stime = inst["StartTime"]; double et; // StartTime keyword is the center exposure time diff --git a/isis/src/clementine/objs/LwirCamera/LwirCamera.cpp b/isis/src/clementine/objs/LwirCamera/LwirCamera.cpp index 8acf2a35a741c78cdb3d4f921442fa5416c4b231..233aa90361b808ecfe6fd529fb8661beb96e70c3 100644 --- a/isis/src/clementine/objs/LwirCamera/LwirCamera.cpp +++ b/isis/src/clementine/objs/LwirCamera/LwirCamera.cpp @@ -49,14 +49,14 @@ namespace Isis { NaifStatus::CheckErrors(); // Get the camera characteristics - QString filter = (QString)(lab.FindGroup("BandBin", Pvl::Traverse))["FilterName"]; + QString filter = (QString)(lab.findGroup("BandBin", Pvl::Traverse))["FilterName"]; filter = filter.toUpper(); SetFocalLength(); SetPixelPitch(); // Get the start time in et - PvlGroup inst = lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup inst = lab.findGroup("Instrument", Pvl::Traverse); // set variables startTime and exposureDuration double time = iTime((QString)inst["StartTime"]).Et(); diff --git a/isis/src/clementine/objs/LwirCamera/unitTest.cpp b/isis/src/clementine/objs/LwirCamera/unitTest.cpp index 099f6d7ebe832e63081fde9f73f1448bfc7329b5..81af747c291b92b5cdc79c39a036e42daf4df5ab 100644 --- a/isis/src/clementine/objs/LwirCamera/unitTest.cpp +++ b/isis/src/clementine/objs/LwirCamera/unitTest.cpp @@ -47,7 +47,7 @@ int main(void) { Pvl p("$clementine1/testData/lla4263l.153.lev1.cub"); LwirCamera *cam = (LwirCamera *) CameraFactory::Create(p); - cout << "FileName: " << FileName(p.FileName()).name() << endl; + cout << "FileName: " << FileName(p.fileName()).name() << endl; cout << "CK Frame: " << cam->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); @@ -60,7 +60,7 @@ int main(void) { cout << "SPK Reference ID = " << cam->SpkReferenceId() << endl << endl; // Test Shutter Open/Close - const PvlGroup &inst = p.FindGroup("Instrument", Pvl::Traverse); + const PvlGroup &inst = p.findGroup("Instrument", Pvl::Traverse); double exposureDuration = ((double) inst["ExposureDuration"])/1000; QString stime = inst["StartTime"]; double et; // StartTime keyword is the center exposure time diff --git a/isis/src/clementine/objs/NirCamera/NirCamera.cpp b/isis/src/clementine/objs/NirCamera/NirCamera.cpp index 4a15a511a392a4a8ffeeac5761f90fc2475d2273..825030b580a5a62e2b0487c6c411e985a8e62238 100644 --- a/isis/src/clementine/objs/NirCamera/NirCamera.cpp +++ b/isis/src/clementine/objs/NirCamera/NirCamera.cpp @@ -46,7 +46,7 @@ namespace Isis { NirCamera::NirCamera(Pvl &lab) : FramingCamera(lab) { NaifStatus::CheckErrors(); // Get the camera characteristics - QString filter = (QString)(lab.FindGroup("BandBin", Pvl::Traverse))["FilterName"]; + QString filter = (QString)(lab.findGroup("BandBin", Pvl::Traverse))["FilterName"]; filter = filter.toUpper(); if(filter.compare("A") == 0) { @@ -71,7 +71,7 @@ namespace Isis { SetPixelPitch(); // Get the start time in et - PvlGroup inst = lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup inst = lab.findGroup("Instrument", Pvl::Traverse); // set variables startTime and exposureDuration double et = iTime((QString)inst["StartTime"]).Et(); diff --git a/isis/src/clementine/objs/NirCamera/unitTest.cpp b/isis/src/clementine/objs/NirCamera/unitTest.cpp index 1c1d5857ebdfdba02748690b4f642b4aa864d95d..875a942ddc6d81f3b9c3ee438302da99dd712c67 100644 --- a/isis/src/clementine/objs/NirCamera/unitTest.cpp +++ b/isis/src/clementine/objs/NirCamera/unitTest.cpp @@ -47,7 +47,7 @@ int main(void) { Pvl p("$clementine1/testData/lna1391h.cub"); NirCamera *cam = (NirCamera *) CameraFactory::Create(p); - cout << "FileName: " << FileName(p.FileName()).name() << endl; + cout << "FileName: " << FileName(p.fileName()).name() << endl; cout << "CK Frame: " << cam->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); @@ -60,7 +60,7 @@ int main(void) { cout << "SPK Reference ID = " << cam->SpkReferenceId() << endl << endl; // Test Shutter Open/Close - const PvlGroup &inst = p.FindGroup("Instrument", Pvl::Traverse); + const PvlGroup &inst = p.findGroup("Instrument", Pvl::Traverse); double exposureDuration = ((double) inst["ExposureDuration"])/1000; QString stime = inst["StartTime"]; double et; // StartTime keyword is the center exposure time diff --git a/isis/src/clementine/objs/UvvisCamera/UvvisCamera.cpp b/isis/src/clementine/objs/UvvisCamera/UvvisCamera.cpp index 4162d2ea84e04c38203d305586e6cf24db686a83..f1681ac5b3a9609233e4b0252c710fc6a203adf0 100644 --- a/isis/src/clementine/objs/UvvisCamera/UvvisCamera.cpp +++ b/isis/src/clementine/objs/UvvisCamera/UvvisCamera.cpp @@ -48,7 +48,7 @@ namespace Isis { SetPixelPitch(); // Get the start time in et - PvlGroup inst = lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup inst = lab.findGroup("Instrument", Pvl::Traverse); // set variables startTime and exposureDuration double time = iTime((QString)inst["StartTime"]).Et(); diff --git a/isis/src/clementine/objs/UvvisCamera/unitTest.cpp b/isis/src/clementine/objs/UvvisCamera/unitTest.cpp index f94e4d745506f753ec76fd1b765f806597a62d8f..94d687e5d4ba91c739c606cb06d5b463adeffeb3 100644 --- a/isis/src/clementine/objs/UvvisCamera/unitTest.cpp +++ b/isis/src/clementine/objs/UvvisCamera/unitTest.cpp @@ -50,7 +50,7 @@ int main(void) { Pvl p("$clementine1/testData/lub0428b.cub"); UvvisCamera *cam = (UvvisCamera *) CameraFactory::Create(p); - cout << "FileName: " << FileName(p.FileName()).name() << endl; + cout << "FileName: " << FileName(p.fileName()).name() << endl; cout << "CK Frame: " << cam->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); @@ -63,7 +63,7 @@ int main(void) { cout << "SPK Reference ID = " << cam->SpkReferenceId() << endl << endl; // Test Shutter Open/Close - const PvlGroup &inst = p.FindGroup("Instrument", Pvl::Traverse); + const PvlGroup &inst = p.findGroup("Instrument", Pvl::Traverse); double exposureDuration = ((double) inst["ExposureDuration"])/1000; QString stime = inst["StartTime"]; double et; // StartTime keyword is the center exposure time diff --git a/isis/src/control/apps/autoseed/autoseed.cpp b/isis/src/control/apps/autoseed/autoseed.cpp index 51efac034b892f7b9caea1651fd9166028c0921a..0e423bd771cfd790bd335a3f7b5e111419298bc8 100644 --- a/isis/src/control/apps/autoseed/autoseed.cpp +++ b/isis/src/control/apps/autoseed/autoseed.cpp @@ -49,82 +49,82 @@ void IsisMain() { PolygonSeeder *seeder = PolygonSeederFactory::Create(seedDef); Pvl invalidInput = seeder->InvalidInput(); - PvlGroup &unusedDefKeywords = invalidInput.FindGroup( + PvlGroup &unusedDefKeywords = invalidInput.findGroup( "PolygonSeederAlgorithm", Pvl::Traverse); // Get the distance from the edge of an image a measure must be double pixelsFromEdge = -1.0; - if(seedDef.HasKeyword("PixelsFromEdge", Pvl::Traverse)) { - pixelsFromEdge = seedDef.FindKeyword("PixelsFromEdge", Pvl::Traverse); - if(unusedDefKeywords.HasKeyword("PixelsFromEdge")) - unusedDefKeywords.DeleteKeyword("PixelsFromEdge"); + if(seedDef.hasKeyword("PixelsFromEdge", Pvl::Traverse)) { + pixelsFromEdge = seedDef.findKeyword("PixelsFromEdge", Pvl::Traverse); + if(unusedDefKeywords.hasKeyword("PixelsFromEdge")) + unusedDefKeywords.deleteKeyword("PixelsFromEdge"); } // Get the Emission range double minEmission = 0.0; double maxEmission = 180.0; - if(seedDef.HasKeyword("MinEmission", Pvl::Traverse)) { - minEmission = seedDef.FindKeyword("MinEmission", Pvl::Traverse); - if(unusedDefKeywords.HasKeyword("MinEmission")) - unusedDefKeywords.DeleteKeyword("MinEmission"); + if(seedDef.hasKeyword("MinEmission", Pvl::Traverse)) { + minEmission = seedDef.findKeyword("MinEmission", Pvl::Traverse); + if(unusedDefKeywords.hasKeyword("MinEmission")) + unusedDefKeywords.deleteKeyword("MinEmission"); } - if(seedDef.HasKeyword("MaxEmission", Pvl::Traverse)) { - maxEmission = seedDef.FindKeyword("MaxEmission", Pvl::Traverse); - if(unusedDefKeywords.HasKeyword("MaxEmission")) - unusedDefKeywords.DeleteKeyword("MaxEmission"); + if(seedDef.hasKeyword("MaxEmission", Pvl::Traverse)) { + maxEmission = seedDef.findKeyword("MaxEmission", Pvl::Traverse); + if(unusedDefKeywords.hasKeyword("MaxEmission")) + unusedDefKeywords.deleteKeyword("MaxEmission"); } // Get the Incidence range double minIncidence = 0.0; double maxIncidence = 180.0; - if(seedDef.HasKeyword("MinIncidence", Pvl::Traverse)) { - minIncidence = seedDef.FindKeyword("MinIncidence", Pvl::Traverse); - if(unusedDefKeywords.HasKeyword("MinIncidence")) - unusedDefKeywords.DeleteKeyword("MinIncidence"); + if(seedDef.hasKeyword("MinIncidence", Pvl::Traverse)) { + minIncidence = seedDef.findKeyword("MinIncidence", Pvl::Traverse); + if(unusedDefKeywords.hasKeyword("MinIncidence")) + unusedDefKeywords.deleteKeyword("MinIncidence"); } - if(seedDef.HasKeyword("MaxIncidence", Pvl::Traverse)) { - maxIncidence = seedDef.FindKeyword("MaxIncidence", Pvl::Traverse); - if(unusedDefKeywords.HasKeyword("MaxIncidence")) - unusedDefKeywords.DeleteKeyword("MaxIncidence"); + if(seedDef.hasKeyword("MaxIncidence", Pvl::Traverse)) { + maxIncidence = seedDef.findKeyword("MaxIncidence", Pvl::Traverse); + if(unusedDefKeywords.hasKeyword("MaxIncidence")) + unusedDefKeywords.deleteKeyword("MaxIncidence"); } // Get the DN range bool hasDNRestriction = false; double minDN = -DBL_MAX; double maxDN = DBL_MAX; - if(seedDef.HasKeyword("MinDN", Pvl::Traverse)) { - minDN = seedDef.FindKeyword("MinDN", Pvl::Traverse); + if(seedDef.hasKeyword("MinDN", Pvl::Traverse)) { + minDN = seedDef.findKeyword("MinDN", Pvl::Traverse); hasDNRestriction = true; - if(unusedDefKeywords.HasKeyword("MinDN")) - unusedDefKeywords.DeleteKeyword("MinDN"); + if(unusedDefKeywords.hasKeyword("MinDN")) + unusedDefKeywords.deleteKeyword("MinDN"); } - if(seedDef.HasKeyword("MaxDN", Pvl::Traverse)) { - maxDN = seedDef.FindKeyword("MaxDN", Pvl::Traverse); + if(seedDef.hasKeyword("MaxDN", Pvl::Traverse)) { + maxDN = seedDef.findKeyword("MaxDN", Pvl::Traverse); hasDNRestriction = true; - if(unusedDefKeywords.HasKeyword("MaxDN")) - unusedDefKeywords.DeleteKeyword("MaxDN"); + if(unusedDefKeywords.hasKeyword("MaxDN")) + unusedDefKeywords.deleteKeyword("MaxDN"); } // Get the resolution double minResolution = 0.0; double maxResolution = 0.0; - if(seedDef.HasKeyword("MinResolution", Pvl::Traverse)) { - minResolution = seedDef.FindKeyword("MinResolution", Pvl::Traverse); - if(unusedDefKeywords.HasKeyword("MinResolution")) - unusedDefKeywords.DeleteKeyword("MinResolution"); + if(seedDef.hasKeyword("MinResolution", Pvl::Traverse)) { + minResolution = seedDef.findKeyword("MinResolution", Pvl::Traverse); + if(unusedDefKeywords.hasKeyword("MinResolution")) + unusedDefKeywords.deleteKeyword("MinResolution"); } - if(seedDef.HasKeyword("MaxResolution", Pvl::Traverse)) { - maxResolution = seedDef.FindKeyword("MaxResolution", Pvl::Traverse); - if(unusedDefKeywords.HasKeyword("MaxResolution")) - unusedDefKeywords.DeleteKeyword("MaxResolution"); + if(seedDef.hasKeyword("MaxResolution", Pvl::Traverse)) { + maxResolution = seedDef.findKeyword("MaxResolution", Pvl::Traverse); + if(unusedDefKeywords.hasKeyword("MaxResolution")) + unusedDefKeywords.deleteKeyword("MaxResolution"); } // Get seed domain for unit conversion, no keyword == XY SeedDomain seedDomain = XY; - if(seedDef.HasKeyword("SeedDomain", Pvl::Traverse)) { - IString domain = (QString) seedDef.FindKeyword("SeedDomain", Pvl::Traverse); - if(unusedDefKeywords.HasKeyword("SeedDomain")) - unusedDefKeywords.DeleteKeyword("SeedDomain"); + if(seedDef.hasKeyword("SeedDomain", Pvl::Traverse)) { + IString domain = (QString) seedDef.findKeyword("SeedDomain", Pvl::Traverse); + if(unusedDefKeywords.hasKeyword("SeedDomain")) + unusedDefKeywords.deleteKeyword("SeedDomain"); if(domain.UpCase() == "SAMPLELINE") { seedDomain = SampleLine; @@ -143,12 +143,12 @@ void IsisMain() { // Construct a Projection for converting between Lon/Lat and X/Y // This is used inside the seeding algorithms. // Note: Should this be an option to include this in the program? - PvlGroup inst = cubeLab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup inst = cubeLab.findGroup("Instrument", Pvl::Traverse); QString target = inst["TargetName"]; PvlGroup radii = Projection::TargetRadii(target); Isis::Pvl maplab; - maplab.AddGroup(Isis::PvlGroup("Mapping")); - Isis::PvlGroup &mapGroup = maplab.FindGroup("Mapping"); + maplab.addGroup(Isis::PvlGroup("Mapping")); + Isis::PvlGroup &mapGroup = maplab.findGroup("Mapping"); mapGroup += Isis::PvlKeyword("EquatorialRadius", (QString)radii["EquatorialRadius"]); mapGroup += Isis::PvlKeyword("PolarRadius", (QString)radii["PolarRadius"]); mapGroup += Isis::PvlKeyword("LatitudeType", "Planetocentric"); @@ -295,7 +295,7 @@ void IsisMain() { } errorNum ++; - errors << e.toPvl().Group(0).FindKeyword("Message")[0]; + errors << e.toPvl().group(0).findKeyword("Message")[0]; for(int serNum = 0; serNum < overlaps[ov]->Size(); serNum++) { if(serNum == 0) { errors << ": "; @@ -474,14 +474,14 @@ void IsisMain() { // create SeedDef group and add to print.prt PvlGroup pluginInfo = seeder->PluginParameters("SeedDefinition"); - pluginInfo.AddKeyword(PvlKeyword("MaxIncidence", toString(maxIncidence))); - pluginInfo.AddKeyword(PvlKeyword("MaxEmission", toString(maxEmission))); + pluginInfo.addKeyword(PvlKeyword("MaxIncidence", toString(maxIncidence))); + pluginInfo.addKeyword(PvlKeyword("MaxEmission", toString(maxEmission))); Application::Log(pluginInfo); // inform user of any unused (invalid) keywords found in the def file - if(unusedDefKeywords.Keywords() != 0) { + if(unusedDefKeywords.keywords() != 0) { PvlGroup unusedKeywords(unusedDefKeywords); - unusedKeywords.SetName("InvalidKeyordsFoundInDefFile"); + unusedKeywords.setName("InvalidKeyordsFoundInDefFile"); Application::Log(unusedKeywords); } @@ -499,10 +499,10 @@ void IsisMain() { PvlKeyword cmIgnoredCountKeyword("ControlMeasuresIgnored", toString(cmIgnoredCount)); PvlGroup resultsGrp("Results"); - resultsGrp.AddKeyword(cpCountKeyword); - resultsGrp.AddKeyword(msCountKeyword); - resultsGrp.AddKeyword(cpIgnoredCountKeyword); - resultsGrp.AddKeyword(cmIgnoredCountKeyword); + resultsGrp.addKeyword(cpCountKeyword); + resultsGrp.addKeyword(msCountKeyword); + resultsGrp.addKeyword(cpIgnoredCountKeyword); + resultsGrp.addKeyword(cmIgnoredCountKeyword); Application::Log(resultsGrp); diff --git a/isis/src/control/apps/cnet2mat/cnet2mat.cpp b/isis/src/control/apps/cnet2mat/cnet2mat.cpp index ddf5476bee5a530786e9bd49e2850b37ba99a862..faf8a70f1acc973353397082df0376f7b93bc30e 100644 --- a/isis/src/control/apps/cnet2mat/cnet2mat.cpp +++ b/isis/src/control/apps/cnet2mat/cnet2mat.cpp @@ -34,13 +34,13 @@ void IsisMain() { for (int f = 0; f < list2.size(); f++) { QString currFile(list2[f].toString()); Pvl lab(currFile); - PvlObject qube(lab.FindObject("QUBE")); + PvlObject qube(lab.findObject("QUBE")); QString fsc; - if(qube.HasKeyword("IMAGE_NUMBER")) { - fsc = qube.FindKeyword("IMAGE_NUMBER")[0]; + if(qube.hasKeyword("IMAGE_NUMBER")) { + fsc = qube.findKeyword("IMAGE_NUMBER")[0]; } - else if(qube.HasKeyword("IMAGE_ID")) { - fsc = qube.FindKeyword("IMAGE_ID")[0]; + else if(qube.hasKeyword("IMAGE_ID")) { + fsc = qube.findKeyword("IMAGE_ID")[0]; } else { QString msg = "Unable to find keyword [\"IMAGE_NUMBER\" or \"IMAGE_ID\"] in file ["; diff --git a/isis/src/control/apps/cnetadd/cnetadd.cpp b/isis/src/control/apps/cnetadd/cnetadd.cpp index da77f0f5d9bed0ee7eea96153652e607fc06cfa6..4d6fa537eb6efa83f8f5db0a5e7bb97960e84217 100644 --- a/isis/src/control/apps/cnetadd/cnetadd.cpp +++ b/isis/src/control/apps/cnetadd/cnetadd.cpp @@ -65,7 +65,7 @@ void IsisMain() { logFile = ui.GetFileName("LOG"); } Pvl results; - results.SetName("cnetadd_Results"); + results.setName("cnetadd_Results"); PvlKeyword added("FilesAdded"); PvlKeyword omitted("FilesOmitted"); PvlKeyword pointsModified("PointsModified"); @@ -95,7 +95,7 @@ void IsisMain() { // Check for duplicate SNs accross the lists if (fromSerials->HasSerialNumber(addSerials.SerialNumber(i))) { - duplicates.AddValue(addSerials.FileName(i)); + duplicates.addValue(addSerials.FileName(i)); } // Check for duplicate SNs within the addlist @@ -250,7 +250,7 @@ void IsisMain() { if (log) { PvlKeyword &logKeyword = (imageAdded) ? added : omitted; - logKeyword.AddValue(addList[img].baseName()); + logKeyword.addValue(addList[img].baseName()); } progress.CheckStatus(); @@ -262,14 +262,14 @@ void IsisMain() { for (int i = 0; i < modifiedPointsList.size(); i++) pointsModified += modifiedPointsList[i]; - results.AddKeyword(added); - results.AddKeyword(omitted); - results.AddKeyword(pointsModified); - if (duplicates.Size() > 0) { - results.AddKeyword(duplicates); + results.addKeyword(added); + results.addKeyword(omitted); + results.addKeyword(pointsModified); + if (duplicates.size() > 0) { + results.addKeyword(duplicates); } - results.Write(logFile.expanded()); + results.write(logFile.expanded()); } // List the modified points diff --git a/isis/src/control/apps/cnetcheck/cnetcheck.cpp b/isis/src/control/apps/cnetcheck/cnetcheck.cpp index c6fa7c277fd0078fb5b253b97a70cd1eddb012b4..5f56a907dc85d1234706c155f1a40e0f2d101cf2 100644 --- a/isis/src/control/apps/cnetcheck/cnetcheck.cpp +++ b/isis/src/control/apps/cnetcheck/cnetcheck.cpp @@ -241,7 +241,7 @@ void IsisMain() { stringstream ss(stringstream::in | stringstream::out); - results.AddKeyword(PvlKeyword("Islands", toString((BigInt)islands.size()))); + results.addKeyword(PvlKeyword("Islands", toString((BigInt)islands.size()))); ss << endl << "----------------------------------------" \ "----------------------------------------" << endl; if (islands.size() == 1) { @@ -257,7 +257,7 @@ void IsisMain() { } if (ui.GetBoolean("SINGLEMEASURE") && singleMeasureSerialNumbers.size() > 0) { - results.AddKeyword( + results.addKeyword( PvlKeyword("SingleMeasure", toString((BigInt)singleMeasureSerialNumbers.size()))); QString name(FileName(prefix + "SinglePointCubes.txt").expanded()); @@ -275,7 +275,7 @@ void IsisMain() { } if (ui.GetBoolean("NOLATLON") && noLatLonSerialNumbers.size() > 0) { - results.AddKeyword( + results.addKeyword( PvlKeyword("NoLatLonCubes", toString((BigInt)noLatLonSerialNumbers.size()))); QString name(FileName(prefix + "NoLatLon.txt").expanded()); @@ -331,7 +331,7 @@ void IsisMain() { ss << "The names of these images, along with the failing convex hull " "coverages, are listed in [" << FileName(name).name() << "]" << endl; - results.AddKeyword( + results.addKeyword( PvlKeyword(coverageOp, toString((BigInt) failedCoverageCheck))); } } @@ -339,7 +339,7 @@ void IsisMain() { // At this point, inListNums is the list of cubes NOT included in the // ControlNet, and inListNums are their those cube's serial numbers. if (ui.GetBoolean("NOCONTROL") && !inListNums.empty()) { - results.AddKeyword(PvlKeyword("NoControl", toString((BigInt)inListNums.size()))); + results.addKeyword(PvlKeyword("NoControl", toString((BigInt)inListNums.size()))); QString name(FileName(prefix + "NoControl.txt").expanded()); ofstream out_stream; @@ -366,7 +366,7 @@ void IsisMain() { // ControlMeasures in the ControlNet that do not have a correlating // cube in the input list. if (ui.GetBoolean("NOCUBE") && nonListedSerialNumbers.size() > 0) { - results.AddKeyword( + results.addKeyword( PvlKeyword("NoCube", toString((BigInt)nonListedSerialNumbers.size()))); QString name(FileName(prefix + "NoCube.txt").expanded()); @@ -408,7 +408,7 @@ void IsisMain() { } if (singleMeasureCubes.size() > 0) { - results.AddKeyword( + results.addKeyword( PvlKeyword("SingleCube", toString((BigInt)singleMeasureCubes.size()))); QString name(FileName(prefix + "SingleCube.txt").expanded()); diff --git a/isis/src/control/apps/cnetdiff/cnetdiff.cpp b/isis/src/control/apps/cnetdiff/cnetdiff.cpp index 83b54acb348742b1767e3d692c0f24ca8ed16bfe..67c030a55ab71dc121f88483f816b8b2aa643968 100644 --- a/isis/src/control/apps/cnetdiff/cnetdiff.cpp +++ b/isis/src/control/apps/cnetdiff/cnetdiff.cpp @@ -49,18 +49,18 @@ void IsisMain() { if(ui.WasEntered("DIFF")) { Pvl diffFile(ui.GetFileName("DIFF")); - if(diffFile.HasGroup("Tolerances")) { - tolerances = diffFile.FindGroup("Tolerances"); + if(diffFile.hasGroup("Tolerances")) { + tolerances = diffFile.findGroup("Tolerances"); } - if(diffFile.HasGroup("IgnoreKeys")) { - ignorekeys = diffFile.FindGroup("IgnoreKeys"); + if(diffFile.hasGroup("IgnoreKeys")) { + ignorekeys = diffFile.findGroup("IgnoreKeys"); } } // Don't want to consider the DateTime of a Point or Measure was set by // default. - if(!ignorekeys.HasKeyword("DateTime")) { + if(!ignorekeys.hasKeyword("DateTime")) { ignorekeys += PvlKeyword("DateTime", "true"); } @@ -82,8 +82,8 @@ void IsisMain() { if(ui.WasEntered("TO")) { Pvl out; - out.AddGroup(differences); - out.Write(ui.GetFileName("TO")); + out.addGroup(differences); + out.write(ui.GetFileName("TO")); } differenceReason = ""; @@ -99,16 +99,16 @@ void IsisMain() { } Pvl results = differencer.compare(f1, f2); - if (ui.WasEntered("TO")) results.Write(ui.GetFileName("TO")); + if (ui.WasEntered("TO")) results.write(ui.GetFileName("TO")); PvlGroup log("Results"); // Get a count of all the differences: just the keywords at the object level // (network data) and the number of objects (different points). Ignore the // FileName keyword as it's a superficial difference. - PvlObject &differences = results.FindObject("Differences"); - int count = differences.Objects() + differences.Keywords(); - if (differences.HasKeyword("Filename")) count--; + PvlObject &differences = results.findObject("Differences"); + int count = differences.objects() + differences.keywords(); + if (differences.hasKeyword("Filename")) count--; log += PvlKeyword("Compare", count > 0 ? "Different" : "Identical"); Application::Log(log); @@ -116,14 +116,14 @@ void IsisMain() { } void Compare(LatestControlNetFile *net1, LatestControlNetFile *net2) { - Pvl net1Pvl(net1->ToPvl()); - Pvl net2Pvl(net2->ToPvl()); + Pvl net1Pvl(net1->toPvl()); + Pvl net2Pvl(net2->toPvl()); - PvlObject &net1Obj = net1Pvl.FindObject("ControlNetwork"); - PvlObject &net2Obj = net2Pvl.FindObject("ControlNetwork"); + PvlObject &net1Obj = net1Pvl.findObject("ControlNetwork"); + PvlObject &net2Obj = net2Pvl.findObject("ControlNetwork"); - BigInt net1NumPts = net1Obj.Objects(); - BigInt net2NumPts = net2Obj.Objects(); + BigInt net1NumPts = net1Obj.objects(); + BigInt net2NumPts = net2Obj.objects(); if(net1NumPts != net2NumPts) { differenceReason = "The number of control points in the networks, [" + @@ -161,8 +161,8 @@ void Compare(LatestControlNetFile *net1, LatestControlNetFile *net2) { // qSort(net2Points); for(int cpIndex = 0; cpIndex < net1NumPts; cpIndex ++) { - PvlObject &cp1 = net1Obj.Object(cpIndex); - PvlObject &cp2 = net2Obj.Object(cpIndex); + PvlObject &cp1 = net1Obj.object(cpIndex); + PvlObject &cp2 = net2Obj.object(cpIndex); Compare(cp1, cp2); @@ -174,26 +174,26 @@ void Compare(LatestControlNetFile *net1, LatestControlNetFile *net2) { void Compare(const PvlObject &point1Pvl, const PvlObject &point2Pvl) { // both names must be at least equal, should be named ControlPoint - if(point1Pvl.Name() != point2Pvl.Name()) { + if(point1Pvl.name() != point2Pvl.name()) { QString msg = "The control points' CreatePvlOject method returned an " "unexpected result"; throw IException(IException::Programmer, msg, _FILEINFO_); } - if(point1Pvl.Groups() != point2Pvl.Groups()) { + if(point1Pvl.groups() != point2Pvl.groups()) { filesMatch = false; differenceReason = "The number of control measures, [" + - toString(point1Pvl.Groups()) + "] and [" + - toString(point2Pvl.Groups()) + "] does not match"; + toString(point1Pvl.groups()) + "] and [" + + toString(point2Pvl.groups()) + "] does not match"; } // Start by comparing top level control point keywords. if(filesMatch) CompareGroups(point1Pvl, point2Pvl); // Now compare each measure - for(int cmIndex = 0; filesMatch && cmIndex < point1Pvl.Groups(); cmIndex ++) { - const PvlGroup &measure1 = point1Pvl.Group(cmIndex); - const PvlGroup &measure2 = point2Pvl.Group(cmIndex); + for(int cmIndex = 0; filesMatch && cmIndex < point1Pvl.groups(); cmIndex ++) { + const PvlGroup &measure1 = point1Pvl.group(cmIndex); + const PvlGroup &measure2 = point2Pvl.group(cmIndex); CompareGroups(measure1, measure2); @@ -215,30 +215,30 @@ void CompareGroups(const PvlContainer &pvl1, const PvlContainer &pvl2) { PvlGroup point1FullKeys; PvlGroup point2FullKeys; - for(int keywordIndex = 0; keywordIndex < pvl1.Keywords(); keywordIndex++) { + for(int keywordIndex = 0; keywordIndex < pvl1.keywords(); keywordIndex++) { PvlKeyword thisKey = pvl1[keywordIndex]; point1FullKeys += thisKey; - if(!pvl2.HasKeyword(thisKey.Name())) { - point2FullKeys += PvlKeyword(thisKey.Name(), ""); + if(!pvl2.hasKeyword(thisKey.name())) { + point2FullKeys += PvlKeyword(thisKey.name(), ""); } } - for(int keywordIndex = 0; keywordIndex < pvl2.Keywords(); keywordIndex++) { + for(int keywordIndex = 0; keywordIndex < pvl2.keywords(); keywordIndex++) { PvlKeyword thisKey = pvl2[keywordIndex]; point2FullKeys += thisKey; - if(!pvl1.HasKeyword(thisKey.Name())) { - point1FullKeys += PvlKeyword(thisKey.Name(), ""); + if(!pvl1.hasKeyword(thisKey.name())) { + point1FullKeys += PvlKeyword(thisKey.name(), ""); } } // Now compare the PvlGroups for(int keywordIndex = 0; - keywordIndex < point1FullKeys.Keywords(); + keywordIndex < point1FullKeys.keywords(); keywordIndex++) { PvlKeyword key1 = point1FullKeys[keywordIndex]; - PvlKeyword key2 = point2FullKeys[key1.Name()]; + PvlKeyword key2 = point2FullKeys[key1.name()]; CompareKeywords(key1, key2); } } @@ -246,71 +246,71 @@ void CompareGroups(const PvlContainer &pvl1, const PvlContainer &pvl2) { void CompareKeywords(const PvlKeyword &pvl1, const PvlKeyword &pvl2) { - if(pvl1.Name().compare(pvl2.Name()) != 0) { + if(pvl1.name().compare(pvl2.name()) != 0) { QString msg = "CompareKeywords should always be called with keywords that " "have the same name"; throw IException(IException::Programmer, msg, _FILEINFO_); } - if(pvl1.Size() != pvl2.Size()) { + if(pvl1.size() != pvl2.size()) { filesMatch = false; - differenceReason = "Value '" + pvl1.Name() + "' array size does not match."; + differenceReason = "Value '" + pvl1.name() + "' array size does not match."; return; } - if(tolerances.HasKeyword(pvl1.Name()) && - tolerances[pvl1.Name()].Size() > 1 && - pvl1.Size() != tolerances[pvl1.Name()].Size()) { - QString msg = "Size of value '" + pvl1.Name() + "' does not match with "; + if(tolerances.hasKeyword(pvl1.name()) && + tolerances[pvl1.name()].size() > 1 && + pvl1.size() != tolerances[pvl1.name()].size()) { + QString msg = "Size of value '" + pvl1.name() + "' does not match with "; msg += "its number of tolerances in the DIFF file."; throw IException(IException::User, msg, _FILEINFO_); } - if(ignorekeys.HasKeyword(pvl1.Name()) && - ignorekeys[pvl1.Name()].Size() > 1 && - pvl1.Size() != ignorekeys[pvl1.Name()].Size()) { - QString msg = "Size of value '" + pvl1.Name() + "' does not match with "; + if(ignorekeys.hasKeyword(pvl1.name()) && + ignorekeys[pvl1.name()].size() > 1 && + pvl1.size() != ignorekeys[pvl1.name()].size()) { + QString msg = "Size of value '" + pvl1.name() + "' does not match with "; msg += "its number of ignore keys in the DIFF file."; throw IException(IException::User, msg, _FILEINFO_); } - for(int i = 0; i < pvl1.Size() && filesMatch; i++) { + for(int i = 0; i < pvl1.size() && filesMatch; i++) { QString val1 = pvl1[i]; QString val2 = pvl2[i]; - QString unit1 = pvl1.Unit(i); - QString unit2 = pvl2.Unit(i); + QString unit1 = pvl1.unit(i); + QString unit2 = pvl2.unit(i); int ignoreIndex = 0; - if(ignorekeys.HasKeyword(pvl1.Name()) && ignorekeys[pvl1.Name()].Size() > 1) { + if(ignorekeys.hasKeyword(pvl1.name()) && ignorekeys[pvl1.name()].size() > 1) { ignoreIndex = i; } try { - if(!ignorekeys.HasKeyword(pvl1.Name()) || - ignorekeys[pvl1.Name()][ignoreIndex] == "false") { + if(!ignorekeys.hasKeyword(pvl1.name()) || + ignorekeys[pvl1.name()][ignoreIndex] == "false") { if(unit1.toLower() != unit2.toLower()) { filesMatch = false; - differenceReason = "Value '" + pvl1.Name() + "': units do not match."; + differenceReason = "Value '" + pvl1.name() + "': units do not match."; return; } double tolerance = 0.0; double difference = abs(toDouble(val1) - toDouble(val2)); - if(tolerances.HasKeyword(pvl1.Name())) { - tolerance = toDouble((tolerances[pvl1.Name()].Size() == 1) ? - tolerances[pvl1.Name()][0] : tolerances[pvl1.Name()][i]); + if(tolerances.hasKeyword(pvl1.name())) { + tolerance = toDouble((tolerances[pvl1.name()].size() == 1) ? + tolerances[pvl1.name()][0] : tolerances[pvl1.name()][i]); } if(difference > tolerance) { filesMatch = false; - if(pvl1.Size() == 1) { - differenceReason = "Value [" + pvl1.Name() + "] difference is " + + if(pvl1.size() == 1) { + differenceReason = "Value [" + pvl1.name() + "] difference is " + toString(difference); } else { - differenceReason = "Value [" + pvl1.Name() + "] at index " + + differenceReason = "Value [" + pvl1.name() + "] at index " + toString(i) + ": difference is " + toString(difference); } differenceReason += " (values are [" + val1 + "] and [" + @@ -321,7 +321,7 @@ void CompareKeywords(const PvlKeyword &pvl1, const PvlKeyword &pvl2) { catch(IException &e) { if(val1.toLower() != val2.toLower()) { filesMatch = false; - differenceReason = "Value '" + pvl1.Name() + "': values do not match."; + differenceReason = "Value '" + pvl1.name() + "': values do not match."; } } } diff --git a/isis/src/control/apps/cnetedit/cnetedit.cpp b/isis/src/control/apps/cnetedit/cnetedit.cpp index 11725d282f868822d9f0bff54d38333973fd84ba..b3fc08fb4b8c479d2d31750989eb621d9bcc557a 100644 --- a/isis/src/control/apps/cnetedit/cnetedit.cpp +++ b/isis/src/control/apps/cnetedit/cnetedit.cpp @@ -252,9 +252,9 @@ void IsisMain() { Pvl defFile(ui.GetFileName("DEFFILE")); Pvl pvlTemplate("$ISIS3DATA/base/templates/cnet_validmeasure/validmeasure.def"); Pvl pvlResults; - pvlTemplate.ValidatePvl(defFile, pvlResults); - if (pvlResults.Groups() > 0 || pvlResults.Keywords() > 0) { - Application::Log(pvlResults.Group(0)); + pvlTemplate.validatePvl(defFile, pvlResults); + if (pvlResults.groups() > 0 || pvlResults.keywords() > 0) { + Application::Log(pvlResults.group(0)); QString sErrMsg = "Invalid Deffile\n"; throw IException(IException::User, sErrMsg, _FILEINFO_); } @@ -274,7 +274,7 @@ void IsisMain() { } // Log the DEFFILE to the print file - Application::Log(defFile.FindGroup("ValidMeasure", Pvl::Traverse)); + Application::Log(defFile.findGroup("ValidMeasure", Pvl::Traverse)); } } @@ -288,25 +288,25 @@ void IsisMain() { if (keepLog) { Pvl outputLog; - outputLog.AddKeyword(PvlKeyword("PointsDeleted", toString(numPointsDeleted))); - outputLog.AddKeyword(PvlKeyword("MeasuresDeleted", toString(numMeasuresDeleted))); + outputLog.addKeyword(PvlKeyword("PointsDeleted", toString(numPointsDeleted))); + outputLog.addKeyword(PvlKeyword("MeasuresDeleted", toString(numMeasuresDeleted))); PvlObject lockedLog = createLog( "EditLocked", editLockedPoints, editLockedMeasures); - outputLog.AddObject(lockedLog); + outputLog.addObject(lockedLog); - outputLog.AddObject(createLog("RetainedReferences", retainedReferences)); + outputLog.addObject(createLog("RetainedReferences", retainedReferences)); // Depending on whether the user chose to delete ignored points and // measures, the log will either contain reasons for being ignored, or // reasons for being deleted PvlObject ignoredLog = createLog( deleteIgnored ? "Deleted" : "Ignored", ignoredPoints, ignoredMeasures); - outputLog.AddObject(ignoredLog); + outputLog.addObject(ignoredLog); // Write the log QString logFileName = ui.GetFileName("LOG"); - outputLog.Write(logFileName); + outputLog.write(logFileName); // Delete the structures keeping track of the ignored points and measures delete ignoredPoints; @@ -960,13 +960,13 @@ void logResult(QMap *measuresLog, // If the map already has a group for the given Point ID, simply add the // new measure to it PvlGroup &pointGroup = (*measuresLog)[pointId]; - pointGroup.AddKeyword(measureMessage); + pointGroup.addKeyword(measureMessage); } else { // Else there is no group for the Point ID of the measure being ignored, // so make a new group, add the measure, and insert it into the map PvlGroup pointGroup(pointId); - pointGroup.AddKeyword(measureMessage); + pointGroup.addKeyword(measureMessage); (*measuresLog)[pointId] = pointGroup; } } @@ -979,7 +979,7 @@ PvlObject createLog(QString label, QMap *pointsMap) { QList pointIds = pointsMap->keys(); for (int i = 0; i < pointIds.size(); i++) { QString pointId = pointIds.at(i); - pointsLog.AddKeyword(PvlKeyword(pointId, (*pointsMap)[pointId])); + pointsLog.addKeyword(PvlKeyword(pointId, (*pointsMap)[pointId])); } return pointsLog; @@ -992,16 +992,16 @@ PvlObject createLog(QString label, PvlObject editLog(label); PvlObject pointsLog = createLog("Points", pointsMap); - editLog.AddObject(pointsLog); + editLog.addObject(pointsLog); // Get all the groups of measures from the map PvlObject measuresLog("Measures"); QList measureGroups = measuresMap->values(); for (int i = 0; i < measureGroups.size(); i++) - measuresLog.AddGroup(measureGroups.at(i)); + measuresLog.addGroup(measureGroups.at(i)); - editLog.AddObject(measuresLog); + editLog.addObject(measuresLog); return editLog; } @@ -1014,7 +1014,7 @@ void PrintTemp() { // Get template PVL Pvl userTemp; - userTemp.Read(ui.GetFileName("DEFFILE")); + userTemp.read(ui.GetFileName("DEFFILE")); // Write template file out to the log Isis::Application::GuiLog(userTemp); diff --git a/isis/src/control/apps/cnetextract/cnetextract.cpp b/isis/src/control/apps/cnetextract/cnetextract.cpp index d7251b97f30b7651bd4aa0ff5019d1598df6669e..d29620735e72979c99daf048c4d6078942f62ef2 100644 --- a/isis/src/control/apps/cnetextract/cnetextract.cpp +++ b/isis/src/control/apps/cnetextract/cnetextract.cpp @@ -320,10 +320,10 @@ void IsisMain() { PvlGroup summary("ResultSummary"); PvlGroup results("Results"); - summary.AddKeyword(PvlKeyword("InputPoints", toString(inputPoints))); - summary.AddKeyword(PvlKeyword("InputMeasures", toString(inputMeasures))); - summary.AddKeyword(PvlKeyword("OutputPoints", toString(outputPoints))); - summary.AddKeyword(PvlKeyword("OutputMeasures", toString(outputMeasures))); + summary.addKeyword(PvlKeyword("InputPoints", toString(inputPoints))); + summary.addKeyword(PvlKeyword("InputMeasures", toString(inputMeasures))); + summary.addKeyword(PvlKeyword("OutputPoints", toString(outputPoints))); + summary.addKeyword(PvlKeyword("OutputMeasures", toString(outputMeasures))); if (outputPoints != 0) { // Write the filenames associated with outNet @@ -339,13 +339,13 @@ void IsisMain() { outProgress.CheckStatus(); } else { - summary.AddComment("The output control network file, [" + summary.addComment("The output control network file, [" + ui.GetFileName("ONET") + "], was not created. " "The provided filters have resulted in no points or " "measures extracted."); if (ui.WasEntered("TOLIST")) { - summary.AddComment("The output cube list file, [" + summary.addComment("The output cube list file, [" + ui.GetFileName("TOLIST") + "], was not created. " "The provided filters have resulted in an empty" @@ -355,43 +355,43 @@ void IsisMain() { if(noIgnore) { - summary.AddKeyword(PvlKeyword("IgnoredPoints", toString((int)ignoredPoints.size()))); - summary.AddKeyword(PvlKeyword("IgnoredMeasures", toString((int)ignoredMeasures.size()))); + summary.addKeyword(PvlKeyword("IgnoredPoints", toString((int)ignoredPoints.size()))); + summary.addKeyword(PvlKeyword("IgnoredMeasures", toString((int)ignoredMeasures.size()))); } if(noSingleMeasure) { - summary.AddKeyword(PvlKeyword("SingleMeasurePoints", toString((int)singleMeasurePoints.size()))); + summary.addKeyword(PvlKeyword("SingleMeasurePoints", toString((int)singleMeasurePoints.size()))); } if(noMeasureless) { - summary.AddKeyword(PvlKeyword("MeasurelessPoints", toString((int)measurelessPoints.size()))); + summary.addKeyword(PvlKeyword("MeasurelessPoints", toString((int)measurelessPoints.size()))); } if(noTolerancePoints) { - summary.AddKeyword(PvlKeyword("TolerancePoints", toString((int)tolerancePoints.size()))); + summary.addKeyword(PvlKeyword("TolerancePoints", toString((int)tolerancePoints.size()))); } if(reference) { - summary.AddKeyword(PvlKeyword("NonReferenceMeasures", toString((int)nonReferenceMeasures.size()))); + summary.addKeyword(PvlKeyword("NonReferenceMeasures", toString((int)nonReferenceMeasures.size()))); } if(fixed) { - summary.AddKeyword(PvlKeyword("NonFixedPoints", toString((int)nonFixedPoints.size()))); + summary.addKeyword(PvlKeyword("NonFixedPoints", toString((int)nonFixedPoints.size()))); } if(cubePoints) { - summary.AddKeyword(PvlKeyword("NonCubePoints", toString((int)nonCubePoints.size()))); + summary.addKeyword(PvlKeyword("NonCubePoints", toString((int)nonCubePoints.size()))); } // This is commented out since this does not correspond to any filters or the // documentation of this application. I did not delete the code in case we find // that we need it later. J.Backer 2012-06-22 // // if(noMeasurePoints.size() != 0) { -// summary.AddKeyword(PvlKeyword("NoCubeMeasure", toString((int)noMeasurePoints.size()))); +// summary.addKeyword(PvlKeyword("NoCubeMeasure", toString((int)noMeasurePoints.size()))); // } if(cubeMeasures) { - summary.AddKeyword(PvlKeyword("NonCubeMeasures", toString((int)noCubeMeasures.size()))); + summary.addKeyword(PvlKeyword("NonCubeMeasures", toString((int)noCubeMeasures.size()))); } if(pointsEntered) { - summary.AddKeyword(PvlKeyword("NonListedPoints", toString((int)nonListedPoints.size()))); + summary.addKeyword(PvlKeyword("NonListedPoints", toString((int)nonListedPoints.size()))); } if(latLon) { - summary.AddKeyword(PvlKeyword("LatLonOutOfRange", toString((int)nonLatLonPoints.size()))); - summary.AddKeyword(PvlKeyword("NoLatLonPoints", toString((int)cannotGenerateLatLonPoints.size()))); + summary.addKeyword(PvlKeyword("LatLonOutOfRange", toString((int)nonLatLonPoints.size()))); + summary.addKeyword(PvlKeyword("NoLatLonPoints", toString((int)cannotGenerateLatLonPoints.size()))); } outProgress.CheckStatus(); @@ -404,7 +404,7 @@ void IsisMain() { Progress resultsProgress; if(ui.WasEntered("PREFIX")) { if (outputPoints == inputPoints && outputMeasures == inputMeasures) { - results.AddComment("No filter reports were created since all points and " + results.addComment("No filter reports were created since all points and " "measures from the input control network were " "extracted into the output control network."); } @@ -498,7 +498,7 @@ void IsisMain() { WriteResults(namegen, cannotGenerateLatLonPoints, results); } - results.AddComment("Each keyword represents a filter parameter used. " + results.addComment("Each keyword represents a filter parameter used. " "Check the documentation for specific keyword descriptions."); } Application::Log(results); @@ -770,7 +770,7 @@ void WriteCubeOutList(ControlNet cnet, } // Don't create file if it will be empty if (outputsn.size() == 0) { - summary.AddComment("The output cube list file, [" + summary.addComment("The output cube list file, [" + ui.GetFileName("TOLIST") + "], was not created. " "The provided filters have resulted in an empty" @@ -811,7 +811,7 @@ void WriteResults(QString filename, // if no points or measures are being extracted, // we will not create the filter report. if(notExtracted.size() == 0) { - results.AddComment("The output report ["+ filename +"] was not created. " + results.addComment("The output report ["+ filename +"] was not created. " "The corresponding filter found no points/measures that " "would not be extracted."); return; @@ -828,7 +828,7 @@ void WriteResults(QString filename, } out_stream.close(); - results.AddKeyword(PvlKeyword("ReportCreated", filename)); + results.addKeyword(PvlKeyword("ReportCreated", filename)); return; } diff --git a/isis/src/control/apps/cnethist/cnethist.cpp b/isis/src/control/apps/cnethist/cnethist.cpp index 1d5a5dc8e32ddc23323699ace19d19a1305df376..0ac251a583c396f4d9c63bc85031ebfe5925006c 100644 --- a/isis/src/control/apps/cnethist/cnethist.cpp +++ b/isis/src/control/apps/cnethist/cnethist.cpp @@ -102,8 +102,8 @@ void IsisMain() { if (ui.WasEntered("TO")) //add the msg to the output file if there is one fout << msg << endl << endl << endl; - Application::Log(e.toPvl().FindGroup("Error")); - Application::Log(IException(IException::User,msg, _FILEINFO_).toPvl().FindGroup("Error")); + Application::Log(e.toPvl().findGroup("Error")); + Application::Log(IException(IException::User,msg, _FILEINFO_).toPvl().findGroup("Error")); continue; //skip to the next next net file } diff --git a/isis/src/control/apps/cnetmerge/cnetmerge.cpp b/isis/src/control/apps/cnetmerge/cnetmerge.cpp index f27e69fa357e55b52323903a0df14391d00057c0..762710f08c2c0240d117d7f5d5ff522993e31e1f 100644 --- a/isis/src/control/apps/cnetmerge/cnetmerge.cpp +++ b/isis/src/control/apps/cnetmerge/cnetmerge.cpp @@ -146,8 +146,8 @@ void IsisMain() { // If the user wishes to report on conflicts, write them out to a file if (report) { Pvl outPvl; - outPvl.AddObject(conflictLog); - outPvl.Write(logName); + outPvl.addObject(conflictLog); + outPvl.write(logName); } // Writes out the final Control Net @@ -176,11 +176,11 @@ ControlNet * mergeNetworks(FileList &filelist, PvlObject &conflictLog, if (report) { PvlObject duplicate("Duplicate"); - duplicate.AddKeyword(PvlKeyword("PointId", point->GetId())); - duplicate.AddKeyword(PvlKeyword( + duplicate.addKeyword(PvlKeyword("PointId", point->GetId())); + duplicate.addKeyword(PvlKeyword( "SourceNetwork", pointSources[point->GetId()])); - duplicate.AddKeyword(PvlKeyword("AddNetwork", cnetName.name())); - errors.AddObject(duplicate); + duplicate.addKeyword(PvlKeyword("AddNetwork", cnetName.name())); + errors.addObject(duplicate); } else { // User has disallowed merging points, so throw an error @@ -200,8 +200,8 @@ ControlNet * mergeNetworks(FileList &filelist, PvlObject &conflictLog, if (hasDuplicates && report) { Pvl outPvl; - outPvl.AddObject(errors); - outPvl.Write(logName); + outPvl.addObject(errors); + outPvl.write(logName); QString msg = "Networks contained duplicate points. See log file [" + FileName(logName).name() + "] for details. " @@ -468,7 +468,7 @@ void addMeasure(ControlPoint *basePoint, ControlPoint *newPoint, PvlObject createNetworkLog(ControlNet &cnet) { PvlObject cnetLog("Network"); PvlKeyword networkId("NetworkId", cnet.GetNetworkId()); - cnetLog.AddKeyword(networkId); + cnetLog.addKeyword(networkId); return cnetLog; } @@ -476,7 +476,7 @@ PvlObject createNetworkLog(ControlNet &cnet) { PvlObject createPointLog(ControlPoint *point) { PvlObject pointLog("Point"); PvlKeyword pointId("PointId", point->GetId()); - pointLog.AddKeyword(pointId); + pointLog.addKeyword(pointId); return pointLog; } @@ -492,7 +492,7 @@ void reportConflict(PvlObject &pointLog, QString conflict) { // conflicts to a log file if (report) { PvlKeyword resolution("Resolution", conflict); - pointLog.AddKeyword(resolution); + pointLog.addKeyword(resolution); } } @@ -502,7 +502,7 @@ void reportConflict(PvlGroup &measureLog, QString sn, QString conflict) { // conflicts to a log file if (report) { PvlKeyword resolution(sn, conflict); - measureLog.AddKeyword(resolution); + measureLog.addKeyword(resolution); } } @@ -510,22 +510,22 @@ void reportConflict(PvlGroup &measureLog, QString sn, QString conflict) { void addLog(PvlObject &conflictLog, PvlObject &cnetLog) { // If the network log has at least one point object, then there was at least // one conflict, so add it to the log for all conflicts - if (cnetLog.Objects() > 0) - conflictLog.AddObject(cnetLog); + if (cnetLog.objects() > 0) + conflictLog.addObject(cnetLog); } void addLog(PvlObject &cnetLog, PvlObject &pointLog, PvlGroup &measureLog) { // If the measure log has at least one keyword, then it has at least one // conflict, so add it to the point log - if (measureLog.Keywords() > 0) - pointLog.AddGroup(measureLog); + if (measureLog.keywords() > 0) + pointLog.addGroup(measureLog); // If the point log has more keywords than the PointId keyword, then it has a // conflict and should be added to the network log. Likewise, if it has a // group then its measures had conflicts and thus the point should be added to // the output log. - if (pointLog.Keywords() > 1 || pointLog.Groups() > 0) - cnetLog.AddObject(pointLog); + if (pointLog.keywords() > 1 || pointLog.groups() > 0) + cnetLog.addObject(pointLog); } diff --git a/isis/src/control/apps/cnetnewradii/cnetnewradii.cpp b/isis/src/control/apps/cnetnewradii/cnetnewradii.cpp index b92fd13d72b4d9af34cbcf993eaed8709b083564..d704146ff8d5286e54dcdc8f057907efee225e66 100644 --- a/isis/src/control/apps/cnetnewradii/cnetnewradii.cpp +++ b/isis/src/control/apps/cnetnewradii/cnetnewradii.cpp @@ -153,11 +153,11 @@ void IsisMain() { // Write results to Logs // Summary group is created with the counts of successes and failures PvlGroup summaryGroup = PvlGroup("Summary"); - summaryGroup.AddKeyword(PvlKeyword("Successes", toString(numSuccesses))); - summaryGroup.AddKeyword(PvlKeyword("Failures", toString(numFailures))); - summaryGroup.AddKeyword(PvlKeyword("NumberFixedConstrainedPoints", + summaryGroup.addKeyword(PvlKeyword("Successes", toString(numSuccesses))); + summaryGroup.addKeyword(PvlKeyword("Failures", toString(numFailures))); + summaryGroup.addKeyword(PvlKeyword("NumberFixedConstrainedPoints", toString(numConstrainedFixed))); - summaryGroup.AddKeyword(PvlKeyword("NumberEditLockedPoints", toString(numLocked))); + summaryGroup.addKeyword(PvlKeyword("NumberEditLockedPoints", toString(numLocked))); bool errorlog; FileName errorlogFile; @@ -181,19 +181,19 @@ void IsisMain() { if (errorlog) { // Write details in error log Pvl results; - results.SetName("Results"); - results.AddGroup(summaryGroup); + results.setName("Results"); + results.addGroup(summaryGroup); if (numFailures > 0) { // if there are any failures, add comment to the summary log to alert user - summaryGroup.AddComment("Unable to calculate radius for all points. Point" + summaryGroup.addComment("Unable to calculate radius for all points. Point" " IDs for failures contained in [" + errorlogFile.name() + "]."); PvlGroup failGroup = PvlGroup("Failures"); - failGroup.AddComment("A point fails if we are unable to set universal " + failGroup.addComment("A point fails if we are unable to set universal " "ground or if the radius calculated is a special pixel value."); - failGroup.AddKeyword(PvlKeyword("PointIDs", failedIDs)); - results.AddGroup(failGroup); + failGroup.addKeyword(PvlKeyword("PointIDs", failedIDs)); + results.addGroup(failGroup); } - results.Write(errorlogFile.expanded()); + results.write(errorlogFile.expanded()); } // Write summary to application log Application::Log(summaryGroup); diff --git a/isis/src/control/apps/cnetref/cnetref.cpp b/isis/src/control/apps/cnetref/cnetref.cpp index 26e84b5deb66f13ade322abd1aa9bafc45ad0bad..8cc80e1e0f3ade4d130ed1d2c6f551919622dbf6 100644 --- a/isis/src/control/apps/cnetref/cnetref.cpp +++ b/isis/src/control/apps/cnetref/cnetref.cpp @@ -49,9 +49,9 @@ void IsisMain() { pvlDefFile = new Pvl(ui.GetFileName("DEFFILE")); // Log the DefFile - Application::Log(pvlDefFile->Group(0)); + Application::Log(pvlDefFile->group(0)); - if (pvlDefFile->Group(0).HasKeyword("PixelsFromEdge") && pvlDefFile->Group(0).HasKeyword("MetersFromEdge")) { + if (pvlDefFile->group(0).hasKeyword("PixelsFromEdge") && pvlDefFile->group(0).hasKeyword("MetersFromEdge")) { QString message = "DefFile Error : Cannot have both \"PixelsFromEdge\" && \"MetersFromEdge\"" ; throw IException(IException::User, message, _FILEINFO_); } @@ -63,9 +63,9 @@ void IsisMain() { else { pvlTemplate = Pvl("$ISIS3DATA/base/templates/cnetref/cnetref_nooperator.def"); } - pvlTemplate.ValidatePvl(*pvlDefFile, pvlResults); - if (pvlResults.Groups() > 0 || pvlResults.Keywords() > 0) { - Application::Log(pvlResults.Group(0)); + pvlTemplate.validatePvl(*pvlDefFile, pvlResults); + if (pvlResults.groups() > 0 || pvlResults.keywords() > 0) { + Application::Log(pvlResults.group(0)); QString sErrMsg = "Invalid Deffile\n"; throw IException(IException::User, sErrMsg, _FILEINFO_); } @@ -156,7 +156,7 @@ void IsisMain() { if (bLogFile) { Pvl pvlLog = interestOp->GetLogPvl(); pvlLog += opGroup; - pvlLog.Write(sLogFile); + pvlLog.write(sLogFile); } Application::Log(interestOp->GetStdOptions()); Application::Log(interestOp->GetStatistics()); @@ -174,7 +174,7 @@ void IsisMain() { if (cnetValidMeas) { Pvl pvlLog = cnetValidMeas->GetLogPvl(); if (bLogFile) { - pvlLog.Write(sLogFile); + pvlLog.write(sLogFile); } Application::Log(cnetValidMeas->GetStdOptions()); Application::Log(cnetValidMeas->GetStatistics()); @@ -236,7 +236,7 @@ void ViewDefFile() { // Get template PVL Pvl defFile; - defFile.Read(ui.GetFileName("DEFFILE")); + defFile.read(ui.GetFileName("DEFFILE")); // Write deffile file out to the log Isis::Application::GuiLog(defFile); diff --git a/isis/src/control/apps/cnetstats/cnetstats.cpp b/isis/src/control/apps/cnetstats/cnetstats.cpp index d227d6a37d155532941f092e2ba3e388bd732e57..d0f581d40371f1c78c14f7aefa8c37fa4b18f2f5 100644 --- a/isis/src/control/apps/cnetstats/cnetstats.cpp +++ b/isis/src/control/apps/cnetstats/cnetstats.cpp @@ -31,10 +31,10 @@ void IsisMain() { pvlDefFile = Pvl(sDefFile); // Log the DefFile - Cannot log Object... only by Group - for (int i=0; iHasKeyword("Error"); + bool errors = point->hasKeyword("Error"); if(errors) { - maxCount = point->Keywords() - 1; + maxCount = point->keywords() - 1; } else { - maxCount = point->Keywords(); + maxCount = point->keywords(); } // If its first and not appending, write the column labels @@ -353,13 +353,13 @@ void Write(PvlGroup *point, const ControlMeasure &cm) { // point information for(int i = 0; i < maxCount; i++) { - if((*point)[i].Size() == 3) { - output += QString((*point)[i].Name()) + "X,"; - output += QString((*point)[i].Name()) + "Y,"; - output += QString((*point)[i].Name()) + "Z,"; + if((*point)[i].size() == 3) { + output += QString((*point)[i].name()) + "X,"; + output += QString((*point)[i].name()) + "Y,"; + output += QString((*point)[i].name()) + "Z,"; } else { - output += QString((*point)[i].Name()) + ","; + output += QString((*point)[i].name()) + ","; } } @@ -370,7 +370,7 @@ void Write(PvlGroup *point, const ControlMeasure &cm) { //} - if(errors) output += QString((*point)[maxCount].Name()); + if(errors) output += QString((*point)[maxCount].name()); isFirst = false; measureLabels += output; txt->PutLine(measureLabels); @@ -387,7 +387,7 @@ void Write(PvlGroup *point, const ControlMeasure &cm) { // Write out date values // point information for(int i = 0; i < maxCount; i++) { - if((*point)[i].Size() == 3) { + if((*point)[i].size() == 3) { output += QString(CheckValue((*point)[i][0])) + ","; output += QString(CheckValue((*point)[i][1])) + ","; output += QString(CheckValue((*point)[i][2])) + ","; diff --git a/isis/src/control/apps/coreg/coreg.cpp b/isis/src/control/apps/coreg/coreg.cpp index affe7af17b6b85f112b66f17ac78d244607ee45f..e4e3840358a0ba660469551d6f4bf44842752b1f 100644 --- a/isis/src/control/apps/coreg/coreg.cpp +++ b/isis/src/control/apps/coreg/coreg.cpp @@ -97,7 +97,7 @@ void IsisMain() { // We need to get a user definition of how to auto correlate around each // of the control points. Pvl regdef; - regdef.Read(ui.GetFileName("DEFFILE")); + regdef.read(ui.GetFileName("DEFFILE")); AutoReg *ar = AutoRegFactory::Create(regdef); // We want to create a grid of control points that is N rows by M columns. @@ -133,7 +133,7 @@ void IsisMain() { cn.SetNetworkId("Coreg"); if (match.hasGroup("Instrument")) { PvlGroup inst = match.group("Instrument"); - PvlKeyword &targname = inst.FindKeyword("TargetName"); + PvlKeyword &targname = inst.findKeyword("TargetName"); QString targetname = targname; cn.SetTarget(targetname); } @@ -214,8 +214,8 @@ void IsisMain() { Pvl arPvl = ar->RegistrationStatistics(); - for(int i = 0; i < arPvl.Groups(); i++) { - Application::Log(arPvl.Group(i)); + for(int i = 0; i < arPvl.groups(); i++) { + Application::Log(arPvl.group(i)); } // add the auto registration information to print.prt @@ -290,7 +290,7 @@ void helperButtonLog() { UserInterface &ui = Application::GetUserInterface(); QString file(ui.GetFileName("DEFFILE")); Pvl p; - p.Read(file); + p.read(file); Application::GuiLog(p); } //...........end of helper function ........ diff --git a/isis/src/control/apps/deltack/deltack.cpp b/isis/src/control/apps/deltack/deltack.cpp index 5f43824fe3a3155d1621908110626930c0512564..313f6878064b3ff0fd943b75776b80fd2a4fb4e7 100644 --- a/isis/src/control/apps/deltack/deltack.cpp +++ b/isis/src/control/apps/deltack/deltack.cpp @@ -64,9 +64,9 @@ void IsisMain() { Cube c; c.open(filename, "rw"); //check for target name - if(c.label()->HasKeyword("TargetName", PvlObject::Traverse)) { -// c.Label()->FindKeyword("TargetName"); - PvlGroup inst = c.label()->FindGroup("Instrument", PvlObject::Traverse); + if(c.label()->hasKeyword("TargetName", PvlObject::Traverse)) { +// c.Label()->findKeyword("TargetName"); + PvlGroup inst = c.label()->findGroup("Instrument", PvlObject::Traverse); QString targetName = inst["TargetName"]; cnet.SetTarget(targetName); } @@ -125,18 +125,18 @@ void IsisMain() { c.open(filename, "rw"); //check for existing polygon, if exists delete it - if(c.label()->HasObject("Polygon")) { - c.label()->DeleteObject("Polygon"); + if(c.label()->hasObject("Polygon")) { + c.label()->deleteObject("Polygon"); } Table cmatrix = b.Cmatrix(0); // Write out a description in the spice table QString deltackComment = "deltackAdjusted = " + Isis::iTime::CurrentLocalTime(); - cmatrix.Label().AddComment(deltackComment); + cmatrix.Label().addComment(deltackComment); //PvlKeyword description("Description"); //description = "Camera pointing updated via deltack application"; - //cmatrix.Label().FindObject("Table",Pvl::Traverse).AddKeyword(description); + //cmatrix.Label().findObject("Table",Pvl::Traverse).addKeyword(description); // Update the cube history c.write(cmatrix); diff --git a/isis/src/control/apps/jigsaw/jigsaw.cpp b/isis/src/control/apps/jigsaw/jigsaw.cpp index a121f7ac6edf27ab5fe9d433c3c5da219c072a3f..793c07743005258a44179e0cb518db3d41409040 100644 --- a/isis/src/control/apps/jigsaw/jigsaw.cpp +++ b/isis/src/control/apps/jigsaw/jigsaw.cpp @@ -201,16 +201,16 @@ void IsisMain() { CubeAttributeInput inAtt; Cube *c = p.SetInputCube(b->FileName(i), inAtt, ReadWrite); //check for existing polygon, if exists delete it - if (c->label()->HasObject("Polygon")) { - c->label()->DeleteObject("Polygon"); + if (c->label()->hasObject("Polygon")) { + c->label()->deleteObject("Polygon"); } // check for CameraStatistics Table, if exists, delete - for (int iobj = 0; iobj < c->label()->Objects(); iobj++) { - PvlObject obj = c->label()->Object(iobj); - if (obj.Name() != "Table") continue; + for (int iobj = 0; iobj < c->label()->objects(); iobj++) { + PvlObject obj = c->label()->object(iobj); + if (obj.name() != "Table") continue; if (obj["Name"][0] != QString("CameraStatistics")) continue; - c->label()->DeleteObject(iobj); + c->label()->deleteObject(iobj); break; } @@ -219,9 +219,9 @@ void IsisMain() { if (b->IsHeld(i)) continue; // Don't update held images at all Table cmatrix = b->Cmatrix(i); QString jigComment = "Jigged = " + Isis::iTime::CurrentLocalTime(); - cmatrix.Label().AddComment(jigComment); + cmatrix.Label().addComment(jigComment); Table spvector = b->SpVector(i); - spvector.Label().AddComment(jigComment); + spvector.Label().addComment(jigComment); c->write(cmatrix); c->write(spvector); p.WriteHistory(*c); diff --git a/isis/src/control/apps/mat2cnet/mat2cnet.cpp b/isis/src/control/apps/mat2cnet/mat2cnet.cpp index 6ab093e5a8024207f1d506787c0452a65e88a166..81a897099a154db754096705499228bbd9dc65c1 100644 --- a/isis/src/control/apps/mat2cnet/mat2cnet.cpp +++ b/isis/src/control/apps/mat2cnet/mat2cnet.cpp @@ -30,7 +30,7 @@ std::map snMap; void IsisMain() { // The following steps can take a significant amount of time, so // set up a progress object, incrementing at 1%, to keep the user informed - PvlGroup &uip = Preference::Preferences().FindGroup("UserInterface"); + PvlGroup &uip = Preference::Preferences().findGroup("UserInterface"); uip["ProgressBarPercent"] = "1"; UserInterface &ui = Application::GetUserInterface(); Progress progress; @@ -62,14 +62,14 @@ void IsisMain() { progress.CheckStatus(); QString currFile(list2[f].toString()); Pvl lab(currFile); - PvlObject qube(lab.FindObject("QUBE")); + PvlObject qube(lab.findObject("QUBE")); IString fsc; - if (qube.HasKeyword("IMAGE_NUMBER")) { - fsc = qube.FindKeyword("IMAGE_NUMBER")[0]; + if (qube.hasKeyword("IMAGE_NUMBER")) { + fsc = qube.findKeyword("IMAGE_NUMBER")[0]; } - else if (qube.HasKeyword("IMAGE_ID")) { - fsc = qube.FindKeyword("IMAGE_ID")[0]; + else if (qube.hasKeyword("IMAGE_ID")) { + fsc = qube.findKeyword("IMAGE_ID")[0]; } else { throw IException(IException::Unknown, @@ -458,7 +458,7 @@ void IsisMain() { // Write results to Logs // Summary group is created with the counts of RAND PPP only points PvlGroup summaryGroup = PvlGroup("Summary"); - summaryGroup.AddKeyword(PvlKeyword("RandOnlyPoints", toString(numRandOnly))); + summaryGroup.addKeyword(PvlKeyword("RandOnlyPoints", toString(numRandOnly))); bool log; FileName logFile; @@ -482,23 +482,23 @@ void IsisMain() { if (log) { // Write details in error log Pvl results; - results.SetName("Results"); - results.AddGroup(summaryGroup); + results.setName("Results"); + results.addGroup(summaryGroup); if (numRandOnly > 0) { // if there are any RAND PPP only points, // add comment to the summary log to alert user - summaryGroup.AddComment("Some Point IDs in the RAND PPP file have no " + summaryGroup.addComment("Some Point IDs in the RAND PPP file have no " "measures in the MATCH file."); - summaryGroup.AddComment("These Point IDs are contained " + summaryGroup.addComment("These Point IDs are contained " "in [" + logFile.name() + "]."); TextFile outlog(logFile.expanded(), "overwrite", randOnlyIDs); } else { // if there are no RAND PPP only points and user wanted to create a log, // add comment to the summary log to alert user - summaryGroup.AddComment("All Point IDs in the RAND PPP file have " + summaryGroup.addComment("All Point IDs in the RAND PPP file have " "measures in the MATCH file."); - summaryGroup.AddComment("No RAND PPP log was created."); + summaryGroup.addComment("No RAND PPP log was created."); } } // Write summary to application log diff --git a/isis/src/control/apps/pointreg/pointreg.cpp b/isis/src/control/apps/pointreg/pointreg.cpp index b73724e185944b8c46dfe9212c79702393e1d4dc..37e9af9eec5c94ef8946c44b5e1c543b44794bdf 100644 --- a/isis/src/control/apps/pointreg/pointreg.cpp +++ b/isis/src/control/apps/pointreg/pointreg.cpp @@ -466,8 +466,8 @@ void IsisMain() { // Log Registration Statistics Pvl arPvl = ar->RegistrationStatistics(); - for (int i = 0; i < arPvl.Groups(); i++) { - Application::Log(arPvl.Group(i)); + for (int i = 0; i < arPvl.groups(); i++) { + Application::Log(arPvl.group(i)); } // add the auto registration information to print.prt @@ -478,19 +478,19 @@ void IsisMain() { PvlGroup validationGroup("ValidationStatistics"); Pvl validationPvl = validator->RegistrationStatistics(); - for (int g = 0; g < validationPvl.Groups(); g++) { - PvlGroup &group = validationPvl.Group(g); - if (group.Keywords() > 0) { - group[0].AddComment(group.Name()); - for (int k = 0; k < group.Keywords(); k++) - validationGroup.AddKeyword(group[k]); + for (int g = 0; g < validationPvl.groups(); g++) { + PvlGroup &group = validationPvl.group(g); + if (group.keywords() > 0) { + group[0].addComment(group.name()); + for (int k = 0; k < group.keywords(); k++) + validationGroup.addKeyword(group[k]); } } Application::Log(validationGroup); PvlGroup validationTemplate = validator->UpdatedTemplate(); - validationTemplate.SetName("ValidationTemplate"); + validationTemplate.setName("ValidationTemplate"); Application::Log(validationTemplate); } @@ -820,7 +820,7 @@ void printTemp() { // Get template pvl Pvl userTemp; - userTemp.Read(ui.GetFileName("DEFFILE")); + userTemp.read(ui.GetFileName("DEFFILE")); //Write template file out to the log Isis::Application::GuiLog(userTemp); diff --git a/isis/src/control/apps/seedgrid/seedgrid.cpp b/isis/src/control/apps/seedgrid/seedgrid.cpp index 80adcd4e570f17692f45638601d779af71bf374f..d93c11f887f180eaf607bbc4e571a5dbaba5e234 100644 --- a/isis/src/control/apps/seedgrid/seedgrid.cpp +++ b/isis/src/control/apps/seedgrid/seedgrid.cpp @@ -38,8 +38,8 @@ void IsisMain() { QString spacing = ui.GetString("SPACING"); if (spacing == "METER") { Pvl userMap; - userMap.Read(ui.GetFileName("MAP")); - PvlGroup &mapGroup = userMap.FindGroup("Mapping", Pvl::Traverse); + userMap.read(ui.GetFileName("MAP")); + PvlGroup &mapGroup = userMap.findGroup("Mapping", Pvl::Traverse); // Construct a Projection for converting between Lon/Lat and X/Y // TODO: Should this be an option to include this in the program? @@ -47,8 +47,8 @@ void IsisMain() { if (ui.WasEntered("TARGET")) { target = ui.GetString("TARGET"); } - else if (mapGroup.HasKeyword("TargetName")) { - target = mapGroup.FindKeyword("TargetName")[0]; + else if (mapGroup.hasKeyword("TargetName")) { + target = mapGroup.findKeyword("TargetName")[0]; ui.PutAsString("TARGET", target); } else { @@ -58,24 +58,24 @@ void IsisMain() { throw IException(IException::User, msg, _FILEINFO_); } - mapGroup.AddKeyword(PvlKeyword("TargetName", target), Pvl::Replace); + mapGroup.addKeyword(PvlKeyword("TargetName", target), Pvl::Replace); - if (!mapGroup.HasKeyword("EquatorialRadius") || - !mapGroup.HasKeyword("PolarRadius")) { + if (!mapGroup.hasKeyword("EquatorialRadius") || + !mapGroup.hasKeyword("PolarRadius")) { PvlGroup radii = Projection::TargetRadii(target); - mapGroup.AddKeyword(PvlKeyword("EquatorialRadius", + mapGroup.addKeyword(PvlKeyword("EquatorialRadius", (QString) radii["EquatorialRadius"])); - mapGroup.AddKeyword(PvlKeyword("PolarRadius", + mapGroup.addKeyword(PvlKeyword("PolarRadius", (QString) radii["PolarRadius"])); } if (!ui.WasEntered("MAP")) { - mapGroup.AddKeyword(PvlKeyword("LatitudeType", "Planetocentric")); - mapGroup.AddKeyword(PvlKeyword("LongitudeDirection", "PositiveEast")); - mapGroup.AddKeyword(PvlKeyword("LongitudeDomain", toString(360))); - mapGroup.AddKeyword(PvlKeyword("CenterLatitude", toString(0))); - mapGroup.AddKeyword(PvlKeyword("CenterLongitude", toString(0))); + mapGroup.addKeyword(PvlKeyword("LatitudeType", "Planetocentric")); + mapGroup.addKeyword(PvlKeyword("LongitudeDirection", "PositiveEast")); + mapGroup.addKeyword(PvlKeyword("LongitudeDomain", toString(360))); + mapGroup.addKeyword(PvlKeyword("CenterLatitude", toString(0))); + mapGroup.addKeyword(PvlKeyword("CenterLongitude", toString(0))); } double minLat = ui.GetDouble("MINLAT"); @@ -84,10 +84,10 @@ void IsisMain() { double maxLon = ui.GetDouble("MAXLON"); checkLatitude(minLat, maxLat); - mapGroup.AddKeyword(PvlKeyword("MinimumLatitude", toString(minLat)), Pvl::Replace); - mapGroup.AddKeyword(PvlKeyword("MaximumLatitude", toString(maxLat)), Pvl::Replace); - mapGroup.AddKeyword(PvlKeyword("MinimumLongitude", toString(minLon)), Pvl::Replace); - mapGroup.AddKeyword(PvlKeyword("MaximumLongitude", toString(maxLon)), Pvl::Replace); + mapGroup.addKeyword(PvlKeyword("MinimumLatitude", toString(minLat)), Pvl::Replace); + mapGroup.addKeyword(PvlKeyword("MaximumLatitude", toString(maxLat)), Pvl::Replace); + mapGroup.addKeyword(PvlKeyword("MinimumLongitude", toString(minLon)), Pvl::Replace); + mapGroup.addKeyword(PvlKeyword("MaximumLongitude", toString(maxLon)), Pvl::Replace); Projection *proj = ProjectionFactory::Create(userMap); @@ -123,7 +123,7 @@ void IsisMain() { double xStepSize = ui.GetDouble("XSTEP"); double yStepSize = ui.GetDouble("YSTEP"); - equatorialRadius = toDouble(mapGroup.FindKeyword("EquatorialRadius")[0]); + equatorialRadius = toDouble(mapGroup.findKeyword("EquatorialRadius")[0]); Progress gridStatus; @@ -308,8 +308,8 @@ void printMap() { // Get mapping group from map file Pvl userMap; - userMap.Read(ui.GetFileName("MAP")); - PvlGroup &userGrp = userMap.FindGroup("Mapping", Pvl::Traverse); + userMap.read(ui.GetFileName("MAP")); + PvlGroup &userGrp = userMap.findGroup("Mapping", Pvl::Traverse); //Write map file out to the log Isis::Application::GuiLog(userGrp); diff --git a/isis/src/control/objs/ControlMeasureLogData/ControlMeasureLogData.cpp b/isis/src/control/objs/ControlMeasureLogData/ControlMeasureLogData.cpp index c2c6d5d6ffbd71c3fe0f1aee25b69d5845f6ef42..88cc8442fb8042d997c8d86a9903fed6e62c48ca 100644 --- a/isis/src/control/objs/ControlMeasureLogData/ControlMeasureLogData.cpp +++ b/isis/src/control/objs/ControlMeasureLogData/ControlMeasureLogData.cpp @@ -51,7 +51,7 @@ namespace Isis { ControlMeasureLogData::ControlMeasureLogData(PvlKeyword keywordRep) { Init(); - QString name = keywordRep.Name(); + QString name = keywordRep.name(); p_dataType = NameToDataType(name); if (p_dataType != InvalidNumericLogDataType) p_numericalValue = toDouble(keywordRep[0]); diff --git a/isis/src/control/objs/ControlNetDiff/ControlNetDiff.cpp b/isis/src/control/objs/ControlNetDiff/ControlNetDiff.cpp index dff4c7036551b919e4b3615a9e0fc6eb5eb5f705..064234fbcdeb296fe9f996a158cb85c73e67e5af 100644 --- a/isis/src/control/objs/ControlNetDiff/ControlNetDiff.cpp +++ b/isis/src/control/objs/ControlNetDiff/ControlNetDiff.cpp @@ -64,17 +64,17 @@ namespace Isis { * @param diffFile The PVL of ignore keywords and tolerance values */ void ControlNetDiff::addTolerances(Pvl &diffFile) { - if (diffFile.HasGroup("Tolerances")) { - PvlGroup tolerances = diffFile.FindGroup("Tolerances"); - for (int i = 0; i < tolerances.Keywords(); i++) - m_tolerances->insert(tolerances[i].Name(), + if (diffFile.hasGroup("Tolerances")) { + PvlGroup tolerances = diffFile.findGroup("Tolerances"); + for (int i = 0; i < tolerances.keywords(); i++) + m_tolerances->insert(tolerances[i].name(), toDouble(tolerances[i][0])); } - if (diffFile.HasGroup("IgnoreKeys")) { - PvlGroup ignoreKeys = diffFile.FindGroup("IgnoreKeys"); - for (int i = 0; i < ignoreKeys.Keywords(); i++) - m_ignoreKeys->insert(ignoreKeys[i].Name()); + if (diffFile.hasGroup("IgnoreKeys")) { + PvlGroup ignoreKeys = diffFile.findGroup("IgnoreKeys"); + for (int i = 0; i < ignoreKeys.keywords(); i++) + m_ignoreKeys->insert(ignoreKeys[i].name()); } } @@ -95,14 +95,14 @@ namespace Isis { LatestControlNetFile *net2 = ControlNetVersioner::Read(net2Name.expanded()); diff("Filename", net1Name.name(), net2Name.name(), report); - Pvl net1Pvl(net1->ToPvl()); - Pvl net2Pvl(net2->ToPvl()); + Pvl net1Pvl(net1->toPvl()); + Pvl net2Pvl(net2->toPvl()); - PvlObject &net1Obj = net1Pvl.FindObject("ControlNetwork"); - PvlObject &net2Obj = net2Pvl.FindObject("ControlNetwork"); + PvlObject &net1Obj = net1Pvl.findObject("ControlNetwork"); + PvlObject &net2Obj = net2Pvl.findObject("ControlNetwork"); - BigInt net1NumPts = net1Obj.Objects(); - BigInt net2NumPts = net2Obj.Objects(); + BigInt net1NumPts = net1Obj.objects(); + BigInt net2NumPts = net2Obj.objects(); diff("Points", toString(net1NumPts), toString(net2NumPts), report); diff("NetworkId", net1Obj, net2Obj, report); @@ -110,14 +110,14 @@ namespace Isis { QMap< QString, QMap > pointMap; for (int p = 0; p < net1NumPts; p++) { - PvlObject &point = net1Obj.Object(p); - pointMap[point.FindKeyword("PointId")[0]].insert( + PvlObject &point = net1Obj.object(p); + pointMap[point.findKeyword("PointId")[0]].insert( 0, point); } for (int p = 0; p < net2NumPts; p++) { - PvlObject &point = net2Obj.Object(p); - pointMap[point.FindKeyword("PointId")[0]].insert( + PvlObject &point = net2Obj.object(p); + pointMap[point.findKeyword("PointId")[0]].insert( 1, point); } @@ -128,17 +128,17 @@ namespace Isis { compare(idMap[0], idMap[1], report); } else if (idMap.contains(0)) { - addUniquePoint("PointId", idMap[0].FindKeyword("PointId")[0], "N/A", report); + addUniquePoint("PointId", idMap[0].findKeyword("PointId")[0], "N/A", report); } else if (idMap.contains(1)) { - addUniquePoint("PointId", "N/A", idMap[1].FindKeyword("PointId")[0], report); + addUniquePoint("PointId", "N/A", idMap[1].findKeyword("PointId")[0], report); } } delete net1; delete net2; - results.AddObject(report); + results.addObject(report); return results; } @@ -155,26 +155,26 @@ namespace Isis { void ControlNetDiff::compare(PvlObject &point1Pvl, PvlObject &point2Pvl, PvlObject &report) { PvlObject pointReport("Point"); - QString id1 = point1Pvl.FindKeyword("PointId")[0]; - QString id2 = point2Pvl.FindKeyword("PointId")[0]; - pointReport.AddKeyword(makeKeyword("PointId", id1, id2)); + QString id1 = point1Pvl.findKeyword("PointId")[0]; + QString id2 = point2Pvl.findKeyword("PointId")[0]; + pointReport.addKeyword(makeKeyword("PointId", id1, id2)); - int p1Measures = point1Pvl.Groups(); - int p2Measures = point2Pvl.Groups(); + int p1Measures = point1Pvl.groups(); + int p2Measures = point2Pvl.groups(); diff("Measures", toString(p1Measures), toString(p2Measures), pointReport); compareGroups(point1Pvl, point2Pvl, pointReport); QMap< QString, QMap > measureMap; for (int m = 0; m < p1Measures; m++) { - PvlGroup &measure = point1Pvl.Group(m); - measureMap[measure.FindKeyword("SerialNumber")[0]].insert( + PvlGroup &measure = point1Pvl.group(m); + measureMap[measure.findKeyword("SerialNumber")[0]].insert( 0, measure); } for (int m = 0; m < p2Measures; m++) { - PvlGroup &measure = point2Pvl.Group(m); - measureMap[measure.FindKeyword("SerialNumber")[0]].insert( + PvlGroup &measure = point2Pvl.group(m); + measureMap[measure.findKeyword("SerialNumber")[0]].insert( 1, measure); } @@ -185,15 +185,15 @@ namespace Isis { compareGroups(idMap[0], idMap[1], pointReport); } else if (idMap.contains(0)) { - addUniqueMeasure("SerialNumber", idMap[0].FindKeyword("SerialNumber")[0], "N/A", pointReport); + addUniqueMeasure("SerialNumber", idMap[0].findKeyword("SerialNumber")[0], "N/A", pointReport); } else if (idMap.contains(1)) { - addUniqueMeasure("SerialNumber", "N/A", idMap[1].FindKeyword("SerialNumber")[0], pointReport); + addUniqueMeasure("SerialNumber", "N/A", idMap[1].findKeyword("SerialNumber")[0], pointReport); } } - if (pointReport.Keywords() > 2 || pointReport.Groups() > 0) - report.AddObject(pointReport); + if (pointReport.keywords() > 2 || pointReport.groups() > 0) + report.addObject(pointReport); } @@ -211,19 +211,19 @@ namespace Isis { */ void ControlNetDiff::compareGroups(PvlContainer &g1, PvlContainer &g2, PvlObject &report) { PvlGroup measureReport("Measure"); - if (g1.HasKeyword("SerialNumber")) { - QString sn1 = g1.FindKeyword("SerialNumber")[0]; - QString sn2 = g1.FindKeyword("SerialNumber")[0]; - measureReport.AddKeyword(makeKeyword("SerialNumber", sn1, sn2)); + if (g1.hasKeyword("SerialNumber")) { + QString sn1 = g1.findKeyword("SerialNumber")[0]; + QString sn2 = g1.findKeyword("SerialNumber")[0]; + measureReport.addKeyword(makeKeyword("SerialNumber", sn1, sn2)); } - PvlContainer &groupReport = g1.HasKeyword("SerialNumber") ? + PvlContainer &groupReport = g1.hasKeyword("SerialNumber") ? (PvlContainer &) measureReport : (PvlContainer &) report; QMap< QString, QMap > keywordMap; - for (int k = 0; k < g1.Keywords(); k++) - keywordMap[g1[k].Name()].insert(0, g1[k]); - for (int k = 0; k < g2.Keywords(); k++) - keywordMap[g2[k].Name()].insert(1, g2[k]); + for (int k = 0; k < g1.keywords(); k++) + keywordMap[g1[k].name()].insert(0, g1[k]); + for (int k = 0; k < g2.keywords(); k++) + keywordMap[g2[k].name()].insert(1, g2[k]); QList keywordNames = keywordMap.keys(); for (int i = 0; i < keywordNames.size(); i++) { @@ -232,18 +232,18 @@ namespace Isis { compare(idMap[0], idMap[1], groupReport); } else if (idMap.contains(0)) { - QString name = idMap[0].Name(); + QString name = idMap[0].name(); if (!m_ignoreKeys->contains(name)) diff(name, idMap[0][0], "N/A", groupReport); } else if (idMap.contains(1)) { - QString name = idMap[1].Name(); + QString name = idMap[1].name(); if (!m_ignoreKeys->contains(name)) diff(name, "N/A", idMap[1][0], groupReport); } } - if (measureReport.Keywords() > 1) report.AddGroup(measureReport); + if (measureReport.keywords() > 1) report.addGroup(measureReport); } @@ -262,7 +262,7 @@ namespace Isis { * keywords */ void ControlNetDiff::compare(PvlKeyword &k1, PvlKeyword &k2, PvlContainer &report) { - QString name = k1.Name(); + QString name = k1.name(); if (m_tolerances->contains(name)) diff(name, toDouble(k1[0]), toDouble(k2[0]), (*m_tolerances)[name], report); else @@ -300,7 +300,7 @@ namespace Isis { */ void ControlNetDiff::diff(QString name, QString v1, QString v2, PvlContainer &report) { if (!m_ignoreKeys->contains(name)) { - if (v1 != v2) report.AddKeyword(makeKeyword(name, v1, v2)); + if (v1 != v2) report.addKeyword(makeKeyword(name, v1, v2)); } } @@ -316,8 +316,8 @@ namespace Isis { */ PvlKeyword ControlNetDiff::makeKeyword(QString name, QString v1, QString v2) { PvlKeyword keyword(name); - keyword.AddValue(v1); - if (v1 != v2) keyword.AddValue(v2); + keyword.addValue(v1); + if (v1 != v2) keyword.addValue(v2); return keyword; } @@ -337,7 +337,7 @@ namespace Isis { */ void ControlNetDiff::diff(QString name, double v1, double v2, double tol, PvlContainer &report) { if (!m_ignoreKeys->contains(name)) { - if (fabs(v1 - v2) > tol) report.AddKeyword(makeKeyword(name, v1, v2, tol)); + if (fabs(v1 - v2) > tol) report.addKeyword(makeKeyword(name, v1, v2, tol)); } } @@ -355,10 +355,10 @@ namespace Isis { */ PvlKeyword ControlNetDiff::makeKeyword(QString name, double v1, double v2, double tol) { PvlKeyword keyword(name); - keyword.AddValue(toString(v1)); + keyword.addValue(toString(v1)); if (fabs(v1 - v2) > tol) { - keyword.AddValue(toString(v2)); - keyword.AddValue(toString(tol)); + keyword.addValue(toString(v2)); + keyword.addValue(toString(tol)); } return keyword; } @@ -377,11 +377,11 @@ namespace Isis { PvlObject point("Point"); PvlKeyword keyword(label); - keyword.AddValue(v1); - keyword.AddValue(v2); - point.AddKeyword(keyword); + keyword.addValue(v1); + keyword.addValue(v2); + point.addKeyword(keyword); - parent.AddObject(point); + parent.addObject(point); } @@ -399,11 +399,11 @@ namespace Isis { PvlGroup measure("Measure"); PvlKeyword keyword(label); - keyword.AddValue(v1); - keyword.AddValue(v2); - measure.AddKeyword(keyword); + keyword.addValue(v1); + keyword.addValue(v2); + measure.addKeyword(keyword); - parent.AddGroup(measure); + parent.addGroup(measure); } diff --git a/isis/src/control/objs/ControlNetFilter/ControlNetFilter.cpp b/isis/src/control/objs/ControlNetFilter/ControlNetFilter.cpp index d9dae00d10aba8408102a2548e9ffdde377fee9d..23a7b73adf09e2ac0f3a1dd9955fc89e7d8a811b 100644 --- a/isis/src/control/objs/ControlNetFilter/ControlNetFilter.cpp +++ b/isis/src/control/objs/ControlNetFilter/ControlNetFilter.cpp @@ -176,11 +176,11 @@ namespace Isis { double dLesser = Isis::ValidMaximum; double dGreater = 0; - if (pvlGrp.HasKeyword("LessThan")) { + if (pvlGrp.hasKeyword("LessThan")) { dLesser = fabs((double)pvlGrp["LessThan"]); } - if (pvlGrp.HasKeyword("GreaterThan")) { + if (pvlGrp.hasKeyword("GreaterThan")) { dGreater = fabs((double)pvlGrp["GreaterThan"]); } @@ -251,11 +251,11 @@ namespace Isis { int iLesser = VALID_MAX2; int iGreater = 0; - if (pvlGrp.HasKeyword("LessThan")) { + if (pvlGrp.hasKeyword("LessThan")) { iLesser = toInt(pvlGrp["LessThan"][0]); } - if (pvlGrp.HasKeyword("GreaterThan")) { + if (pvlGrp.hasKeyword("GreaterThan")) { iGreater = toInt(pvlGrp["GreaterThan"][0]); } @@ -312,7 +312,7 @@ namespace Isis { void ControlNetFilter::PointEditLockFilter(const PvlGroup &pvlGrp, bool pbLastFilter){ bool editLock = false; - if (pvlGrp.HasKeyword("EditLock")) { + if (pvlGrp.hasKeyword("EditLock")) { if(pvlGrp["EditLock"][0] == "1" || IString(pvlGrp["EditLock"][0]).DownCase() == "true") editLock = true; } @@ -360,13 +360,13 @@ namespace Isis { double dLesser = Isis::ValidMaximum; double dGreater = 0; - if (pvlGrp.HasKeyword("LessThan")) { + if (pvlGrp.hasKeyword("LessThan")) { if (pvlGrp["LessThan"][0] != "") { dLesser = fabs((double)pvlGrp["LessThan"]); } } - if (pvlGrp.HasKeyword("GreaterThan")) { + if (pvlGrp.hasKeyword("GreaterThan")) { if (pvlGrp["GreaterThan"][0] != "") { dGreater = fabs((double)pvlGrp["GreaterThan"]); } @@ -492,13 +492,13 @@ namespace Isis { void ControlNetFilter::PointMeasuresFilter(const PvlGroup &pvlGrp, bool pbLastFilter) { int iLesser = VALID_MAX2, iGreater = 0; - if (pvlGrp.HasKeyword("LessThan")) { + if (pvlGrp.hasKeyword("LessThan")) { if (pvlGrp["LessThan"][0] != "") { iLesser = toInt(pvlGrp["LessThan"][0]); } } - if (pvlGrp.HasKeyword("GreaterThan")) { + if (pvlGrp.hasKeyword("GreaterThan")) { if (pvlGrp["GreaterThan"][0] != "") { iGreater = toInt(pvlGrp["GreaterThan"][0]); } @@ -557,14 +557,14 @@ namespace Isis { IString sType = ""; IString sTemp = ""; - if (pvlGrp.HasKeyword("PointType")) { + if (pvlGrp.hasKeyword("PointType")) { if (pvlGrp["PointType"][0] != "") { sType = pvlGrp["PointType"][0]; sType = sType.DownCase(sType); } } - if (pvlGrp.HasKeyword("Ignore")) { + if (pvlGrp.hasKeyword("Ignore")) { iSetIgnoreFlag = 1; sTemp = pvlGrp["Ignore"][0]; if (sTemp == "1" || sTemp.DownCase() == "true") { @@ -631,25 +631,25 @@ namespace Isis { double dMinLat = Isis::ValidMinimum, dMaxLat = Isis::ValidMaximum; double dMinLon = Isis::ValidMinimum, dMaxLon = Isis::ValidMaximum; - if (pvlGrp.HasKeyword("MinLat")) { + if (pvlGrp.hasKeyword("MinLat")) { if (pvlGrp["MinLat"][0] != "") { dMinLat = pvlGrp["MinLat"]; } } - if (pvlGrp.HasKeyword("MaxLat")) { + if (pvlGrp.hasKeyword("MaxLat")) { if (pvlGrp["MaxLat"][0] != "") { dMaxLat = pvlGrp["MaxLat"]; } } - if (pvlGrp.HasKeyword("MinLon")) { + if (pvlGrp.hasKeyword("MinLon")) { if (pvlGrp["MinLon"][0] != "") { dMinLon = pvlGrp["MinLon"]; } } - if (pvlGrp.HasKeyword("MaxLon")) { + if (pvlGrp.hasKeyword("MaxLon")) { if (pvlGrp["MaxLon"][0] != "") { dMaxLon = pvlGrp["MaxLon"]; } @@ -720,13 +720,13 @@ namespace Isis { double dMaxDistance = 0; QString sUnits = "pixels"; - if (pvlGrp.HasKeyword("MaxDistance")) { + if (pvlGrp.hasKeyword("MaxDistance")) { if (pvlGrp["MaxDistance"][0] != "") { dMaxDistance = pvlGrp["MaxDistance"]; } } - if (pvlGrp.HasKeyword("Units")) { + if (pvlGrp.hasKeyword("Units")) { sUnits = pvlGrp["Units"][0]; } @@ -858,13 +858,13 @@ namespace Isis { void ControlNetFilter::PointGoodnessOfFitFilter(const PvlGroup & pvlGrp, bool pbLastFilter){ double dLesser=Isis::ValidMaximum, dGreater=0; - if (pvlGrp.HasKeyword("LessThan")){ + if (pvlGrp.hasKeyword("LessThan")){ if (pvlGrp["LessThan"][0] != "") { dLesser = fabs((double)(pvlGrp["LessThan"])); } } - if (pvlGrp.HasKeyword("GreaterThan")){ + if (pvlGrp.hasKeyword("GreaterThan")){ if (pvlGrp["GreaterThan"][0] != "") { dGreater = fabs((double)pvlGrp["GreaterThan"]); } @@ -934,13 +934,13 @@ namespace Isis { string sType = ""; IString isType; - if (pvlGrp.HasKeyword("Ignore")) { + if (pvlGrp.hasKeyword("Ignore")) { iIgnoredFlag = 0; if (IString(pvlGrp["Ignore"][0]).DownCase() == "true") iIgnoredFlag = 1; } - if (pvlGrp.HasKeyword("MeasureType")) { + if (pvlGrp.hasKeyword("MeasureType")) { sType = IString(pvlGrp["MeasureType"][0]).DownCase(); } @@ -1015,7 +1015,7 @@ namespace Isis { std::vector sCubeNames; // Store the Cubenames from the PvlGroup - for (int i = 0; i < pvlGrp.Keywords(); i++) { + for (int i = 0; i < pvlGrp.keywords(); i++) { sCubeNames.push_back(pvlGrp[i][0]); } @@ -1103,13 +1103,13 @@ namespace Isis { double dLesser = Isis::ValidMaximum; double dGreater = 0; - if (pvlGrp.HasKeyword("LessThan")) { + if (pvlGrp.hasKeyword("LessThan")) { if (pvlGrp["LessThan"][0] != "") { dLesser = fabs((double)pvlGrp["LessThan"]); } } - if (pvlGrp.HasKeyword("GreaterThan")) { + if (pvlGrp.hasKeyword("GreaterThan")) { if (pvlGrp["GreaterThan"][0] != "") { dGreater = fabs((double)pvlGrp["GreaterThan"]); } @@ -1159,7 +1159,7 @@ namespace Isis { */ void ControlNetFilter::CubeNameExpressionFilter(const PvlGroup &pvlGrp, bool pbLastFilter) { QString sCubeExpr(""); - if (pvlGrp.HasKeyword("Expression")) { + if (pvlGrp.hasKeyword("Expression")) { sCubeExpr = QString(pvlGrp["Expression"][0]); } @@ -1227,12 +1227,12 @@ namespace Isis { */ void ControlNetFilter::CubeNumPointsFilter(const PvlGroup &pvlGrp, bool pbLastFilter) { int iLessPoints = VALID_MAX2, iGreaterPoints = 0; - if (pvlGrp.HasKeyword("LessThan")) { + if (pvlGrp.hasKeyword("LessThan")) { if (pvlGrp["LessThan"][0] != "") { iLessPoints = toInt(pvlGrp["LessThan"][0]); } } - if (pvlGrp.HasKeyword("GreaterThan")) { + if (pvlGrp.hasKeyword("GreaterThan")) { if (pvlGrp["GreaterThan"][0] != "") { iGreaterPoints = toInt(pvlGrp["GreaterThan"][0]); } @@ -1283,13 +1283,13 @@ namespace Isis { double dDistance = 0; QString sUnits = "pixels"; - if (pvlGrp.HasKeyword("MaxDistance")) { + if (pvlGrp.hasKeyword("MaxDistance")) { if (pvlGrp["MaxDistance"][0] != "") { dDistance = pvlGrp["MaxDistance"]; } } - if (pvlGrp.HasKeyword("Units")) { + if (pvlGrp.hasKeyword("Units")) { sUnits = pvlGrp["Units"][0]; } diff --git a/isis/src/control/objs/ControlNetFilter/unitTest.cpp b/isis/src/control/objs/ControlNetFilter/unitTest.cpp index 1a1611ef432f3510c3a274cfefc6e0d94d8b63df..4e72fa04e627c13559fed81046e34bb40cc8044a 100644 --- a/isis/src/control/objs/ControlNetFilter/unitTest.cpp +++ b/isis/src/control/objs/ControlNetFilter/unitTest.cpp @@ -45,7 +45,7 @@ void IsisMain() { filterGrp += keyword; cnetFilter->PointResMagnitudeFilter(filterGrp, false); cout << filterGrp << endl; - filterGrp.Clear(); + filterGrp.clear(); PrintControlNetInfo(*cnet); delete (cnet); delete (cnetFilter); @@ -62,7 +62,7 @@ void IsisMain() { filterGrp += keyword; cnetFilter->PointEditLockFilter(filterGrp, false); cout << filterGrp << endl; - filterGrp.Clear(); + filterGrp.clear(); PrintControlNetInfo(*cnet); delete (cnet); delete (cnetFilter); @@ -79,7 +79,7 @@ void IsisMain() { filterGrp += keyword; cnetFilter->PointNumMeasuresEditLockFilter(filterGrp, false); cout << filterGrp << endl; - filterGrp.Clear(); + filterGrp.clear(); PrintControlNetInfo(*cnet); delete (cnet); delete (cnetFilter); @@ -98,7 +98,7 @@ void IsisMain() { filterGrp += keyword; cnetFilter->PointPixelShiftFilter(filterGrp, false); cout << filterGrp << endl; - filterGrp.Clear(); + filterGrp.clear(); PrintControlNetInfo(*cnet); delete (cnet); delete (cnetFilter); @@ -115,7 +115,7 @@ void IsisMain() { filterGrp += keyword; cnetFilter->PointIDFilter(filterGrp, false); cout << filterGrp << endl; - filterGrp.Clear(); + filterGrp.clear(); PrintControlNetInfo(*cnet); delete (cnet); delete (cnetFilter); @@ -134,7 +134,7 @@ void IsisMain() { filterGrp += keyword; cnetFilter->PointMeasuresFilter(filterGrp, false); cout << filterGrp << endl; - filterGrp.Clear(); + filterGrp.clear(); PrintControlNetInfo(*cnet); delete (cnet); delete (cnetFilter); @@ -153,7 +153,7 @@ void IsisMain() { filterGrp += keyword; cnetFilter->PointPropertiesFilter(filterGrp, false); cout << filterGrp << endl; - filterGrp.Clear(); + filterGrp.clear(); PrintControlNetInfo(*cnet); delete (cnet); delete (cnetFilter); @@ -180,7 +180,7 @@ void IsisMain() { cnetFilter->PointLatLonFilter(filterGrp, false); cout << filterGrp << endl; - filterGrp.Clear(); + filterGrp.clear(); PrintControlNetInfo(*cnet); delete (cnet); delete (cnetFilter); @@ -199,7 +199,7 @@ void IsisMain() { filterGrp += keyword; cnetFilter->PointDistanceFilter(filterGrp, false); cout << filterGrp << endl; - filterGrp.Clear(); + filterGrp.clear(); PrintControlNetInfo(*cnet); delete (cnet); delete (cnetFilter); @@ -216,7 +216,7 @@ void IsisMain() { filterGrp += keyword; cnetFilter->PointMeasurePropertiesFilter(filterGrp, false); cout << filterGrp << endl; - filterGrp.Clear(); + filterGrp.clear(); PrintControlNetInfo(*cnet); delete (cnet); delete (cnetFilter); @@ -234,7 +234,7 @@ void IsisMain() { cnetFilter->PointGoodnessOfFitFilter(filterGrp, false); cout << filterGrp << endl; PrintControlNetInfo(*cnet); - filterGrp.Clear(); + filterGrp.clear(); delete (cnet); delete (cnetFilter); cnetFilter = NULL; @@ -256,7 +256,7 @@ void IsisMain() { filterGrp += keyword; cnetFilter->PointCubeNamesFilter(filterGrp, false); cout << filterGrp << endl; - filterGrp.Clear(); + filterGrp.clear(); PrintControlNetInfo(*cnet); delete (cnet); delete (cnetFilter); @@ -274,7 +274,7 @@ void IsisMain() { filterGrp += keyword; cnetFilter->CubeNameExpressionFilter(filterGrp, false); cout << filterGrp << endl; - filterGrp.Clear(); + filterGrp.clear(); PrintControlNetInfo(*cnet); delete (cnet); delete (cnetFilter); @@ -293,7 +293,7 @@ void IsisMain() { filterGrp += keyword; cnetFilter->CubeNumPointsFilter(filterGrp, false); cout << filterGrp << endl; - filterGrp.Clear(); + filterGrp.clear(); PrintControlNetInfo(*cnet); delete (cnet); delete (cnetFilter); @@ -312,7 +312,7 @@ void IsisMain() { filterGrp += keyword; cnetFilter->CubeDistanceFilter(filterGrp, false); cout << filterGrp << endl; - filterGrp.Clear(); + filterGrp.clear(); PrintControlNetInfo(*cnet); delete (cnet); delete (cnetFilter); @@ -331,7 +331,7 @@ void IsisMain() { filterGrp += keyword; cnetFilter->CubeConvexHullFilter(filterGrp, false); cout << filterGrp << endl; - filterGrp.Clear(); + filterGrp.clear(); PrintControlNetInfo(*cnet); delete (cnet); delete (cnetFilter); diff --git a/isis/src/control/objs/ControlNetValidMeasure/ControlNetValidMeasure.cpp b/isis/src/control/objs/ControlNetValidMeasure/ControlNetValidMeasure.cpp index 521511ae419753844e8a1085728781e11f8238fc..f7bafeac5e4a79b74110e3207a5a8b976681484f 100644 --- a/isis/src/control/objs/ControlNetValidMeasure/ControlNetValidMeasure.cpp +++ b/isis/src/control/objs/ControlNetValidMeasure/ControlNetValidMeasure.cpp @@ -23,7 +23,7 @@ namespace Isis { ControlNetValidMeasure::ControlNetValidMeasure(Pvl *pPvl) { InitStdOptions(); - if(pPvl != NULL && pPvl->HasGroup("ValidMeasure")) { + if(pPvl != NULL && pPvl->hasGroup("ValidMeasure")) { Parse(*pPvl); } else { @@ -43,7 +43,7 @@ namespace Isis { ControlNetValidMeasure::ControlNetValidMeasure(Pvl &pPvl) { InitStdOptions(); - if(pPvl.HasGroup("ValidMeasure")) { + if(pPvl.hasGroup("ValidMeasure")) { Parse(pPvl); } else { @@ -142,7 +142,7 @@ namespace Isis { * @param pvlDef - Pvl DefFile */ void ControlNetValidMeasure::Parse(Pvl &pvlDef) { - mPvlOpGrp = pvlDef.FindGroup("ValidMeasure", Pvl::Traverse); + mPvlOpGrp = pvlDef.findGroup("ValidMeasure", Pvl::Traverse); mStdOptionsGrp = PvlGroup("StandardOptions"); @@ -380,7 +380,7 @@ namespace Isis { */ void ControlNetValidMeasure::ValidatePvlFromEdge(void) { // Parse the Pixels from edge - if(mPvlOpGrp.HasKeyword("PixelsFromEdge")) { + if(mPvlOpGrp.hasKeyword("PixelsFromEdge")) { miPixelsFromEdge = mPvlOpGrp["PixelsFromEdge"]; if(miPixelsFromEdge < 0) { miPixelsFromEdge = 0; @@ -391,7 +391,7 @@ namespace Isis { mStdOptionsGrp += Isis::PvlKeyword("PixelsFromEdge", toString(miPixelsFromEdge)); } // Parse the Meters from edge - if(mPvlOpGrp.HasKeyword("MetersFromEdge")) { + if(mPvlOpGrp.hasKeyword("MetersFromEdge")) { mdMetersFromEdge = mPvlOpGrp["MetersFromEdge"]; if(mdMetersFromEdge < 0) { mdMetersFromEdge = 0; @@ -411,7 +411,7 @@ namespace Isis { * @author Sharmila Prasad (6/4/2010) */ void ControlNetValidMeasure::ValidatePvlResolution(void) { - if(mPvlOpGrp.HasKeyword("MinResolution")){ + if(mPvlOpGrp.hasKeyword("MinResolution")){ mdMinResolution = mPvlOpGrp["MinResolution"]; mbCameraRequired = true; } @@ -420,7 +420,7 @@ namespace Isis { } mStdOptionsGrp += Isis::PvlKeyword("MinResolution", toString(mdMinResolution)); - if(mPvlOpGrp.HasKeyword("MaxResolution")){ + if(mPvlOpGrp.hasKeyword("MaxResolution")){ mdMaxResolution = mPvlOpGrp["MaxResolution"]; mbCameraRequired = true; } @@ -449,7 +449,7 @@ namespace Isis { * */ void ControlNetValidMeasure::ValidatePvlDN(void) { - if(mPvlOpGrp.HasKeyword("MinDN")) { + if(mPvlOpGrp.hasKeyword("MinDN")) { mdMinDN = mPvlOpGrp["MinDN"]; mbValidateDN = true; } @@ -458,7 +458,7 @@ namespace Isis { } mStdOptionsGrp += Isis::PvlKeyword("MinDN", (mdMinDN == Isis::ValidMinimum ? "NA" : toString(mdMinDN))); - if(mPvlOpGrp.HasKeyword("MaxDN")) { + if(mPvlOpGrp.hasKeyword("MaxDN")) { mdMaxDN = mPvlOpGrp["MaxDN"]; mbValidateDN = true; } @@ -482,7 +482,7 @@ namespace Isis { * */ void ControlNetValidMeasure::ValidatePvlEmissionAngle(void) { - if(mPvlOpGrp.HasKeyword("MinEmission")) { + if(mPvlOpGrp.hasKeyword("MinEmission")) { mdMinEmissionAngle = mPvlOpGrp["MinEmission"]; mbCameraRequired = true; if(mdMinEmissionAngle < 0 || mdMinEmissionAngle > 135) { @@ -492,7 +492,7 @@ namespace Isis { } mStdOptionsGrp += Isis::PvlKeyword("MinEmission", toString(mdMinEmissionAngle)); - if(mPvlOpGrp.HasKeyword("MaxEmission")) { + if(mPvlOpGrp.hasKeyword("MaxEmission")) { mdMaxEmissionAngle = mPvlOpGrp["MaxEmission"]; mbCameraRequired = true; if(mdMaxEmissionAngle < 0 || mdMaxEmissionAngle > 135) { @@ -518,7 +518,7 @@ namespace Isis { * */ void ControlNetValidMeasure::ValidatePvlIncidenceAngle(void) { - if(mPvlOpGrp.HasKeyword("MinIncidence")) { + if(mPvlOpGrp.hasKeyword("MinIncidence")) { mdMinIncidenceAngle = mPvlOpGrp["MinIncidence"]; mbCameraRequired = true; if(mdMinIncidenceAngle < 0 || mdMinIncidenceAngle > 135) { @@ -528,7 +528,7 @@ namespace Isis { } mStdOptionsGrp += Isis::PvlKeyword("MinIncidence", toString(mdMinIncidenceAngle)); - if(mPvlOpGrp.HasKeyword("MaxIncidence")) { + if(mPvlOpGrp.hasKeyword("MaxIncidence")) { mdMaxIncidenceAngle = mPvlOpGrp["MaxIncidence"]; mbCameraRequired = true; if(mdMaxIncidenceAngle < 0 || mdMaxIncidenceAngle > 135) { @@ -552,7 +552,7 @@ namespace Isis { void ControlNetValidMeasure::ValidatePvlResidualTolerances(void){ bool bRes=false; bool bResMag = false; - if(mPvlOpGrp.HasKeyword("SampleResidual")) { + if(mPvlOpGrp.hasKeyword("SampleResidual")) { mdSampleResTolerance = mPvlOpGrp["SampleResidual"]; if(mdSampleResTolerance < 0) { QString msg = "Invalid Sample Residual, must be greater than zero"; @@ -562,7 +562,7 @@ namespace Isis { } mStdOptionsGrp += Isis::PvlKeyword("SampleResidual", (mdSampleResTolerance == DBL_MAX ? "NA" : toString(mdSampleResTolerance))); - if(mPvlOpGrp.HasKeyword("LineResidual")) { + if(mPvlOpGrp.hasKeyword("LineResidual")) { mdLineResTolerance = mPvlOpGrp["LineResidual"]; if(mdLineResTolerance < 0) { QString msg = "Invalid Line Residual, must be greater than zero"; @@ -572,7 +572,7 @@ namespace Isis { } mStdOptionsGrp += Isis::PvlKeyword("LineResidual", (mdLineResTolerance == DBL_MAX ? "NA" : toString(mdLineResTolerance))); - if(mPvlOpGrp.HasKeyword("ResidualMagnitude")) { + if(mPvlOpGrp.hasKeyword("ResidualMagnitude")) { mdResidualTolerance = mPvlOpGrp["ResidualMagnitude"]; if(mdResidualTolerance < 0) { QString msg = "Invalid Residual Magnitude Tolerance, must be greater than zero"; @@ -596,7 +596,7 @@ namespace Isis { */ void ControlNetValidMeasure::ValidatePvlShiftTolerances() { bool hasSampleLineShift = false; - if (mPvlOpGrp.HasKeyword("SampleShift")) { + if (mPvlOpGrp.hasKeyword("SampleShift")) { m_sampleShiftTolerance = mPvlOpGrp["SampleShift"]; if (m_sampleShiftTolerance < 0) { QString msg = "Invalid Sample Shift tolerance:" @@ -607,7 +607,7 @@ namespace Isis { } mStdOptionsGrp += Isis::PvlKeyword("SampleShift", (m_sampleShiftTolerance == DBL_MAX ? "NA" : toString(m_sampleShiftTolerance))); - if (mPvlOpGrp.HasKeyword("LineShift")) { + if (mPvlOpGrp.hasKeyword("LineShift")) { m_lineShiftTolerance = mPvlOpGrp["LineShift"]; if (m_lineShiftTolerance < 0) { QString msg = "Invalid Line Shift tolerance:" @@ -619,7 +619,7 @@ namespace Isis { mStdOptionsGrp += Isis::PvlKeyword("LineShift", (m_lineShiftTolerance == DBL_MAX ? "NA" : toString(m_lineShiftTolerance))); bool hasPixelShift = false; - if (mPvlOpGrp.HasKeyword("PixelShift")) { + if (mPvlOpGrp.hasKeyword("PixelShift")) { m_pixelShiftTolerance = mPvlOpGrp["PixelShift"]; if (m_pixelShiftTolerance < 0) { QString msg = "Invalid Pixel Shift tolerance:" diff --git a/isis/src/control/objs/ControlNetVersioner/ControlNetFile.h b/isis/src/control/objs/ControlNetVersioner/ControlNetFile.h index 2245fb5b17c6b413fbddabd725f242c01f35bff8..53dc8459525b8942a4ff903dceae2f2e69075fd2 100644 --- a/isis/src/control/objs/ControlNetVersioner/ControlNetFile.h +++ b/isis/src/control/objs/ControlNetVersioner/ControlNetFile.h @@ -51,7 +51,7 @@ namespace Isis { /** * Convert the binary representation to Pvl (any pvl version). */ - virtual Pvl ToPvl() const = 0; + virtual Pvl toPvl() const = 0; private: /** diff --git a/isis/src/control/objs/ControlNetVersioner/ControlNetFileV0001.cpp b/isis/src/control/objs/ControlNetVersioner/ControlNetFileV0001.cpp index 23f39c80851cebdd3af7881696ffdd413217b405..84b1485a33f6c7843632d1e5ff6664a5ee7fc07a 100644 --- a/isis/src/control/objs/ControlNetVersioner/ControlNetFileV0001.cpp +++ b/isis/src/control/objs/ControlNetVersioner/ControlNetFileV0001.cpp @@ -33,8 +33,8 @@ namespace Isis { void ControlNetFileV0001::Read(const Pvl &head, const FileName &file) { - const PvlObject &protoBufferInfo = head.FindObject("ProtoBuffer"); - const PvlObject &protoBufferCore = protoBufferInfo.FindObject("Core"); + const PvlObject &protoBufferInfo = head.findObject("ProtoBuffer"); + const PvlObject &protoBufferCore = protoBufferInfo.findObject("Core"); BigInt coreStartPos = protoBufferCore["StartByte"]; BigInt coreLength = protoBufferCore["Bytes"]; @@ -68,7 +68,7 @@ namespace Isis { throw IException(IException::User, msg, _FILEINFO_); } - const PvlObject &logDataInfo = protoBufferInfo.FindObject("LogData"); + const PvlObject &logDataInfo = protoBufferInfo.findObject("LogData"); BigInt logStartPos = logDataInfo["StartByte"]; BigInt logLength = logDataInfo["Bytes"]; @@ -94,10 +94,10 @@ namespace Isis { } - Pvl ControlNetFileV0001::ToPvl() const { + Pvl ControlNetFileV0001::toPvl() const { Pvl pvl; - pvl.AddObject(PvlObject("ControlNetwork")); - PvlObject &network = pvl.FindObject("ControlNetwork"); + pvl.addObject(PvlObject("ControlNetwork")); + PvlObject &network = pvl.findObject("ControlNetwork"); network += PvlKeyword("NetworkId", p_network->networkid().c_str()); network += PvlKeyword("TargetName", p_network->targetname().c_str()); @@ -311,10 +311,10 @@ namespace Isis { binaryPoint.referenceindex() == j) pvlMeasure += PvlKeyword("Reference", "True"); - pvlPoint.AddGroup(pvlMeasure); + pvlPoint.addGroup(pvlMeasure); } - network.AddObject(pvlPoint); + network.addObject(pvlPoint); } return pvl; diff --git a/isis/src/control/objs/ControlNetVersioner/ControlNetFileV0001.h b/isis/src/control/objs/ControlNetVersioner/ControlNetFileV0001.h index 93f49e508043b5f2450d968e82041ae2dcf90ff9..fd3857fbb8f130eb413e58b0284c06fd8f8ea5b2 100644 --- a/isis/src/control/objs/ControlNetVersioner/ControlNetFileV0001.h +++ b/isis/src/control/objs/ControlNetVersioner/ControlNetFileV0001.h @@ -65,7 +65,7 @@ namespace Isis { // We don't need old Write methods... since this wasn't already // implemented I'm not going to bother to implement it now. virtual void Write(const FileName &file) const {}; - virtual Pvl ToPvl() const; + virtual Pvl toPvl() const; /** * Retrieve the protocol buffer that encapsulates the entire control diff --git a/isis/src/control/objs/ControlNetVersioner/ControlNetFileV0002.cpp b/isis/src/control/objs/ControlNetVersioner/ControlNetFileV0002.cpp index 4ea35b111eabc8c52634872ba97b3385f1246283..cf174259f22eacef66710c133b7152b007faf3c0 100644 --- a/isis/src/control/objs/ControlNetVersioner/ControlNetFileV0002.cpp +++ b/isis/src/control/objs/ControlNetVersioner/ControlNetFileV0002.cpp @@ -49,8 +49,8 @@ namespace Isis { * */ void ControlNetFileV0002::Read(const Pvl &header, const FileName &file) { - const PvlObject &protoBufferInfo = header.FindObject("ProtoBuffer"); - const PvlObject &protoBufferCore = protoBufferInfo.FindObject("Core"); + const PvlObject &protoBufferInfo = header.findObject("ProtoBuffer"); + const PvlObject &protoBufferCore = protoBufferInfo.findObject("Core"); BigInt headerStartPos = protoBufferCore["HeaderStartByte"]; BigInt headerLength = protoBufferCore["HeaderBytes"]; @@ -195,17 +195,17 @@ namespace Isis { PvlObject protoObj("ProtoBuffer"); PvlObject protoCore("Core"); - protoCore.AddKeyword(PvlKeyword("HeaderStartByte", + protoCore.addKeyword(PvlKeyword("HeaderStartByte", toString((BigInt) startCoreHeaderPos))); - protoCore.AddKeyword(PvlKeyword("HeaderBytes", toString((BigInt) coreHeaderSize))); - protoCore.AddKeyword(PvlKeyword("PointsStartByte", + protoCore.addKeyword(PvlKeyword("HeaderBytes", toString((BigInt) coreHeaderSize))); + protoCore.addKeyword(PvlKeyword("PointsStartByte", toString((BigInt) ( startCoreHeaderPos + coreHeaderSize)))); - protoCore.AddKeyword(PvlKeyword("PointsBytes", + protoCore.addKeyword(PvlKeyword("PointsBytes", toString(pointsSize))); - protoObj.AddObject(protoCore); + protoObj.addObject(protoCore); PvlGroup netInfo("ControlNetworkInfo"); - netInfo.AddComment("This group is for informational purposes only"); + netInfo.addComment("This group is for informational purposes only"); netInfo += PvlKeyword("NetworkId", p_networkHeader->networkid().c_str()); netInfo += PvlKeyword("TargetName", p_networkHeader->targetname().c_str()); netInfo += PvlKeyword("UserName", p_networkHeader->username().c_str()); @@ -215,9 +215,9 @@ namespace Isis { netInfo += PvlKeyword("NumberOfPoints", toString(p_controlPoints->size())); netInfo += PvlKeyword("NumberOfMeasures", toString(numMeasures)); netInfo += PvlKeyword("Version", "2"); - protoObj.AddGroup(netInfo); + protoObj.addGroup(netInfo); - p.AddObject(protoObj); + p.addObject(protoObj); output.seekp(0, ios::beg); output << p; @@ -242,10 +242,10 @@ namespace Isis { * Tie ----> Free * */ - Pvl ControlNetFileV0002::ToPvl() const { + Pvl ControlNetFileV0002::toPvl() const { Pvl pvl; - pvl.AddObject(PvlObject("ControlNetwork")); - PvlObject &network = pvl.FindObject("ControlNetwork"); + pvl.addObject(PvlObject("ControlNetwork")); + PvlObject &network = pvl.findObject("ControlNetwork"); network += PvlKeyword("NetworkId", p_networkHeader->networkid().c_str()); network += PvlKeyword("TargetName", p_networkHeader->targetname().c_str()); @@ -259,7 +259,7 @@ namespace Isis { // Get Target Radii from naif kernel PvlGroup pvlRadii; - QString target = (QString)network.FindKeyword("TargetName",Pvl::Traverse); + QString target = (QString)network.findKeyword("TargetName",Pvl::Traverse); if (target != "") { try { NaifStatus::CheckErrors(); @@ -362,13 +362,13 @@ namespace Isis { Displacement(binaryPoint.apriorix(),Displacement::Meters), Displacement(binaryPoint.aprioriy(),Displacement::Meters), Displacement(binaryPoint.aprioriz(),Displacement::Meters)); - pvlPoint.FindKeyword("AprioriX").AddComment("AprioriLatitude = " + + pvlPoint.findKeyword("AprioriX").addComment("AprioriLatitude = " + toString(apriori.GetLatitude().degrees()) + " "); - pvlPoint.FindKeyword("AprioriY").AddComment("AprioriLongitude = " + + pvlPoint.findKeyword("AprioriY").addComment("AprioriLongitude = " + toString(apriori.GetLongitude().degrees()) + " "); - pvlPoint.FindKeyword("AprioriZ").AddComment("AprioriRadius = " + + pvlPoint.findKeyword("AprioriZ").addComment("AprioriRadius = " + toString(apriori.GetLocalRadius().meters()) + " "); @@ -382,7 +382,7 @@ namespace Isis { matrix += toString(binaryPoint.aprioricovar(5)); pvlPoint += matrix; - if (pvlRadii.HasKeyword("EquatorialRadius")) { + if (pvlRadii.hasKeyword("EquatorialRadius")) { apriori.SetRadii( Distance(pvlRadii["EquatorialRadius"],Distance::Meters), Distance(pvlRadii["EquatorialRadius"],Distance::Meters), @@ -404,7 +404,7 @@ namespace Isis { " AprioriRadiusSigma = " + toString(apriori.GetLocalRadiusSigma().meters()) + " "; - pvlPoint.FindKeyword("AprioriCovarianceMatrix").AddComment(sigmas); + pvlPoint.findKeyword("AprioriCovarianceMatrix").addComment(sigmas); } } } @@ -429,13 +429,13 @@ namespace Isis { Displacement(binaryPoint.adjustedx(),Displacement::Meters), Displacement(binaryPoint.adjustedy(),Displacement::Meters), Displacement(binaryPoint.adjustedz(),Displacement::Meters)); - pvlPoint.FindKeyword("AdjustedX").AddComment("AdjustedLatitude = " + + pvlPoint.findKeyword("AdjustedX").addComment("AdjustedLatitude = " + toString(adjusted.GetLatitude().degrees()) + " "); - pvlPoint.FindKeyword("AdjustedY").AddComment("AdjustedLongitude = " + + pvlPoint.findKeyword("AdjustedY").addComment("AdjustedLongitude = " + toString(adjusted.GetLongitude().degrees()) + " "); - pvlPoint.FindKeyword("AdjustedZ").AddComment("AdjustedRadius = " + + pvlPoint.findKeyword("AdjustedZ").addComment("AdjustedRadius = " + toString(adjusted.GetLocalRadius().meters()) + " "); @@ -449,7 +449,7 @@ namespace Isis { matrix += toString(binaryPoint.adjustedcovar(5)); pvlPoint += matrix; - if (pvlRadii.HasKeyword("EquatorialRadius")) { + if (pvlRadii.hasKeyword("EquatorialRadius")) { adjusted.SetRadii( Distance(pvlRadii["EquatorialRadius"],Distance::Meters), Distance(pvlRadii["EquatorialRadius"],Distance::Meters), @@ -471,7 +471,7 @@ namespace Isis { " AdjustedRadiusSigma = " + toString(adjusted.GetLocalRadiusSigma().meters()) + " "; - pvlPoint.FindKeyword("AdjustedCovarianceMatrix").AddComment(sigmas); + pvlPoint.findKeyword("AdjustedCovarianceMatrix").addComment(sigmas); } } } @@ -554,10 +554,10 @@ namespace Isis { binaryPoint.referenceindex() == j) pvlMeasure += PvlKeyword("Reference", "True"); - pvlPoint.AddGroup(pvlMeasure); + pvlPoint.addGroup(pvlMeasure); } - network.AddObject(pvlPoint); + network.addObject(pvlPoint); } return pvl; } diff --git a/isis/src/control/objs/ControlNetVersioner/ControlNetFileV0002.h b/isis/src/control/objs/ControlNetVersioner/ControlNetFileV0002.h index c4e95cd8f5dd6b1e7b0f820f4b572e7be8b36dc7..38e2241658ffaf20d6763ffcb21461070f837fdf 100644 --- a/isis/src/control/objs/ControlNetVersioner/ControlNetFileV0002.h +++ b/isis/src/control/objs/ControlNetVersioner/ControlNetFileV0002.h @@ -59,7 +59,7 @@ namespace Isis { virtual void Read(const Pvl &header, const FileName &file); virtual void Write(const FileName &file) const; - virtual Pvl ToPvl() const; + virtual Pvl toPvl() const; /** * Get the control network level information - things like NetworkID, diff --git a/isis/src/control/objs/ControlNetVersioner/ControlNetVersioner.cpp b/isis/src/control/objs/ControlNetVersioner/ControlNetVersioner.cpp index 1b47d6f072f841011991455c48c20b64449849b0..11717ce650a16535d1fa8196d1c3add9ee73da6d 100644 --- a/isis/src/control/objs/ControlNetVersioner/ControlNetVersioner.cpp +++ b/isis/src/control/objs/ControlNetVersioner/ControlNetVersioner.cpp @@ -41,10 +41,10 @@ namespace Isis { try { Pvl network(networkFileName.expanded()); - if(network.HasObject("ProtoBuffer")) { + if(network.hasObject("ProtoBuffer")) { return ReadBinaryNetwork(network, networkFileName); } - else if(network.HasObject("ControlNetwork")) { + else if(network.hasObject("ControlNetwork")) { return ReadPvlNetwork(network); } else { @@ -71,7 +71,7 @@ namespace Isis { void ControlNetVersioner::Write(const FileName &file, const LatestControlNetFile &fileData, bool pvl) { if(pvl) { - fileData.ToPvl().Write(file.expanded()); + fileData.toPvl().write(file.expanded()); } else { fileData.Write(file); @@ -96,9 +96,9 @@ namespace Isis { * @param pvl The pvl network obtained from Pvl::Read on the input filename */ LatestControlNetFile *ControlNetVersioner::ReadPvlNetwork(Pvl pvl) { - PvlObject &network = pvl.FindObject("ControlNetwork"); + PvlObject &network = pvl.findObject("ControlNetwork"); - if(!network.HasKeyword("Version")) + if(!network.hasKeyword("Version")) network += PvlKeyword("Version", "1"); int version = toInt(network["Version"][0]); @@ -156,12 +156,12 @@ namespace Isis { ControlNetFileHeaderV0002 &header = latest->GetNetworkHeader(); - header.set_networkid(network.FindKeyword("NetworkId")[0].toAscii().data()); - header.set_targetname(network.FindKeyword("TargetName")[0].toAscii().data()); - header.set_created(network.FindKeyword("Created")[0].toAscii().data()); - header.set_lastmodified(network.FindKeyword("LastModified")[0].toAscii().data()); - header.set_description(network.FindKeyword("Description")[0].toAscii().data()); - header.set_username(network.FindKeyword("UserName")[0].toAscii().data()); + header.set_networkid(network.findKeyword("NetworkId")[0].toAscii().data()); + header.set_targetname(network.findKeyword("TargetName")[0].toAscii().data()); + header.set_created(network.findKeyword("Created")[0].toAscii().data()); + header.set_lastmodified(network.findKeyword("LastModified")[0].toAscii().data()); + header.set_description(network.findKeyword("Description")[0].toAscii().data()); + header.set_username(network.findKeyword("UserName")[0].toAscii().data()); header.add_pointmessagesizes(0); // Just to pass the "IsInitialized" test if(!header.IsInitialized()) { @@ -172,9 +172,9 @@ namespace Isis { QList &points = latest->GetNetworkPoints(); - for(int objectIndex = 0; objectIndex < network.Objects(); objectIndex ++) { + for(int objectIndex = 0; objectIndex < network.objects(); objectIndex ++) { ControlPointFileEntryV0002 point; - PvlObject &object = network.Object(objectIndex); + PvlObject &object = network.object(objectIndex); Copy(object, "PointId", point, &ControlPointFileEntryV0002::set_id); @@ -218,7 +218,7 @@ namespace Isis { else point.set_type(ControlPointFileEntryV0002::Free); - if (object.HasKeyword("AprioriXYZSource")) { + if (object.hasKeyword("AprioriXYZSource")) { IString source = object["AprioriXYZSource"][0]; if (source == "None") { @@ -249,7 +249,7 @@ namespace Isis { } } - if (object.HasKeyword("AprioriRadiusSource")) { + if (object.hasKeyword("AprioriRadiusSource")) { IString source = object["AprioriRadiusSource"][0]; if (source == "None") { @@ -278,7 +278,7 @@ namespace Isis { } } - if (object.HasKeyword("AprioriCovarianceMatrix")) { + if (object.hasKeyword("AprioriCovarianceMatrix")) { PvlKeyword &matrix = object["AprioriCovarianceMatrix"]; point.add_aprioricovar(toDouble(matrix[0])); @@ -289,7 +289,7 @@ namespace Isis { point.add_aprioricovar(toDouble(matrix[5])); } - if(object.HasKeyword("AdjustedCovarianceMatrix")) { + if(object.hasKeyword("AdjustedCovarianceMatrix")) { PvlKeyword &matrix = object["AdjustedCovarianceMatrix"]; point.add_adjustedcovar(toDouble(matrix[0])); @@ -301,8 +301,8 @@ namespace Isis { } // Process Measures - for (int groupIndex = 0; groupIndex < object.Groups(); groupIndex ++) { - PvlGroup &group = object.Group(groupIndex); + for (int groupIndex = 0; groupIndex < object.groups(); groupIndex ++) { + PvlGroup &group = object.group(groupIndex); ControlPointFileEntryV0002::Measure measure; Copy(group, "SerialNumber", @@ -336,11 +336,11 @@ namespace Isis { Copy(group, "LineSigma", measure, &ControlPointFileEntryV0002::Measure::set_linesigma); - if(group.HasKeyword("Reference")) { + if(group.hasKeyword("Reference")) { if(group["Reference"][0].toLower() == "true") point.set_referenceindex(groupIndex); - group.DeleteKeyword("Reference"); + group.deleteKeyword("Reference"); } QString type = group["MeasureType"][0].toLower(); @@ -358,13 +358,13 @@ namespace Isis { throw IException(IException::Io, "Unknown measure type [" + type + "]", _FILEINFO_); - group.DeleteKeyword("MeasureType"); + group.deleteKeyword("MeasureType"); - for(int key = 0; key < group.Keywords(); key++) { + for(int key = 0; key < group.keywords(); key++) { ControlMeasureLogData interpreter(group[key]); if(!interpreter.IsValid()) { IString msg = "Unhandled or duplicate keywords in control measure [" - + group[key].Name() + "]"; + + group[key].name() + "]"; throw IException(IException::Programmer, msg, _FILEINFO_); } else { @@ -401,10 +401,10 @@ namespace Isis { // Find the binary cnet version by any means necessary int version = 1; - const PvlObject &protoBuf = header.FindObject("ProtoBuffer"); - const PvlGroup &netInfo = protoBuf.FindGroup("ControlNetworkInfo"); + const PvlObject &protoBuf = header.findObject("ProtoBuffer"); + const PvlGroup &netInfo = protoBuf.findGroup("ControlNetworkInfo"); - if(netInfo.HasKeyword("Version")) + if(netInfo.hasKeyword("Version")) version = toInt(netInfo["Version"][0]); // Okay, let's instantiate the correct ControlNetFile for this version @@ -428,7 +428,7 @@ namespace Isis { cnetFile->Read(header, filename); if(version != LATEST_BINARY_VERSION) { - Pvl pvl(cnetFile->ToPvl()); + Pvl pvl(cnetFile->toPvl()); delete cnetFile; cnetFile = NULL; @@ -483,19 +483,19 @@ namespace Isis { Distance equatorialRadius(radii["EquatorialRadius"], Distance::Meters); Distance polarRadius(radii["PolarRadius"], Distance::Meters); - for(int cpIndex = 0; cpIndex < network.Objects(); cpIndex ++) { - PvlObject &cp = network.Object(cpIndex); + for(int cpIndex = 0; cpIndex < network.objects(); cpIndex ++) { + PvlObject &cp = network.object(cpIndex); - if(cp.HasKeyword("Held") && cp["Held"][0] == "True") + if(cp.hasKeyword("Held") && cp["Held"][0] == "True") cp["PointType"] = "Ground"; - if(cp.HasKeyword("AprioriLatLonSource")) - cp["AprioriLatLonSource"].SetName("AprioriXYZSource"); + if(cp.hasKeyword("AprioriLatLonSource")) + cp["AprioriLatLonSource"].setName("AprioriXYZSource"); - if(cp.HasKeyword("AprioriLatLonSourceFile")) - cp["AprioriLatLonSourceFile"].SetName("AprioriXYZSourceFile"); + if(cp.hasKeyword("AprioriLatLonSourceFile")) + cp["AprioriLatLonSourceFile"].setName("AprioriXYZSourceFile"); - if(cp.HasKeyword("AprioriLatitude")) { + if(cp.hasKeyword("AprioriLatitude")) { SurfacePoint apriori( Latitude(toDouble(cp["AprioriLatitude"][0]), Angle::Degrees), Longitude(toDouble(cp["AprioriLongitude"][0]), Angle::Degrees), @@ -506,7 +506,7 @@ namespace Isis { cp += PvlKeyword("AprioriZ", toString(apriori.GetZ().meters()), "meters"); } - if(cp.HasKeyword("Latitude")) { + if(cp.hasKeyword("Latitude")) { SurfacePoint adjusted( Latitude(toDouble(cp["Latitude"][0]), Angle::Degrees), Longitude(toDouble(cp["Longitude"][0]), Angle::Degrees), @@ -516,30 +516,30 @@ namespace Isis { cp += PvlKeyword("AdjustedY", toString(adjusted.GetY().meters()), "meters"); cp += PvlKeyword("AdjustedZ", toString(adjusted.GetZ().meters()), "meters"); - if(!cp.HasKeyword("AprioriLatitude")) { + if(!cp.hasKeyword("AprioriLatitude")) { cp += PvlKeyword("AprioriX", toString(adjusted.GetX().meters()), "meters"); cp += PvlKeyword("AprioriY", toString(adjusted.GetY().meters()), "meters"); cp += PvlKeyword("AprioriZ", toString(adjusted.GetZ().meters()), "meters"); } } - if(cp.HasKeyword("X")) - cp["X"].SetName("AdjustedX"); + if(cp.hasKeyword("X")) + cp["X"].setName("AdjustedX"); - if(cp.HasKeyword("Y")) - cp["Y"].SetName("AdjustedY"); + if(cp.hasKeyword("Y")) + cp["Y"].setName("AdjustedY"); - if(cp.HasKeyword("Z")) - cp["Z"].SetName("AdjustedZ"); + if(cp.hasKeyword("Z")) + cp["Z"].setName("AdjustedZ"); - if(cp.HasKeyword("AprioriSigmaLatitude") || - cp.HasKeyword("AprioriSigmaLongitude") || - cp.HasKeyword("AprioriSigmaRadius")) { + if(cp.hasKeyword("AprioriSigmaLatitude") || + cp.hasKeyword("AprioriSigmaLongitude") || + cp.hasKeyword("AprioriSigmaRadius")) { double sigmaLat = 10000.0; double sigmaLon = 10000.0; double sigmaRad = 10000.0; - if(cp.HasKeyword("AprioriSigmaLatitude")) { + if(cp.hasKeyword("AprioriSigmaLatitude")) { if(toDouble(cp["AprioriSigmaLatitude"][0]) > 0 && toDouble(cp["AprioriSigmaLatitude"][0]) < sigmaLat) sigmaLat = cp["AprioriSigmaLatitude"]; @@ -547,7 +547,7 @@ namespace Isis { cp += PvlKeyword("LatitudeConstrained", "True"); } - if(cp.HasKeyword("AprioriSigmaLongitude")) { + if(cp.hasKeyword("AprioriSigmaLongitude")) { if(toDouble(cp["AprioriSigmaLongitude"][0]) > 0 && toDouble(cp["AprioriSigmaLongitude"][0]) < sigmaLon) sigmaLon = cp["AprioriSigmaLongitude"]; @@ -555,7 +555,7 @@ namespace Isis { cp += PvlKeyword("LongitudeConstrained", "True"); } - if(cp.HasKeyword("AprioriSigmaRadius")) { + if(cp.hasKeyword("AprioriSigmaRadius")) { if(toDouble(cp["AprioriSigmaRadius"][0]) > 0 && toDouble(cp["AprioriSigmaRadius"][0]) < sigmaRad) sigmaRad = cp["AprioriSigmaRadius"]; @@ -585,26 +585,26 @@ namespace Isis { cp += aprioriCovarMatrix; } - if(cp.HasKeyword("AdjustedSigmaLatitude") || - cp.HasKeyword("AdjustedSigmaLongitude") || - cp.HasKeyword("AdjustedSigmaRadius")) { + if(cp.hasKeyword("AdjustedSigmaLatitude") || + cp.hasKeyword("AdjustedSigmaLongitude") || + cp.hasKeyword("AdjustedSigmaRadius")) { double sigmaLat = 10000.0; double sigmaLon = 10000.0; double sigmaRad = 10000.0; - if(cp.HasKeyword("AdjustedSigmaLatitude")) { + if(cp.hasKeyword("AdjustedSigmaLatitude")) { if(toDouble(cp["AdjustedSigmaLatitude"][0]) > 0 && toDouble(cp["AdjustedSigmaLatitude"][0]) < sigmaLat) sigmaLat = cp["AdjustedSigmaLatitude"]; } - if(cp.HasKeyword("AdjustedSigmaLongitude")) { + if(cp.hasKeyword("AdjustedSigmaLongitude")) { if(toDouble(cp["AdjustedSigmaLongitude"][0]) > 0 && toDouble(cp["AdjustedSigmaLongitude"][0]) < sigmaLon) sigmaLon = cp["AdjustedSigmaLongitude"]; } - if(cp.HasKeyword("AdjustedSigmaRadius")) { + if(cp.hasKeyword("AdjustedSigmaRadius")) { if(toDouble(cp["AdjustedSigmaRadius"][0]) > 0 && toDouble(cp["AdjustedSigmaRadius"][0]) < sigmaRad) sigmaRad = cp["AdjustedSigmaRadius"]; @@ -632,42 +632,42 @@ namespace Isis { cp += adjustedCovarMatrix; } - if(cp.HasKeyword("ApostCovarianceMatrix")) - cp["ApostCovarianceMatrix"].SetName("AdjustedCovarianceMatrix"); + if(cp.hasKeyword("ApostCovarianceMatrix")) + cp["ApostCovarianceMatrix"].setName("AdjustedCovarianceMatrix"); - if(!cp.HasKeyword("LatitudeConstrained")) { - if(cp.HasKeyword("AprioriCovarianceMatrix")) + if(!cp.hasKeyword("LatitudeConstrained")) { + if(cp.hasKeyword("AprioriCovarianceMatrix")) cp += PvlKeyword("LatitudeConstrained", "True"); else cp += PvlKeyword("LatitudeConstrained", "False"); } - if(!cp.HasKeyword("LongitudeConstrained")) { - if(cp.HasKeyword("AprioriCovarianceMatrix")) + if(!cp.hasKeyword("LongitudeConstrained")) { + if(cp.hasKeyword("AprioriCovarianceMatrix")) cp += PvlKeyword("LongitudeConstrained", "True"); else cp += PvlKeyword("LongitudeConstrained", "False"); } - if(!cp.HasKeyword("RadiusConstrained")) { - if(cp.HasKeyword("AprioriCovarianceMatrix")) + if(!cp.hasKeyword("RadiusConstrained")) { + if(cp.hasKeyword("AprioriCovarianceMatrix")) cp += PvlKeyword("RadiusConstrained", "True"); else cp += PvlKeyword("RadiusConstrained", "False"); } // Delete anything that has no value... - for(int cpKeyIndex = 0; cpKeyIndex < cp.Keywords(); cpKeyIndex ++) { + for(int cpKeyIndex = 0; cpKeyIndex < cp.keywords(); cpKeyIndex ++) { if(cp[cpKeyIndex][0] == "") { - cp.DeleteKeyword(cpKeyIndex); + cp.deleteKeyword(cpKeyIndex); } } - for(int cmIndex = 0; cmIndex < cp.Groups(); cmIndex ++) { - PvlGroup &cm = cp.Group(cmIndex); + for(int cmIndex = 0; cmIndex < cp.groups(); cmIndex ++) { + PvlGroup &cm = cp.group(cmIndex); // Estimated => Candidate - if(cm.HasKeyword("MeasureType")) { + if(cm.hasKeyword("MeasureType")) { IString type = cm["MeasureType"][0]; type.DownCase(); @@ -684,35 +684,35 @@ namespace Isis { } } - if(cm.HasKeyword("ErrorSample")) - cm["ErrorSample"].SetName("SampleResidual"); + if(cm.hasKeyword("ErrorSample")) + cm["ErrorSample"].setName("SampleResidual"); - if(cm.HasKeyword("ErrorLine")) - cm["ErrorLine"].SetName("LineResidual"); + if(cm.hasKeyword("ErrorLine")) + cm["ErrorLine"].setName("LineResidual"); // Delete some extraneous values we once printed - if(cm.HasKeyword("SampleResidual") && + if(cm.hasKeyword("SampleResidual") && toDouble(cm["SampleResidual"][0]) == 0.0) - cm.DeleteKeyword("SampleResidual"); + cm.deleteKeyword("SampleResidual"); - if(cm.HasKeyword("LineResidual") && + if(cm.hasKeyword("LineResidual") && toDouble(cm["LineResidual"][0]) == 0.0) - cm.DeleteKeyword("LineResidual"); + cm.deleteKeyword("LineResidual"); - if(cm.HasKeyword("Diameter") && + if(cm.hasKeyword("Diameter") && toDouble(cm["Diameter"][0]) == 0.0) - cm.DeleteKeyword("Diameter"); + cm.deleteKeyword("Diameter"); - if(cm.HasKeyword("ErrorMagnitude")) - cm.DeleteKeyword("ErrorMagnitude"); + if(cm.hasKeyword("ErrorMagnitude")) + cm.deleteKeyword("ErrorMagnitude"); - if(cm.HasKeyword("ZScore")) - cm.DeleteKeyword("ZScore"); + if(cm.hasKeyword("ZScore")) + cm.deleteKeyword("ZScore"); // Delete anything that has no value... - for(int cmKeyIndex = 0; cmKeyIndex < cm.Keywords(); cmKeyIndex ++) { + for(int cmKeyIndex = 0; cmKeyIndex < cm.keywords(); cmKeyIndex ++) { if(cm[cmKeyIndex][0] == "") { - cm.DeleteKeyword(cmKeyIndex); + cm.deleteKeyword(cmKeyIndex); } } } @@ -732,11 +732,11 @@ namespace Isis { PvlObject &network) { network["Version"] = "3"; - for(int cpIndex = 0; cpIndex < network.Objects(); cpIndex ++) { - PvlObject &cp = network.Object(cpIndex); + for(int cpIndex = 0; cpIndex < network.objects(); cpIndex ++) { + PvlObject &cp = network.object(cpIndex); - if(cp.HasKeyword("AprioriCovarianceMatrix") || - cp.HasKeyword("AdjustedCovarianceMatrix")) + if(cp.hasKeyword("AprioriCovarianceMatrix") || + cp.hasKeyword("AdjustedCovarianceMatrix")) cp["PointType"] = "Constrained"; } } @@ -753,8 +753,8 @@ namespace Isis { PvlObject &network) { network["Version"] = "4"; - for (int cpIndex = 0; cpIndex < network.Objects(); cpIndex ++) { - PvlObject &cp = network.Object(cpIndex); + for (int cpIndex = 0; cpIndex < network.objects(); cpIndex ++) { + PvlObject &cp = network.object(cpIndex); if (cp["PointType"][0] == "Ground") cp["PointType"] = "Fixed"; if (cp["PointType"][0] == "Tie") cp["PointType"] = "Free"; @@ -778,11 +778,11 @@ namespace Isis { void ControlNetVersioner::Copy(PvlContainer &container, QString keyName, ControlPointFileEntryV0002 &point, void (ControlPointFileEntryV0002::*setter)(bool)) { - if(!container.HasKeyword(keyName)) + if(!container.hasKeyword(keyName)) return; QString value = container[keyName][0]; - container.DeleteKeyword(keyName); + container.deleteKeyword(keyName); value = value.toLower(); if(value == "true" || value == "yes") (point.*setter)(true); @@ -805,11 +805,11 @@ namespace Isis { void ControlNetVersioner::Copy(PvlContainer &container, QString keyName, ControlPointFileEntryV0002 &point, void (ControlPointFileEntryV0002::*setter)(double)) { - if(!container.HasKeyword(keyName)) + if(!container.hasKeyword(keyName)) return; double value = toDouble(container[keyName][0]); - container.DeleteKeyword(keyName); + container.deleteKeyword(keyName); (point.*setter)(value); } @@ -830,11 +830,11 @@ namespace Isis { void ControlNetVersioner::Copy(PvlContainer &container, QString keyName, ControlPointFileEntryV0002 &point, void (ControlPointFileEntryV0002::*setter)(const std::string&)) { - if(!container.HasKeyword(keyName)) + if(!container.hasKeyword(keyName)) return; IString value = container[keyName][0]; - container.DeleteKeyword(keyName); + container.deleteKeyword(keyName); (point.*setter)(value); } @@ -855,11 +855,11 @@ namespace Isis { void ControlNetVersioner::Copy(PvlContainer &container, QString keyName, ControlPointFileEntryV0002::Measure &measure, void (ControlPointFileEntryV0002::Measure::*setter)(bool)) { - if(!container.HasKeyword(keyName)) + if(!container.hasKeyword(keyName)) return; QString value = container[keyName][0]; - container.DeleteKeyword(keyName); + container.deleteKeyword(keyName); value = value.toLower(); if(value == "true" || value == "yes") (measure.*setter)(true); @@ -882,11 +882,11 @@ namespace Isis { void ControlNetVersioner::Copy(PvlContainer &container, QString keyName, ControlPointFileEntryV0002::Measure &measure, void (ControlPointFileEntryV0002::Measure::*setter)(double)) { - if(!container.HasKeyword(keyName)) + if(!container.hasKeyword(keyName)) return; double value = toDouble(container[keyName][0]); - container.DeleteKeyword(keyName); + container.deleteKeyword(keyName); (measure.*setter)(value); } @@ -907,11 +907,11 @@ namespace Isis { void ControlNetVersioner::Copy(PvlContainer &container, QString keyName, ControlPointFileEntryV0002::Measure &measure, void (ControlPointFileEntryV0002::Measure::*set)(const std::string &)) { - if(!container.HasKeyword(keyName)) + if(!container.hasKeyword(keyName)) return; IString value = container[keyName][0]; - container.DeleteKeyword(keyName); + container.deleteKeyword(keyName); (measure.*set)(value); } } diff --git a/isis/src/control/objs/ControlNetVersioner/unitTest.cpp b/isis/src/control/objs/ControlNetVersioner/unitTest.cpp index 6cd70a4e2250817c8fbbae343e5ec9a4adedcda6..123bcc936e2d3da89e58c9fa3daa8116cf3d8f9d 100644 --- a/isis/src/control/objs/ControlNetVersioner/unitTest.cpp +++ b/isis/src/control/objs/ControlNetVersioner/unitTest.cpp @@ -47,9 +47,9 @@ void TestNetwork(const QString &filename, bool printNetwork) { if(printNetwork) { cerr << "Converted directly to Pvl:" << endl; - Pvl pvlVersion(test->ToPvl()); + Pvl pvlVersion(test->toPvl()); cerr << pvlVersion << endl; - pvlVersion.Write("./tmp.pvl"); + pvlVersion.write("./tmp.pvl"); } // Test the latest binary read/write and Pvl conversion @@ -67,8 +67,8 @@ void TestNetwork(const QString &filename, bool printNetwork) { cerr << "After reading and writing to a binary form does Pvl match?" << endl; if(printNetwork) { - Pvl pvlVersion2(test2->ToPvl()); - pvlVersion2.Write("./tmp2.pvl"); + Pvl pvlVersion2(test2->toPvl()); + pvlVersion2.write("./tmp2.pvl"); if(system("cmp ./tmp.pvl ./tmp2.pvl")) { cerr << "Reading/Writing results in Pvl differences!" << endl; } diff --git a/isis/src/control/objs/InterestOperator/InterestOperator.cpp b/isis/src/control/objs/InterestOperator/InterestOperator.cpp index 76686e54627e5f834d5ddc82fb906e65dffeea8b..10fd5581986d7213b9e7bc60680bb937b722ef70 100644 --- a/isis/src/control/objs/InterestOperator/InterestOperator.cpp +++ b/isis/src/control/objs/InterestOperator/InterestOperator.cpp @@ -84,7 +84,7 @@ namespace Isis { try { // Get info from the operator group // Required Parameters - PvlGroup &op = pPvl.FindGroup("Operator", Pvl::Traverse); + PvlGroup &op = pPvl.findGroup("Operator", Pvl::Traverse); mOperatorGrp += Isis::PvlKeyword(op["Name"]); @@ -105,7 +105,7 @@ namespace Isis { } catch (IException &e) { - QString msg = "Improper format for InterestOperator PVL [" + pPvl.FileName() + "]"; + QString msg = "Improper format for InterestOperator PVL [" + pPvl.fileName() + "]"; throw IException(IException::User, msg, _FILEINFO_); } } @@ -920,9 +920,9 @@ namespace Isis { // add this object's group to the pvl - void InterestOperator::AddGroup(Isis::PvlObject &obj) { + void InterestOperator::addGroup(Isis::PvlObject &obj) { Isis::PvlGroup group; - obj.AddGroup(group); + obj.addGroup(group); } diff --git a/isis/src/control/objs/InterestOperator/InterestOperator.h b/isis/src/control/objs/InterestOperator/InterestOperator.h index d5a611bdfec72de23a1a3682c53493678d080f27..09c309d8b94778f0a682c1d2efa8503d5932881f 100644 --- a/isis/src/control/objs/InterestOperator/InterestOperator.h +++ b/isis/src/control/objs/InterestOperator/InterestOperator.h @@ -163,7 +163,7 @@ namespace Isis { //! Compare for int1 greater than / equal to int2 virtual bool CompareInterests(double int1, double int2); - void AddGroup(Isis::PvlObject &obj); //???? check if used + void addGroup(Isis::PvlObject &obj); //???? check if used //! Set the Clip Polygon for points to be contained in the overlaps void SetClipPolygon(const geos::geom::MultiPolygon &clipPolygon); diff --git a/isis/src/control/objs/InterestOperator/unitTest.cpp b/isis/src/control/objs/InterestOperator/unitTest.cpp index 1ae4e873220acf323deecb1d4fadc3d3500b3ab9..f98e384e2ac1c5f6fcba91cdc4f834c9a651d749 100644 --- a/isis/src/control/objs/InterestOperator/unitTest.cpp +++ b/isis/src/control/objs/InterestOperator/unitTest.cpp @@ -35,11 +35,11 @@ int main() { //op += PvlKeyword("MaxResolution", 300); PvlObject o("InterestOperator"); - o.AddGroup(op); - o.AddGroup(opv); + o.addGroup(op); + o.addGroup(opv); Pvl pvl; - pvl.AddObject(o); + pvl.addObject(o); std::cout << pvl << std::endl; InterestOperator *iop = InterestOperatorFactory::Create(pvl); diff --git a/isis/src/control/objs/InterestOperatorFactory/InterestOperatorFactory.cpp b/isis/src/control/objs/InterestOperatorFactory/InterestOperatorFactory.cpp index 291bd0ad8f728bfc571a0524e91df25400fe1bdd..c23a4de8d7c9e2ece1c783976a5d3696cb2e8dd7 100644 --- a/isis/src/control/objs/InterestOperatorFactory/InterestOperatorFactory.cpp +++ b/isis/src/control/objs/InterestOperatorFactory/InterestOperatorFactory.cpp @@ -52,17 +52,17 @@ namespace Isis { **/ InterestOperator *InterestOperatorFactory::Create(Pvl &pPvl) { // Get the algorithm name to create - PvlGroup &op = pPvl.FindGroup("Operator", Pvl::Traverse); + PvlGroup &op = pPvl.findGroup("Operator", Pvl::Traverse); QString operatorName = op["Name"]; // Open the factory plugin file Plugin p; FileName f("InterestOperator.plugin"); if(f.fileExists()) { - p.Read("InterestOperator.plugin"); + p.read("InterestOperator.plugin"); } else { - p.Read("$ISISROOT/lib/InterestOperator.plugin"); + p.read("$ISISROOT/lib/InterestOperator.plugin"); } // Get the algorithm specific plugin and return it diff --git a/isis/src/database/objs/DatabaseFactory/DatabaseFactory.cpp b/isis/src/database/objs/DatabaseFactory/DatabaseFactory.cpp index 4a3feffee3ea317d95d4e7c8ec5666210d7ab551..c0e6181d81ff803b478886c4e176ee19015a3ee7 100644 --- a/isis/src/database/objs/DatabaseFactory/DatabaseFactory.cpp +++ b/isis/src/database/objs/DatabaseFactory/DatabaseFactory.cpp @@ -493,13 +493,13 @@ namespace Isis { */ void DatabaseFactory::initPreferences() { Preference &userPref = Preference::Preferences(); - if(userPref.HasGroup("Database")) { - PvlGroup &dbgroup = userPref.FindGroup("Database"); - if(dbgroup.HasKeyword("AccessConfig")) { + if(userPref.hasGroup("Database")) { + PvlGroup &dbgroup = userPref.findGroup("Database"); + if(dbgroup.hasKeyword("AccessConfig")) { addAccessProfile(dbgroup["AccessConfig"]); } // Get default profile name for later use - if(dbgroup.HasKeyword("DefaultProfile")) + if(dbgroup.hasKeyword("DefaultProfile")) _defProfName = (QString) dbgroup["DefaultProfile"]; } return; diff --git a/isis/src/database/objs/DbAccess/DbAccess.cpp b/isis/src/database/objs/DbAccess/DbAccess.cpp index 56240f801b108ff1e6bded94543d5c2a1a7acebc..0c1b3697fe5a28b039616b90759ed6c1eaee5a87 100644 --- a/isis/src/database/objs/DbAccess/DbAccess.cpp +++ b/isis/src/database/objs/DbAccess/DbAccess.cpp @@ -155,7 +155,7 @@ namespace Isis { */ void DbAccess::load(const QString &filename) { Pvl pvl(filename); - PvlObject db = pvl.FindObject("Database"); + PvlObject db = pvl.findObject("Database"); load(db); } @@ -178,13 +178,13 @@ namespace Isis { loadkeys(pvl); // Get all database user access profiles - PvlObject::PvlGroupIterator group = pvl.FindGroup("Profile", - pvl.BeginGroup(), - pvl.EndGroup()); - while(group != pvl.EndGroup()) { + PvlObject::PvlGroupIterator group = pvl.findGroup("Profile", + pvl.beginGroup(), + pvl.endGroup()); + while(group != pvl.endGroup()) { DbProfile dbgroup(*group); _profiles.add(dbgroup.Name(), dbgroup); - group = pvl.FindGroup("Profile", ++group, pvl.EndGroup()); + group = pvl.findGroup("Profile", ++group, pvl.endGroup()); } return; } diff --git a/isis/src/database/objs/DbProfile/DbProfile.cpp b/isis/src/database/objs/DbProfile/DbProfile.cpp index 5ac851261e944bc805f886b9a4d031059dad38f4..b1702f0e60bcdabb9e1c5e6e0285c917426794b6 100644 --- a/isis/src/database/objs/DbProfile/DbProfile.cpp +++ b/isis/src/database/objs/DbProfile/DbProfile.cpp @@ -95,7 +95,7 @@ namespace Isis { */ void DbProfile::add(const QString &key, const QString &value) { if(_keys.exists(key)) { - _keys.get(key).AddValue(value); + _keys.get(key).addValue(value); } else { _keys.add(key, PvlKeyword(key, value)); @@ -140,7 +140,7 @@ namespace Isis { */ int DbProfile::count(const QString &key) const { if(_keys.exists(key)) { - return (_keys.get(key).Size()); + return (_keys.get(key).size()); } return (0); } @@ -197,8 +197,8 @@ namespace Isis { */ void DbProfile::loadkeys(PvlContainer &pvl) { PvlContainer::PvlKeywordIterator key; - for(key = pvl.Begin() ; key != pvl.End() ; ++key) { - _keys.add(key->Name(), *key); + for(key = pvl.begin() ; key != pvl.end() ; ++key) { + _keys.add(key->name(), *key); } } @@ -218,7 +218,7 @@ namespace Isis { PvlGroup propGroup(_group); OrderedKeys::CollectorConstIter okItr; for(okItr = okeys.begin() ; okItr != okeys.end() ; ++okItr) { - propGroup.AddKeyword(*(okItr->second)); + propGroup.addKeyword(*(okItr->second)); } o << propGroup << std::endl; diff --git a/isis/src/dawn/apps/dawnfc2isis/dawnfc2isis.cpp b/isis/src/dawn/apps/dawnfc2isis/dawnfc2isis.cpp index 8b76f86533018e78c3e88497b6309ce4074cc076..45cdbe19697a263c6b935fb1e9e39e8f52ec30b2 100644 --- a/isis/src/dawn/apps/dawnfc2isis/dawnfc2isis.cpp +++ b/isis/src/dawn/apps/dawnfc2isis/dawnfc2isis.cpp @@ -26,8 +26,8 @@ void IsisMain() { try { Pvl lab(inFile.expanded()); - instid = (QString) lab.FindKeyword("INSTRUMENT_ID"); - missid = (QString) lab.FindKeyword("MISSION_ID"); + instid = (QString) lab.findKeyword("INSTRUMENT_ID"); + missid = (QString) lab.findKeyword("MISSION_ID"); } catch(IException &e) { QString msg = "Unable to read [INSTRUMENT_ID] or [MISSION_ID] from input file [" + @@ -68,7 +68,7 @@ void IsisMain() { Cube *outcube = p2.SetOutputCube("TO"); // Get the directory where the DAWN translation tables are. - PvlGroup dataDir(Preference::Preferences().FindGroup("DataDirectory")); + PvlGroup dataDir(Preference::Preferences().findGroup("DataDirectory")); QString transDir = (QString) dataDir["Dawn"] + "/translations/"; // Create a PVL to store the translated labels in @@ -91,19 +91,19 @@ void IsisMain() { // Update target if user specifies it if (!target.isEmpty()) { - PvlGroup &igrp = outLabel.FindGroup("Instrument",Pvl::Traverse); + PvlGroup &igrp = outLabel.findGroup("Instrument",Pvl::Traverse); igrp["TargetName"] = target; } // Write the BandBin, Archive, and Instrument groups // to the output cube label - outcube->putGroup(outLabel.FindGroup("BandBin", Pvl::Traverse)); - outcube->putGroup(outLabel.FindGroup("Archive", Pvl::Traverse)); - outcube->putGroup(outLabel.FindGroup("Instrument", Pvl::Traverse)); + outcube->putGroup(outLabel.findGroup("BandBin", Pvl::Traverse)); + outcube->putGroup(outLabel.findGroup("Archive", Pvl::Traverse)); + outcube->putGroup(outLabel.findGroup("Instrument", Pvl::Traverse)); // Set the BandBin filter name, center, and width values based on the // FilterNumber. - PvlGroup &bbGrp(outLabel.FindGroup("BandBin", Pvl::Traverse)); + PvlGroup &bbGrp(outLabel.findGroup("BandBin", Pvl::Traverse)); int filtno = bbGrp["FilterNumber"]; int center; int width; @@ -153,9 +153,9 @@ void IsisMain() { "FilterNumber. The FilterNumber must fall in the range 1 to 8."; throw IException(IException::Io, msg, _FILEINFO_); } - bbGrp.AddKeyword(PvlKeyword("Center", toString(center))); - bbGrp.AddKeyword(PvlKeyword("Width", toString(width))); - bbGrp.AddKeyword(PvlKeyword("FilterName", filtname)); + bbGrp.addKeyword(PvlKeyword("Center", toString(center))); + bbGrp.addKeyword(PvlKeyword("Width", toString(width))); + bbGrp.addKeyword(PvlKeyword("FilterName", filtname)); outcube->putGroup(bbGrp); PvlGroup kerns("Kernels"); diff --git a/isis/src/dawn/apps/dawnvir2isis/dawnvir2isis.cpp b/isis/src/dawn/apps/dawnvir2isis/dawnvir2isis.cpp index cf5b5f160b5f84941a5e627a019d758bfa472459..bb212092bbe440caf39ee948769e1571f48de112 100644 --- a/isis/src/dawn/apps/dawnvir2isis/dawnvir2isis.cpp +++ b/isis/src/dawn/apps/dawnvir2isis/dawnvir2isis.cpp @@ -50,8 +50,8 @@ void IsisMain () try { Pvl lab(inFile.expanded()); - instid = (QString) lab.FindKeyword ("CHANNEL_ID"); - missid = (QString) lab.FindKeyword ("INSTRUMENT_HOST_ID"); + instid = (QString) lab.findKeyword ("CHANNEL_ID"); + missid = (QString) lab.findKeyword ("INSTRUMENT_HOST_ID"); } catch (IException &e) { QString msg = "Unable to read [INSTRUMENT_ID] or [MISSION_ID] from input file [" + @@ -84,7 +84,7 @@ void IsisMain () p.StartProcess (); // Get the directory where the DAWN translation tables are. - PvlGroup dataDir (Preference::Preferences().FindGroup("DataDirectory")); + PvlGroup dataDir (Preference::Preferences().findGroup("DataDirectory")); QString transDir = (QString) dataDir["Dawn"] + "/translations/"; // Create a PVL to store the translated labels in @@ -107,15 +107,15 @@ void IsisMain () // Update target if user specifies it if (!target.isEmpty()) { - PvlGroup &igrp = outLabel.FindGroup("Instrument",Pvl::Traverse); + PvlGroup &igrp = outLabel.findGroup("Instrument",Pvl::Traverse); igrp["TargetName"] = target; } // Write the BandBin, Archive, and Instrument groups // to the output cube label - outcube->putGroup(outLabel.FindGroup("BandBin",Pvl::Traverse)); - outcube->putGroup(outLabel.FindGroup("Archive",Pvl::Traverse)); - outcube->putGroup(outLabel.FindGroup("Instrument",Pvl::Traverse)); + outcube->putGroup(outLabel.findGroup("BandBin",Pvl::Traverse)); + outcube->putGroup(outLabel.findGroup("Archive",Pvl::Traverse)); + outcube->putGroup(outLabel.findGroup("Instrument",Pvl::Traverse)); PvlGroup kerns("Kernels"); if (instid == "VIS") { @@ -138,7 +138,7 @@ void IsisMain () hktable.setType("MirrorCos", "DOUBLE"); Table hktab = hktable.importTable("ScetTimeClock,ShutterStatus,MirrorSin,MirrorCos", "VIRHouseKeeping"); - hktab.Label().AddKeyword(PvlKeyword("SourceFile", hkLabel)); + hktab.Label().addKeyword(PvlKeyword("SourceFile", hkLabel)); outcube->write(hktab); } catch (IException &e) { diff --git a/isis/src/dawn/objs/DawnFcCamera/DawnFcCamera.cpp b/isis/src/dawn/objs/DawnFcCamera/DawnFcCamera.cpp index e383b7666e3235e7f87d3638fc7aae33502f4cd1..5f0046444ec4d218508123e52ce6ae3db50f7294 100644 --- a/isis/src/dawn/objs/DawnFcCamera/DawnFcCamera.cpp +++ b/isis/src/dawn/objs/DawnFcCamera/DawnFcCamera.cpp @@ -106,7 +106,7 @@ namespace Isis { // spacecraft clock start count. There is a delay of 193 ms while the // CCD is discharged or cleared. Finally the exporsure information // needs to be obtained. - PvlGroup &inst = lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup &inst = lab.findGroup("Instrument", Pvl::Traverse); QString stime = inst["SpacecraftClockStartCount"]; double et = getClockTime(stime).Et(); et += 193.0 / 1000.0; diff --git a/isis/src/dawn/objs/DawnFcCamera/unitTest.cpp b/isis/src/dawn/objs/DawnFcCamera/unitTest.cpp index 300a1d59bbc96aac061561f7b003f0560742dd34..9382661dbbab52d0ac6ab0d30472eb7473294d87 100644 --- a/isis/src/dawn/objs/DawnFcCamera/unitTest.cpp +++ b/isis/src/dawn/objs/DawnFcCamera/unitTest.cpp @@ -47,7 +47,7 @@ int main(void) { Pvl p("$dawn/testData/FC21B0001010_09049002212F5D.cub"); DawnFcCamera *cam = (DawnFcCamera *) CameraFactory::Create(p); - cout << "FileName: " << FileName(p.FileName()).name() << endl; + cout << "FileName: " << FileName(p.fileName()).name() << endl; cout << "CK Frame: " << cam->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); @@ -60,7 +60,7 @@ int main(void) { cout << "SPK Reference ID = " << cam->SpkReferenceId() << endl << endl; // Test Shutter Open/Close - const PvlGroup &inst = p.FindGroup("Instrument", Pvl::Traverse); + const PvlGroup &inst = p.findGroup("Instrument", Pvl::Traverse); double exposureDuration = ((double) inst["ExposureDuration"])/1000; QString stime = inst["StartTime"]; double et; // StartTime keyword is the center exposure time diff --git a/isis/src/dawn/objs/DawnVirCamera/DawnVirCamera.cpp b/isis/src/dawn/objs/DawnVirCamera/DawnVirCamera.cpp index df663504dde830cd5ab9a86bc669f8fcdeca4101..dac7850e2da832b663506c0dd4b415e9c8bcc3d8 100644 --- a/isis/src/dawn/objs/DawnVirCamera/DawnVirCamera.cpp +++ b/isis/src/dawn/objs/DawnVirCamera/DawnVirCamera.cpp @@ -30,12 +30,12 @@ namespace Isis { // cout << "Testing DawnVirCamera...\n"; - PvlGroup &archive = lab.FindGroup("Archive", Isis::Pvl::Traverse); + PvlGroup &archive = lab.findGroup("Archive", Isis::Pvl::Traverse); int procLevel = archive["ProcessingLevelId"]; m_is1BCalibrated = (procLevel > 2) ? true : false; // Get the start time from labels - PvlGroup &inst = lab.FindGroup("Instrument", Isis::Pvl::Traverse); + PvlGroup &inst = lab.findGroup("Instrument", Isis::Pvl::Traverse); QString channelId = inst["ChannelId"]; QString instMode = inst["InstrumentModeId"]; @@ -72,7 +72,7 @@ namespace Isis { // Setup detector map // Get the line scan rates/times - readHouseKeeping(lab.FileName(), m_scanRate); + readHouseKeeping(lab.fileName(), m_scanRate); new VariableLineScanCameraDetectorMap(this, m_lineRates); DetectorMap()->SetDetectorSampleSumming(m_summing); @@ -381,14 +381,14 @@ namespace Isis { // Create the time dependant frames keyword int virZeroId = getInteger("FRAME_" + virZero); PvlKeyword tdf("TimeDependentFrames", toString(virZeroId)); // DAWN_VIR_{ID}_ZERO - tdf.AddValue("-203200"); // DAWN_VIR - tdf.AddValue("-203000"); // DAWN_SPACECRAFT - tdf.AddValue("1"); // J2000 + tdf.addValue("-203200"); // DAWN_VIR + tdf.addValue("-203000"); // DAWN_SPACECRAFT + tdf.addValue("1"); // J2000 quats.Label() += tdf; // Create constant rotation frames PvlKeyword cf("ConstantFrames", toString(virZeroId)); - cf.AddValue(toString(virZeroId)); + cf.addValue(toString(virZeroId)); quats.Label() += cf; SpiceDouble identity[3][3]; @@ -398,7 +398,7 @@ namespace Isis { PvlKeyword crot("ConstantRotation"); for (int i = 0 ; i < 3 ; i++) { for (int j = 0 ; j < 3 ; j++) { - crot.AddValue(toString(identity[i][j])); + crot.addValue(toString(identity[i][j])); } } diff --git a/isis/src/dawn/objs/DawnVirCamera/unitTest.cpp b/isis/src/dawn/objs/DawnVirCamera/unitTest.cpp index ff3a111b02fc8bf18fb4dcbe2bec0b3216fc777b..fb2734a8a1b3b8b4266cabcc3cde602f72b96958 100644 --- a/isis/src/dawn/objs/DawnVirCamera/unitTest.cpp +++ b/isis/src/dawn/objs/DawnVirCamera/unitTest.cpp @@ -53,7 +53,7 @@ int main(void) { Pvl p("$ISIS3TESTDATA/isis/src/dawn/objs/DawnVirCamera/VIR_VIS_1B_1_362681635_1.cub"); DawnVirCamera *cam = (DawnVirCamera *) CameraFactory::Create(p); - cout << "FileName: " << FileName(p.FileName()).name() << endl; + cout << "FileName: " << FileName(p.fileName()).name() << endl; cout << "CK Frame: " << cam->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); @@ -66,7 +66,7 @@ int main(void) { cout << "SPK Reference ID = " << cam->SpkReferenceId() << endl << endl; // Test Shutter Open/Close - //const PvlGroup &inst = p.FindGroup("Instrument", Pvl::Traverse); + //const PvlGroup &inst = p.findGroup("Instrument", Pvl::Traverse); std::pair< double, double > imgTimes = cam->StartEndEphemerisTimes(); cout << "Start Time: " << imgTimes.first << "\n"; cout << "End Time: " << imgTimes.second << "\n"; diff --git a/isis/src/galileo/apps/gllssi2isis/gllssi2isis.cpp b/isis/src/galileo/apps/gllssi2isis/gllssi2isis.cpp index 876967e05e7b28e20153b193540499481c422934..767598786d63a1e4ff634b5da4eb78e36dd6a2c1 100644 --- a/isis/src/galileo/apps/gllssi2isis/gllssi2isis.cpp +++ b/isis/src/galileo/apps/gllssi2isis/gllssi2isis.cpp @@ -35,7 +35,7 @@ void IsisMain() { Pvl lab(inFile.expanded()); //Checks if in file is rdr - if(lab.HasObject("IMAGE_MAP_PROJECTION")) { + if(lab.hasObject("IMAGE_MAP_PROJECTION")) { QString msg = "[" + inFile.name() + "] appears to be an rdr file."; msg += " Use pds2isis."; throw IException(IException::Io, msg, _FILEINFO_); @@ -120,7 +120,7 @@ void TranslateData(Buffer &inData) { void TranslateLabels(Pvl &pdsLabel, Cube *ocube) { // Get the directory where the MOC translation tables are. - PvlGroup &dataDir = Preference::Preferences().FindGroup("DataDirectory"); + PvlGroup &dataDir = Preference::Preferences().findGroup("DataDirectory"); // Transfer the instrument group to the output cube QString transDir = (QString) dataDir["Galileo"]; @@ -133,22 +133,22 @@ void TranslateLabels(Pvl &pdsLabel, Cube *ocube) { labelXlater.Auto(*(outputLabel)); //Add to the Archive Group - PvlGroup &arch = outputLabel->FindGroup("Archive", Pvl::Traverse); - PvlGroup &inst = outputLabel->FindGroup("Instrument", Pvl::Traverse); - arch.AddKeyword(PvlKeyword("DataType", "RADIANCE")); - QString CTC = (QString) arch.FindKeyword("ObservationId"); + PvlGroup &arch = outputLabel->findGroup("Archive", Pvl::Traverse); + PvlGroup &inst = outputLabel->findGroup("Instrument", Pvl::Traverse); + arch.addKeyword(PvlKeyword("DataType", "RADIANCE")); + QString CTC = (QString) arch.findKeyword("ObservationId"); QString CTCout = CTC.mid(0, 2); - arch.AddKeyword(PvlKeyword("CalTargetCode", CTCout)); + arch.addKeyword(PvlKeyword("CalTargetCode", CTCout)); // Add to the Instrument Group - QString itest = (QString) inst.FindKeyword("StartTime"); + QString itest = (QString) inst.findKeyword("StartTime"); itest.remove("Z"); - inst.FindKeyword("StartTime").SetValue(itest); + inst.findKeyword("StartTime").setValue(itest); //change exposure duration to seconds - double expDur = inst.FindKeyword("exposureDuration"); + double expDur = inst.findKeyword("exposureDuration"); double expDurOut = expDur / 1000.0; - inst.FindKeyword("exposureDuration").SetValue(toString(expDurOut), "seconds"); - inst.AddKeyword(PvlKeyword("FrameDuration", + inst.findKeyword("exposureDuration").setValue(toString(expDurOut), "seconds"); + inst.addKeyword(PvlKeyword("FrameDuration", (QString) pdsLabel["frameDuration"], "seconds")); //Calculate the Frame_Rate_Id keyword @@ -160,11 +160,11 @@ void TranslateLabels(Pvl &pdsLabel, Cube *ocube) { summingMode = 2; } - inst.AddKeyword(PvlKeyword("Summing", toString(summingMode))); - inst.AddKeyword(PvlKeyword("FrameModeId", frameModeId)); + inst.addKeyword(PvlKeyword("Summing", toString(summingMode))); + inst.addKeyword(PvlKeyword("FrameModeId", frameModeId)); // Create the Band bin Group - PvlGroup &bandBin = outputLabel->FindGroup("BandBin", Pvl::Traverse); + PvlGroup &bandBin = outputLabel->findGroup("BandBin", Pvl::Traverse); QString filterName = pdsLabel["FILTER_NAME"]; QString waveLength = ""; QString width = ""; @@ -200,8 +200,8 @@ void TranslateLabels(Pvl &pdsLabel, Cube *ocube) { waveLength = "0.986"; width = ".04"; } - bandBin.AddKeyword(PvlKeyword("Center", waveLength, "micrometers")); - bandBin.AddKeyword(PvlKeyword("Width", width, "micrometers")); + bandBin.addKeyword(PvlKeyword("Center", waveLength, "micrometers")); + bandBin.addKeyword(PvlKeyword("Width", width, "micrometers")); //create the kernel group PvlGroup kern("Kernels"); diff --git a/isis/src/galileo/apps/gllssical/gllssical.cpp b/isis/src/galileo/apps/gllssical/gllssical.cpp index 4c48855b109b667d572861631d84552c5c546b10..4ef3ddf6a7b539397f629d1b0d88e6d7d3684e28 100644 --- a/isis/src/galileo/apps/gllssical/gllssical.cpp +++ b/isis/src/galileo/apps/gllssical/gllssical.cpp @@ -95,32 +95,32 @@ void IsisMain() { p.StartProcess(Calibrate); PvlGroup calibrationLog("RadiometricCalibration"); - calibrationLog.AddKeyword(PvlKeyword("From", ui.GetFileName("FROM"))); + calibrationLog.addKeyword(PvlKeyword("From", ui.GetFileName("FROM"))); FileName shutterFileName = FindShutterFile(icube); - calibrationLog.AddKeyword(PvlKeyword("DarkCurrentFile", darkFileName.originalPath() + "/" + + calibrationLog.addKeyword(PvlKeyword("DarkCurrentFile", darkFileName.originalPath() + "/" + darkFileName.name())); - calibrationLog.AddKeyword(PvlKeyword("GainFile", gainFileName.originalPath() + "/" + + calibrationLog.addKeyword(PvlKeyword("GainFile", gainFileName.originalPath() + "/" + gainFileName.name())); - calibrationLog.AddKeyword(PvlKeyword("ShutterFile", shutterFileName.originalPath() + "/" + + calibrationLog.addKeyword(PvlKeyword("ShutterFile", shutterFileName.originalPath() + "/" + shutterFileName.name())); - calibrationLog.AddKeyword(PvlKeyword("ScaleFactor", toString(scaleFactor))); - calibrationLog.AddKeyword(PvlKeyword("OutputUnits", iof ? "I/F" : "Radiance")); + calibrationLog.addKeyword(PvlKeyword("ScaleFactor", toString(scaleFactor))); + calibrationLog.addKeyword(PvlKeyword("OutputUnits", iof ? "I/F" : "Radiance")); if (iof) { - calibrationLog.AddKeyword(PvlKeyword("S1", toString(s1), "I/F per Ft-Lambert")); - calibrationLog.AddKeyword(PvlKeyword("RSUN", toString(rsun), "(Planet-Sun range)/5.2 A.U.")); - calibrationLog.AddKeyword(PvlKeyword("Scale", toString(scaleFactor), "I/F units per DN")); - calibrationLog.AddKeyword(PvlKeyword("GC", toString(cubeConversion), "Cube gain conversion")); - calibrationLog.AddKeyword(PvlKeyword("GG", toString(gainConversion), "Gain file gain conversion")); - calibrationLog.AddKeyword(PvlKeyword("IOF-SCALE0", toString(scaleFactor0), "(S1/Scale)*(GC/GG)/RSUN**2")); + calibrationLog.addKeyword(PvlKeyword("S1", toString(s1), "I/F per Ft-Lambert")); + calibrationLog.addKeyword(PvlKeyword("RSUN", toString(rsun), "(Planet-Sun range)/5.2 A.U.")); + calibrationLog.addKeyword(PvlKeyword("Scale", toString(scaleFactor), "I/F units per DN")); + calibrationLog.addKeyword(PvlKeyword("GC", toString(cubeConversion), "Cube gain conversion")); + calibrationLog.addKeyword(PvlKeyword("GG", toString(gainConversion), "Gain file gain conversion")); + calibrationLog.addKeyword(PvlKeyword("IOF-SCALE0", toString(scaleFactor0), "(S1/Scale)*(GC/GG)/RSUN**2")); } else { - calibrationLog.AddKeyword(PvlKeyword("S2", toString(s2), "Nanowatts per Ft-Lambert")); - calibrationLog.AddKeyword(PvlKeyword("Scale", toString(scaleFactor), + calibrationLog.addKeyword(PvlKeyword("S2", toString(s2), "Nanowatts per Ft-Lambert")); + calibrationLog.addKeyword(PvlKeyword("Scale", toString(scaleFactor), "Nanowatts/cm**2/steradian/nanometer/DN")); - calibrationLog.AddKeyword(PvlKeyword("GC", toString(cubeConversion), "Cube gain conversion")); - calibrationLog.AddKeyword(PvlKeyword("GG", toString(gainConversion), "Gain file gain conversion")); - calibrationLog.AddKeyword(PvlKeyword("Radiance-SCALE0", toString(scaleFactor0), "(S2/Scale)*(GC/GG)")); + calibrationLog.addKeyword(PvlKeyword("GC", toString(cubeConversion), "Cube gain conversion")); + calibrationLog.addKeyword(PvlKeyword("GG", toString(gainConversion), "Gain file gain conversion")); + calibrationLog.addKeyword(PvlKeyword("Radiance-SCALE0", toString(scaleFactor0), "(S2/Scale)*(GC/GG)")); } ocube->putGroup(calibrationLog); @@ -332,10 +332,10 @@ FileName ReadWeightTable(Cube *icube) { weightFile = weightFile.highestVersion(); Pvl weightTables(weightFile.expanded()); QString group = QString("FrameMode") + icube->group("Instrument")["FrameModeId"][0].at(0); - PvlGroup &frameGrp = weightTables.FindGroup(group); + PvlGroup &frameGrp = weightTables.findGroup(group); QString keyword = QString("GainState") + ((getGainModeID(icube) < 3) ? QString("12") : QString("34")); - for(int i = 0; i < frameGrp[keyword].Size(); i++) { + for(int i = 0; i < frameGrp[keyword].size(); i++) { weight.push_back(toDouble(frameGrp[keyword][i])); } @@ -392,18 +392,18 @@ void calculateScaleFactor0(Cube *icube, Cube *gaincube) { Pvl conversionFactors(GetScaleFactorFile().expanded()); PvlKeyword fltToRef, fltToRad; - for(int grp = 0; grp < conversionFactors.Groups(); grp++) { - PvlGroup currGrp = conversionFactors.Group(grp); + for(int grp = 0; grp < conversionFactors.groups(); grp++) { + PvlGroup currGrp = conversionFactors.group(grp); // Match target name - if(currGrp.HasKeyword("TargetName")) { + if(currGrp.hasKeyword("TargetName")) { if(!icube->group("Archive")["CalTargetCode"][0].startsWith(currGrp["TargetName"][0])) { continue; } } // Match MinimumEncounter - if(currGrp.HasKeyword("MinimumTargetName")) { + if(currGrp.hasKeyword("MinimumTargetName")) { try { if((int)currGrp["MinimumTargetName"] > (int)toInt(icube->group("Archive")["CalTargetCode"][0].mid(0, 2))) { @@ -421,7 +421,7 @@ void calculateScaleFactor0(Cube *icube, Cube *gaincube) { int filterNumber = toInt(icube->group("BandBin")["FilterNumber"][0]); - if(fltToRef.Size() == 0) { + if(fltToRef.size() == 0) { throw IException(IException::Unknown, "Unable to find matching reflectance and radiance values for target [" + icube->group("Instrument")["TargetName"][0] + "] in [" + diff --git a/isis/src/galileo/objs/SsiCamera/SsiCamera.cpp b/isis/src/galileo/objs/SsiCamera/SsiCamera.cpp index a6c85a69499eed78760c58111dcecd01afb72ec4..a51335e51df409c1c3e996215d9fd3ed20c9bd4f 100644 --- a/isis/src/galileo/objs/SsiCamera/SsiCamera.cpp +++ b/isis/src/galileo/objs/SsiCamera/SsiCamera.cpp @@ -52,7 +52,7 @@ namespace Isis { double k1; iTime removeCoverDate("1994/04/01 00:00:00"); - iTime imageDate(lab.FindKeyword("StartTime", PvlObject::Traverse)[0]); + iTime imageDate(lab.findKeyword("StartTime", PvlObject::Traverse)[0]); /* * Change the Focal Length and K1 constant based on whether or not the protective cover is on * See "The Direction of the North Pole and the Control Network of Asteroid 951 Gaspra" Icarus 107, 18-22 (1994) @@ -71,7 +71,7 @@ namespace Isis { SetPixelPitch(); // Get the start time in et - PvlGroup inst = lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup inst = lab.findGroup("Instrument", Pvl::Traverse); double et = iTime((QString)inst["StartTime"]).Et(); diff --git a/isis/src/galileo/objs/SsiCamera/unitTest.cpp b/isis/src/galileo/objs/SsiCamera/unitTest.cpp index 3595ba011bf8b5be4f9ae8f11735b76ab710426f..27df1ac3fea43b27de098d66cb306f082b46e631 100644 --- a/isis/src/galileo/objs/SsiCamera/unitTest.cpp +++ b/isis/src/galileo/objs/SsiCamera/unitTest.cpp @@ -48,7 +48,7 @@ int main(void) { Pvl p("$galileo/testData/1213r.cub"); SsiCamera *cam = (SsiCamera *) CameraFactory::Create(p); - cout << "FileName: " << FileName(p.FileName()).name() << endl; + cout << "FileName: " << FileName(p.fileName()).name() << endl; cout << "CK Frame: " << cam->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); @@ -62,7 +62,7 @@ int main(void) { // Test Shutter Open/Close - const PvlGroup &inst = p.FindGroup("Instrument", Pvl::Traverse); + const PvlGroup &inst = p.findGroup("Instrument", Pvl::Traverse); double exposureDuration = ((double) inst["ExposureDuration"])/1000; QString stime = inst["StartTime"]; double et; // StartTime keyword is the center exposure time diff --git a/isis/src/kaguya/apps/kaguyatc2isis/kaguyatc2isis.cpp b/isis/src/kaguya/apps/kaguyatc2isis/kaguyatc2isis.cpp index d63f108a9ea1b86034f11ba886418b80bf0a702c..83f09a3ae1433a6f0658abc4964b6e9c203d4d41 100644 --- a/isis/src/kaguya/apps/kaguyatc2isis/kaguyatc2isis.cpp +++ b/isis/src/kaguya/apps/kaguyatc2isis/kaguyatc2isis.cpp @@ -22,7 +22,7 @@ void IsisMain() { Pvl lab(inFile.expanded()); try { - id = (QString) lab.FindKeyword("DATA_SET_ID"); + id = (QString) lab.findKeyword("DATA_SET_ID"); } catch(IException &e) { QString msg = "Unable to read [DATA_SET_ID] from input file [" + @@ -50,7 +50,7 @@ void IsisMain() { p.TranslatePdsProjection(otherLabels); // Get the directory where the generic pds2isis level 2 translation tables are. - PvlGroup dataDir(Preference::Preferences().FindGroup("DataDirectory")); + PvlGroup dataDir(Preference::Preferences().findGroup("DataDirectory")); QString transDir = (QString) dataDir["base"] + "/translations/"; // Translate the Archive group @@ -59,8 +59,8 @@ void IsisMain() { archiveXlater.Auto(otherLabels); // Write the Archive and Mapping groups to the output cube label - outcube->putGroup(otherLabels.FindGroup("Mapping")); - outcube->putGroup(otherLabels.FindGroup("Archive")); + outcube->putGroup(otherLabels.findGroup("Mapping")); + outcube->putGroup(otherLabels.findGroup("Archive")); // Add the BandBin group PvlGroup bbin("BandBin"); diff --git a/isis/src/lo/apps/lo2isis/lo2isis.cpp b/isis/src/lo/apps/lo2isis/lo2isis.cpp index 212f035804ad0f4d07f7017fee6209c1399fd0a8..de871eab499a7dca1ebcdb4281ec63f1b2afec25 100644 --- a/isis/src/lo/apps/lo2isis/lo2isis.cpp +++ b/isis/src/lo/apps/lo2isis/lo2isis.cpp @@ -20,7 +20,7 @@ void IsisMain() { //Checks if in file is rdr label = in.expanded(); - if(label.HasObject("IMAGE_MAP_PROJECTION")) { + if(label.hasObject("IMAGE_MAP_PROJECTION")) { QString msg = "[" + in.name() + "] appears to be an rdr file."; msg += " Use pds2isis."; throw IException(IException::User, msg, _FILEINFO_); @@ -38,7 +38,7 @@ void IsisMain() { void TranslateLunarLabels(FileName &labelFile, Cube *ocube) { // Get the directory where the Lunar translation tables are. - PvlGroup &dataDir = Preference::Preferences().FindGroup("DataDirectory"); + PvlGroup &dataDir = Preference::Preferences().findGroup("DataDirectory"); // Transfer the instrument group to the output cube QString transDir = (QString) dataDir["Lo"] + "/translations/"; @@ -48,15 +48,15 @@ void TranslateLunarLabels(FileName &labelFile, Cube *ocube) { bool hasFiducial = false; // Check to see if file is PDS - if(inputLabel.HasKeyword("PDS_VERSION_ID", Pvl::None)) { - QString pdsVersion = inputLabel.FindKeyword("PDS_VERSION_ID", Pvl::None)[0]; + if(inputLabel.hasKeyword("PDS_VERSION_ID", Pvl::None)) { + QString pdsVersion = inputLabel.findKeyword("PDS_VERSION_ID", Pvl::None)[0]; if(pdsVersion == "PDS3") { - if(inputLabel.HasKeyword("LO:FIDUCIAL_ID", Pvl::Traverse)) { + if(inputLabel.hasKeyword("LO:FIDUCIAL_ID", Pvl::Traverse)) { hasFiducial = true; bandBinTransFile = transDir + "LoPdsFiducialImport.trn"; } - else if(inputLabel.HasKeyword("LO:BORESIGHT_SAMPLE", Pvl::Traverse)) { + else if(inputLabel.hasKeyword("LO:BORESIGHT_SAMPLE", Pvl::Traverse)) { bandBinTransFile = transDir + "LoPdsBoresightImport.trn"; } else { @@ -72,11 +72,11 @@ void TranslateLunarLabels(FileName &labelFile, Cube *ocube) { } // Else the input is an Isis2 cube else { - if(inputLabel.HasKeyword("FIDUCIAL_ID", Pvl::Traverse)) { + if(inputLabel.hasKeyword("FIDUCIAL_ID", Pvl::Traverse)) { hasFiducial = true; bandBinTransFile = transDir + "LoIsis2FiducialImport.trn"; } - else if(inputLabel.HasKeyword("BORESIGHT_SAMPLE", Pvl::Traverse)) { + else if(inputLabel.hasKeyword("BORESIGHT_SAMPLE", Pvl::Traverse)) { bandBinTransFile = transDir + "LoIsis2BoresightImport.trn"; } else { @@ -95,50 +95,50 @@ void TranslateLunarLabels(FileName &labelFile, Cube *ocube) { PvlTranslationManager labelXlater(inputLabel, bandBinTransFile.expanded()); labelXlater.Auto(*(outputLabel)); - PvlGroup &inst = outputLabel->FindGroup("Instrument", Pvl::Traverse); + PvlGroup &inst = outputLabel->findGroup("Instrument", Pvl::Traverse); //Creates FiducialCoordinateMicron with the proper units - if(!inputLabel.HasKeyword("LO:BORESIGHT_SAMPLE", Pvl::Traverse)) { - QString fcm = (QString) inst.FindKeyword("FiducialCoordinateMicron"); + if(!inputLabel.hasKeyword("LO:BORESIGHT_SAMPLE", Pvl::Traverse)) { + QString fcm = (QString) inst.findKeyword("FiducialCoordinateMicron"); QString fcmUnits = fcm; fcmUnits.remove(QRegExp("^[0-9.]*")); fcm.remove(QRegExp("[a-zA-Z]*$")); - inst.FindKeyword("FiducialCoordinateMicron").SetValue(fcm, fcmUnits); + inst.findKeyword("FiducialCoordinateMicron").setValue(fcm, fcmUnits); } // High Resolution & Fiducial Medium Case if(hasFiducial) { //Add units to some keywords - PvlKeyword fxc = inst.FindKeyword("FiducialXCoordinates"); - inst.FindKeyword("FiducialXCoordinates").Clear(); - for(int i = 0; i < fxc.Size(); i++) { - inst.FindKeyword("FiducialXCoordinates").AddValue(fxc[i], "mm"); + PvlKeyword fxc = inst.findKeyword("FiducialXCoordinates"); + inst.findKeyword("FiducialXCoordinates").clear(); + for(int i = 0; i < fxc.size(); i++) { + inst.findKeyword("FiducialXCoordinates").addValue(fxc[i], "mm"); } - PvlKeyword fyc = inst.FindKeyword("FiducialYCoordinates"); - inst.FindKeyword("FiducialYCoordinates").Clear(); - for(int i = 0; i < fyc.Size(); i++) { - inst.FindKeyword("FiducialYCoordinates").AddValue(fyc[i], "mm"); + PvlKeyword fyc = inst.findKeyword("FiducialYCoordinates"); + inst.findKeyword("FiducialYCoordinates").clear(); + for(int i = 0; i < fyc.size(); i++) { + inst.findKeyword("FiducialYCoordinates").addValue(fyc[i], "mm"); } - PvlKeyword fl = inst.FindKeyword("FiducialLines"); - inst.FindKeyword("FiducialLines").Clear(); - for(int i = 0; i < fl.Size(); i++) { - inst.FindKeyword("FiducialLines").AddValue(fl[i], "pixels"); + PvlKeyword fl = inst.findKeyword("FiducialLines"); + inst.findKeyword("FiducialLines").clear(); + for(int i = 0; i < fl.size(); i++) { + inst.findKeyword("FiducialLines").addValue(fl[i], "pixels"); } - PvlKeyword fs = inst.FindKeyword("FiducialSamples"); - inst.FindKeyword("FiducialSamples").Clear(); - for(int i = 0; i < fs.Size(); i++) { - inst.FindKeyword("FiducialSamples").AddValue(fs[i], "pixels"); + PvlKeyword fs = inst.findKeyword("FiducialSamples"); + inst.findKeyword("FiducialSamples").clear(); + for(int i = 0; i < fs.size(); i++) { + inst.findKeyword("FiducialSamples").addValue(fs[i], "pixels"); } } else if(!hasFiducial) { //What needs to be done if it contains Boresight info } - QString instrumentID = inst.FindKeyword("InstrumentId"); - QString spacecraftName = inst.FindKeyword("SpacecraftName"); + QString instrumentID = inst.findKeyword("InstrumentId"); + QString spacecraftName = inst.findKeyword("SpacecraftName"); //Determines the NaifFrameCode PvlGroup kerns("Kernels"); @@ -161,15 +161,15 @@ void TranslateLunarLabels(FileName &labelFile, Cube *ocube) { } //Create subframe and frame keywords - QString imgNumber = (QString) inst.FindKeyword("ImageNumber"); + QString imgNumber = (QString) inst.findKeyword("ImageNumber"); int subFrame = toInt(imgNumber.mid(5)); - inst.AddKeyword(PvlKeyword("SubFrame", toString(subFrame))); + inst.addKeyword(PvlKeyword("SubFrame", toString(subFrame))); //ImageNumber is auto translated, and no longer needed - inst.DeleteKeyword("ImageNumber"); + inst.deleteKeyword("ImageNumber"); kerns += PvlKeyword("NaifFrameCode", frameCode); - outputLabel->FindObject("IsisCube").AddGroup(kerns); + outputLabel->findObject("IsisCube").addGroup(kerns); return; } diff --git a/isis/src/lo/apps/lopdsgen/lopdsgen.cpp b/isis/src/lo/apps/lopdsgen/lopdsgen.cpp index 7e82cad136fa7d2035dc5c5e6731f00c8a6d9d21..5f2b7cd0803fc9067c16b6939fa48ff5fc739a77 100644 --- a/isis/src/lo/apps/lopdsgen/lopdsgen.cpp +++ b/isis/src/lo/apps/lopdsgen/lopdsgen.cpp @@ -74,43 +74,43 @@ void IsisMain() { outFileNoExt = outFileNoExt.removeExtension(); QString productID(outFileNoExt.baseName()); PvlKeyword productId("PRODUCT_ID", productID.toUpper()); - pdsLabel.AddKeyword(productId); + pdsLabel.addKeyword(productId); // Translate the keywords from the original labels that go in this label OriginalLabel origBlob; iCube->read(origBlob); Pvl origLabel; PvlObject origLabelObj = origBlob.ReturnLabels(); - origLabelObj.SetName("OriginalLabelObject"); - origLabel.AddObject(origLabelObj); + origLabelObj.setName("OriginalLabelObject"); + origLabel.addObject(origLabelObj); // Get the directory where the Lunar translation tables are. - PvlGroup &dataDir = Preference::Preferences().FindGroup("DataDirectory"); + PvlGroup &dataDir = Preference::Preferences().findGroup("DataDirectory"); // Transfer the instrument group to the output cube QString transDir = (QString) dataDir["Lo"] + "/translations/"; // Isis 3 cubes being exported for the first time - if(!origLabel.HasKeyword("PRODUCT_TYPE", Pvl::Traverse)) { + if(!origLabel.hasKeyword("PRODUCT_TYPE", Pvl::Traverse)) { PvlTranslationManager orig(origLabel, transDir + "LoOriginalExport.trn"); orig.Auto(pdsLabel); // Add elements of SCAN_PARAMETER keyword to label - PvlObject &qube = origLabelObj.FindObject("QUBE"); - PvlGroup &ingestion = qube.FindGroup("ISIS_INGESTION"); + PvlObject &qube = origLabelObj.findObject("QUBE"); + PvlGroup &ingestion = qube.findGroup("ISIS_INGESTION"); // Strips and level1 products use the following two keywords in different ways - PvlKeyword &scanResolution = ingestion.FindKeyword("SCAN_RESOLUTION"); - PvlKeyword &scanDensityRange = ingestion.FindKeyword("SCAN_DENSITY_RANGE"); + PvlKeyword &scanResolution = ingestion.findKeyword("SCAN_RESOLUTION"); + PvlKeyword &scanDensityRange = ingestion.findKeyword("SCAN_DENSITY_RANGE"); // Change the units of SCAN_RESOLUTION from "um" to "" QString scanResolutionStr = scanResolution[0]; int umPos = scanResolutionStr.indexOf("um"); QString resolution = scanResolutionStr.mid(0, umPos); scanResolution[0] = resolution; - scanResolution.SetUnits("micron"); - scanResolution.SetName("LO:FILMSTRIP_SCAN_RESOLUTION"); + scanResolution.setUnits("micron"); + scanResolution.setName("LO:FILMSTRIP_SCAN_RESOLUTION"); // Break keyword SCAN_DENSITY_RANGE into two different parts QString scanDensityRangeStr = scanDensityRange[0]; @@ -119,36 +119,36 @@ void IsisMain() { QString range2 = scanDensityRangeStr.mid(toPos + 4); // Label translation for strips - if(qube.FindGroup("ISIS_INSTRUMENT").HasKeyword("STRIP_NUMBER")) { + if(qube.findGroup("ISIS_INSTRUMENT").hasKeyword("STRIP_NUMBER")) { PvlTranslationManager orig(origLabel, transDir + "LoStripExport.trn"); orig.Auto(pdsLabel); - pdsLabel.AddKeyword(scanResolution, PvlContainer::Replace); + pdsLabel.addKeyword(scanResolution, PvlContainer::Replace); } // Translation for level1 products - else if(qube.FindGroup("ISIS_INSTRUMENT").HasKeyword("START_TIME")) { + else if(qube.findGroup("ISIS_INSTRUMENT").hasKeyword("START_TIME")) { PvlTranslationManager orig(origLabel, transDir + "LoLevel1Export.trn"); orig.Auto(pdsLabel); - pdsLabel.AddKeyword(scanResolution, PvlContainer::Replace); + pdsLabel.addKeyword(scanResolution, PvlContainer::Replace); - PvlKeyword &outputMicron = qube.FindKeyword("OUTPUT_MICRON"); + PvlKeyword &outputMicron = qube.findKeyword("OUTPUT_MICRON"); // Change the units of OUTPUT_MICRON from "um" to "" QString outputMicronStr = outputMicron[0]; umPos = outputMicronStr.indexOf("um"); resolution = outputMicronStr.mid(0, umPos); outputMicron[0] = resolution; - outputMicron.SetUnits("micron"); - outputMicron.SetName("LO:FILMSTRIP_SCAN_PROCESSING_RES"); + outputMicron.setUnits("micron"); + outputMicron.setName("LO:FILMSTRIP_SCAN_PROCESSING_RES"); - pdsLabel.AddKeyword(outputMicron, PvlContainer::Replace); + pdsLabel.addKeyword(outputMicron, PvlContainer::Replace); // Calculate statistics on the cube to be processed and place // its MINIMUM and MAXIMUM into the output label p.CalculateStatistics(); - pdsLabel.FindObject("IMAGE").AddKeyword(PvlKeyword("MINIMUM", toString(p.CubeStatistics(0)->Minimum())), Pvl::Replace); - pdsLabel.FindObject("IMAGE").AddKeyword(PvlKeyword("MAXIMUM", toString(p.CubeStatistics(0)->Maximum())), Pvl::Replace); + pdsLabel.findObject("IMAGE").addKeyword(PvlKeyword("MINIMUM", toString(p.CubeStatistics(0)->Minimum())), Pvl::Replace); + pdsLabel.findObject("IMAGE").addKeyword(PvlKeyword("MAXIMUM", toString(p.CubeStatistics(0)->Maximum())), Pvl::Replace); } else { FileName inputFile(ui.GetFileName("FROM")); @@ -163,7 +163,7 @@ void IsisMain() { orig.Auto(pdsLabel); // Reexporting strips - if(origLabel.HasKeyword("STRIP_NUMBER", Pvl::Traverse)) { + if(origLabel.hasKeyword("STRIP_NUMBER", Pvl::Traverse)) { PvlTranslationManager strip(origLabel, transDir + "LoStripExport.trn"); strip.Auto(pdsLabel); } @@ -176,24 +176,24 @@ void IsisMain() { // Add to labels boresight or fiducial data QString bandBinTransFile; - if(iCube->label()->HasKeyword("FiducialId", Pvl::Traverse)) { + if(iCube->label()->hasKeyword("FiducialId", Pvl::Traverse)) { bandBinTransFile = transDir + "LoFiducialExport.trn"; PvlTranslationManager bandLab(*(iCube->label()), bandBinTransFile); bandLab.Auto(pdsLabel); // Change the units of FIDCUAIL_COORDINATE_MICRON from "um" to "" - PvlKeyword &coordMicron = iCube->label()->FindKeyword( + PvlKeyword &coordMicron = iCube->label()->findKeyword( "FiducialCoordinateMicron", Pvl::Traverse); QString coordMicronStr = coordMicron[0]; int umPos = coordMicronStr.indexOf("um"); QString coord = coordMicronStr.mid(0, umPos); coordMicron[0] = coord; - coordMicron.SetUnits("micron"); - coordMicron.SetName("LO:FIDUCIAL_COORDINATE_MICRON"); + coordMicron.setUnits("micron"); + coordMicron.setName("LO:FIDUCIAL_COORDINATE_MICRON"); - pdsLabel.AddKeyword(coordMicron, PvlContainer::Replace); + pdsLabel.addKeyword(coordMicron, PvlContainer::Replace); } - else if(iCube->label()->HasKeyword("BoresightSample", Pvl::Traverse)) { + else if(iCube->label()->hasKeyword("BoresightSample", Pvl::Traverse)) { bandBinTransFile = transDir + "LoBoresightExport.trn"; PvlTranslationManager bandLab(*(iCube->label()), bandBinTransFile); bandLab.Auto(pdsLabel); @@ -215,19 +215,19 @@ void IsisMain() { pdsLabel += PvlKeyword("PRODUCT_CREATION_TIME", tmpDateTime.UTC()); if(ui.WasEntered("NOTE")) { - pdsLabel.AddKeyword(PvlKeyword("NOTE", ui.GetString("NOTE")), Pvl::Replace); + pdsLabel.addKeyword(PvlKeyword("NOTE", ui.GetString("NOTE")), Pvl::Replace); } // Add a keyword type (i.e., QString, bool, int...) file to the PDS label Pvl PvlFormatPds *formatter = new PvlFormatPds(); - formatter->SetCharLimit(128); - formatter->Add(transDir + "LoExportFormatter.typ"); - pdsLabel.SetFormat(formatter); + formatter->setCharLimit(128); + formatter->add(transDir + "LoExportFormatter.typ"); + pdsLabel.setFormat(formatter); // Add an output format template (group, object, & keyword output order) to // the PDS PVL QString formatDir = (QString) dataDir["Lo"] + "/templates/labels/"; - pdsLabel.SetFormatTemplate(formatDir + "LoExportTemplate.pft"); + pdsLabel.setFormatTemplate(formatDir + "LoExportTemplate.pft"); // Write labels to output file FileName outFile(ui.GetFileName("TO", "img")); diff --git a/isis/src/lo/objs/LoCameraFiducialMap/LoCameraFiducialMap.cpp b/isis/src/lo/objs/LoCameraFiducialMap/LoCameraFiducialMap.cpp index e13dcb1f3d1e9200d762a902eec8650638166b3f..f713c9e8ee76997a9df1b3577b9509f48377cffe 100644 --- a/isis/src/lo/objs/LoCameraFiducialMap/LoCameraFiducialMap.cpp +++ b/isis/src/lo/objs/LoCameraFiducialMap/LoCameraFiducialMap.cpp @@ -52,7 +52,7 @@ namespace Isis { PvlKeyword &fXs = inst["FiducialXCoordinates"]; PvlKeyword &fYs = inst["FiducialYCoordinates"]; - for(int i = 0; i < fSamps.Size(); i++) { + for(int i = 0; i < fSamps.size(); i++) { p_fidSamples.push_back(toDouble(fSamps[i])); p_fidLines.push_back(toDouble(fLines[i])); p_fidXCoords.push_back(toDouble(fXs[i])); diff --git a/isis/src/lo/objs/LoCameraFiducialMap/unitTest.cpp b/isis/src/lo/objs/LoCameraFiducialMap/unitTest.cpp index 2db5db86cb00c29ba37a45812306269b17ff3e9d..427410bfd2df9354d294ed0e7909e9489a4a082b 100644 --- a/isis/src/lo/objs/LoCameraFiducialMap/unitTest.cpp +++ b/isis/src/lo/objs/LoCameraFiducialMap/unitTest.cpp @@ -44,7 +44,7 @@ int main(void) { Pvl pm("$lo/testData/3083_med_raw.cub"); Camera *camm = CameraFactory::Create(pm); - cout << "FileName: " << FileName(pm.FileName()).name() << endl; + cout << "FileName: " << FileName(pm.fileName()).name() << endl; cout << "CK Frame: " << camm->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); @@ -135,7 +135,7 @@ int main(void) { Pvl ph("$lo/testData/4164H_Full_mirror.cub"); Camera *camh = CameraFactory::Create(ph); - cout << "FileName: " << FileName(ph.FileName()).name() << endl; + cout << "FileName: " << FileName(ph.fileName()).name() << endl; cout << "CK Frame: " << camh->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); diff --git a/isis/src/lo/objs/LoHighCamera/LoHighCamera.cpp b/isis/src/lo/objs/LoHighCamera/LoHighCamera.cpp index 16a797f121f88a06334dba66e755eb2ddc3a637d..7c878ccceeafb3d32415a56af45da2bd99ad0d23 100644 --- a/isis/src/lo/objs/LoHighCamera/LoHighCamera.cpp +++ b/isis/src/lo/objs/LoHighCamera/LoHighCamera.cpp @@ -49,7 +49,7 @@ namespace Isis { LoHighCamera::LoHighCamera(Pvl &lab) : FramingCamera(lab) { NaifStatus::CheckErrors(); // Get the Instrument label information needed to define the camera for this frame - PvlGroup inst = lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup inst = lab.findGroup("Instrument", Pvl::Traverse); QString spacecraft = (QString)inst["SpacecraftName"]; QString instId = (QString)inst["InstrumentId"]; diff --git a/isis/src/lo/objs/LoHighCamera/unitTest.cpp b/isis/src/lo/objs/LoHighCamera/unitTest.cpp index 2f5fcc70f1edcd9f9595ad731e10937f9d97a036..4a8f9a750efc3514aecf687527a9473593ad3f7b 100644 --- a/isis/src/lo/objs/LoHighCamera/unitTest.cpp +++ b/isis/src/lo/objs/LoHighCamera/unitTest.cpp @@ -51,7 +51,7 @@ int main(void) { Pvl p("$lo/testData/4164H_Full_mirror.cub"); LoHighCamera *cam = (LoHighCamera *) CameraFactory::Create(p); - cout << "FileName: " << FileName(p.FileName()).name() << endl; + cout << "FileName: " << FileName(p.fileName()).name() << endl; cout << "CK Frame: " << cam->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); @@ -65,7 +65,7 @@ int main(void) { // Test Shutter Open/Close - const PvlGroup &inst = p.FindGroup("Instrument", Pvl::Traverse); + const PvlGroup &inst = p.findGroup("Instrument", Pvl::Traverse); // approximate 1 tenth of a second since Lunar Orbiter did not provide double exposureDuration = .1; QString stime = inst["StartTime"]; diff --git a/isis/src/lo/objs/LoMediumCamera/LoMediumCamera.cpp b/isis/src/lo/objs/LoMediumCamera/LoMediumCamera.cpp index 6ade6abdc346b63dd41e8d2723207c19d2d0e3dd..f93933191097f04a49f4d3dd5a5e1e043177c09b 100644 --- a/isis/src/lo/objs/LoMediumCamera/LoMediumCamera.cpp +++ b/isis/src/lo/objs/LoMediumCamera/LoMediumCamera.cpp @@ -50,15 +50,15 @@ namespace Isis { LoMediumCamera::LoMediumCamera(Pvl &lab) : FramingCamera(lab) { NaifStatus::CheckErrors(); // Get the Instrument label information needed to define the camera for this frame - PvlGroup inst = lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup inst = lab.findGroup("Instrument", Pvl::Traverse); QString spacecraft = inst["SpacecraftName"]; QString instId = inst["InstrumentId"]; LoMediumCamera::FocalPlaneMapType type; - if(inst.HasKeyword("FiducialSamples")) { + if(inst.hasKeyword("FiducialSamples")) { type = Fiducial; } - else if(inst.HasKeyword("BoresightSample")) { + else if(inst.hasKeyword("BoresightSample")) { type = Boresight; } else { diff --git a/isis/src/lo/objs/LoMediumCamera/unitTest.cpp b/isis/src/lo/objs/LoMediumCamera/unitTest.cpp index 37aaca63bb01c2e1652004989f9e2b21c96af68b..48f14c74cd890f930124ca9c934507bf1461319c 100644 --- a/isis/src/lo/objs/LoMediumCamera/unitTest.cpp +++ b/isis/src/lo/objs/LoMediumCamera/unitTest.cpp @@ -51,7 +51,7 @@ int main(void) { Pvl p("$lo/testData/3083_med_tohi.cub"); LoMediumCamera *cam = (LoMediumCamera *) CameraFactory::Create(p); - cout << "FileName: " << FileName(p.FileName()).name() << endl; + cout << "FileName: " << FileName(p.fileName()).name() << endl; cout << "CK Frame: " << cam->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); @@ -65,7 +65,7 @@ int main(void) { // Test Shutter Open/Close - const PvlGroup &inst = p.FindGroup("Instrument", Pvl::Traverse); + const PvlGroup &inst = p.findGroup("Instrument", Pvl::Traverse); // approximate 1 tenth of a second since Lunar Orbiter did not provide double exposureDuration = .1; QString stime = inst["StartTime"]; diff --git a/isis/src/local/apps/cissua2isis/cissua2isis.cpp b/isis/src/local/apps/cissua2isis/cissua2isis.cpp index ba8dcf35edf0f63daa645833a5312b6f00ecafac..a2193fc04c9e0de4578f2568baa157a87d615ab8 100644 --- a/isis/src/local/apps/cissua2isis/cissua2isis.cpp +++ b/isis/src/local/apps/cissua2isis/cissua2isis.cpp @@ -39,9 +39,9 @@ void IsisMain() { // Fix the StartTime and StopTime keywords from having the 'Z' value at the end Pvl *outLabel = ocube->label(); - PvlGroup &inst = outLabel->FindGroup("Instrument", Isis::PvlObject::Traverse); - PvlKeyword &start = inst.FindKeyword("StartTime"); - PvlKeyword &stop = inst.FindKeyword("StopTime"); + PvlGroup &inst = outLabel->findGroup("Instrument", Isis::PvlObject::Traverse); + PvlKeyword &start = inst.findKeyword("StartTime"); + PvlKeyword &stop = inst.findKeyword("StopTime"); QString startValue = start[0]; QString stopValue = stop[0]; start[0] = startValue.remove(QRegExp("Z$")); @@ -120,7 +120,7 @@ void TranslateUoACassiniLabels(Pvl &labelPvl, Cube *ocube) { Pvl *outLabel = ocube->label(); // Get the directory where the CISS translation tables are. - PvlGroup dataDir(Preference::Preferences().FindGroup("DataDirectory")); + PvlGroup dataDir(Preference::Preferences().findGroup("DataDirectory")); QString transDir = (QString) dataDir["Cassini"] + "/translations/"; // Translate @@ -128,38 +128,38 @@ void TranslateUoACassiniLabels(Pvl &labelPvl, Cube *ocube) { PvlTranslationManager instrumentXlater(labelPvl, transFile.expanded()); instrumentXlater.Auto((*outLabel)); - PvlGroup &inst = outLabel->FindGroup("Instrument", Isis::PvlObject::Traverse); + PvlGroup &inst = outLabel->findGroup("Instrument", Isis::PvlObject::Traverse); // Create the correct SpacecraftClockCount value - PvlGroup &inInst = labelPvl.FindGroup("ISIS_INSTRUMENT", Pvl::Traverse); - QString scc = inInst.FindKeyword("SPACECRAFT_CLOCK_CNT_PARTITION"); - scc += "/" + (QString) inInst.FindKeyword("ORIGINAL_SPACECRAFT_CLOCK_START_COUN"); - inst.AddKeyword(PvlKeyword("SpacecraftClockCount", scc)); + PvlGroup &inInst = labelPvl.findGroup("ISIS_INSTRUMENT", Pvl::Traverse); + QString scc = inInst.findKeyword("SPACECRAFT_CLOCK_CNT_PARTITION"); + scc += "/" + (QString) inInst.findKeyword("ORIGINAL_SPACECRAFT_CLOCK_START_COUN"); + inst.addKeyword(PvlKeyword("SpacecraftClockCount", scc)); // dataConv is used later - QString dataConv = inInst.FindKeyword("DATA_CONVERSION_TYPE"); - inst.AddKeyword(PvlKeyword("DataConversionType", dataConv)); + QString dataConv = inInst.findKeyword("DATA_CONVERSION_TYPE"); + inst.addKeyword(PvlKeyword("DataConversionType", dataConv)); //to add an array of values - PvlKeyword opticsTemp(inInst.FindKeyword("OPTICS_TEMPERATURE")); - opticsTemp.SetName("OpticsTemperature"); - inst.AddKeyword(opticsTemp); + PvlKeyword opticsTemp(inInst.findKeyword("OPTICS_TEMPERATURE")); + opticsTemp.setName("OpticsTemperature"); + inst.addKeyword(opticsTemp); //two possible label names for same keyword - if(labelPvl.HasKeyword("ENCODING_TYPE")) { - QString encodingType = labelPvl.FindKeyword("ENCODING_TYPE", Pvl::Traverse); - inst.AddKeyword(PvlKeyword("CompressionType", encodingType)); + if(labelPvl.hasKeyword("ENCODING_TYPE")) { + QString encodingType = labelPvl.findKeyword("ENCODING_TYPE", Pvl::Traverse); + inst.addKeyword(PvlKeyword("CompressionType", encodingType)); } else { - QString instCmprsType = labelPvl.FindKeyword("INST_CMPRS_TYPE", Pvl::Traverse); - inst.AddKeyword(PvlKeyword("CompressionType", instCmprsType)); + QString instCmprsType = labelPvl.findKeyword("INST_CMPRS_TYPE", Pvl::Traverse); + inst.addKeyword(PvlKeyword("CompressionType", instCmprsType)); } - QString flightSoftware = labelPvl.FindKeyword("FLIGHT_SOFTWARE_VERSION_ID", Pvl::Traverse); - inst.AddKeyword(PvlKeyword("FlightSoftwareVersionId", flightSoftware)); + QString flightSoftware = labelPvl.findKeyword("FLIGHT_SOFTWARE_VERSION_ID", Pvl::Traverse); + inst.addKeyword(PvlKeyword("FlightSoftwareVersionId", flightSoftware)); // Sets the needed Kernel FrameCode - QString instrumentID = inst.FindKeyword("InstrumentId"); + QString instrumentID = inst.findKeyword("InstrumentId"); PvlGroup kerns("Kernels"); if(instrumentID == "ISSNA") { kerns += PvlKeyword("NaifFrameCode", toString(-82360)); @@ -172,10 +172,10 @@ void TranslateUoACassiniLabels(Pvl &labelPvl, Cube *ocube) { msg += "angle or wide angle images"; throw IException(IException::User, msg, _FILEINFO_); } - outLabel->FindObject("IsisCube").AddGroup(kerns); + outLabel->findObject("IsisCube").addGroup(kerns); // Create BandBin group - QString filter = labelPvl.FindKeyword("BAND_BIN_FILTER_NAME", Isis::PvlObject::Traverse)[0]; + QString filter = labelPvl.findKeyword("BAND_BIN_FILTER_NAME", Isis::PvlObject::Traverse)[0]; filter = filter.mid(0, 3) + "/" + filter.mid(4); QString cameraAngleDefs; if(instrumentID.at(3) == 'N') { @@ -211,6 +211,6 @@ void TranslateUoACassiniLabels(Pvl &labelPvl, Cube *ocube) { bandBin += PvlKeyword("OriginalBand", "1"); bandBin += PvlKeyword("Center", toString(center)); bandBin += PvlKeyword("Width", toString(width)); - outLabel->FindObject("IsisCube").AddGroup(bandBin); + outLabel->findObject("IsisCube").addGroup(bandBin); } diff --git a/isis/src/local/apps/kaguyami2isis/kaguyami2isis.cpp b/isis/src/local/apps/kaguyami2isis/kaguyami2isis.cpp index 381141a8d9e84aba8aaf98a66addbd77b3803c35..37d4301eb13806fa754560354cc08aaa8130f31d 100644 --- a/isis/src/local/apps/kaguyami2isis/kaguyami2isis.cpp +++ b/isis/src/local/apps/kaguyami2isis/kaguyami2isis.cpp @@ -28,7 +28,7 @@ void IsisMain() { Pvl lab(inFile.expanded()); try { - id = (QString) lab.FindKeyword("DATA_SET_ID"); + id = (QString) lab.findKeyword("DATA_SET_ID"); } catch(IException &e) { QString msg = "Unable to read [DATA_SET_ID] from input file [" + @@ -44,7 +44,7 @@ void IsisMain() { p.StartProcess(); // Get the directory where the Kaguya MI translation tables are. - PvlGroup dataDir(Preference::Preferences().FindGroup("DataDirectory")); + PvlGroup dataDir(Preference::Preferences().findGroup("DataDirectory")); QString transDir = (QString) dataDir["Kaguya"] + "/translations/"; Pvl inputLabel(inFile.expanded()); Pvl *outputLabel = outcube->label(); @@ -60,24 +60,24 @@ void IsisMain() { PvlTranslationManager instrumentXlater(inputLabel, transFile.expanded()); instrumentXlater.Auto(*(outputLabel)); //trim trailing z's from the time strings - PvlGroup &instGroup(outputLabel->FindGroup("Instrument",Pvl::Traverse)); + PvlGroup &instGroup(outputLabel->findGroup("Instrument",Pvl::Traverse)); QString timeString; //StartTime PvlKeyword &startTimeKeyword=instGroup["StartTime"]; timeString = startTimeKeyword[0]; - startTimeKeyword.SetValue( timeString.mid(0,timeString.lastIndexOf("Z")) ); + startTimeKeyword.setValue( timeString.mid(0,timeString.lastIndexOf("Z")) ); //StartTimeRaw PvlKeyword &startTimeRawKeyword=instGroup["StartTimeRaw"]; timeString = startTimeRawKeyword[0]; - startTimeRawKeyword.SetValue( timeString.mid(0,timeString.lastIndexOf("Z")) ); + startTimeRawKeyword.setValue( timeString.mid(0,timeString.lastIndexOf("Z")) ); //StopTime PvlKeyword &stopTimeKeyword=instGroup["StopTime"]; timeString = stopTimeKeyword[0]; - stopTimeKeyword.SetValue( timeString.mid(0,timeString.lastIndexOf("Z")) ); + stopTimeKeyword.setValue( timeString.mid(0,timeString.lastIndexOf("Z")) ); //StopTimeRaw PvlKeyword &stopTimeRawKeyword=instGroup["StopTimeRaw"]; timeString = stopTimeRawKeyword[0]; - stopTimeRawKeyword.SetValue( timeString.mid(0,timeString.lastIndexOf("Z")) ); + stopTimeRawKeyword.setValue( timeString.mid(0,timeString.lastIndexOf("Z")) ); // Translate the BandBin group @@ -87,23 +87,23 @@ void IsisMain() { //Set up the Kernels group PvlGroup kern("Kernels"); - if (lab.FindKeyword("INSTRUMENT_ID")[0] == "MI-VIS") { + if (lab.findKeyword("INSTRUMENT_ID")[0] == "MI-VIS") { kern += PvlKeyword("NaifFrameCode", toString(-131335)); kern += PvlKeyword("NaifCkCode", toString(-131330)); } - else if (lab.FindKeyword("INSTRUMENT_ID")[0] == "MI-NIR") { + else if (lab.findKeyword("INSTRUMENT_ID")[0] == "MI-NIR") { kern += PvlKeyword("NaifFrameCode", toString(-131341)); kern += PvlKeyword("NaifCkCode", toString(-131340)); } //At the time of this writing there was no expectation that Kaguya ever did any binning // so this is check to make sure an error is thrown if an image was binned - if (lab.FindKeyword("INSTRUMENT_ID")[0] == "MI-VIS" && outcube->sampleCount() != 962 ) { + if (lab.findKeyword("INSTRUMENT_ID")[0] == "MI-VIS" && outcube->sampleCount() != 962 ) { QString msg = "Input file [" + inFile.expanded() + "]" + " appears to be binned. Binning was " "unexpected, and is unsupported by the camera model"; throw IException(IException::Unknown, msg, _FILEINFO_); } - if (lab.FindKeyword("INSTRUMENT_ID")[0] == "MI-NIR" && outcube->sampleCount() != 320 ) { + if (lab.findKeyword("INSTRUMENT_ID")[0] == "MI-NIR" && outcube->sampleCount() != 320 ) { QString msg = "Input file [" + inFile.expanded() + "]" + " appears to be binned. Binning was " "unexpected, and is unsupported by the camera model"; throw IException(IException::Unknown, msg, _FILEINFO_); diff --git a/isis/src/local/objs/KaguyaMiCamera/KaguyaMiCamera.cpp b/isis/src/local/objs/KaguyaMiCamera/KaguyaMiCamera.cpp index fefe19601ff1c17f2de16c36161a09d7ccf0de1e..b107cca4a3d3e76a505832fac17862353d01c9a0 100644 --- a/isis/src/local/objs/KaguyaMiCamera/KaguyaMiCamera.cpp +++ b/isis/src/local/objs/KaguyaMiCamera/KaguyaMiCamera.cpp @@ -52,7 +52,7 @@ namespace Isis { // Get the start time from labels - PvlGroup &inst = lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup &inst = lab.findGroup("Instrument", Pvl::Traverse); QString stime = (QString)inst["StartTime"]; SpiceDouble etStart=0; diff --git a/isis/src/local/objs/KaguyaMiCamera/unitTest.cpp b/isis/src/local/objs/KaguyaMiCamera/unitTest.cpp index 084595618281d2d769215142c8a0dca40bce6b2d..a9a5de8ee4cecd0d468b3d92183654fd0e297fe9 100644 --- a/isis/src/local/objs/KaguyaMiCamera/unitTest.cpp +++ b/isis/src/local/objs/KaguyaMiCamera/unitTest.cpp @@ -50,7 +50,7 @@ int main(int argc, char *argv[]) { for(unsigned int i = 0; i < sizeof(knownLat) / sizeof(double); i++) { Pvl p(files[i]); Camera *cam = CameraFactory::Create(p); - cout << "FileName: " << FileName(p.FileName()).name() << endl; + cout << "FileName: " << FileName(p.fileName()).name() << endl; cout << "CK Frame: " << cam->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); diff --git a/isis/src/lro/apps/lronac2isis/lronac2isis.cpp b/isis/src/lro/apps/lronac2isis/lronac2isis.cpp index 020e4ceefb03974e3a93b0057c86fb96786abf4a..7bcc8446aff6146d04a1daf15607d1d431b2a47f 100644 --- a/isis/src/lro/apps/lronac2isis/lronac2isis.cpp +++ b/isis/src/lro/apps/lronac2isis/lronac2isis.cpp @@ -35,15 +35,15 @@ void IsisMain() { try { Pvl lab(inFile.expanded()); - if(lab.HasKeyword("DATA_SET_ID")) - id = (QString) lab.FindKeyword("DATA_SET_ID"); + if(lab.hasKeyword("DATA_SET_ID")) + id = (QString) lab.findKeyword("DATA_SET_ID"); else { QString msg = "Unable to read [DATA_SET_ID] from input file [" + inFile.expanded() + "]"; throw IException(IException::Unknown, msg, _FILEINFO_); } //Checks if in file is rdr - bool projected = lab.HasObject("IMAGE_MAP_PROJECTION"); + bool projected = lab.hasObject("IMAGE_MAP_PROJECTION"); if(projected) { QString msg = "[" + inFile.name() + "] appears to be an rdr file."; msg += " Use pds2isis."; @@ -51,24 +51,24 @@ void IsisMain() { } // Store the decompanding information - PvlKeyword xtermKeyword = lab.FindKeyword("LRO:XTERM"), - mtermKeyword = lab.FindKeyword("LRO:MTERM"), - btermKeyword = lab.FindKeyword("LRO:BTERM"); + PvlKeyword xtermKeyword = lab.findKeyword("LRO:XTERM"), + mtermKeyword = lab.findKeyword("LRO:MTERM"), + btermKeyword = lab.findKeyword("LRO:BTERM"); - if(mtermKeyword.Size() != xtermKeyword.Size() || btermKeyword.Size() != xtermKeyword.Size()) { + if(mtermKeyword.size() != xtermKeyword.size() || btermKeyword.size() != xtermKeyword.size()) { QString msg = "The decompanding terms do not have the same dimensions"; throw IException(IException::Io, msg, _FILEINFO_); } - for(int i = 0; i < xtermKeyword.Size(); i++) { + for(int i = 0; i < xtermKeyword.size(); i++) { g_xterm.push_back(toDouble(xtermKeyword[i])); g_mterm.push_back(toDouble(mtermKeyword[i])); g_bterm.push_back(toDouble(btermKeyword[i])); } - double versionId = toDouble(lab.FindKeyword("PRODUCT_VERSION_ID")[0].remove(QRegExp("^v"))); + double versionId = toDouble(lab.findKeyword("PRODUCT_VERSION_ID")[0].remove(QRegExp("^v"))); - if(lab.FindKeyword("FRAME_ID")[0] == "RIGHT" && versionId < 1.30) + if(lab.findKeyword("FRAME_ID")[0] == "RIGHT" && versionId < 1.30) g_flip = true; else g_flip = false; @@ -183,7 +183,7 @@ void TranslateLrocNacLabels(FileName &labelFile, Cube *ocube) { //Pvl to store the labels Pvl outLabel; //Set up the directory where the translations are - PvlGroup dataDir(Preference::Preferences().FindGroup("DataDirectory")); + PvlGroup dataDir(Preference::Preferences().findGroup("DataDirectory")); QString transDir = (QString) dataDir["Lro"] + "/translations/"; Pvl labelPvl(labelFile.expanded()); @@ -206,25 +206,25 @@ void TranslateLrocNacLabels(FileName &labelFile, Cube *ocube) { //Set up the Kernels group PvlGroup kern("Kernels"); - if(lab.FindKeyword("FRAME_ID")[0] == "LEFT") + if(lab.findKeyword("FRAME_ID")[0] == "LEFT") kern += PvlKeyword("NaifFrameCode", "-85600"); else kern += PvlKeyword("NaifFrameCode", "-85610"); - PvlGroup inst = outLabel.FindGroup("Instrument", Pvl::Traverse); - if(lab.FindKeyword("FRAME_ID")[0] == "LEFT") { - inst.FindKeyword("InstrumentId") = "NACL"; - inst.FindKeyword("InstrumentName") = "LUNAR RECONNAISSANCE ORBITER NARROW ANGLE CAMERA LEFT"; + PvlGroup inst = outLabel.findGroup("Instrument", Pvl::Traverse); + if(lab.findKeyword("FRAME_ID")[0] == "LEFT") { + inst.findKeyword("InstrumentId") = "NACL"; + inst.findKeyword("InstrumentName") = "LUNAR RECONNAISSANCE ORBITER NARROW ANGLE CAMERA LEFT"; } else { - inst.FindKeyword("InstrumentId") = "NACR"; - inst.FindKeyword("InstrumentName") = "LUNAR RECONNAISSANCE ORBITER NARROW ANGLE CAMERA RIGHT"; + inst.findKeyword("InstrumentId") = "NACR"; + inst.findKeyword("InstrumentName") = "LUNAR RECONNAISSANCE ORBITER NARROW ANGLE CAMERA RIGHT"; } //Add all groups to the output cube ocube->putGroup(inst); - ocube->putGroup(outLabel.FindGroup("Archive", Pvl::Traverse)); - ocube->putGroup(outLabel.FindGroup("BandBin", Pvl::Traverse)); + ocube->putGroup(outLabel.findGroup("Archive", Pvl::Traverse)); + ocube->putGroup(outLabel.findGroup("BandBin", Pvl::Traverse)); ocube->putGroup(kern); } diff --git a/isis/src/lro/apps/lronac2pds/lronac2pds.cpp b/isis/src/lro/apps/lronac2pds/lronac2pds.cpp index 2cf8999b03b220e5692289c850d0dd0c25bb4d29..51ad7d562c0462ab5d95c115c6277c90db0cffc5 100644 --- a/isis/src/lro/apps/lronac2pds/lronac2pds.cpp +++ b/isis/src/lro/apps/lronac2pds/lronac2pds.cpp @@ -42,7 +42,7 @@ void IsisMain () { ProcessByLine p; Cube *inCube = p.SetInputCube("FROM"); - g_isIof = inCube->label()->FindGroup("Radiometry", Pvl::Traverse).FindKeyword("RadiometricType")[0].toUpper() == "IOF"; + g_isIof = inCube->label()->findGroup("Radiometry", Pvl::Traverse).findKeyword("RadiometricType")[0].toUpper() == "IOF"; FileName scaledCube("$TEMPORARY/" + FileName(ui.GetFileName("FROM")).name()); scaledCube.addExtension("cub"); @@ -147,10 +147,10 @@ void OutputLabel ( std::ofstream &fout, Cube* cube ) { //Pvl to store the labels Pvl outLabel; PvlFormatPds *p_formatter = new PvlFormatPds("$lro/translations/pdsExportRootGen.typ"); - labelPvl.SetFormat(p_formatter); - labelPvl.SetTerminator("END"); + labelPvl.setFormat(p_formatter); + labelPvl.setTerminator("END"); //Set up the directory where the translations are - PvlGroup dataDir(Preference::Preferences().FindGroup("DataDirectory")); + PvlGroup dataDir(Preference::Preferences().findGroup("DataDirectory")); QString transDir = (QString) dataDir["Lro"] + "/translations/"; stringstream stream; @@ -162,25 +162,25 @@ void OutputLabel ( std::ofstream &fout, Cube* cube ) { labelXlator.Auto(outLabel); // Copy any Translation changes over - for (int i = 0; i < outLabel.Keywords(); i++) { + for (int i = 0; i < outLabel.keywords(); i++) { bool hasUnit = false; QString unit = ""; - if (labelPvl[outLabel[i].Name()].Unit() != "") { + if (labelPvl[outLabel[i].name()].unit() != "") { hasUnit = true; - unit = labelPvl[outLabel[i].Name()].Unit(); + unit = labelPvl[outLabel[i].name()].unit(); } bool hasComment = false; QString comment = ""; - if (labelPvl[outLabel[i].Name()].Comments() > 0) { + if (labelPvl[outLabel[i].name()].comments() > 0) { hasComment = true; - comment = labelPvl[outLabel[i].Name()].Comment(0); + comment = labelPvl[outLabel[i].name()].comment(0); } - labelPvl[outLabel[i].Name()] = outLabel[i]; + labelPvl[outLabel[i].name()] = outLabel[i]; if (hasUnit) - labelPvl[outLabel[i].Name()].SetUnits(unit); + labelPvl[outLabel[i].name()].setUnits(unit); if (hasComment) - labelPvl[outLabel[i].Name()].AddComment(comment); + labelPvl[outLabel[i].name()].addComment(comment); } //Update the product ID @@ -189,13 +189,13 @@ void OutputLabel ( std::ofstream &fout, Cube* cube ) { labelPvl["PRODUCT_ID"][0].replace((prod_id.length()-1), 1, "C"); // Update the product creation time - labelPvl["PRODUCT_CREATION_TIME"].SetValue(iTime::CurrentGMT()); + labelPvl["PRODUCT_CREATION_TIME"].setValue(iTime::CurrentGMT()); - labelPvl["PRODUCT_VERSION_ID"].SetValue(g_productVersionId); + labelPvl["PRODUCT_VERSION_ID"].setValue(g_productVersionId); // Update the "IMAGE" Object - PvlObject &imageObject = labelPvl.FindObject("IMAGE"); - imageObject.Clear(); + PvlObject &imageObject = labelPvl.findObject("IMAGE"); + imageObject.clear(); imageObject += PvlKeyword("LINES", toString(cube->lineCount())); imageObject += PvlKeyword("LINE_SAMPLES", toString(cube->sampleCount())); if (g_isIof) { diff --git a/isis/src/lro/apps/lronaccal/lronaccal.cpp b/isis/src/lro/apps/lronaccal/lronaccal.cpp index b21b4512cccea96f84010b7f365822ab120955fa..05dafc47298609f3b80eb4ef060d498e41850ae5 100644 --- a/isis/src/lro/apps/lronaccal/lronaccal.cpp +++ b/isis/src/lro/apps/lronaccal/lronaccal.cpp @@ -62,7 +62,7 @@ void IsisMain() { g_iof = (ui.GetString("RADIOMETRICTYPE") == "IOF"); Isis::Pvl lab(ui.GetFileName("FROM")); - Isis::PvlGroup &inst = lab.FindGroup("Instrument", Pvl::Traverse); + Isis::PvlGroup &inst = lab.findGroup("Instrument", Pvl::Traverse); // Check if it is a NAC image QString instId = inst["InstrumentId"]; @@ -72,12 +72,12 @@ void IsisMain() { } // And check if it has already run through calibration - if(lab.FindObject("IsisCube").HasGroup("Radiometry")) { + if(lab.findObject("IsisCube").hasGroup("Radiometry")) { QString msg = "This image has already been calibrated"; throw IException(IException::User, msg, _FILEINFO_); } - if(lab.FindObject("IsisCube").HasGroup("AlphaCube")) { + if(lab.findObject("IsisCube").hasGroup("AlphaCube")) { QString msg = "This application can not be run on any image that has been geometrically transformed (i.e. scaled, rotated, sheared, or reflected) or cropped."; throw IException(IException::User, msg, _FILEINFO_); } @@ -129,7 +129,7 @@ void IsisMain() { cutoff = LINE_SIZE / 2; } - for(int i = 0; i < maskedPixels.Size(); i++) + for(int i = 0; i < maskedPixels.size(); i++) if((g_isLeftNac && toInt(maskedPixels[i]) < cutoff) || (!g_isLeftNac && toInt(maskedPixels[i]) > cutoff)) g_maskedPixelsLeft.push_back(toInt(maskedPixels[i])); else diff --git a/isis/src/lro/apps/lronacecho/lronacecho.cpp b/isis/src/lro/apps/lronacecho/lronacecho.cpp index 01b7035b93d8524a0750d94272b94eb5bf741f4a..45805e6113046c1e35f74d55e2e688b2b908b57f 100644 --- a/isis/src/lro/apps/lronacecho/lronacecho.cpp +++ b/isis/src/lro/apps/lronacecho/lronacecho.cpp @@ -26,7 +26,7 @@ void IsisMain() { g_delta = ui.GetDouble("DELTA"); Pvl lab(ui.GetFileName("FROM")); - PvlGroup &inst = lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup &inst = lab.findGroup("Instrument", Pvl::Traverse); // Check if it is a NAC image QString instId = inst["InstrumentId"]; diff --git a/isis/src/lro/apps/lrowac2isis/lrowac2isis.cpp b/isis/src/lro/apps/lrowac2isis/lrowac2isis.cpp index bac44dda6382cb702a26968e1a0ad611e04848d2..e4843ca3b0d2cb8c44e0c84ab7f7c1911dda0f8f 100644 --- a/isis/src/lro/apps/lrowac2isis/lrowac2isis.cpp +++ b/isis/src/lro/apps/lrowac2isis/lrowac2isis.cpp @@ -67,7 +67,7 @@ void IsisMain() { if(ui.GetBoolean("UNLUT") && pdsLab["LRO:LOOKUP_TABLE_TYPE"][0] == "STORED") { PvlKeyword lutKeyword = pdsLab["LRO:LOOKUP_CONVERSION_TABLE"]; - for(int i = 0; i < lutKeyword.Size(); i ++) { + for(int i = 0; i < lutKeyword.size(); i ++) { IString lutPair = lutKeyword[i]; lutPair.ConvertWhiteSpace(); lutPair.Remove("() "); @@ -216,8 +216,8 @@ void IsisMain() { PvlKeyword numFrameletsKeyword("NumFramelets", toString(numFramelets)); if(uveven) { - for(int grp = 0; grp < isis3UvEvenLab.Groups(); grp++) { - uveven->putGroup(isis3UvEvenLab.Group(grp)); + for(int grp = 0; grp < isis3UvEvenLab.groups(); grp++) { + uveven->putGroup(isis3UvEvenLab.group(grp)); } History history("IsisCube"); @@ -231,8 +231,8 @@ void IsisMain() { } if(uvodd) { - for(int grp = 0; grp < isis3UvOddLab.Groups(); grp++) { - uvodd->putGroup(isis3UvOddLab.Group(grp)); + for(int grp = 0; grp < isis3UvOddLab.groups(); grp++) { + uvodd->putGroup(isis3UvOddLab.group(grp)); } History history("IsisCube"); @@ -246,8 +246,8 @@ void IsisMain() { } if(viseven) { - for(int grp = 0; grp < isis3VisEvenLab.Groups(); grp++) { - viseven->putGroup(isis3VisEvenLab.Group(grp)); + for(int grp = 0; grp < isis3VisEvenLab.groups(); grp++) { + viseven->putGroup(isis3VisEvenLab.group(grp)); } History history("IsisCube"); @@ -261,8 +261,8 @@ void IsisMain() { } if(visodd) { - for(int grp = 0; grp < isis3VisOddLab.Groups(); grp++) { - visodd->putGroup(isis3VisOddLab.Group(grp)); + for(int grp = 0; grp < isis3VisOddLab.groups(); grp++) { + visodd->putGroup(isis3VisOddLab.group(grp)); } History history("IsisCube"); @@ -457,7 +457,7 @@ void TranslateLabels(Pvl &pdsLab, Pvl &isis3VisEven, Pvl &isis3VisOdd, // Let's start by running through the generic translations. // Get the directory where the translation tables are. - PvlGroup dataDir(Preference::Preferences().FindGroup("DataDirectory")); + PvlGroup dataDir(Preference::Preferences().findGroup("DataDirectory")); QString transDir = (QString) dataDir["Lro"] + "/translations/"; // Translate the in @@ -494,32 +494,32 @@ void TranslateLabels(Pvl &pdsLab, Pvl &isis3VisEven, Pvl &isis3VisOdd, genericInstrument.push_back(PvlKeyword("Decompanded", (ui.GetBoolean("UNLUT") ? "Yes" : "No"))); // We'll need the instrument groups a lot, get a reference right to them - PvlGroup &visEvenInst = isis3VisEven.FindGroup("Instrument", Pvl::Traverse); - PvlGroup &visOddInst = isis3VisOdd.FindGroup("Instrument", Pvl::Traverse); - PvlGroup &uvEvenInst = isis3UvEven.FindGroup("Instrument", Pvl::Traverse); - PvlGroup &uvOddInst = isis3UvOdd.FindGroup("Instrument", Pvl::Traverse); + PvlGroup &visEvenInst = isis3VisEven.findGroup("Instrument", Pvl::Traverse); + PvlGroup &visOddInst = isis3VisOdd.findGroup("Instrument", Pvl::Traverse); + PvlGroup &uvEvenInst = isis3UvEven.findGroup("Instrument", Pvl::Traverse); + PvlGroup &uvOddInst = isis3UvOdd.findGroup("Instrument", Pvl::Traverse); // Add user parameters to the instrument group for(unsigned int key = 0; key < genericInstrument.size(); key++) { - visEvenInst.AddKeyword(genericInstrument[key]); - visOddInst.AddKeyword(genericInstrument[key]); - uvEvenInst.AddKeyword(genericInstrument[key]); - uvOddInst.AddKeyword(genericInstrument[key]); + visEvenInst.addKeyword(genericInstrument[key]); + visOddInst.addKeyword(genericInstrument[key]); + uvEvenInst.addKeyword(genericInstrument[key]); + uvOddInst.addKeyword(genericInstrument[key]); } // add labels unique to particular files if(viseven) { - visEvenInst.AddKeyword(PvlKeyword("Framelets", "Even")); - visEvenInst.AddKeyword(PvlKeyword("NumFramelets", toString(viseven->lineCount() / 14))); - visEvenInst.AddKeyword(PvlKeyword("InstrumentId", "WAC-VIS"), Pvl::Replace); - visEvenInst.AddKeyword(PvlKeyword("InstrumentModeId", (QString) pdsLab["INSTRUMENT_MODE_ID"])); + visEvenInst.addKeyword(PvlKeyword("Framelets", "Even")); + visEvenInst.addKeyword(PvlKeyword("NumFramelets", toString(viseven->lineCount() / 14))); + visEvenInst.addKeyword(PvlKeyword("InstrumentId", "WAC-VIS"), Pvl::Replace); + visEvenInst.addKeyword(PvlKeyword("InstrumentModeId", (QString) pdsLab["INSTRUMENT_MODE_ID"])); } if(visodd) { - visOddInst.AddKeyword(PvlKeyword("Framelets", "Odd")); - visOddInst.AddKeyword(PvlKeyword("NumFramelets", toString(visodd->lineCount() / 14))); - visOddInst.AddKeyword(PvlKeyword("InstrumentId", "WAC-VIS"), Pvl::Replace); - visOddInst.AddKeyword(PvlKeyword("InstrumentModeId", (QString) pdsLab["INSTRUMENT_MODE_ID"])); + visOddInst.addKeyword(PvlKeyword("Framelets", "Odd")); + visOddInst.addKeyword(PvlKeyword("NumFramelets", toString(visodd->lineCount() / 14))); + visOddInst.addKeyword(PvlKeyword("InstrumentId", "WAC-VIS"), Pvl::Replace); + visOddInst.addKeyword(PvlKeyword("InstrumentModeId", (QString) pdsLab["INSTRUMENT_MODE_ID"])); } // **TEMPORARY. This should be done by a translation table. @@ -533,17 +533,17 @@ void TranslateLabels(Pvl &pdsLab, Pvl &isis3VisEven, Pvl &isis3VisOdd, visWavelength = pdsLab["CENTER_FILTER_WAVELENGTH"][0]; visFilterNum = pdsLab["FILTER_NUMBER"][0]; - if(pdsLab.HasKeyword("BANDWIDTH")) { + if(pdsLab.hasKeyword("BANDWIDTH")) { visBandwidth = pdsLab["BANDWIDTH"][0]; } } else { - for(int i = 0; i < pdsLab["FILTER_NUMBER"].Size(); i++) { + for(int i = 0; i < pdsLab["FILTER_NUMBER"].size(); i++) { if(toInt(pdsLab["FILTER_NUMBER"][i]) > 2) { visWavelength += pdsLab["CENTER_FILTER_WAVELENGTH"][i]; visFilterNum += pdsLab["FILTER_NUMBER"][i]; - if(pdsLab.HasKeyword("BANDWIDTH")) { + if(pdsLab.hasKeyword("BANDWIDTH")) { visBandwidth += pdsLab["BANDWIDTH"][i]; } } @@ -553,7 +553,7 @@ void TranslateLabels(Pvl &pdsLab, Pvl &isis3VisEven, Pvl &isis3VisOdd, visBandBin += visFilterNum; visBandBin += visWavelength; - if(visBandwidth.Size() != 0) { + if(visBandwidth.size() != 0) { visBandBin += visBandwidth; } @@ -566,17 +566,17 @@ void TranslateLabels(Pvl &pdsLab, Pvl &isis3VisEven, Pvl &isis3VisOdd, isis3VisOdd += visKerns; if(uveven) { - uvEvenInst.AddKeyword(PvlKeyword("Framelets", "Even")); - uvEvenInst.AddKeyword(PvlKeyword("NumFramelets", toString(uveven->lineCount() / 4))); - uvEvenInst.AddKeyword(PvlKeyword("InstrumentId", "WAC-UV"), Pvl::Replace); - uvEvenInst.AddKeyword(PvlKeyword("InstrumentModeId", (QString) pdsLab["INSTRUMENT_MODE_ID"])); + uvEvenInst.addKeyword(PvlKeyword("Framelets", "Even")); + uvEvenInst.addKeyword(PvlKeyword("NumFramelets", toString(uveven->lineCount() / 4))); + uvEvenInst.addKeyword(PvlKeyword("InstrumentId", "WAC-UV"), Pvl::Replace); + uvEvenInst.addKeyword(PvlKeyword("InstrumentModeId", (QString) pdsLab["INSTRUMENT_MODE_ID"])); } if(uvodd) { - uvOddInst.AddKeyword(PvlKeyword("Framelets", "Odd")); - uvOddInst.AddKeyword(PvlKeyword("NumFramelets", toString(uvodd->lineCount() / 4))); - uvOddInst.AddKeyword(PvlKeyword("InstrumentId", "WAC-UV"), Pvl::Replace); - uvOddInst.AddKeyword(PvlKeyword("InstrumentModeId", (QString) pdsLab["INSTRUMENT_MODE_ID"])); + uvOddInst.addKeyword(PvlKeyword("Framelets", "Odd")); + uvOddInst.addKeyword(PvlKeyword("NumFramelets", toString(uvodd->lineCount() / 4))); + uvOddInst.addKeyword(PvlKeyword("InstrumentId", "WAC-UV"), Pvl::Replace); + uvOddInst.addKeyword(PvlKeyword("InstrumentModeId", (QString) pdsLab["INSTRUMENT_MODE_ID"])); } // Translate the BandBin group @@ -585,12 +585,12 @@ void TranslateLabels(Pvl &pdsLab, Pvl &isis3VisEven, Pvl &isis3VisOdd, PvlKeyword uvFilterNum("FilterNumber"); PvlKeyword uvBandwidth("Width"); - for(int i = 0; i < pdsLab["FILTER_NUMBER"].Size(); i++) { + for(int i = 0; i < pdsLab["FILTER_NUMBER"].size(); i++) { if(toInt(pdsLab["FILTER_NUMBER"][i]) <= 2) { uvWavelength += pdsLab["CENTER_FILTER_WAVELENGTH"][i]; uvFilterNum += pdsLab["FILTER_NUMBER"][i]; - if(pdsLab.HasKeyword("BANDWIDTH")) { + if(pdsLab.hasKeyword("BANDWIDTH")) { uvBandwidth += pdsLab["BANDWIDTH"][i]; } } @@ -599,7 +599,7 @@ void TranslateLabels(Pvl &pdsLab, Pvl &isis3VisEven, Pvl &isis3VisOdd, uvBandBin += uvFilterNum; uvBandBin += uvWavelength; - if(uvBandwidth.Size() != 0) { + if(uvBandwidth.size() != 0) { uvBandBin += uvBandwidth; } @@ -670,45 +670,45 @@ void ValidateInputLabels(Pvl &pdsLab) { // Check known values first to verify they match PvlKeyword &lut = pdsLab["LRO:LOOKUP_CONVERSION_TABLE"]; - if(lut.Size() != 256) { + if(lut.size() != 256) { QString msg = "Keyword [LRO:LOOKUP_CONVERSION_TABLE] has the wrong number of values"; throw IException(IException::Unknown, msg, _FILEINFO_); } PvlKeyword &missionName = pdsLab["MISSION_NAME"]; - if(missionName.Size() != 1 || missionName[0] != "LUNAR RECONNAISSANCE ORBITER") { + if(missionName.size() != 1 || missionName[0] != "LUNAR RECONNAISSANCE ORBITER") { QString msg = "Keyword [MISSION_NAME] does not have a value of [LUNAR RECONNAISSANCER ORBITER]"; throw IException(IException::Unknown, msg, _FILEINFO_); } PvlKeyword &instrumentId = pdsLab["INSTRUMENT_ID"]; - if(instrumentId.Size() != 1 || instrumentId[0] != "LROC") { + if(instrumentId.size() != 1 || instrumentId[0] != "LROC") { QString msg = "Keyword [INSTRUMENT_ID] does not have a value of [LROC]"; throw IException(IException::Unknown, msg, _FILEINFO_); } // Make sure CENTER_FILTER_WAVELENGTH/FILTER_NUMBER makes sense - if(pdsLab["FILTER_NUMBER"].Size() != pdsLab["CENTER_FILTER_WAVELENGTH"].Size()) { + if(pdsLab["FILTER_NUMBER"].size() != pdsLab["CENTER_FILTER_WAVELENGTH"].size()) { QString msg = "Keywords [FILTER_NUMBER,CENTER_FILTER_WAVELENGTH] must have the same number of values"; throw IException(IException::Unknown, msg, _FILEINFO_); } - if(pdsLab["INSTRUMENT_MODE_ID"][0] == "BW" && pdsLab["FILTER_NUMBER"].Size() != 1) { + if(pdsLab["INSTRUMENT_MODE_ID"][0] == "BW" && pdsLab["FILTER_NUMBER"].size() != 1) { QString msg = "Keyword [FILTER_NUMBER] must have size 1 if [INSTRUMENT_MODE_ID] is [BW]"; throw IException(IException::Unknown, msg, _FILEINFO_); } - else if(pdsLab["INSTRUMENT_MODE_ID"][0] == "COLOR" && (pdsLab["FILTER_NUMBER"].Size() < 5 - || pdsLab["FILTER_NUMBER"].Size() > 7 || pdsLab["FILTER_NUMBER"].Size() == 6)) { + else if(pdsLab["INSTRUMENT_MODE_ID"][0] == "COLOR" && (pdsLab["FILTER_NUMBER"].size() < 5 + || pdsLab["FILTER_NUMBER"].size() > 7 || pdsLab["FILTER_NUMBER"].size() == 6)) { QString msg = "Keyword [FILTER_NUMBER] must have size 5 or 7 if [INSTRUMENT_MODE_ID] is [COLOR]"; throw IException(IException::Unknown, msg, _FILEINFO_); } - else if(pdsLab["INSTRUMENT_MODE_ID"][0] == "UV" && pdsLab["FILTER_NUMBER"].Size() != 2) { + else if(pdsLab["INSTRUMENT_MODE_ID"][0] == "UV" && pdsLab["FILTER_NUMBER"].size() != 2) { QString msg = "Keyword [FILTER_NUMBER] must have size 2 if [INSTRUMENT_MODE_ID] is [UV]"; throw IException(IException::Unknown, msg, _FILEINFO_); } - else if(pdsLab["INSTRUMENT_MODE_ID"][0] == "VIS" && pdsLab["FILTER_NUMBER"].Size() != 5) { + else if(pdsLab["INSTRUMENT_MODE_ID"][0] == "VIS" && pdsLab["FILTER_NUMBER"].size() != 5) { QString msg = "Keyword [FILTER_NUMBER] must have size 5 if [INSTRUMENT_MODE_ID] is [VIS]"; throw IException(IException::Unknown, msg, _FILEINFO_); } @@ -728,7 +728,7 @@ void ValidateInputLabels(Pvl &pdsLab) { filters.push_back(pair(6, "643")); filters.push_back(pair(7, "689")); - for(int i = 0; i < pdsLab["FILTER_NUMBER"].Size(); i++) { + for(int i = 0; i < pdsLab["FILTER_NUMBER"].size(); i++) { bool found = false; bool match = false; for(int j = 0; !found && j < (int) filters.size(); j++) { @@ -756,7 +756,7 @@ void ValidateInputLabels(Pvl &pdsLab) { }; for(unsigned int i = 0; i < sizeof(QString) / sizeof(invalidKeywords); i++) { - if(pdsLab.HasKeyword(invalidKeywords[i])) { + if(pdsLab.hasKeyword(invalidKeywords[i])) { QString msg = "Keyword ["; msg += invalidKeywords[i]; msg += "] must not exist"; @@ -768,7 +768,7 @@ void ValidateInputLabels(Pvl &pdsLab) { PvlKeyword &orbitNumber = pdsLab["ORBIT_NUMBER"]; QRegExp integerRegex("[0-9]+"); - if(orbitNumber.Size() != 1 || !integerRegex.exactMatch(orbitNumber[0])) { + if(orbitNumber.size() != 1 || !integerRegex.exactMatch(orbitNumber[0])) { QString msg = "The value of keyword [ORBIT_NUMBER] is not valid"; throw IException(IException::Unknown, msg, _FILEINFO_); } @@ -787,7 +787,7 @@ void ValidateInputLabels(Pvl &pdsLab) { }; for(unsigned int i = 0; i < sizeof(numericKeywords) / sizeof(QString); i++) { - if(pdsLab[numericKeywords[i]].Size() != 1 || !numberRegex.exactMatch(pdsLab[numericKeywords[i]][0])) { + if(pdsLab[numericKeywords[i]].size() != 1 || !numberRegex.exactMatch(pdsLab[numericKeywords[i]][0])) { QString msg = "The value of keyword ["; msg += numericKeywords[i]; msg += "] is not valid"; @@ -803,7 +803,7 @@ void ValidateInputLabels(Pvl &pdsLab) { }; for(unsigned int i = 0; i < sizeof(timeKeywords) / sizeof(QString); i++) { - if(pdsLab[timeKeywords[i]].Size() != 1 || !timeRegex.exactMatch(pdsLab[timeKeywords[i]][0])) { + if(pdsLab[timeKeywords[i]].size() != 1 || !timeRegex.exactMatch(pdsLab[timeKeywords[i]][0])) { QString msg = "The value of keyword ["; msg += timeKeywords[i]; msg += "] is not valid"; @@ -819,7 +819,7 @@ void ValidateInputLabels(Pvl &pdsLab) { }; for(unsigned int i = 0; i < sizeof(clockKeywords) / sizeof(QString); i++) { - if(pdsLab[clockKeywords[i]].Size() != 1 || !clockRegex.exactMatch(pdsLab[clockKeywords[i]][0])) { + if(pdsLab[clockKeywords[i]].size() != 1 || !clockRegex.exactMatch(pdsLab[clockKeywords[i]][0])) { QString msg = "The value of keyword ["; msg += clockKeywords[i]; msg += "] is not valid"; diff --git a/isis/src/lro/apps/lrowac2pds/lrowac2pds.cpp b/isis/src/lro/apps/lrowac2pds/lrowac2pds.cpp index 5059ab6bf40ecc806ce977a3394e43bf6fcf415c..ba7ce1cf42384670c3e57e7cb529c247738c5ddf 100644 --- a/isis/src/lro/apps/lrowac2pds/lrowac2pds.cpp +++ b/isis/src/lro/apps/lrowac2pds/lrowac2pds.cpp @@ -80,7 +80,7 @@ void IsisMain () { for (int i = 0; i < list.size(); i++) { Pvl tempPvl; - tempPvl.Read(list[i].toString()); + tempPvl.read(list[i].toString()); OriginalLabel origLab(list[i].toString()); pdsLab = origLab.ReturnLabels(); @@ -95,7 +95,7 @@ void IsisMain () { throw IException(IException::User, msg, _FILEINFO_); } - Isis::PvlGroup &inst = tempPvl.FindGroup("Instrument", Pvl::Traverse); + Isis::PvlGroup &inst = tempPvl.findGroup("Instrument", Pvl::Traverse); QString instId = (QString) inst["InstrumentId"]; QString framelets = (QString) inst["Framelets"]; QString numFrames = inst["NumFramelets"]; @@ -111,7 +111,7 @@ void IsisMain () { instrumentModeId = instModeId; if (numFramelets == 0) numFramelets = toInt(numFrames); - g_isIoF = tempPvl.FindGroup("Radiometry", Pvl::Traverse).FindKeyword("RadiometricType")[0].toUpper() == "IOF"; + g_isIoF = tempPvl.findGroup("Radiometry", Pvl::Traverse).findKeyword("RadiometricType")[0].toUpper() == "IOF"; if (instId == "WAC-VIS" && framelets == "Even") { viseven = new Cube(); @@ -365,10 +365,10 @@ void OutputLabel ( std::ofstream &fout, Cube* cube, Pvl &labelPvl ) { //Pvl to store the labels Pvl outLabel; PvlFormatPds *p_formatter = new PvlFormatPds("$lro/translations/pdsExportRootGen.typ"); - labelPvl.SetFormat(p_formatter); - labelPvl.SetTerminator("END"); + labelPvl.setFormat(p_formatter); + labelPvl.setTerminator("END"); //Set up the directory where the translations are - PvlGroup dataDir(Preference::Preferences().FindGroup("DataDirectory")); + PvlGroup dataDir(Preference::Preferences().findGroup("DataDirectory")); QString transDir = (QString) dataDir["Lro"] + "/translations/"; stringstream stream; @@ -380,25 +380,25 @@ void OutputLabel ( std::ofstream &fout, Cube* cube, Pvl &labelPvl ) { labelXlator.Auto(outLabel); // Copy any Translation changes over - for (int i = 0; i < outLabel.Keywords(); i++) { + for (int i = 0; i < outLabel.keywords(); i++) { bool hasUnit = false; QString unit = ""; - if (labelPvl[outLabel[i].Name()].Unit() != "") { + if (labelPvl[outLabel[i].name()].unit() != "") { hasUnit = true; - unit = labelPvl[outLabel[i].Name()].Unit(); + unit = labelPvl[outLabel[i].name()].unit(); } bool hasComment = false; QString comment = ""; - if (labelPvl[outLabel[i].Name()].Comments() > 0) { + if (labelPvl[outLabel[i].name()].comments() > 0) { hasComment = true; - comment = labelPvl[outLabel[i].Name()].Comment(0); + comment = labelPvl[outLabel[i].name()].comment(0); } - labelPvl[outLabel[i].Name()] = outLabel[i]; + labelPvl[outLabel[i].name()] = outLabel[i]; if (hasUnit) - labelPvl[outLabel[i].Name()].SetUnits(unit); + labelPvl[outLabel[i].name()].setUnits(unit); if (hasComment) - labelPvl[outLabel[i].Name()].AddComment(comment); + labelPvl[outLabel[i].name()].addComment(comment); } //Update the product ID @@ -406,13 +406,13 @@ void OutputLabel ( std::ofstream &fout, Cube* cube, Pvl &labelPvl ) { labelPvl["PRODUCT_ID"][0].replace((prod_id.length()-1), 1, "C"); // Update the product creation time - labelPvl["PRODUCT_CREATION_TIME"].SetValue(iTime::CurrentGMT()); + labelPvl["PRODUCT_CREATION_TIME"].setValue(iTime::CurrentGMT()); - labelPvl["PRODUCT_VERSION_ID"].SetValue(g_productVersionId); + labelPvl["PRODUCT_VERSION_ID"].setValue(g_productVersionId); // Update the "IMAGE" Object - PvlObject &imageObject = labelPvl.FindObject("IMAGE"); - imageObject.Clear(); + PvlObject &imageObject = labelPvl.findObject("IMAGE"); + imageObject.clear(); imageObject += PvlKeyword("LINES", toString(cube->lineCount())); imageObject += PvlKeyword("LINE_SAMPLES", toString(cube->sampleCount())); imageObject += PvlKeyword("SAMPLE_BITS", toString(32)); diff --git a/isis/src/lro/apps/lrowaccal/lrowaccal.cpp b/isis/src/lro/apps/lrowaccal/lrowaccal.cpp index dfc6b7dd4b6dd9960db64f2075fc9fb9b2eb0edd..954d9deff9f543f9fb136cd1a9de67027e838e5f 100644 --- a/isis/src/lro/apps/lrowaccal/lrowaccal.cpp +++ b/isis/src/lro/apps/lrowaccal/lrowaccal.cpp @@ -62,7 +62,7 @@ void IsisMain () { Cube *icube = p.SetInputCube("FROM"); // Make sure it is a WAC cube - Isis::PvlGroup &inst = icube->label()->FindGroup("Instrument", Pvl::Traverse); + Isis::PvlGroup &inst = icube->label()->findGroup("Instrument", Pvl::Traverse); QString instId = (QString) inst["InstrumentId"]; instId = instId.toUpper(); if (instId != "WAC-VIS" && instId != "WAC-UV") { @@ -72,12 +72,12 @@ void IsisMain () { } // And check if it has already run through calibration - if (icube->label()->FindObject("IsisCube").HasGroup("Radiometry")) { + if (icube->label()->findObject("IsisCube").hasGroup("Radiometry")) { QString msg = "This image has already been calibrated"; throw IException(IException::User, msg, _FILEINFO_); } - if (icube->label()->FindObject("IsisCube").HasGroup("AlphaCube")) { + if (icube->label()->findObject("IsisCube").hasGroup("AlphaCube")) { QString msg = "This application can not be run on any image that has been geometrically transformed (i.e. scaled, rotated, sheared, or reflected) or cropped."; throw IException(IException::User, msg, _FILEINFO_); } @@ -115,7 +115,7 @@ void IsisMain () { g_bands.push_back(icube->physicalBand(i)); } - Isis::PvlGroup &bandBin = icube->label()->FindGroup("BandBin", Pvl::Traverse); + Isis::PvlGroup &bandBin = icube->label()->findGroup("BandBin", Pvl::Traverse); QString filter = (QString) bandBin["Center"][0]; QString filterNum = (QString) bandBin["FilterNumber"][0]; //We have to pay special attention incase we are passed a @@ -171,7 +171,7 @@ void IsisMain () { if (g_radiometric) { - Isis::PvlKeyword &bands = icube->label()->FindGroup("BandBin", Pvl::Traverse).FindKeyword("FilterNumber"); + Isis::PvlKeyword &bands = icube->label()->findGroup("BandBin", Pvl::Traverse).findKeyword("FilterNumber"); if (radFile.toLower() == "default" || radFile.length() == 0) radFile = "$lro/calibration/WAC_RadiometricResponsivity.????.pvl"; @@ -189,7 +189,7 @@ void IsisMain () { if (g_iof) { responsivity = radPvl["IOF"]; - for (int i = 0; i < bands.Size(); i++) + for (int i = 0; i < bands.size(); i++) g_iofResponsivity.push_back(toDouble(responsivity[toInt(bands[i]) - 1])); try { @@ -223,7 +223,7 @@ void IsisMain () { } else { responsivity = radPvl["Radiance"]; - for (int i = 0; i < bands.Size(); i++) + for (int i = 0; i < bands.size(); i++) g_radianceResponsivity.push_back(toDouble(responsivity[toInt(bands[i]) - 1])); } } @@ -263,9 +263,9 @@ void IsisMain () { PvlGroup calgrp("Radiometry"); if (g_dark) { PvlKeyword darks("DarkFiles"); - darks.AddValue(darkFiles[0]); + darks.addValue(darkFiles[0]); if (darkFiles.size() > 1) - darks.AddValue(darkFiles[1]); + darks.addValue(darkFiles[1]); calgrp += darks; } if (g_flatfield) @@ -275,12 +275,12 @@ void IsisMain () { if (g_iof) { calgrp += PvlKeyword("RadiometricType", "IOF"); for (unsigned int i=0; i< g_iofResponsivity.size(); i++) - vals.AddValue(toString(g_iofResponsivity[i])); + vals.addValue(toString(g_iofResponsivity[i])); } else { calgrp += PvlKeyword("RadiometricType", "AbsoluteRadiance"); for (unsigned int i=0; i< g_radianceResponsivity.size(); i++) - vals.AddValue(toString(g_radianceResponsivity[i])); + vals.addValue(toString(g_radianceResponsivity[i])); } calgrp += vals; calgrp += PvlKeyword("SolarDistance", toString(g_solarDistance)); diff --git a/isis/src/lro/apps/lrowacpho/Exponential.cpp b/isis/src/lro/apps/lrowacpho/Exponential.cpp index e7d1ed7442dce6271285e320fdbf282ff4b2da96..9c67665b73cd909ea0e63dcc4721740234b53fd7 100644 --- a/isis/src/lro/apps/lrowacpho/Exponential.cpp +++ b/isis/src/lro/apps/lrowacpho/Exponential.cpp @@ -122,11 +122,11 @@ namespace Isis { * @param pvl Output PVL container write keywords */ void Exponential::Report ( PvlContainer &pvl ) { - pvl.AddComment("I/F = mu0/(mu0+mu) * F(phase)"); - pvl.AddComment("where:"); - pvl.AddComment(" mu0 = cos(incidence)"); - pvl.AddComment(" mu = cos(incidence)"); - pvl.AddComment(" F(phase) = A0*exp(B0*phase) + A1*exp(B1*phase) + ... + An*exp(Bn*phase)"); + pvl.addComment("I/F = mu0/(mu0+mu) * F(phase)"); + pvl.addComment("where:"); + pvl.addComment(" mu0 = cos(incidence)"); + pvl.addComment(" mu = cos(incidence)"); + pvl.addComment(" F(phase) = A0*exp(B0*phase) + A1*exp(B1*phase) + ... + An*exp(Bn*phase)"); pvl += PvlKeyword("Algorithm", "Exponential"); pvl += PvlKeyword("IncRef", toString(_iRef), "degrees"); @@ -147,15 +147,15 @@ namespace Isis { for (unsigned int i = 0; i < _bandpho.size(); i++) { Parameters &p = _bandpho[i]; - units.AddValue(p.units); - phostd.AddValue(toString(p.phoStd)); - bbc.AddValue(toString(p.wavelength)); - bbct.AddValue(toString(p.tolerance)); - bbn.AddValue(toString(p.band)); + units.addValue(p.units); + phostd.addValue(toString(p.phoStd)); + bbc.addValue(toString(p.wavelength)); + bbct.addValue(toString(p.tolerance)); + bbn.addValue(toString(p.band)); for (unsigned int j = 0; j < aTermKeywords.size(); j++) - aTermKeywords[j].AddValue(toString(p.aTerms[j])); + aTermKeywords[j].addValue(toString(p.aTerms[j])); for (unsigned int j = 0; j < bTermKeywords.size(); j++) - bTermKeywords[j].AddValue(toString(p.bTerms[j])); + bTermKeywords[j].addValue(toString(p.bTerms[j])); } pvl += units; pvl += phostd; @@ -262,23 +262,23 @@ namespace Isis { _bandpho.clear(); // Interate over all Photometric groups - _normProf = DbProfile(pvl.FindObject("NormalizationModel").FindGroup("Algorithm", Pvl::Traverse)); + _normProf = DbProfile(pvl.findObject("NormalizationModel").findGroup("Algorithm", Pvl::Traverse)); _iRef = toDouble(ConfKey(_normProf, "IncRef", toString(30.0))); _eRef = toDouble(ConfKey(_normProf, "EmaRef", toString(0.0))); _gRef = toDouble(ConfKey(_normProf, "PhaRef", toString(_iRef))); - PvlObject &phoObj = pvl.FindObject("PhotometricModel"); + PvlObject &phoObj = pvl.findObject("PhotometricModel"); DbProfile phoProf = DbProfile(phoObj); - PvlObject::PvlGroupIterator algo = phoObj.BeginGroup(); - while (algo != phoObj.EndGroup()) { - if (algo->Name().toLower() == "algorithm") { + PvlObject::PvlGroupIterator algo = phoObj.beginGroup(); + while (algo != phoObj.endGroup()) { + if (algo->name().toLower() == "algorithm") { _profiles.push_back(DbProfile(phoProf, DbProfile(*algo))); } ++algo; } Pvl *label = cube.label(); - PvlKeyword center = label->FindGroup("BandBin", Pvl::Traverse)["Center"]; + PvlKeyword center = label->findGroup("BandBin", Pvl::Traverse)["Center"]; QString errs(""); for (int i = 0; i < cube.bandCount(); i++) { Parameters parms = findParameters(toDouble(center[i])); @@ -299,7 +299,7 @@ namespace Isis { // Check for errors and throw them all at the same time if (!errs.isEmpty()) { - errs += " --> Errors in the input PVL file \"" + pvl.FileName() + "\""; + errs += " --> Errors in the input PVL file \"" + pvl.fileName() + "\""; throw IException(IException::User, errs, _FILEINFO_); } diff --git a/isis/src/lro/apps/lrowacpho/HapkeExponential.cpp b/isis/src/lro/apps/lrowacpho/HapkeExponential.cpp index 2e6b06dee6767f3d235682469cd94b965637c2f5..846270645f3ee27654f046a8bd01c0521c55af7f 100644 --- a/isis/src/lro/apps/lrowacpho/HapkeExponential.cpp +++ b/isis/src/lro/apps/lrowacpho/HapkeExponential.cpp @@ -127,11 +127,11 @@ namespace Isis { * @param pvl Output PVL container write keywords */ void HapkeExponential::Report ( PvlContainer &pvl ) { - pvl.AddComment("I/F = mu0/(mu0+mu) * F(mu,mu0,phase)"); - pvl.AddComment(" where:"); - pvl.AddComment(" mu0 = cos(incidence)"); - pvl.AddComment(" mu = cos(emission)"); - pvl.AddComment(" F(mu,mu0,phase) = A1*exp(B1*phase) + A2*( mu0 + mu )exp(B2*phase) + A3*( mu0 + mu ) + A4"); + pvl.addComment("I/F = mu0/(mu0+mu) * F(mu,mu0,phase)"); + pvl.addComment(" where:"); + pvl.addComment(" mu0 = cos(incidence)"); + pvl.addComment(" mu = cos(emission)"); + pvl.addComment(" F(mu,mu0,phase) = A1*exp(B1*phase) + A2*( mu0 + mu )exp(B2*phase) + A3*( mu0 + mu ) + A4"); pvl += PvlKeyword("Algorithm", "HapkeExponential"); pvl += PvlKeyword("IncRef", toString(_iRef), "degrees"); @@ -152,15 +152,15 @@ namespace Isis { for (unsigned int i = 0; i < _bandpho.size(); i++) { Parameters &p = _bandpho[i]; - units.AddValue(p.units); - phostd.AddValue(toString(p.phoStd)); - bbc.AddValue(toString(p.wavelength)); - bbct.AddValue(toString(p.tolerance)); - bbn.AddValue(toString(p.band)); + units.addValue(p.units); + phostd.addValue(toString(p.phoStd)); + bbc.addValue(toString(p.wavelength)); + bbct.addValue(toString(p.tolerance)); + bbn.addValue(toString(p.band)); for (unsigned int j = 0; j < aTermKeywords.size(); j++) - aTermKeywords[j].AddValue(toString(p.aTerms[j])); + aTermKeywords[j].addValue(toString(p.aTerms[j])); for (unsigned int j = 0; j < bTermKeywords.size(); j++) - bTermKeywords[j].AddValue(toString(p.bTerms[j])); + bTermKeywords[j].addValue(toString(p.bTerms[j])); } pvl += units; pvl += phostd; @@ -265,23 +265,23 @@ namespace Isis { _bandpho.clear(); // Interate over all Photometric groups - _normProf = DbProfile(pvl.FindObject("NormalizationModel").FindGroup("Algorithm", Pvl::Traverse)); + _normProf = DbProfile(pvl.findObject("NormalizationModel").findGroup("Algorithm", Pvl::Traverse)); _iRef = toDouble(ConfKey(_normProf, "IncRef", toString(30.0))); _eRef = toDouble(ConfKey(_normProf, "EmaRef", toString(0.0))); _gRef = toDouble(ConfKey(_normProf, "PhaRef", toString(_iRef))); - PvlObject &phoObj = pvl.FindObject("PhotometricModel"); + PvlObject &phoObj = pvl.findObject("PhotometricModel"); DbProfile phoProf = DbProfile(phoObj); - PvlObject::PvlGroupIterator algo = phoObj.BeginGroup(); - while (algo != phoObj.EndGroup()) { - if (algo->Name().toLower() == "algorithm") { + PvlObject::PvlGroupIterator algo = phoObj.beginGroup(); + while (algo != phoObj.endGroup()) { + if (algo->name().toLower() == "algorithm") { _profiles.push_back(DbProfile(phoProf, DbProfile(*algo))); } ++algo; } Pvl *label = cube.label(); - PvlKeyword center = label->FindGroup("BandBin", Pvl::Traverse)["Center"]; + PvlKeyword center = label->findGroup("BandBin", Pvl::Traverse)["Center"]; QString errs(""); for (int i = 0; i < cube.bandCount(); i++) { Parameters parms = findParameters(toDouble(center[i])); @@ -302,7 +302,7 @@ namespace Isis { // Check for errors and throw them all at the same time if (!errs.isEmpty()) { - errs += " --> Errors in the input PVL file \"" + pvl.FileName() + "\""; + errs += " --> Errors in the input PVL file \"" + pvl.fileName() + "\""; throw IException(IException::User, errs, _FILEINFO_); } diff --git a/isis/src/lro/apps/lrowacpho/Hillier.cpp b/isis/src/lro/apps/lrowacpho/Hillier.cpp index 16378bbff1dda839dcf0d19000da096e096af841..a18c7456d41f9b2d826df7a1c98988111c119840 100644 --- a/isis/src/lro/apps/lrowacpho/Hillier.cpp +++ b/isis/src/lro/apps/lrowacpho/Hillier.cpp @@ -120,11 +120,11 @@ namespace Isis { * @param pvl Output PVL container write keywords */ void Hillier::Report ( PvlContainer &pvl ) { - pvl.AddComment("I/F = mu0/(mu0+mu) * F(phase)"); - pvl.AddComment(" where:"); - pvl.AddComment(" mu0 = cos(incidence)"); - pvl.AddComment(" mu = cos(incidence)"); - pvl.AddComment(" F(phase) = B0*exp(-B1*phase) + A0 + A1*phase + A2*phase^2 + A3*phase^3 + A4*phase^4"); + pvl.addComment("I/F = mu0/(mu0+mu) * F(phase)"); + pvl.addComment(" where:"); + pvl.addComment(" mu0 = cos(incidence)"); + pvl.addComment(" mu = cos(incidence)"); + pvl.addComment(" F(phase) = B0*exp(-B1*phase) + A0 + A1*phase + A2*phase^2 + A3*phase^3 + A4*phase^4"); pvl += PvlKeyword("Algorithm", "Hillier"); pvl += PvlKeyword("IncRef", toString(_iRef), "degrees"); @@ -144,18 +144,18 @@ namespace Isis { PvlKeyword a4("A4"); for (unsigned int i = 0; i < _bandpho.size(); i++) { Parameters &p = _bandpho[i]; - units.AddValue(p.units); - phostd.AddValue(toString(p.phoStd)); - bbc.AddValue(toString(p.wavelength)); - bbct.AddValue(toString(p.tolerance)); - bbn.AddValue(toString(p.band)); - b0.AddValue(toString(p.b0)); - b1.AddValue(toString(p.b1)); - a0.AddValue(toString(p.a0)); - a1.AddValue(toString(p.a1)); - a2.AddValue(toString(p.a2)); - a3.AddValue(toString(p.a3)); - a4.AddValue(toString(p.a4)); + units.addValue(p.units); + phostd.addValue(toString(p.phoStd)); + bbc.addValue(toString(p.wavelength)); + bbct.addValue(toString(p.tolerance)); + bbn.addValue(toString(p.band)); + b0.addValue(toString(p.b0)); + b1.addValue(toString(p.b1)); + a0.addValue(toString(p.a0)); + a1.addValue(toString(p.a1)); + a2.addValue(toString(p.a2)); + a3.addValue(toString(p.a3)); + a4.addValue(toString(p.a4)); } pvl += units; pvl += phostd; @@ -261,23 +261,23 @@ namespace Isis { _bandpho.clear(); // Interate over all Photometric groups - _normProf = DbProfile(pvl.FindObject("NormalizationModel").FindGroup("Algorithm", Pvl::Traverse)); + _normProf = DbProfile(pvl.findObject("NormalizationModel").findGroup("Algorithm", Pvl::Traverse)); _iRef = toDouble(ConfKey(_normProf, "IncRef", toString(30.0))); _eRef = toDouble(ConfKey(_normProf, "EmaRef", toString(0.0))); _gRef = toDouble(ConfKey(_normProf, "PhaRef", toString(_iRef))); - PvlObject &phoObj = pvl.FindObject("PhotometricModel"); + PvlObject &phoObj = pvl.findObject("PhotometricModel"); DbProfile phoProf = DbProfile(phoObj); - PvlObject::PvlGroupIterator algo = phoObj.BeginGroup(); - while (algo != phoObj.EndGroup()) { - if (algo->Name().toLower() == "algorithm") { + PvlObject::PvlGroupIterator algo = phoObj.beginGroup(); + while (algo != phoObj.endGroup()) { + if (algo->name().toLower() == "algorithm") { _profiles.push_back(DbProfile(phoProf, DbProfile(*algo))); } ++algo; } Pvl *label = cube.label(); - PvlKeyword center = label->FindGroup("BandBin", Pvl::Traverse)["Center"]; + PvlKeyword center = label->findGroup("BandBin", Pvl::Traverse)["Center"]; QString errs(""); for (int i = 0; i < cube.bandCount(); i++) { Parameters parms = findParameters(toDouble(center[i])); @@ -298,7 +298,7 @@ namespace Isis { // Check for errors and throw them all at the same time if (!errs.isEmpty()) { - errs += " --> Errors in the input PVL file \"" + pvl.FileName() + "\""; + errs += " --> Errors in the input PVL file \"" + pvl.fileName() + "\""; throw IException(IException::User, errs, _FILEINFO_); } diff --git a/isis/src/lro/apps/lrowacpho/PhotometricFunction.h b/isis/src/lro/apps/lrowacpho/PhotometricFunction.h index 938b5be88abef7d3e7b26f74c6a4c2c116c76259..43b8f6d37d65f4a79a860284efeb2ab84052dea4 100644 --- a/isis/src/lro/apps/lrowacpho/PhotometricFunction.h +++ b/isis/src/lro/apps/lrowacpho/PhotometricFunction.h @@ -87,7 +87,7 @@ namespace Isis { } static QString AlgorithmName ( const PvlObject &pvl ) { - return pvl.FindObject("PhotometricModel").FindGroup("Algorithm", Pvl::Traverse).FindKeyword("Name")[0]; + return pvl.findObject("PhotometricModel").findGroup("Algorithm", Pvl::Traverse).findKeyword("Name")[0]; } virtual double Compute ( const double &line, const double &sample, int band = 1, bool useDem = false); diff --git a/isis/src/lro/apps/mrf2isis/mrf2isis.cpp b/isis/src/lro/apps/mrf2isis/mrf2isis.cpp index 5f860a1012d43d7ffad8a1c9e9c2a680057fd957..39a5dfee063c8d1f15fef6cc5c319537db0d737d 100644 --- a/isis/src/lro/apps/mrf2isis/mrf2isis.cpp +++ b/isis/src/lro/apps/mrf2isis/mrf2isis.cpp @@ -22,7 +22,7 @@ void IsisMain() { Pvl lab(inFile.expanded()); try { - id = (QString) lab.FindKeyword("DATA_SET_ID"); + id = (QString) lab.findKeyword("DATA_SET_ID"); } catch(IException &e) { QString msg = "Unable to read [DATA_SET_ID] from input file [" + @@ -48,7 +48,7 @@ void IsisMain() { Cube *outcube = p.SetOutputCube("TO"); QString bandorder; - bandorder = (QString) lab.FindObject("IMAGE").FindKeyword("BAND_STORAGE_TYPE"); + bandorder = (QString) lab.findObject("IMAGE").findKeyword("BAND_STORAGE_TYPE"); bandorder = bandorder.toUpper(); if(bandorder == "BAND_SEQUENTIAL") { p.SetOrganization(Isis::ProcessImport::BSQ); @@ -71,7 +71,7 @@ void IsisMain() { p.TranslatePdsProjection(otherLabels); // Get the directory where the MiniRF level 2 translation tables are. - PvlGroup dataDir(Preference::Preferences().FindGroup("DataDirectory")); + PvlGroup dataDir(Preference::Preferences().findGroup("DataDirectory")); QString transDir = (QString) dataDir["Lro"] + "/translations/"; if(id == "CHAN1-L-MRFFR-5-CDR-MAP-V1.0" || id == "LRO-L-MRFLRO-5-CDR-MAP-V1.0") { @@ -86,9 +86,9 @@ void IsisMain() { archiveXlater.Auto(otherLabels); // Write the BandBin, Archive, and Mapping groups to the output cube label - outcube->putGroup(otherLabels.FindGroup("BandBin")); - outcube->putGroup(otherLabels.FindGroup("Mapping")); - outcube->putGroup(otherLabels.FindGroup("Archive")); + outcube->putGroup(otherLabels.findGroup("BandBin")); + outcube->putGroup(otherLabels.findGroup("Mapping")); + outcube->putGroup(otherLabels.findGroup("Archive")); } else { // Translate the BandBin group @@ -113,15 +113,15 @@ void IsisMain() { // Write the BandBin, Archive, Instrument, and ImageInfo groups // to the output cube label - outcube->putGroup(otherLabels.FindGroup("BandBin")); - outcube->putGroup(otherLabels.FindGroup("Archive")); - outcube->putGroup(otherLabels.FindGroup("Instrument")); - outcube->putGroup(otherLabels.FindGroup("ImageInfo")); + outcube->putGroup(otherLabels.findGroup("BandBin")); + outcube->putGroup(otherLabels.findGroup("Archive")); + outcube->putGroup(otherLabels.findGroup("Instrument")); + outcube->putGroup(otherLabels.findGroup("ImageInfo")); // Make sure the ScaledPixelHeight and ScaledPixelWidth are the same - PvlGroup &instGrp(otherLabels.FindGroup("Instrument", Pvl::Traverse)); - if(instGrp.HasKeyword("ScaledPixelHeight") && - instGrp.HasKeyword("ScaledPixelWidth")) { + PvlGroup &instGrp(otherLabels.findGroup("Instrument", Pvl::Traverse)); + if(instGrp.hasKeyword("ScaledPixelHeight") && + instGrp.hasKeyword("ScaledPixelWidth")) { double pheight = instGrp["ScaledPixelHeight"]; double pwidth = instGrp["ScaledPixelWidth"]; if(pheight != pwidth) { @@ -135,7 +135,7 @@ void IsisMain() { // Set the frequency based on the InstrumentModeId. This has to // be done manually, because the frequency information was not // put in the PDS labels. - if(!(instGrp.HasKeyword("Frequency"))) { + if(!(instGrp.hasKeyword("Frequency"))) { QString instmodeid = instGrp["InstrumentModeId"]; double frequency; if(instmodeid.startsWith("BASELINE_S") || @@ -145,7 +145,7 @@ void IsisMain() { else { // BASELINE_X or ZOOM_X frequency = 7140000000.0; } - instGrp.AddKeyword(PvlKeyword("Frequency", toString(frequency))); + instGrp.addKeyword(PvlKeyword("Frequency", toString(frequency))); outcube->putGroup(instGrp); } PvlGroup kerns("Kernels"); diff --git a/isis/src/lro/apps/mrf2pds/ProcessExportMiniRFLroPds.cpp b/isis/src/lro/apps/mrf2pds/ProcessExportMiniRFLroPds.cpp index 4e1df6b1a017c440293e3d561469dcb1096f8a7c..80e0d1daf5bdd5ea1784e53495b15805009a1b7c 100644 --- a/isis/src/lro/apps/mrf2pds/ProcessExportMiniRFLroPds.cpp +++ b/isis/src/lro/apps/mrf2pds/ProcessExportMiniRFLroPds.cpp @@ -44,8 +44,8 @@ namespace Isis { m_label = new Pvl; m_formatter = new PvlFormatPds("$lro/translations/mrfExportRoot.typ"); - m_label->SetFormat(m_formatter); - m_label->SetTerminator("END"); + m_label->setFormat(m_formatter); + m_label->setTerminator("END"); if (type == ProcessExportPds::Image) { CreateImageLabel(); @@ -83,7 +83,7 @@ namespace Isis { // The IMAGE_MAP_PROJECTION group is located in the ROOT for PDS IMAGEs. The // standard routines will add the IMAGE_MAP_PROJECTION correctly StandardAllMapping(mainPvl); - mainPvl.GetFormat()->Add("$lro/translations/mrfExportAllMapping.typ"); + mainPvl.format()->add("$lro/translations/mrfExportAllMapping.typ"); } } diff --git a/isis/src/lro/apps/mrf2pds/mrf2pds.cpp b/isis/src/lro/apps/mrf2pds/mrf2pds.cpp index 01669232ca2e8e4c66bc480cd6905c18ca8fb7ea..ecb2cffbec5540ff62c243d517d233a41ac41964 100644 --- a/isis/src/lro/apps/mrf2pds/mrf2pds.cpp +++ b/isis/src/lro/apps/mrf2pds/mrf2pds.cpp @@ -80,17 +80,17 @@ void IsisMain() { cInCube->read(cOriginalBlob); Pvl cOrigLabel; PvlObject cOrigLabelObj = cOriginalBlob.ReturnLabels(); - cOrigLabelObj.SetName("OriginalLabelObject"); - cOrigLabel.AddObject(cOrigLabelObj); + cOrigLabelObj.setName("OriginalLabelObject"); + cOrigLabel.addObject(cOrigLabelObj); // Translates the ISIS labels along with the original EDR labels - cOrigLabel.AddObject(*(cInCube->label())); + cOrigLabel.addObject(*(cInCube->label())); PvlTranslationManager cCubeLabel2(cOrigLabel, "$lro/translations/mrfExportOrigLabel.trn"); cCubeLabel2.Auto(pdsLabel); - if(cInLabel->FindObject("IsisCube").FindGroup("Instrument").HasKeyword("MissionName")) { - PvlKeyword &cKeyMissionName = cInLabel->FindObject("IsisCube").FindGroup("Instrument").FindKeyword("MissionName"); + if(cInLabel->findObject("IsisCube").findGroup("Instrument").hasKeyword("MissionName")) { + PvlKeyword &cKeyMissionName = cInLabel->findObject("IsisCube").findGroup("Instrument").findKeyword("MissionName"); int sFound = cKeyMissionName[0].indexOf("CHANDRAYAAN"); if(sFound != -1) { cCubeLabel2 = PvlTranslationManager(cOrigLabel, "$lro/translations/mrfExportOrigLabelCH1.trn"); @@ -106,16 +106,16 @@ void IsisMain() { PvlGroup &cBandBinGrp = cInCube->group("BandBin"); PvlKeyword cKeyBandBin = PvlKeyword("BAND_NAME"); PvlKeyword cKeyInBandBin; - if(cBandBinGrp.HasKeyword("OriginalBand")) { - cKeyInBandBin = cBandBinGrp.FindKeyword("OriginalBand"); + if(cBandBinGrp.hasKeyword("OriginalBand")) { + cKeyInBandBin = cBandBinGrp.findKeyword("OriginalBand"); } - else if(cBandBinGrp.HasKeyword("FilterName")) { - cKeyInBandBin = cBandBinGrp.FindKeyword("FilterName"); + else if(cBandBinGrp.hasKeyword("FilterName")) { + cKeyInBandBin = cBandBinGrp.findKeyword("FilterName"); } - for(int i = 0; i < cKeyInBandBin.Size(); i++) { + for(int i = 0; i < cKeyInBandBin.size(); i++) { cKeyBandBin += cKeyInBandBin[i]; } - PvlObject &cImageObject(pdsLabel.FindObject("IMAGE")); + PvlObject &cImageObject(pdsLabel.findObject("IMAGE")); cImageObject += cKeyBandBin; } @@ -142,10 +142,10 @@ void IsisMain() { // Distinguish betweeen Level 2 and 3 images by calling the camera() // function as only non mosaic images(Level2) have a camera if(bLevel2) { - pdsLabel.SetFormatTemplate("$lro/translations/mrfPdsLevel2.pft"); + pdsLabel.setFormatTemplate("$lro/translations/mrfPdsLevel2.pft"); } else { - pdsLabel.SetFormatTemplate("$lro/translations/mrfPdsLevel3.pft"); + pdsLabel.setFormatTemplate("$lro/translations/mrfPdsLevel3.pft"); } int iFound = outFileName.indexOf(".lbl"); @@ -172,40 +172,40 @@ void GetUserLabel(QString psUserLbl, Pvl &pcPdsLbl, bool pbLevel2) { Pvl cUsrPvl(psUserLbl); /*if (pbLevel2 && - (cUsrPvl.HasKeyword("SPACECRAFT_CLOCK_START_COUNT") || - cUsrPvl.HasKeyword("SPACECRAFT_CLOCK_STOP_COUNT") || - cUsrPvl.HasKeyword("START_TIME") || - cUsrPvl.HasKeyword("STOP_TIME"))) { + (cUsrPvl.hasKeyword("SPACECRAFT_CLOCK_START_COUNT") || + cUsrPvl.hasKeyword("SPACECRAFT_CLOCK_STOP_COUNT") || + cUsrPvl.hasKeyword("START_TIME") || + cUsrPvl.hasKeyword("STOP_TIME"))) { QString msg = "Unsupported User defined keywords for Level2"; throw Isis::iException::Message(Isis::iException::User,msg,_FILEINFO_); }*/ // Add all the keywords in the root - for(int j = 0; j < cUsrPvl.Keywords(); j++) { - if(pcPdsLbl.HasKeyword(cUsrPvl[j].Name())) { - PvlKeyword &cKey = pcPdsLbl.FindKeyword(cUsrPvl[j].Name()); - cKey.Clear(); - cKey.SetValue(cUsrPvl[j][0]); + for(int j = 0; j < cUsrPvl.keywords(); j++) { + if(pcPdsLbl.hasKeyword(cUsrPvl[j].name())) { + PvlKeyword &cKey = pcPdsLbl.findKeyword(cUsrPvl[j].name()); + cKey.clear(); + cKey.setValue(cUsrPvl[j][0]); } else - pcPdsLbl.AddKeyword(cUsrPvl[j]); + pcPdsLbl.addKeyword(cUsrPvl[j]); } // Add keywords in the objects - for(int j = 0; j < cUsrPvl.Objects(); j++) { - PvlObject cUsrObject = cUsrPvl.Object(j); - if(pcPdsLbl.HasObject(cUsrObject.Name())) { - PvlObject &cObject = pcPdsLbl.FindObject(cUsrObject.Name()); - for(int k = 0; k < cUsrObject.Keywords(); k++) { + for(int j = 0; j < cUsrPvl.objects(); j++) { + PvlObject cUsrObject = cUsrPvl.object(j); + if(pcPdsLbl.hasObject(cUsrObject.name())) { + PvlObject &cObject = pcPdsLbl.findObject(cUsrObject.name()); + for(int k = 0; k < cUsrObject.keywords(); k++) { PvlKeyword cUsrKeyword = cUsrObject[k]; - if(cObject.HasKeyword(cUsrKeyword.Name())) { - PvlKeyword &cKey = cObject.FindKeyword(cUsrKeyword.Name()); - cKey.Clear(); - cKey.SetValue(cUsrKeyword[0]); + if(cObject.hasKeyword(cUsrKeyword.name())) { + PvlKeyword &cKey = cObject.findKeyword(cUsrKeyword.name()); + cKey.clear(); + cKey.setValue(cUsrKeyword[0]); } else { - cObject.AddKeyword(cUsrKeyword); + cObject.addKeyword(cUsrKeyword); } } } @@ -224,11 +224,11 @@ void GetUserLabel(QString psUserLbl, Pvl &pcPdsLbl, bool pbLevel2) { void GetSourceProductID(QString psSrcListFile, QString psSrcType, Pvl &pcPdsLbl) { PvlKeyword cKeySrcPrdId; - if(pcPdsLbl.HasKeyword("SOURCE_PRODUCT_ID")) { - pcPdsLbl.DeleteKeyword("SOURCE_PRODUCT_ID"); + if(pcPdsLbl.hasKeyword("SOURCE_PRODUCT_ID")) { + pcPdsLbl.deleteKeyword("SOURCE_PRODUCT_ID"); } - cKeySrcPrdId.SetName("SOURCE_PRODUCT_ID"); + cKeySrcPrdId.setName("SOURCE_PRODUCT_ID"); // List File name if(psSrcType == "LIST") { @@ -265,47 +265,47 @@ void GetSourceProductID(QString psSrcListFile, QString psSrcType, Pvl &pcPdsLbl) void FixLabel(Pvl &pcPdsLbl, bool &pbLevel2) { // Level 3 if(!pbLevel2) { - if(pcPdsLbl.HasKeyword("LINE_EXPOSURE_DURATION")) { - pcPdsLbl.DeleteKeyword("LINE_EXPOSURE_DURATION"); + if(pcPdsLbl.hasKeyword("LINE_EXPOSURE_DURATION")) { + pcPdsLbl.deleteKeyword("LINE_EXPOSURE_DURATION"); } - if(pcPdsLbl.HasKeyword("ORBIT_NUMBER")) { - pcPdsLbl.DeleteKeyword("ORBIT_NUMBER"); + if(pcPdsLbl.hasKeyword("ORBIT_NUMBER")) { + pcPdsLbl.deleteKeyword("ORBIT_NUMBER"); } - if(pcPdsLbl.HasKeyword("INCIDENCE_ANGLE")) { - pcPdsLbl.DeleteKeyword("INCIDENCE_ANGLE"); + if(pcPdsLbl.hasKeyword("INCIDENCE_ANGLE")) { + pcPdsLbl.deleteKeyword("INCIDENCE_ANGLE"); } - if(pcPdsLbl.HasKeyword("INSTRUMENT_MODE_ID")) { - pcPdsLbl.DeleteKeyword("INSTRUMENT_MODE_ID"); + if(pcPdsLbl.hasKeyword("INSTRUMENT_MODE_ID")) { + pcPdsLbl.deleteKeyword("INSTRUMENT_MODE_ID"); } - if(pcPdsLbl.HasKeyword("INSTRUMENT_MODE_DESC")) { - pcPdsLbl.DeleteKeyword("INSTRUMENT_MODE_DESC"); + if(pcPdsLbl.hasKeyword("INSTRUMENT_MODE_DESC")) { + pcPdsLbl.deleteKeyword("INSTRUMENT_MODE_DESC"); } - if(pcPdsLbl.HasKeyword("LOOK_DIRECTION")) { - pcPdsLbl.DeleteKeyword("LOOK_DIRECTION"); + if(pcPdsLbl.hasKeyword("LOOK_DIRECTION")) { + pcPdsLbl.deleteKeyword("LOOK_DIRECTION"); } } // Additional keywords and update existing keywords - if(pcPdsLbl.HasKeyword("LABEL_RECORDS")) { - pcPdsLbl.DeleteKeyword("LABEL_RECORDS"); + if(pcPdsLbl.hasKeyword("LABEL_RECORDS")) { + pcPdsLbl.deleteKeyword("LABEL_RECORDS"); } - if(!pcPdsLbl.HasKeyword("PRODUCER_FULL_NAME")) { + if(!pcPdsLbl.hasKeyword("PRODUCER_FULL_NAME")) { PvlKeyword cKeyPrdFullName = PvlKeyword("PRODUCER_FULL_NAME", "USGS AstroGeology Flagstaff"); pcPdsLbl += cKeyPrdFullName; } - if(!pcPdsLbl.HasKeyword("PRODUCER_INSTITUTION_NAME")) { + if(!pcPdsLbl.hasKeyword("PRODUCER_INSTITUTION_NAME")) { PvlKeyword cKeyPrdInstName = PvlKeyword("PRODUCER_INSTITUTION_NAME", "USGS AstroGeology"); pcPdsLbl += cKeyPrdInstName; } - if(!pcPdsLbl.HasKeyword("MISSION_NAME")) { + if(!pcPdsLbl.hasKeyword("MISSION_NAME")) { PvlKeyword cKeyMissionName = PvlKeyword("MISSION_NAME", "LUNAR RECONNAISSANCE ORBITER"); pcPdsLbl += cKeyMissionName; } - if(!pcPdsLbl.HasKeyword("PRODUCER_ID")) { + if(!pcPdsLbl.hasKeyword("PRODUCER_ID")) { PvlKeyword cKeyPrdID = PvlKeyword("PRODUCER_ID", "USGS"); pcPdsLbl += cKeyPrdID; } @@ -324,19 +324,19 @@ void FixLabel(Pvl &pcPdsLbl, bool &pbLevel2) { pcPdsLbl += cKeySoftwareVersion; // Specific to IMAGE Object - PvlObject &cImageObject(pcPdsLbl.FindObject("IMAGE")); - if(cImageObject.HasKeyword("OFFSET")) { - cImageObject.DeleteKeyword("OFFSET"); + PvlObject &cImageObject(pcPdsLbl.findObject("IMAGE")); + if(cImageObject.hasKeyword("OFFSET")) { + cImageObject.deleteKeyword("OFFSET"); } // Update SAMPLE_TYPE from "IEEE_" to "PC_" - if(cImageObject.HasKeyword("SAMPLE_TYPE")) { - PvlKeyword &cSampleType = cImageObject.FindKeyword("SAMPLE_TYPE"); + if(cImageObject.hasKeyword("SAMPLE_TYPE")) { + PvlKeyword &cSampleType = cImageObject.findKeyword("SAMPLE_TYPE"); QString sVal = cSampleType[0]; int iFound = sVal.indexOf('_'); if(iFound >= 0) { sVal.replace(0, iFound, "PC"); - cSampleType.SetValue(sVal); + cSampleType.setValue(sVal); } } @@ -348,27 +348,27 @@ void FixLabel(Pvl &pcPdsLbl, bool &pbLevel2) { } // Projection object - PvlObject &cProjectionObject(pcPdsLbl.FindObject("IMAGE_MAP_PROJECTION")); - if(cProjectionObject.HasKeyword("PROJECTION_LATITUDE_TYPE")) { - cProjectionObject.DeleteKeyword("PROJECTION_LATITUDE_TYPE"); + PvlObject &cProjectionObject(pcPdsLbl.findObject("IMAGE_MAP_PROJECTION")); + if(cProjectionObject.hasKeyword("PROJECTION_LATITUDE_TYPE")) { + cProjectionObject.deleteKeyword("PROJECTION_LATITUDE_TYPE"); } - if(!cProjectionObject.HasKeyword("COORDINATE_SYSTEM_TYPE")) { + if(!cProjectionObject.hasKeyword("COORDINATE_SYSTEM_TYPE")) { PvlKeyword cKeyCordSysType = PvlKeyword("COORDINATE_SYSTEM_TYPE", " "); cProjectionObject += cKeyCordSysType; } - if(cProjectionObject.HasKeyword("MAP_PROJECTION_TYPE")) { - PvlKeyword cKeyPrjType = cProjectionObject.FindKeyword("MAP_PROJECTION_TYPE"); + if(cProjectionObject.hasKeyword("MAP_PROJECTION_TYPE")) { + PvlKeyword cKeyPrjType = cProjectionObject.findKeyword("MAP_PROJECTION_TYPE"); if(cKeyPrjType[0] == "OBLIQUE CYLINDRICAL") { - PvlKeyword &cKeyCenLon = cProjectionObject.FindKeyword("CENTER_LONGITUDE"); - cKeyCenLon.SetValue("0.0 "); - PvlKeyword &cKeyCenLat = cProjectionObject.FindKeyword("CENTER_LATITUDE"); - cKeyCenLat.SetValue("0.0 "); + PvlKeyword &cKeyCenLon = cProjectionObject.findKeyword("CENTER_LONGITUDE"); + cKeyCenLon.setValue("0.0 "); + PvlKeyword &cKeyCenLat = cProjectionObject.findKeyword("CENTER_LATITUDE"); + cKeyCenLat.setValue("0.0 "); if(pbLevel2) { // Get the X,Y,Z values from Proj X Axis Vector - PvlKeyword cKeyObXProj = cProjectionObject.FindKeyword("OBLIQUE_PROJ_X_AXIS_VECTOR"); + PvlKeyword cKeyObXProj = cProjectionObject.findKeyword("OBLIQUE_PROJ_X_AXIS_VECTOR"); double x, y, z; x = IString(cKeyObXProj[0]).ToDouble(); y = IString(cKeyObXProj[1]).ToDouble(); @@ -389,33 +389,33 @@ void FixLabel(Pvl &pcPdsLbl, bool &pbLevel2) { PvlKeyword cKeyRefLon("REFERENCE_LONGITUDE"); QString iStr = toString(dLon, 6); iStr += " "; - cKeyRefLon.SetValue(iStr); - cProjectionObject.AddKeyword(cKeyRefLon); + cKeyRefLon.setValue(iStr); + cProjectionObject.addKeyword(cKeyRefLon); PvlKeyword cKeyRefLat("REFERENCE_LATITUDE"); iStr = toString(dLat, 6); iStr += " "; - cKeyRefLat.SetValue(iStr); - cProjectionObject.AddKeyword(cKeyRefLat); + cKeyRefLat.setValue(iStr); + cProjectionObject.addKeyword(cKeyRefLat); } else { // Level3 Projection object - if(cProjectionObject.HasKeyword("OBLIQUE_PROJ_POLE_LATITUDE")) { - cProjectionObject.DeleteKeyword("OBLIQUE_PROJ_POLE_LATITUDE"); + if(cProjectionObject.hasKeyword("OBLIQUE_PROJ_POLE_LATITUDE")) { + cProjectionObject.deleteKeyword("OBLIQUE_PROJ_POLE_LATITUDE"); } - if(cProjectionObject.HasKeyword("OBLIQUE_PROJ_POLE_LONGITUDE")) { - cProjectionObject.DeleteKeyword("OBLIQUE_PROJ_POLE_LONGITUDE"); + if(cProjectionObject.hasKeyword("OBLIQUE_PROJ_POLE_LONGITUDE")) { + cProjectionObject.deleteKeyword("OBLIQUE_PROJ_POLE_LONGITUDE"); } - if(cProjectionObject.HasKeyword("OBLIQUE_PROJ_POLE_ROTATION")) { - cProjectionObject.DeleteKeyword("OBLIQUE_PROJ_POLE_ROTATION"); + if(cProjectionObject.hasKeyword("OBLIQUE_PROJ_POLE_ROTATION")) { + cProjectionObject.deleteKeyword("OBLIQUE_PROJ_POLE_ROTATION"); } - if(cProjectionObject.HasKeyword("OBLIQUE_PROJ_X_AXIS_VECTOR")) { - cProjectionObject.DeleteKeyword("OBLIQUE_PROJ_X_AXIS_VECTOR"); + if(cProjectionObject.hasKeyword("OBLIQUE_PROJ_X_AXIS_VECTOR")) { + cProjectionObject.deleteKeyword("OBLIQUE_PROJ_X_AXIS_VECTOR"); } - if(cProjectionObject.HasKeyword("OBLIQUE_PROJ_Y_AXIS_VECTOR")) { - cProjectionObject.DeleteKeyword("OBLIQUE_PROJ_Y_AXIS_VECTOR"); + if(cProjectionObject.hasKeyword("OBLIQUE_PROJ_Y_AXIS_VECTOR")) { + cProjectionObject.deleteKeyword("OBLIQUE_PROJ_Y_AXIS_VECTOR"); } - if(cProjectionObject.HasKeyword("OBLIQUE_PROJ_Z_AXIS_VECTOR")) { - cProjectionObject.DeleteKeyword("OBLIQUE_PROJ_Z_AXIS_VECTOR"); + if(cProjectionObject.hasKeyword("OBLIQUE_PROJ_Z_AXIS_VECTOR")) { + cProjectionObject.deleteKeyword("OBLIQUE_PROJ_Z_AXIS_VECTOR"); } } } @@ -424,33 +424,33 @@ void FixLabel(Pvl &pcPdsLbl, bool &pbLevel2) { PvlKeyword cKeyDataSetMapProj("^DATA_SET_MAP_PROJECTION", "DSMAP.CAT"); cProjectionObject += cKeyDataSetMapProj; - if(cProjectionObject.HasKeyword("LINE_PROJECTION_OFFSET")) { - PvlKeyword &cLineProjOffset = cProjectionObject.FindKeyword("LINE_PROJECTION_OFFSET"); + if(cProjectionObject.hasKeyword("LINE_PROJECTION_OFFSET")) { + PvlKeyword &cLineProjOffset = cProjectionObject.findKeyword("LINE_PROJECTION_OFFSET"); QString sVal = cLineProjOffset[0]; int iFound = sVal.indexOf('<'); if(iFound >= 0) { sVal.remove(iFound, 1); - cLineProjOffset.SetValue(sVal); + cLineProjOffset.setValue(sVal); } } - if(cProjectionObject.HasKeyword("SAMPLE_PROJECTION_OFFSET")) { - PvlKeyword &cSampleProjOffset = cProjectionObject.FindKeyword("SAMPLE_PROJECTION_OFFSET"); + if(cProjectionObject.hasKeyword("SAMPLE_PROJECTION_OFFSET")) { + PvlKeyword &cSampleProjOffset = cProjectionObject.findKeyword("SAMPLE_PROJECTION_OFFSET"); QString sVal = cSampleProjOffset[0]; int iFound = sVal.indexOf('<'); if(iFound >= 0) { sVal.remove(iFound, 1); - cSampleProjOffset.SetValue(sVal); + cSampleProjOffset.setValue(sVal); } } - if(cProjectionObject.HasKeyword("MAP_SCALE")) { - PvlKeyword &cMapScale = cProjectionObject.FindKeyword("MAP_SCALE"); + if(cProjectionObject.hasKeyword("MAP_SCALE")) { + PvlKeyword &cMapScale = cProjectionObject.findKeyword("MAP_SCALE"); QString sVal = cMapScale[0]; int iFound = sVal.indexOf("EL"); if(iFound >= 0) { sVal.remove(iFound, 2); - cMapScale.SetValue(sVal); + cMapScale.setValue(sVal); } } } diff --git a/isis/src/lro/objs/LroNarrowAngleCamera/LroNarrowAngleCamera.cpp b/isis/src/lro/objs/LroNarrowAngleCamera/LroNarrowAngleCamera.cpp index b29e9c3579454dd4c8b1eaaee0e40f926835a9d7..215046729c5747b6ca2b2b66f41e02ffde408c56 100644 --- a/isis/src/lro/objs/LroNarrowAngleCamera/LroNarrowAngleCamera.cpp +++ b/isis/src/lro/objs/LroNarrowAngleCamera/LroNarrowAngleCamera.cpp @@ -65,7 +65,7 @@ namespace Isis { multiplicativeLineTimeError = getDouble(ikernKey); // Get the start time from labels - PvlGroup &inst = lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup &inst = lab.findGroup("Instrument", Pvl::Traverse); QString stime = inst["SpacecraftClockPrerollCount"]; SpiceDouble etStart; diff --git a/isis/src/lro/objs/LroNarrowAngleCamera/unitTest.cpp b/isis/src/lro/objs/LroNarrowAngleCamera/unitTest.cpp index 8d728069382331f22083fa8ea23872c2d759f081..3ffb9f9a8f5a40e87b67d09523aa5913ab1981dc 100644 --- a/isis/src/lro/objs/LroNarrowAngleCamera/unitTest.cpp +++ b/isis/src/lro/objs/LroNarrowAngleCamera/unitTest.cpp @@ -57,7 +57,7 @@ int main(void) { if (cmVersion == 1) { knownLat = -83.229473272165; knownLon = 353.93153626711; - p.Read("$lro/testData/M111607830RE_crop.cub.cv1"); + p.read("$lro/testData/M111607830RE_crop.cub.cv1"); } else { knownLat = -83.2598150072595899; @@ -66,7 +66,7 @@ int main(void) { Camera *cam = CameraFactory::Create(p); - cout << "FileName: " << FileName(p.FileName()).name() << endl; + cout << "FileName: " << FileName(p.fileName()).name() << endl; cout << "CK Frame: " << cam->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); diff --git a/isis/src/lro/objs/LroWideAngleCamera/LroWideAngleCamera.cpp b/isis/src/lro/objs/LroWideAngleCamera/LroWideAngleCamera.cpp index 57dcc96ee84509b2cea3e22fb3c9b46af3be1039..4c4fc7b39860038a164876a7f8144ac70981974d 100644 --- a/isis/src/lro/objs/LroWideAngleCamera/LroWideAngleCamera.cpp +++ b/isis/src/lro/objs/LroWideAngleCamera/LroWideAngleCamera.cpp @@ -55,7 +55,7 @@ namespace Isis { // Get the ephemeris time from the labels double et; - PvlGroup &inst = lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup &inst = lab.findGroup("Instrument", Pvl::Traverse); QString stime = inst["SpacecraftClockStartCount"]; et = getClockTime(stime).Et(); @@ -87,15 +87,15 @@ namespace Isis { p_nframelets = ParentLines() / (frameletSize / sumMode); // Setup the line detector offset map for each filter - int nbands = (int) lab.FindKeyword("Bands", PvlObject::Traverse); - const PvlGroup &bandBin = lab.FindGroup("BandBin", Pvl::Traverse); + int nbands = (int) lab.findKeyword("Bands", PvlObject::Traverse); + const PvlGroup &bandBin = lab.findGroup("BandBin", Pvl::Traverse); const PvlKeyword &filtNames = bandBin["Center"]; // Sanity check - if(nbands != filtNames.Size()) { + if(nbands != filtNames.size()) { ostringstream mess; mess << "Number bands in (file) label (" << nbands << ") do not match number of values in BandBin/Center keyword (" - << filtNames.Size() << ") - required for band-dependent geoemtry"; + << filtNames.size() << ") - required for band-dependent geoemtry"; throw IException(IException::User, mess.str(), _FILEINFO_); } @@ -131,7 +131,7 @@ namespace Isis { } // Now map the actual filter that exist in cube - for(int i = 0; i < filtNames.Size(); i++) { + for(int i = 0; i < filtNames.size(); i++) { if(!filterToDetectorOffset.exists((IString)filtNames[i])) { QString msg = "Unrecognized filter name [" + filtNames[i] + "]"; throw IException(IException::Programmer, msg, _FILEINFO_); diff --git a/isis/src/lro/objs/LroWideAngleCamera/unitTest.cpp b/isis/src/lro/objs/LroWideAngleCamera/unitTest.cpp index 6c0c5c2abe01c463513b00ca4550421fbce4c520..b941dc85e43375f87416f3a1f3a9c2024737ad06 100644 --- a/isis/src/lro/objs/LroWideAngleCamera/unitTest.cpp +++ b/isis/src/lro/objs/LroWideAngleCamera/unitTest.cpp @@ -53,7 +53,7 @@ int main(void) { if (cmVersion == 1) { knownLat = -70.69638475050628; knownLon = 244.3314992195277; - p.Read("$lro/testData/wacCameraTest.cub.cv1"); + p.read("$lro/testData/wacCameraTest.cub.cv1"); } else { // Version 2 difference caused by new CK and comprehensive IK kernel support @@ -64,7 +64,7 @@ int main(void) { Camera *cam = CameraFactory::Create(p); - cout << "FileName: " << FileName(p.FileName()).name() << endl; + cout << "FileName: " << FileName(p.fileName()).name() << endl; cout << "CK Frame: " << cam->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); diff --git a/isis/src/lro/objs/MiniRF/MiniRF.cpp b/isis/src/lro/objs/MiniRF/MiniRF.cpp index 2bf9949b85c653ecc9d322f7cba9ca6ca788081f..6e13aeece3cff2acb1d7eae9fdbb935c8caa0c67 100644 --- a/isis/src/lro/objs/MiniRF/MiniRF.cpp +++ b/isis/src/lro/objs/MiniRF/MiniRF.cpp @@ -50,7 +50,7 @@ namespace Isis { // Get the ground range resolution (ScaledPixelHeight and ScaledPixelWidth // are expected to be equal - mrf2isis checks for this) - Isis::PvlGroup &inst = lab.FindGroup("Instrument", Isis::Pvl::Traverse); + Isis::PvlGroup &inst = lab.findGroup("Instrument", Isis::Pvl::Traverse); double groundRangeResolution = inst["ScaledPixelHeight"]; // meters // Synthesize the pixel pitch to the ground range resolution diff --git a/isis/src/lro/objs/MiniRF/unitTest.cpp b/isis/src/lro/objs/MiniRF/unitTest.cpp index 955a8cd1b4d9a34d9c4ad08cda5656af7dbeb0b9..8d0ac2be20a41475010a9d2e1e834a5c63741827 100644 --- a/isis/src/lro/objs/MiniRF/unitTest.cpp +++ b/isis/src/lro/objs/MiniRF/unitTest.cpp @@ -45,7 +45,7 @@ int main(void) { Pvl p("$chan1/testData/FSR_CDR_LV1_01801_0R.cub"); Camera *cam = Isis::CameraFactory::Create(p); - cout << "FileName: " << FileName(p.FileName()).name() << endl; + cout << "FileName: " << FileName(p.fileName()).name() << endl; cout << "CK Frame: " << cam->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); diff --git a/isis/src/mariner/apps/mar102isis/mar102isis.cpp b/isis/src/mariner/apps/mar102isis/mar102isis.cpp index 949e1071c81a667311b81c41a2f0f1820e6561c1..1b707f16a40c8afc8a09333c2da607289ad96ccc 100644 --- a/isis/src/mariner/apps/mar102isis/mar102isis.cpp +++ b/isis/src/mariner/apps/mar102isis/mar102isis.cpp @@ -35,7 +35,7 @@ void IsisMain() { Pvl label(inputFile.expanded()); // If the PVL created from the input labels is empty, then input is raw - if(label.Groups() + label.Objects() + label.Keywords() == 0) { + if(label.groups() + label.objects() + label.keywords() == 0) { isRaw = true; } @@ -204,7 +204,7 @@ void UpdateLabels(Cube *cube, const QString &labels) { bandBin += PvlKeyword("OriginalBand", "1"); QString center = toString(filterCenter); bandBin += PvlKeyword("Center", center); - bandBin.FindKeyword("Center").SetUnits("micrometers"); + bandBin.findKeyword("Center").setUnits("micrometers"); // Dates taken from ASU Mariner website - http://ser.ses.asu.edu/M10/TXT/encounters.html and // from Nasa website - http://www.jpl.nasa.gov/missions/missiondetails.cfm?mission_Mariner10 @@ -307,16 +307,16 @@ void UpdateLabels(Cube *cube, const QString &labels) { // Get the labels and add the updated labels to them Pvl *cubeLabels = cube->label(); - cubeLabels->FindObject("IsisCube").AddGroup(inst); - cubeLabels->FindObject("IsisCube").AddGroup(archive); - cubeLabels->FindObject("IsisCube").AddGroup(bandBin); - cubeLabels->FindObject("IsisCube").AddGroup(kernels); - cubeLabels->FindObject("IsisCube").AddGroup(rx); + cubeLabels->findObject("IsisCube").addGroup(inst); + cubeLabels->findObject("IsisCube").addGroup(archive); + cubeLabels->findObject("IsisCube").addGroup(bandBin); + cubeLabels->findObject("IsisCube").addGroup(kernels); + cubeLabels->findObject("IsisCube").addGroup(rx); PvlObject original("OriginalLabel"); original += PvlKeyword("Label", labels); Pvl olabel; - olabel.AddObject(original); + olabel.addObject(original); OriginalLabel ol(olabel); cube->write(ol); } @@ -324,7 +324,7 @@ void UpdateLabels(Cube *cube, const QString &labels) { // Translate Isis 2 labels into Isis 3 labels. void TranslateIsis2Labels(FileName &labelFile, Cube *oCube) { // Get the directory where the Mariner translation tables are. - PvlGroup &dataDir = Preference::Preferences().FindGroup("DataDirectory"); + PvlGroup &dataDir = Preference::Preferences().findGroup("DataDirectory"); // Transfer the instrument group to the output cube QString transDir = (QString) dataDir["Mariner10"] + "/translations/"; @@ -339,24 +339,24 @@ void TranslateIsis2Labels(FileName &labelFile, Cube *oCube) { translation.Auto(*(outputLabel)); //Instrument group - PvlGroup &inst = outputLabel->FindGroup("Instrument", Pvl::Traverse); + PvlGroup &inst = outputLabel->findGroup("Instrument", Pvl::Traverse); - PvlKeyword &instrumentId = inst.FindKeyword("InstrumentId"); - instrumentId.SetValue("M10_VIDICON_" + instrumentId[0]); + PvlKeyword &instrumentId = inst.findKeyword("InstrumentId"); + instrumentId.setValue("M10_VIDICON_" + instrumentId[0]); - PvlKeyword &targetName = inst.FindKeyword("TargetName"); + PvlKeyword &targetName = inst.findKeyword("TargetName"); QString targetTail(targetName[0].mid(1)); targetTail = targetTail.toLower(); - targetName.SetValue(targetName[0].at(0) + targetTail); + targetName.setValue(targetName[0].at(0) + targetTail); - PvlKeyword &startTime = inst.FindKeyword("StartTime"); - startTime.SetValue(startTime[0].mid(0, startTime[0].size() - 1)); + PvlKeyword &startTime = inst.findKeyword("StartTime"); + startTime.setValue(startTime[0].mid(0, startTime[0].size() - 1)); - PvlGroup &archive = outputLabel->FindGroup("Archive", Pvl::Traverse); - PvlKeyword &imgNo = archive.FindKeyword("ImageNumber"); + PvlGroup &archive = outputLabel->findGroup("Archive", Pvl::Traverse); + PvlKeyword &imgNo = archive.findKeyword("ImageNumber"); QString ino = imgNo[0]; ino = ino.trimmed(); - imgNo.SetValue(ino); + imgNo.setValue(ino); iTime time(startTime[0]); if(time < iTime("1974-2-3T12:00:00")) { @@ -375,22 +375,22 @@ void TranslateIsis2Labels(FileName &labelFile, Cube *oCube) { archive += PvlKeyword("Encounter", "Mercury_3"); } - inst.FindKeyword("ExposureDuration").SetUnits("milliseconds"); + inst.findKeyword("ExposureDuration").setUnits("milliseconds"); - PvlGroup &bBin = outputLabel->FindGroup("BandBin", Pvl::Traverse); - QString filter = inputLabel.FindObject("QUBE")["FILTER_NAME"]; + PvlGroup &bBin = outputLabel->findGroup("BandBin", Pvl::Traverse); + QString filter = inputLabel.findObject("QUBE")["FILTER_NAME"]; if(filter != "F") { //Band Bin group - bBin.FindKeyword("Center").SetUnits("micrometers"); + bBin.findKeyword("Center").setUnits("micrometers"); } // Kernels group - PvlGroup &kernels = outputLabel->FindGroup("Kernels", Pvl::Traverse); - PvlGroup &reseaus = outputLabel->FindGroup("Reseaus", Pvl::Traverse); - PvlKeyword &templ = reseaus.FindKeyword("Template"); - PvlKeyword &valid = reseaus.FindKeyword("Valid"); + PvlGroup &kernels = outputLabel->findGroup("Kernels", Pvl::Traverse); + PvlGroup &reseaus = outputLabel->findGroup("Reseaus", Pvl::Traverse); + PvlKeyword &templ = reseaus.findKeyword("Template"); + PvlKeyword &valid = reseaus.findKeyword("Valid"); - for(int i = 0; i < valid.Size(); i++) { + for(int i = 0; i < valid.size(); i++) { valid[i] = valid[i].mid(0, 1); } @@ -398,12 +398,12 @@ void TranslateIsis2Labels(FileName &labelFile, Cube *oCube) { QString camera = ""; if(QString("M10_VIDICON_A") == inst["InstrumentId"][0]) { templ = "$mariner10/reseaus/mar10a.template.cub"; - kernels.FindKeyword("NaifFrameCode").SetValue("-76110"); + kernels.findKeyword("NaifFrameCode").setValue("-76110"); camera = "M10_VIDICON_A_RESEAUS"; } else { templ = "$mariner10/reseaus/mar10b.template.cub"; - kernels.FindKeyword("NaifFrameCode").SetValue("-76120"); + kernels.findKeyword("NaifFrameCode").setValue("-76120"); camera = "M10_VIDICON_B_RESEAUS"; } } diff --git a/isis/src/mariner/apps/mar10cal/mar10cal.cpp b/isis/src/mariner/apps/mar10cal/mar10cal.cpp index 6fb8d520a421a2ce2051f4b9dd70af5732275ab4..2adcb8f258497a32a1b7fce52ee075cacc6c0a4c 100644 --- a/isis/src/mariner/apps/mar10cal/mar10cal.cpp +++ b/isis/src/mariner/apps/mar10cal/mar10cal.cpp @@ -35,7 +35,7 @@ void IsisMain() { UserInterface & ui = Application::GetUserInterface(); Isis::Pvl lab(ui.GetFileName("FROM")); - Isis::PvlGroup & inst = lab.FindGroup("Instrument", Pvl::Traverse); + Isis::PvlGroup & inst = lab.findGroup("Instrument", Pvl::Traverse); QString mission = inst["SpacecraftName"]; if (mission != "Mariner_10") { diff --git a/isis/src/mariner/apps/mar10clean/mar10clean.cpp b/isis/src/mariner/apps/mar10clean/mar10clean.cpp index 4edc750971832eef54fc04bc8a62d93cc39941d9..e06a2f5e7ce3ab70f4e8fe0410d47709733e2239 100644 --- a/isis/src/mariner/apps/mar10clean/mar10clean.cpp +++ b/isis/src/mariner/apps/mar10clean/mar10clean.cpp @@ -16,7 +16,7 @@ void IsisMain() { Cube iCube; iCube.open(ui.GetFileName("FROM")); Pvl * labels = iCube.label(); - if ("Mariner_10" != (QString)labels->FindKeyword("SpacecraftName", Pvl::Traverse)) { + if ("Mariner_10" != (QString)labels->findKeyword("SpacecraftName", Pvl::Traverse)) { QString msg = "The cube [" + ui.GetFileName("FROM") + "] does not appear" + " to be a Mariner10 cube"; throw IException(IException::User, msg, _FILEINFO_); diff --git a/isis/src/mariner/apps/mar10nonoise/mar10nonoise.cpp b/isis/src/mariner/apps/mar10nonoise/mar10nonoise.cpp index 88c2c9831258408266640c9e37eafc777788b81d..9067a9233e096172fd7ab36df5cb71c0a6e641d5 100644 --- a/isis/src/mariner/apps/mar10nonoise/mar10nonoise.cpp +++ b/isis/src/mariner/apps/mar10nonoise/mar10nonoise.cpp @@ -15,7 +15,7 @@ void IsisMain() { Cube iCube; iCube.open(ui.GetFileName("FROM")); Pvl * labels = iCube.label(); - if ("Mariner_10" != (QString)labels->FindKeyword("SpacecraftName", Pvl::Traverse)) { + if ("Mariner_10" != (QString)labels->findKeyword("SpacecraftName", Pvl::Traverse)) { QString msg = "The cube [" + ui.GetFileName("FROM") + "] does not appear" + " to be a Mariner10 cube"; throw IException(IException::User, msg, _FILEINFO_); diff --git a/isis/src/mariner/apps/mar10restore/mar10restore.cpp b/isis/src/mariner/apps/mar10restore/mar10restore.cpp index 6e02fb93e293b81a54817c0471163e334045e7cd..82299f8001b65622cc328e3868e5457d81d53e58 100644 --- a/isis/src/mariner/apps/mar10restore/mar10restore.cpp +++ b/isis/src/mariner/apps/mar10restore/mar10restore.cpp @@ -19,7 +19,7 @@ void IsisMain() { // Check that it is a Mariner10 cube. Pvl * labels = cube.label(); - if ("Mariner_10" != (QString)labels->FindKeyword("SpacecraftName", Pvl::Traverse)) { + if ("Mariner_10" != (QString)labels->findKeyword("SpacecraftName", Pvl::Traverse)) { QString msg = "The cube [" + ui.GetFileName("FROM") + "] does not appear" + " to be a Mariner10 cube"; throw IException(IException::User, msg, _FILEINFO_); diff --git a/isis/src/mariner/objs/Mariner10Camera/Mariner10Camera.cpp b/isis/src/mariner/objs/Mariner10Camera/Mariner10Camera.cpp index fb1eeaa4ee52a5e600ba179672f02bd6b74113d4..ff2418d6eb42fe59c3bbf327e60f9a026614810a 100644 --- a/isis/src/mariner/objs/Mariner10Camera/Mariner10Camera.cpp +++ b/isis/src/mariner/objs/Mariner10Camera/Mariner10Camera.cpp @@ -65,7 +65,7 @@ namespace Isis { SetFocalLength(); SetPixelPitch(); - PvlGroup inst = lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup inst = lab.findGroup("Instrument", Pvl::Traverse); // Get utc start time QString stime = inst["StartTime"]; diff --git a/isis/src/mariner/objs/Mariner10Camera/unitTest.cpp b/isis/src/mariner/objs/Mariner10Camera/unitTest.cpp index 88ca4f51aee204b25d60bc5e106368f2b5099974..49ca8dc427b0489f65c12b8458d1f911270185db 100644 --- a/isis/src/mariner/objs/Mariner10Camera/unitTest.cpp +++ b/isis/src/mariner/objs/Mariner10Camera/unitTest.cpp @@ -72,7 +72,7 @@ int main(void) { // Pvl p("$mariner10/testData/27265.cub"); Pvl p(files[i]); Mariner10Camera *cam = (Mariner10Camera *) CameraFactory::Create(p); - cout << "FileName: " << FileName(p.FileName()).name() << endl; + cout << "FileName: " << FileName(p.fileName()).name() << endl; cout << "CK Frame: " << cam->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); @@ -85,7 +85,7 @@ int main(void) { cout << "SPK Reference ID = " << cam->SpkReferenceId() << endl << endl; // Test Shutter Open/Close - const PvlGroup &inst = p.FindGroup("Instrument", Pvl::Traverse); + const PvlGroup &inst = p.findGroup("Instrument", Pvl::Traverse); double exposureDuration = ((double) inst["ExposureDuration"])/1000; QString stime = inst["StartTime"]; double et; // StartTime keyword is the center exposure time diff --git a/isis/src/mer/apps/mer2isis/mer2isis.cpp b/isis/src/mer/apps/mer2isis/mer2isis.cpp index 7eaaa5355fe358456a810ebba1e32aceb02ac54f..63b9a38e5960e680c931ea3dcbe905b6ba658f24 100644 --- a/isis/src/mer/apps/mer2isis/mer2isis.cpp +++ b/isis/src/mer/apps/mer2isis/mer2isis.cpp @@ -20,7 +20,7 @@ void IsisMain() { //Checks if in file is rdr Pvl lab(input.expanded()); - if(lab.HasObject("IMAGE_MAP_PROJECTION")) { + if(lab.hasObject("IMAGE_MAP_PROJECTION")) { QString msg = "[" + input.name() + "] has already been projected."; msg += " Use pds2isis."; throw IException(IException::User, msg, _FILEINFO_); @@ -53,7 +53,7 @@ void TranslateMerEdrLabels(FileName &labelFile, Cube *ocube) { Pvl outLabel; // Get the directory where the MER translation tables are. - PvlGroup dataDir(Preference::Preferences().FindGroup("DataDirectory")); + PvlGroup dataDir(Preference::Preferences().findGroup("DataDirectory")); QString transDir = (QString) dataDir["Mer"]; transDir = transDir + "/" + "translations/"; @@ -65,13 +65,13 @@ void TranslateMerEdrLabels(FileName &labelFile, Cube *ocube) { transFile = transDir + "merStructure.trn"; PvlTranslationManager structXlater(labelPvl, transFile.expanded()); structXlater.Auto(outLabel); - ocube->putGroup(outLabel.FindGroup("ARCHIVE", Pvl::Traverse)); + ocube->putGroup(outLabel.findGroup("ARCHIVE", Pvl::Traverse)); // Translate the Instrument group transFile = transDir + "merInstrument.trn"; PvlTranslationManager instrumentXlater(labelPvl, transFile.expanded()); instrumentXlater.Auto(outLabel); - ocube->putGroup(outLabel.FindGroup("INSTRUMENT", Pvl::Traverse)); + ocube->putGroup(outLabel.findGroup("INSTRUMENT", Pvl::Traverse)); // Pull out MiCCD and MiElectronic from the TemperatureName in the instrument group void MiFixLab(PvlGroup & instGroup); @@ -83,37 +83,37 @@ void TranslateMerEdrLabels(FileName &labelFile, Cube *ocube) { transFile = transDir + "merImageRequest.trn"; PvlTranslationManager imageReqXlater(labelPvl, transFile.expanded()); imageReqXlater.Auto(outLabel); - ocube->putGroup(outLabel.FindGroup("MER_IMAGE_REQUEST_PARMS", Pvl::Traverse)); + ocube->putGroup(outLabel.findGroup("MER_IMAGE_REQUEST_PARMS", Pvl::Traverse)); // Translate the Subframe group transFile = transDir + "merSubframe.trn"; PvlTranslationManager subframeXlater(labelPvl, transFile.expanded()); subframeXlater.Auto(outLabel); - ocube->putGroup(outLabel.FindGroup("MER_SUBFRAME_REQUEST_PARMS", Pvl::Traverse)); + ocube->putGroup(outLabel.findGroup("MER_SUBFRAME_REQUEST_PARMS", Pvl::Traverse)); } void MiFixLab(PvlGroup &instGroup) { // code to get instrment and electronics temperatures. - PvlKeyword temp = instGroup.FindKeyword("InstrumentTemperature"); - PvlKeyword tempName = instGroup.FindKeyword("InstrumentTemperatureName"); + PvlKeyword temp = instGroup.findKeyword("InstrumentTemperature"); + PvlKeyword tempName = instGroup.findKeyword("InstrumentTemperatureName"); PvlKeyword miCCD; - miCCD.SetName("TemperatureMiCCD"); - miCCD.SetValue(temp[6]); - instGroup.AddKeyword(miCCD); + miCCD.setName("TemperatureMiCCD"); + miCCD.setValue(temp[6]); + instGroup.addKeyword(miCCD); PvlKeyword miElectornic; - miElectornic.SetName("TemperatureMiElectronics"); - miElectornic.SetValue(temp[7]); - instGroup.AddKeyword(miElectornic); + miElectornic.setName("TemperatureMiElectronics"); + miElectornic.setValue(temp[7]); + instGroup.addKeyword(miElectornic); //Code to remove "Z" from the StartTime and StopTime keywords //StartTime code - QString Newstarttime = (QString)instGroup.FindKeyword("StartTime"); + QString Newstarttime = (QString)instGroup.findKeyword("StartTime"); Newstarttime.remove("Z"); - instGroup.FindKeyword("StartTime").SetValue(Newstarttime); + instGroup.findKeyword("StartTime").setValue(Newstarttime); //StopTime code - QString Newstoptime = (QString)instGroup.FindKeyword("StopTime"); + QString Newstoptime = (QString)instGroup.findKeyword("StopTime"); Newstoptime.remove("Z"); - instGroup.FindKeyword("StopTime").SetValue(Newstoptime); + instGroup.findKeyword("StopTime").setValue(Newstoptime); } diff --git a/isis/src/mer/apps/mical/MiCalibration.cpp b/isis/src/mer/apps/mical/MiCalibration.cpp index f533f8058fda6380291c311b4a8d858dd087a4c6..22c28c27cb81fe84d254933eb4a86d1881c6c5df 100644 --- a/isis/src/mer/apps/mical/MiCalibration.cpp +++ b/isis/src/mer/apps/mical/MiCalibration.cpp @@ -25,7 +25,7 @@ namespace Isis { void MiCalibration::ReadLabels(Cube &image) { PvlGroup labelgrp = - image.label()->FindGroup("Instrument", Pvl::Traverse); + image.label()->findGroup("Instrument", Pvl::Traverse); p_exposureDuration = labelgrp["ExposureDuration"]; p_instrumentSerialNumber = labelgrp["InstrumentSerialNumber"]; p_CCDTemperature = toDouble(labelgrp["InstrumentTemperature"][6]); @@ -45,7 +45,7 @@ namespace Isis { */ void MiCalibration::ReadKernel(Pvl &kernel) { QString rover = "MI_" + toString(p_instrumentSerialNumber); - PvlGroup kernelgrp = kernel.FindGroup(rover, Pvl::Traverse); + PvlGroup kernelgrp = kernel.findGroup(rover, Pvl::Traverse); p_DELCCDTa = kernelgrp["DELCCDTa"]; p_DELCCDTb = kernelgrp["DELCCDTb"]; p_RPVOFFa = kernelgrp["RPVOFFa"]; diff --git a/isis/src/mer/apps/mical/mical.cpp b/isis/src/mer/apps/mical/mical.cpp index 012777a2f9b85b5a58f5c2ef8208a9f0bd67c462..334f3b98c09448f8ae19c265edbb3ed6dd29e2bd 100644 --- a/isis/src/mer/apps/mical/mical.cpp +++ b/isis/src/mer/apps/mical/mical.cpp @@ -312,7 +312,7 @@ void helperButtonLogCalKernel() { } Pvl p; - p.Read(calKernelFile); + p.read(calKernelFile); QString OQString = "********** Output of [" + calKernelFile + "] *********"; Application::GuiLog(OQString); Application::GuiLog(p); diff --git a/isis/src/messenger/apps/mdis2isis/mdis2isis.cpp b/isis/src/messenger/apps/mdis2isis/mdis2isis.cpp index eaa3fdb288e77ba4ab04504d44b4be44cfd7447d..fcf053afe2f41c7670dc3c3eb1fed01f57c183d9 100644 --- a/isis/src/messenger/apps/mdis2isis/mdis2isis.cpp +++ b/isis/src/messenger/apps/mdis2isis/mdis2isis.cpp @@ -73,11 +73,11 @@ void IsisMain() { Pvl lab(inFile.expanded()); try { - needsUnlut = (int) lab.FindKeyword("MESS:COMP12_8"); + needsUnlut = (int) lab.findKeyword("MESS:COMP12_8"); // Check for NAC imager - if((int) lab.FindKeyword("MESS:IMAGER") == 1) validMaxDn = NACValidMaximum; - id = (QString) lab.FindKeyword("MISSION_NAME"); - projected = lab.HasObject("IMAGE_MAP_PROJECTION"); + if((int) lab.findKeyword("MESS:IMAGER") == 1) validMaxDn = NACValidMaximum; + id = (QString) lab.findKeyword("MISSION_NAME"); + projected = lab.hasObject("IMAGE_MAP_PROJECTION"); } catch(IException &e) { QString msg = "Unable to read [MISSION] from input file [" + @@ -112,9 +112,9 @@ void IsisMain() { PvlKeyword sourceId("SourceProductId", '"' + inFile.baseName() + '"'); // Create YearDoy keyword in Archive group - iTime stime(outLabel.FindGroup("Instrument", Pvl::Traverse)["StartTime"][0]); + iTime stime(outLabel.findGroup("Instrument", Pvl::Traverse)["StartTime"][0]); PvlKeyword yeardoy("YearDoy", toString(stime.Year()*1000 + stime.DayOfYear())); - (void) outLabel.FindGroup("Archive", Pvl::Traverse).AddKeyword(yeardoy); + (void) outLabel.findGroup("Archive", Pvl::Traverse).addKeyword(yeardoy); if(ui.GetBoolean("UNLUT") == false || !needsUnlut) { // We're not going to unlut the data, so just set output cube @@ -124,16 +124,16 @@ void IsisMain() { // Write the Instrument, BandBin, Archive, and Kernels groups to the output // cube label - PvlGroup &group = outLabel.FindGroup("Instrument", Pvl::Traverse); - group.AddKeyword(PvlKeyword("Unlutted", toString((int)!needsUnlut))); + PvlGroup &group = outLabel.findGroup("Instrument", Pvl::Traverse); + group.addKeyword(PvlKeyword("Unlutted", toString((int)!needsUnlut))); outCube->putGroup(group); - outCube->putGroup(outLabel.FindGroup("BandBin", Pvl::Traverse)); + outCube->putGroup(outLabel.findGroup("BandBin", Pvl::Traverse)); - group = outLabel.FindGroup("Archive", Pvl::Traverse); - group.AddKeyword(sourceId, Pvl::Replace); + group = outLabel.findGroup("Archive", Pvl::Traverse); + group.addKeyword(sourceId, Pvl::Replace); outCube->putGroup(group); - outCube->putGroup(outLabel.FindGroup("Kernels", Pvl::Traverse)); + outCube->putGroup(outLabel.findGroup("Kernels", Pvl::Traverse)); outCube = NULL; @@ -153,18 +153,18 @@ void IsisMain() { outCube->setDimensions(p.Samples(), p.Lines(), p.Bands()); outCube->create(ui.GetFileName("TO")); - PvlGroup &group = outLabel.FindGroup("Instrument", Pvl::Traverse); - group.AddKeyword(PvlKeyword("Unlutted", toString((int)true))); - group.AddKeyword(PvlKeyword("LutInversionTable", lutfile)); - outCube->label()->FindObject("IsisCube").AddGroup(group); + PvlGroup &group = outLabel.findGroup("Instrument", Pvl::Traverse); + group.addKeyword(PvlKeyword("Unlutted", toString((int)true))); + group.addKeyword(PvlKeyword("LutInversionTable", lutfile)); + outCube->label()->findObject("IsisCube").addGroup(group); - group = outLabel.FindGroup("Archive", Pvl::Traverse); - sourceId.AddValue('"' + lutid + '"'); - group.AddKeyword(sourceId); - outCube->label()->FindObject("IsisCube").AddGroup(group); + group = outLabel.findGroup("Archive", Pvl::Traverse); + sourceId.addValue('"' + lutid + '"'); + group.addKeyword(sourceId); + outCube->label()->findObject("IsisCube").addGroup(group); - outCube->label()->FindObject("IsisCube").AddGroup(outLabel.FindGroup("BandBin", Pvl::Traverse)); - outCube->label()->FindObject("IsisCube").AddGroup(outLabel.FindGroup("Kernels", Pvl::Traverse)); + outCube->label()->findObject("IsisCube").addGroup(outLabel.findGroup("BandBin", Pvl::Traverse)); + outCube->label()->findObject("IsisCube").addGroup(outLabel.findGroup("Kernels", Pvl::Traverse)); p.StartProcess(UnlutData); @@ -183,7 +183,7 @@ Pvl TranslateMdisEdrLabels(FileName &labelFile, const QString &target) { Pvl outLabel; // Get the directory where the MESSENGER/MDIS translation tables are. - PvlGroup dataDir(Preference::Preferences().FindGroup("DataDirectory")); + PvlGroup dataDir(Preference::Preferences().findGroup("DataDirectory")); QString transDir = (QString) dataDir["Messenger"] + "/translations/"; // Get a filename for the MESSENGER EDR label @@ -206,8 +206,8 @@ Pvl TranslateMdisEdrLabels(FileName &labelFile, const QString &target) { // Create the Kernel Group PvlGroup kerns("Kernels"); - PvlGroup &bandbin(outLabel.FindGroup("BandBin", Pvl::Traverse)); - PvlGroup &instGrp(outLabel.FindGroup("Instrument", Pvl::Traverse)); + PvlGroup &bandbin(outLabel.findGroup("BandBin", Pvl::Traverse)); + PvlGroup &instGrp(outLabel.findGroup("Instrument", Pvl::Traverse)); QString instId = instGrp["InstrumentId"]; QString naifCode; @@ -215,11 +215,11 @@ Pvl TranslateMdisEdrLabels(FileName &labelFile, const QString &target) { CreateFilterSpecs(instId, (int) instGrp["FilterWheelPosition"], bandbin, naifCode); kerns += PvlKeyword("NaifIkCode", naifCode); - outLabel.AddGroup(kerns); + outLabel.addGroup(kerns); // If the user specifed the target explicitly or it doesn't exist, create // something so the camera will always work - if(instGrp.FindKeyword("TargetName").IsNull() || (!target.isEmpty())) { + if(instGrp.findKeyword("TargetName").isNull() || (!target.isEmpty())) { if(!target.isEmpty()) { instGrp["TargetName"] = QString(target); } @@ -293,7 +293,7 @@ int CreateFilterSpecs(const QString &instId, int filter_code, calibFile = calibFile.highestVersion(); Pvl config(calibFile.expanded()); - PvlGroup &confgrp = config.FindGroup("FilterWheel"); + PvlGroup &confgrp = config.findGroup("FilterWheel"); int tolerance = confgrp["EncoderTolerance"]; naifCode = "-236800"; @@ -318,14 +318,14 @@ int CreateFilterSpecs(const QString &instId, int filter_code, } if(!name.isEmpty()) { - bandbin.AddKeyword(PvlKeyword("Number", toString(filter)), PvlContainer::Replace); - bandbin.AddKeyword(PvlKeyword("Name", name), PvlContainer::Replace); - bandbin.AddKeyword(PvlKeyword("Center", center, "NM"), PvlContainer::Replace); - bandbin.AddKeyword(PvlKeyword("Width", width, "NM"), PvlContainer::Replace); + bandbin.addKeyword(PvlKeyword("Number", toString(filter)), PvlContainer::Replace); + bandbin.addKeyword(PvlKeyword("Name", name), PvlContainer::Replace); + bandbin.addKeyword(PvlKeyword("Center", center, "NM"), PvlContainer::Replace); + bandbin.addKeyword(PvlKeyword("Width", width, "NM"), PvlContainer::Replace); } else { // If we reach here, we cannot validate the number - set it to unknown - bandbin.AddKeyword(PvlKeyword("Number", "Unknown"), PvlContainer::Replace); + bandbin.addKeyword(PvlKeyword("Number", "Unknown"), PvlContainer::Replace); } return (0); @@ -352,7 +352,7 @@ void UnlutData(Buffer &data) { } LutTable LoadLut(Pvl &label, QString &tableused, QString &froot) { - int tableToUse = label.FindKeyword("MESS:COMP_ALG"); + int tableToUse = label.findKeyword("MESS:COMP_ALG"); FileName tableFile("$messenger/calibration/LUT_INVERT/MDISLUTINV_?.TAB"); tableFile = tableFile.highestVersion(); diff --git a/isis/src/messenger/apps/mdis2pds/mdis2pds.cpp b/isis/src/messenger/apps/mdis2pds/mdis2pds.cpp index a37d283c162cf9445a1ace21a54cef858b94c9aa..8e50b6200497e8e71e3ba3adcbf8bef22c3a9fb4 100644 --- a/isis/src/messenger/apps/mdis2pds/mdis2pds.cpp +++ b/isis/src/messenger/apps/mdis2pds/mdis2pds.cpp @@ -35,33 +35,33 @@ inline double SetRound(double value, const int precision) { inline void ValidateUnit(PvlKeyword &key, const QString &kunit) { PvlKeyword temp = key; - key.Clear(); - for(int i = 0 ; i < temp.Size() ; i++) { + key.clear(); + for(int i = 0 ; i < temp.size() ; i++) { try { // If this works, check unit, otherwise an exception is thrown (void) toDouble(temp[i]); - QString unit = temp.Unit(i); + QString unit = temp.unit(i); if(unit.isEmpty()) unit = kunit; - key.AddValue(temp[i], unit); + key.addValue(temp[i], unit); } catch(...) { - key.AddValue(temp[i]); + key.addValue(temp[i]); } } return; } inline void FixUnit(PvlObject &obj, const QString &key, const QString &unit) { - if(obj.HasKeyword(key, PvlObject::Traverse)) { - ValidateUnit(obj.FindKeyword(key, PvlObject::Traverse), unit); + if(obj.hasKeyword(key, PvlObject::Traverse)) { + ValidateUnit(obj.findKeyword(key, PvlObject::Traverse), unit); } return; } inline void FixQuotes(PvlContainer &kcont, const QString &value = "N/A") { PvlContainer::PvlKeywordIterator kiter; - for(kiter = kcont.Begin() ; kiter != kcont.End() ; ++kiter) { - for(int nv = 0 ; nv < kiter->Size() ; nv++) { + for(kiter = kcont.begin() ; kiter != kcont.end() ; ++kiter) { + for(int nv = 0 ; nv < kiter->size() ; nv++) { if((*kiter)[nv] == value)(*kiter)[nv] = Quote((*kiter)[nv]); } } @@ -73,13 +73,13 @@ inline void FixLabels(PvlObject &obj) { // Fix all nested objects PvlObject::PvlObjectIterator o; - for(o = obj.BeginObject() ; o != obj.EndObject() ; ++o) { + for(o = obj.beginObject() ; o != obj.endObject() ; ++o) { FixLabels(*o); } // Fix local groups PvlObject::PvlGroupIterator g; - for(g = obj.BeginGroup() ; g != obj.EndGroup() ; ++g) { + for(g = obj.beginGroup() ; g != obj.endGroup() ; ++g) { FixQuotes(*g); } return; @@ -185,13 +185,13 @@ void IsisMain() { incube->read(origBlob); Pvl origLabel; PvlObject origLabelObj = origBlob.ReturnLabels(); - origLabelObj.SetName("OriginalLabelObject"); - origLabel.AddObject(origLabelObj); + origLabelObj.setName("OriginalLabelObject"); + origLabel.addObject(origLabelObj); p.CheckStatus(); // Translates the ISIS labels along with the original EDR labels - origLabel.AddObject(*(incube->label())); + origLabel.addObject(*(incube->label())); PvlTranslationManager labels(origLabel, "$messenger/translations/mdisCdrLabel.trn"); labels.Auto(pdsLabel); @@ -199,44 +199,44 @@ void IsisMain() { p.CheckStatus(); // Add keyword comments - PvlKeyword &recordType(pdsLabel.FindKeyword("RECORD_TYPE")); - recordType.AddComment("/*** FILE FORMAT ***/"); + PvlKeyword &recordType(pdsLabel.findKeyword("RECORD_TYPE")); + recordType.addComment("/*** FILE FORMAT ***/"); - PvlKeyword &image(pdsLabel.FindKeyword("^IMAGE")); - image.AddComment("/*** POINTERS TO START BYTE OFFSET OF OBJECTS IN IMAGE FILE ***/"); + PvlKeyword &image(pdsLabel.findKeyword("^IMAGE")); + image.addComment("/*** POINTERS TO START BYTE OFFSET OF OBJECTS IN IMAGE FILE ***/"); - PvlKeyword &missionName(pdsLabel.FindKeyword("MISSION_NAME")); - missionName.AddComment("/*** GENERAL DATA DESCRIPTION PARAMETERS ***/"); + PvlKeyword &missionName(pdsLabel.findKeyword("MISSION_NAME")); + missionName.addComment("/*** GENERAL DATA DESCRIPTION PARAMETERS ***/"); - PvlKeyword &startTime(pdsLabel.FindKeyword("START_TIME")); - startTime.AddComment("/*** TIME PARAMETERS ***/"); + PvlKeyword &startTime(pdsLabel.findKeyword("START_TIME")); + startTime.addComment("/*** TIME PARAMETERS ***/"); - PvlKeyword &instrumentName(pdsLabel.FindKeyword("INSTRUMENT_NAME")); - instrumentName.AddComment("/*** INSTRUMENT ENGINEERING PARAMETERS ***/"); + PvlKeyword &instrumentName(pdsLabel.findKeyword("INSTRUMENT_NAME")); + instrumentName.addComment("/*** INSTRUMENT ENGINEERING PARAMETERS ***/"); - PvlKeyword &messMetExp(pdsLabel.FindKeyword("MESS:MET_EXP")); - messMetExp.AddComment("/*** INSTRUMENT RAW PARAMETERS ***/"); + PvlKeyword &messMetExp(pdsLabel.findKeyword("MESS:MET_EXP")); + messMetExp.addComment("/*** INSTRUMENT RAW PARAMETERS ***/"); - PvlKeyword &geometry(pdsLabel.FindKeyword("RIGHT_ASCENSION")); - geometry.AddComment("/*** GEOMETRY INFORMATION ***/"); + PvlKeyword &geometry(pdsLabel.findKeyword("RIGHT_ASCENSION")); + geometry.addComment("/*** GEOMETRY INFORMATION ***/"); - PvlKeyword &target(pdsLabel.FindKeyword("SC_TARGET_POSITION_VECTOR")); - target.AddComment("/*** TARGET PARAMETERS ***/"); + PvlKeyword &target(pdsLabel.findKeyword("SC_TARGET_POSITION_VECTOR")); + target.addComment("/*** TARGET PARAMETERS ***/"); - PvlKeyword &sensor(pdsLabel.FindKeyword("SLANT_DISTANCE")); - sensor.AddComment("/*** TARGET WITHIN SENSOR FOV ***/"); + PvlKeyword &sensor(pdsLabel.findKeyword("SLANT_DISTANCE")); + sensor.addComment("/*** TARGET WITHIN SENSOR FOV ***/"); - PvlKeyword &spacecraftPosition(pdsLabel.FindKeyword("SUB_SPACECRAFT_LATITUDE")); - spacecraftPosition.AddComment("/*** SPACECRAFT POSITION WITH RESPECT TO CENTRAL BODY ***/"); + PvlKeyword &spacecraftPosition(pdsLabel.findKeyword("SUB_SPACECRAFT_LATITUDE")); + spacecraftPosition.addComment("/*** SPACECRAFT POSITION WITH RESPECT TO CENTRAL BODY ***/"); - PvlKeyword &spacecraftLocation(pdsLabel.FindKeyword("SPACECRAFT_SOLAR_DISTANCE")); - spacecraftLocation.AddComment("/*** SPACECRAFT LOCATION ***/"); + PvlKeyword &spacecraftLocation(pdsLabel.findKeyword("SPACECRAFT_SOLAR_DISTANCE")); + spacecraftLocation.addComment("/*** SPACECRAFT LOCATION ***/"); - PvlKeyword &solarDistance(pdsLabel.FindKeyword("SOLAR_DISTANCE")); - solarDistance.AddComment("/*** VIEWING AND LIGHTING GEOMETRY (SUN ON TARGET) ***/"); + PvlKeyword &solarDistance(pdsLabel.findKeyword("SOLAR_DISTANCE")); + solarDistance.addComment("/*** VIEWING AND LIGHTING GEOMETRY (SUN ON TARGET) ***/"); - PvlGroup &subframe(pdsLabel.FindGroup("SUBFRAME1_PARAMETERS")); - subframe.AddComment("/*** GEOMETRY FOR EACH SUBFRAME ***/"); + PvlGroup &subframe(pdsLabel.findGroup("SUBFRAME1_PARAMETERS")); + subframe.addComment("/*** GEOMETRY FOR EACH SUBFRAME ***/"); p.CheckStatus(); @@ -248,20 +248,20 @@ void IsisMain() { PvlKeyword saturated("SATURATED_PIXEL_COUNT", toString(hist->HisPixels())); - PvlObject &imageObj = pdsLabel.FindObject("IMAGE"); + PvlObject &imageObj = pdsLabel.findObject("IMAGE"); - minDn.AddComment("/*** IMAGE STATISTICS ***/"); - imageObj.AddKeyword(minDn); - imageObj.AddKeyword(maxDn); - imageObj.AddKeyword(meanDn); - imageObj.AddKeyword(stddev); - saturated.AddComment("/*** PIXEL COUNTS ***/"); - imageObj.AddKeyword(saturated); - if(imageObj.HasKeyword("DARK_STRIP_MEAN")) { - PvlKeyword &darkStripMean = imageObj.FindKeyword("DARK_STRIP_MEAN"); + minDn.addComment("/*** IMAGE STATISTICS ***/"); + imageObj.addKeyword(minDn); + imageObj.addKeyword(maxDn); + imageObj.addKeyword(meanDn); + imageObj.addKeyword(stddev); + saturated.addComment("/*** PIXEL COUNTS ***/"); + imageObj.addKeyword(saturated); + if(imageObj.hasKeyword("DARK_STRIP_MEAN")) { + PvlKeyword &darkStripMean = imageObj.findKeyword("DARK_STRIP_MEAN"); try { - if(darkStripMean.Size() > 0) { + if(darkStripMean.size() > 0) { darkStripMean[0] = toString(SetRound(toDouble(darkStripMean[0]), 16)); } } @@ -274,63 +274,63 @@ void IsisMain() { p.CheckStatus(); // Fixes bad keywords - PvlKeyword &data_set_id = pdsLabel.FindKeyword("DATA_SET_ID", Pvl::Traverse); - data_set_id.SetValue(dataSetID); - PvlKeyword &product_id = pdsLabel.FindKeyword("PRODUCT_ID", Pvl::Traverse); - if((product_id.Size() == 0) || ((product_id.Size() > 0) && (product_id[0] == "N/A"))) { - product_id.SetValue(output.baseName()); + PvlKeyword &data_set_id = pdsLabel.findKeyword("DATA_SET_ID", Pvl::Traverse); + data_set_id.setValue(dataSetID); + PvlKeyword &product_id = pdsLabel.findKeyword("PRODUCT_ID", Pvl::Traverse); + if((product_id.size() == 0) || ((product_id.size() > 0) && (product_id[0] == "N/A"))) { + product_id.setValue(output.baseName()); } - PvlKeyword &product_creation_time = pdsLabel.FindKeyword("PRODUCT_CREATION_TIME", Pvl::Traverse); - product_creation_time.SetValue(mdis2pds_runtime); + PvlKeyword &product_creation_time = pdsLabel.findKeyword("PRODUCT_CREATION_TIME", Pvl::Traverse); + product_creation_time.setValue(mdis2pds_runtime); - PvlKeyword &software_name = pdsLabel.FindKeyword("SOFTWARE_NAME", Pvl::Traverse); - if((software_name.Size() > 0) && (software_name[0] == "N/A")) { - software_name.SetValue(mdis2pds_program); + PvlKeyword &software_name = pdsLabel.findKeyword("SOFTWARE_NAME", Pvl::Traverse); + if((software_name.size() > 0) && (software_name[0] == "N/A")) { + software_name.setValue(mdis2pds_program); } - PvlKeyword &software_version_id = pdsLabel.FindKeyword("SOFTWARE_VERSION_ID", Pvl::Traverse); - if(software_version_id.Size() > 0) { + PvlKeyword &software_version_id = pdsLabel.findKeyword("SOFTWARE_VERSION_ID", Pvl::Traverse); + if(software_version_id.size() > 0) { if(software_version_id[0] == "N/A") { - software_version_id.SetValue(Quote(mdis2pds_version)); + software_version_id.setValue(Quote(mdis2pds_version)); } else { - software_version_id.SetValue(software_version_id[0]); + software_version_id.setValue(software_version_id[0]); } } - PvlKeyword &filter_number = pdsLabel.FindKeyword("FILTER_NUMBER", Pvl::Traverse); - if((filter_number.Size() > 0)) { - filter_number.SetValue(Quote(filter_number[0])); + PvlKeyword &filter_number = pdsLabel.findKeyword("FILTER_NUMBER", Pvl::Traverse); + if((filter_number.size() > 0)) { + filter_number.setValue(Quote(filter_number[0])); } // Add quotes - PvlKeyword &data_quality_id = pdsLabel.FindKeyword("DATA_QUALITY_ID", Pvl::Traverse); - data_quality_id.SetValue(Quote(data_quality_id)); - PvlKeyword &sequence_name = pdsLabel.FindKeyword("SEQUENCE_NAME", Pvl::Traverse); - sequence_name.SetValue(Quote(sequence_name)); - - PvlKeyword &start_count = pdsLabel.FindKeyword("SPACECRAFT_CLOCK_START_COUNT", Pvl::Traverse); - start_count.SetValue(Quote(start_count)); - PvlKeyword &stop_count = pdsLabel.FindKeyword("SPACECRAFT_CLOCK_STOP_COUNT", Pvl::Traverse); - stop_count.SetValue(Quote(stop_count)); - - PvlKeyword &site_id = pdsLabel.FindKeyword("SITE_ID", Pvl::Traverse); - site_id.SetValue(Quote(site_id)); - PvlKeyword &source_product_id = pdsLabel.FindKeyword("SOURCE_PRODUCT_ID", Pvl::Traverse); - for(int i = 0; i < source_product_id.Size(); i++) { + PvlKeyword &data_quality_id = pdsLabel.findKeyword("DATA_QUALITY_ID", Pvl::Traverse); + data_quality_id.setValue(Quote(data_quality_id)); + PvlKeyword &sequence_name = pdsLabel.findKeyword("SEQUENCE_NAME", Pvl::Traverse); + sequence_name.setValue(Quote(sequence_name)); + + PvlKeyword &start_count = pdsLabel.findKeyword("SPACECRAFT_CLOCK_START_COUNT", Pvl::Traverse); + start_count.setValue(Quote(start_count)); + PvlKeyword &stop_count = pdsLabel.findKeyword("SPACECRAFT_CLOCK_STOP_COUNT", Pvl::Traverse); + stop_count.setValue(Quote(stop_count)); + + PvlKeyword &site_id = pdsLabel.findKeyword("SITE_ID", Pvl::Traverse); + site_id.setValue(Quote(site_id)); + PvlKeyword &source_product_id = pdsLabel.findKeyword("SOURCE_PRODUCT_ID", Pvl::Traverse); + for(int i = 0; i < source_product_id.size(); i++) { source_product_id[i] = Quote(source_product_id[i]); } // Enforce parentheses for scalars - if(source_product_id.Size() == 1) - source_product_id.SetValue('(' + source_product_id[0] + ')'); + if(source_product_id.size() == 1) + source_product_id.setValue('(' + source_product_id[0] + ')'); // Removes keywords - PvlObject &imageObject(pdsLabel.FindObject("IMAGE")); - imageObject.DeleteKeyword("FILTER_NAME"); - imageObject.DeleteKeyword("CENTER_FILTER_WAVELENGTH"); - imageObject.DeleteKeyword("BANDWIDTH"); + PvlObject &imageObject(pdsLabel.findObject("IMAGE")); + imageObject.deleteKeyword("FILTER_NAME"); + imageObject.deleteKeyword("CENTER_FILTER_WAVELENGTH"); + imageObject.deleteKeyword("BANDWIDTH"); p.CheckStatus(); @@ -344,10 +344,10 @@ void IsisMain() { for(int i = 1 ; i <= 5 ; i++) { QString n(toString(i)); QString group = "SUBFRAME" + n + "_PARAMETERS"; - if(pdsLabel.HasGroup(group)) { - PvlGroup &grp = pdsLabel.FindGroup(group); - ValidateUnit(grp.FindKeyword("RETICLE_POINT_LATITUDE"), "DEG"); - ValidateUnit(grp.FindKeyword("RETICLE_POINT_LONGITUDE"), "DEG"); + if(pdsLabel.hasGroup(group)) { + PvlGroup &grp = pdsLabel.findGroup(group); + ValidateUnit(grp.findKeyword("RETICLE_POINT_LATITUDE"), "DEG"); + ValidateUnit(grp.findKeyword("RETICLE_POINT_LONGITUDE"), "DEG"); } } diff --git a/isis/src/messenger/apps/mdiscal/mdiscal.cpp b/isis/src/messenger/apps/mdiscal/mdiscal.cpp index c4aec06e97778d408b65b28cfd145763ed9246e7..bb451e5d0d62825125c9c120ada69daf525144b0 100644 --- a/isis/src/messenger/apps/mdiscal/mdiscal.cpp +++ b/isis/src/messenger/apps/mdiscal/mdiscal.cpp @@ -79,7 +79,7 @@ void IsisMain() { ProcessByLine p; FileName calibFile("$messenger/calibration/mdisCalibration????.trn"); calibFile = calibFile.highestVersion(); - configFile.Read(calibFile.expanded()); + configFile.read(calibFile.expanded()); // Initialize variables calibrationValues.clear(); @@ -359,75 +359,75 @@ void IsisMain() { // Log calibration activity PvlGroup calibrationLog("RadiometricCalibration"); - calibrationLog.AddKeyword(PvlKeyword("SoftwareName", mdiscal_program)); - calibrationLog.AddKeyword(PvlKeyword("SoftwareVersion", mdiscal_version)); - calibrationLog.AddKeyword(PvlKeyword("ProcessDate", mdiscal_runtime)); - calibrationLog.AddKeyword(PvlKeyword("DarkCurrentModel", darkCurr)); + calibrationLog.addKeyword(PvlKeyword("SoftwareName", mdiscal_program)); + calibrationLog.addKeyword(PvlKeyword("SoftwareVersion", mdiscal_version)); + calibrationLog.addKeyword(PvlKeyword("ProcessDate", mdiscal_runtime)); + calibrationLog.addKeyword(PvlKeyword("DarkCurrentModel", darkCurr)); if (darkCurrentMode == DarkCurrentLinear) { QString equation = "Y = " + toString(calibrationValues[0]) + QString(" + ") + toString(calibrationValues[1]) + QString("x"); - calibrationLog.AddKeyword(PvlKeyword("DarkCurrentEquation", (QString)equation)); + calibrationLog.addKeyword(PvlKeyword("DarkCurrentEquation", (QString)equation)); } else if (darkCurrentMode == DarkCurrentModel) { - calibrationLog.AddKeyword(PvlKeyword("DarkCurrentFile", darkCurrentFile)); + calibrationLog.addKeyword(PvlKeyword("DarkCurrentFile", darkCurrentFile)); } - calibrationLog.AddKeyword(PvlKeyword("BinnedImage", toString((int)isBinnedData))); - calibrationLog.AddKeyword(PvlKeyword("FilterNumber", toString(filterNumber + 1))); + calibrationLog.addKeyword(PvlKeyword("BinnedImage", toString((int)isBinnedData))); + calibrationLog.addKeyword(PvlKeyword("FilterNumber", toString(filterNumber + 1))); if (g_flatfield) { - calibrationLog.AddKeyword(PvlKeyword("FlatFieldFile", flatfield.originalPath() + "/" + flatfield.name())); - calibrationLog.AddKeyword(PvlKeyword("CalibrationFile", calibFile.originalPath() + "/" + calibFile.name())); - calibrationLog.AddKeyword(PvlKeyword("ResponsivityFile", respfile)); - calibrationLog.AddKeyword(PvlKeyword("SmearCompFile", smearfile)); + calibrationLog.addKeyword(PvlKeyword("FlatFieldFile", flatfield.originalPath() + "/" + flatfield.name())); + calibrationLog.addKeyword(PvlKeyword("CalibrationFile", calibFile.originalPath() + "/" + calibFile.name())); + calibrationLog.addKeyword(PvlKeyword("ResponsivityFile", respfile)); + calibrationLog.addKeyword(PvlKeyword("SmearCompFile", smearfile)); PvlKeyword rspKey("Response", toString(rsp[0])); for (unsigned int i = 1; i < rsp.size(); i++) { - rspKey.AddValue(toString(rsp[i])); + rspKey.addValue(toString(rsp[i])); } - calibrationLog.AddKeyword(rspKey); - calibrationLog.AddKeyword(PvlKeyword("SmearComponent", toString(smearComponent))); + calibrationLog.addKeyword(rspKey); + calibrationLog.addKeyword(PvlKeyword("SmearComponent", toString(smearComponent))); } else { - calibrationLog.AddKeyword(PvlKeyword("FlatFieldFile", "N/A")); - calibrationLog.AddKeyword(PvlKeyword("CalibrationFile", "N/A")); - calibrationLog.AddKeyword(PvlKeyword("ResponsivityFile", "N/A")); - calibrationLog.AddKeyword(PvlKeyword("SmearCompFile", "N/A")); + calibrationLog.addKeyword(PvlKeyword("FlatFieldFile", "N/A")); + calibrationLog.addKeyword(PvlKeyword("CalibrationFile", "N/A")); + calibrationLog.addKeyword(PvlKeyword("ResponsivityFile", "N/A")); + calibrationLog.addKeyword(PvlKeyword("SmearCompFile", "N/A")); PvlKeyword rspKey("Response"); - calibrationLog.AddKeyword(PvlKeyword("Response", "N/A")); - calibrationLog.AddKeyword(PvlKeyword("SmearComponent", "N/A")); + calibrationLog.addKeyword(PvlKeyword("Response", "N/A")); + calibrationLog.addKeyword(PvlKeyword("SmearComponent", "N/A")); } QString calibType; if (do_iof && iof_is_good) { - calibrationLog.AddKeyword(PvlKeyword("Units", "I over F")); - calibrationLog.AddKeyword(PvlKeyword("SolarDistance", toString(solarDist), "AU")); - calibrationLog.AddKeyword(PvlKeyword("SolarIrrFile", solirrfile)); - calibrationLog.AddKeyword(PvlKeyword("FilterIrradianceFactor", toString(F_f))); - calibrationLog.AddKeyword(PvlKeyword("IOFFactor", toString(iof))); + calibrationLog.addKeyword(PvlKeyword("Units", "I over F")); + calibrationLog.addKeyword(PvlKeyword("SolarDistance", toString(solarDist), "AU")); + calibrationLog.addKeyword(PvlKeyword("SolarIrrFile", solirrfile)); + calibrationLog.addKeyword(PvlKeyword("FilterIrradianceFactor", toString(F_f))); + calibrationLog.addKeyword(PvlKeyword("IOFFactor", toString(iof))); calibType = "IF"; } else if (g_radiometric) { - calibrationLog.AddKeyword(PvlKeyword("Units", "W / (m**2 micrometer sr)")); + calibrationLog.addKeyword(PvlKeyword("Units", "W / (m**2 micrometer sr)")); calibType = "RA"; } else { - calibrationLog.AddKeyword(PvlKeyword("Units", "DN")); + calibrationLog.addKeyword(PvlKeyword("Units", "DN")); calibType = "DN"; } - calibrationLog.AddKeyword(PvlKeyword("ContaminationEventFile", eventfile)); - calibrationLog.AddKeyword(PvlKeyword("ContaminationEventDate", eventDate)); - calibrationLog.AddKeyword(PvlKeyword("ContaminationEventFactor", + calibrationLog.addKeyword(PvlKeyword("ContaminationEventFile", eventfile)); + calibrationLog.addKeyword(PvlKeyword("ContaminationEventDate", eventDate)); + calibrationLog.addKeyword(PvlKeyword("ContaminationEventFactor", toString(eventCorrection))); - calibrationLog.AddKeyword(PvlKeyword("DarkStripColumns", toString(nDarkColumns)), + calibrationLog.addKeyword(PvlKeyword("DarkStripColumns", toString(nDarkColumns)), Pvl::Replace); - calibrationLog.AddKeyword(PvlKeyword("ValidDarkColumns", toString(nValidDark)), + calibrationLog.addKeyword(PvlKeyword("ValidDarkColumns", toString(nValidDark)), Pvl::Replace); if (darkStrip.TotalPixels() > 0) { double avgDark = (darkStrip.ValidPixels() > 0) ? darkStrip.Average() : 0.0; - calibrationLog.AddKeyword(PvlKeyword("DarkStripMean", toString(avgDark)), + calibrationLog.addKeyword(PvlKeyword("DarkStripMean", toString(avgDark)), Pvl::Replace); } // Report nulled sample count - calibrationLog.AddKeyword(PvlKeyword("LeftSamplesNulled", toString(nSampsToNull))); + calibrationLog.addKeyword(PvlKeyword("LeftSamplesNulled", toString(nSampsToNull))); // Handle updates of ProductId and SourceProduct Id keywords PvlGroup& archive = ocube->group("Archive"); @@ -435,13 +435,13 @@ void IsisMain() { QString orgProdId = key[0]; QString newProdId = orgProdId + "_" + calibType + "_" + toString(cdr_version); newProdId[0] = 'C'; - key.SetValue(Quote(newProdId)); - archive.AddKeyword(key, Pvl::Replace); + key.setValue(Quote(newProdId)); + archive.addKeyword(key, Pvl::Replace); // Now SourceProductId - if (archive.HasKeyword("SourceProductId")) { + if (archive.hasKeyword("SourceProductId")) { key = archive["SourceProductId"]; - for (int i = 0; i < key.Size(); i++) { + for (int i = 0; i < key.size(); i++) { key[i] = Quote(key[i]); } } else { @@ -449,20 +449,20 @@ void IsisMain() { } if (!darkCurrentFile.isEmpty()) { - key.AddValue(Quote(FileName(darkCurrentFile).baseName())); + key.addValue(Quote(FileName(darkCurrentFile).baseName())); } - key.AddValue(Quote(flatfield.baseName())); - key.AddValue(Quote(FileName(respfile).baseName())); - // key.AddValue(Quote(FileName(smearfile).baseName())); + key.addValue(Quote(flatfield.baseName())); + key.addValue(Quote(FileName(respfile).baseName())); + // key.addValue(Quote(FileName(smearfile).baseName())); if (iof_is_good) { - key.AddValue(Quote(FileName(solirrfile).baseName())); + key.addValue(Quote(FileName(solirrfile).baseName())); } - archive.AddKeyword(key, Pvl::Replace); + archive.addKeyword(key, Pvl::Replace); // Write Calibration group to file and log ocube->putGroup(calibrationLog); Application::Log(calibrationLog); - configFile.Clear(); + configFile.clear(); } FileName DetermineFlatFieldFile() { diff --git a/isis/src/messenger/apps/mdisddr/mdisddr.cpp b/isis/src/messenger/apps/mdisddr/mdisddr.cpp index 9a3c90ea6685d147fc43770a0963bcd5c172658f..4fcc5bff57efdd26721ada9e12bae4746c729706 100644 --- a/isis/src/messenger/apps/mdisddr/mdisddr.cpp +++ b/isis/src/messenger/apps/mdisddr/mdisddr.cpp @@ -41,33 +41,33 @@ inline double SetRound(double value, const int precision) { inline void ValidateUnit(PvlKeyword &key, const QString &kunit) { PvlKeyword temp = key; - key.Clear(); - for(int i = 0 ; i < temp.Size() ; i++) { + key.clear(); + for(int i = 0 ; i < temp.size() ; i++) { try { // If this works, check unit, otherwise an exception is thrown (void) toDouble(temp[i]); - QString unit = temp.Unit(i); + QString unit = temp.unit(i); if(unit.isEmpty()) unit = kunit; - key.AddValue(temp[i], unit); + key.addValue(temp[i], unit); } catch(...) { - key.AddValue(temp[i]); + key.addValue(temp[i]); } } return; } inline void FixUnit(PvlObject &obj, const QString &key, const QString &unit) { - if(obj.HasKeyword(key, PvlObject::Traverse)) { - ValidateUnit(obj.FindKeyword(key, PvlObject::Traverse), unit); + if(obj.hasKeyword(key, PvlObject::Traverse)) { + ValidateUnit(obj.findKeyword(key, PvlObject::Traverse), unit); } return; } inline void FixQuotes(PvlContainer &kcont, const QString &value = "N/A") { PvlContainer::PvlKeywordIterator kiter; - for(kiter = kcont.Begin() ; kiter != kcont.End() ; ++kiter) { - for(int nv = 0 ; nv < kiter->Size() ; nv++) { + for(kiter = kcont.begin() ; kiter != kcont.end() ; ++kiter) { + for(int nv = 0 ; nv < kiter->size() ; nv++) { if((*kiter)[nv] == value)(*kiter)[nv] = Quote((*kiter)[nv]); } } @@ -79,13 +79,13 @@ inline void FixLabels(PvlObject &obj) { // Fix all nested objects PvlObject::PvlObjectIterator o; - for(o = obj.BeginObject() ; o != obj.EndObject() ; ++o) { + for(o = obj.beginObject() ; o != obj.endObject() ; ++o) { FixLabels(*o); } // Fix local groups PvlObject::PvlGroupIterator g; - for(g = obj.BeginGroup() ; g != obj.EndGroup() ; ++g) { + for(g = obj.beginGroup() ; g != obj.endGroup() ; ++g) { FixQuotes(*g); } return; @@ -135,8 +135,8 @@ void IsisMain() { try { Pvl phoLabel(pfile); BandMap bandmap; - PvlKeyword bn = phoLabel.FindGroup("BandBin", Pvl::Traverse)["Name"]; - for(int i = 0 ; i < bn.Size() ; i++) { + PvlKeyword bn = phoLabel.findGroup("BandBin", Pvl::Traverse)["Name"]; + for(int i = 0 ; i < bn.size() ; i++) { bandmap.add(bn[i], i + 1); } @@ -192,12 +192,12 @@ void IsisMain() { from.read(origBlob); Pvl origLabel; PvlObject origLabelObj = origBlob.ReturnLabels(); - origLabelObj.SetName("OriginalLabelObject"); - origLabel.AddObject(origLabelObj); + origLabelObj.setName("OriginalLabelObject"); + origLabel.addObject(origLabelObj); p.CheckStatus(); // Translates the ISIS labels along with the original EDR labels - origLabel.AddObject(*from.label()); + origLabel.addObject(*from.label()); PvlTranslationManager labels(origLabel, "$messenger/translations/mdisDDRLabel.trn"); labels.Auto(pdsLabel); @@ -211,19 +211,19 @@ void IsisMain() { pdsLabel += PvlKeyword("SPACECRAFT_NAME", Quote("MESSENGER")); // Fixes bad keywords - PvlKeyword &data_set_id = pdsLabel.FindKeyword("DATA_SET_ID", Pvl::Traverse); - data_set_id.SetValue(dataSetID); + PvlKeyword &data_set_id = pdsLabel.findKeyword("DATA_SET_ID", Pvl::Traverse); + data_set_id.setValue(dataSetID); QString prodid(input.baseName()); - PvlKeyword &product_id = pdsLabel.FindKeyword("PRODUCT_ID", Pvl::Traverse); - if((product_id.Size() == 0) || ((product_id.Size() > 0) && (product_id[0] == "N/A"))) { - product_id.SetValue(prodid); + PvlKeyword &product_id = pdsLabel.findKeyword("PRODUCT_ID", Pvl::Traverse); + if((product_id.size() == 0) || ((product_id.size() > 0) && (product_id[0] == "N/A"))) { + product_id.setValue(prodid); } else { QString pid = product_id[0]; pid[0] = 'D'; pid.remove(QRegExp("_.*")); pid.append("_DE_0"); - product_id.SetValue(pid); + product_id.setValue(pid); prodid = pid; } @@ -233,67 +233,67 @@ void IsisMain() { output = output.addExtension("IMG"); if(!toEntered) ui.PutFileName("TO", output.expanded()); - PvlKeyword &product_creation_time = pdsLabel.FindKeyword("PRODUCT_CREATION_TIME", Pvl::Traverse); - product_creation_time.SetValue(mdisddr_runtime); + PvlKeyword &product_creation_time = pdsLabel.findKeyword("PRODUCT_CREATION_TIME", Pvl::Traverse); + product_creation_time.setValue(mdisddr_runtime); - PvlKeyword &software_name = pdsLabel.FindKeyword("SOFTWARE_NAME", Pvl::Traverse); - software_name.SetValue(mdisddr_program); + PvlKeyword &software_name = pdsLabel.findKeyword("SOFTWARE_NAME", Pvl::Traverse); + software_name.setValue(mdisddr_program); - PvlKeyword &software_version_id = pdsLabel.FindKeyword("SOFTWARE_VERSION_ID", Pvl::Traverse); - software_version_id.SetValue(Quote(mdisddr_version)); + PvlKeyword &software_version_id = pdsLabel.findKeyword("SOFTWARE_VERSION_ID", Pvl::Traverse); + software_version_id.setValue(Quote(mdisddr_version)); - PvlKeyword &filter_number = pdsLabel.FindKeyword("FILTER_NUMBER", Pvl::Traverse); - if((filter_number.Size() > 0)) { - filter_number.SetValue(Quote(filter_number[0])); + PvlKeyword &filter_number = pdsLabel.findKeyword("FILTER_NUMBER", Pvl::Traverse); + if((filter_number.size() > 0)) { + filter_number.setValue(Quote(filter_number[0])); } // Add quotes - PvlKeyword &data_quality_id = pdsLabel.FindKeyword("DATA_QUALITY_ID", Pvl::Traverse); - data_quality_id.SetValue(Quote(data_quality_id)); - PvlKeyword &sequence_name = pdsLabel.FindKeyword("SEQUENCE_NAME", Pvl::Traverse); - sequence_name.SetValue(Quote(sequence_name)); - PvlKeyword &start_count = pdsLabel.FindKeyword("SPACECRAFT_CLOCK_START_COUNT", Pvl::Traverse); - start_count.SetValue(Quote(start_count)); - PvlKeyword &stop_count = pdsLabel.FindKeyword("SPACECRAFT_CLOCK_STOP_COUNT", Pvl::Traverse); - stop_count.SetValue(Quote(stop_count)); + PvlKeyword &data_quality_id = pdsLabel.findKeyword("DATA_QUALITY_ID", Pvl::Traverse); + data_quality_id.setValue(Quote(data_quality_id)); + PvlKeyword &sequence_name = pdsLabel.findKeyword("SEQUENCE_NAME", Pvl::Traverse); + sequence_name.setValue(Quote(sequence_name)); + PvlKeyword &start_count = pdsLabel.findKeyword("SPACECRAFT_CLOCK_START_COUNT", Pvl::Traverse); + start_count.setValue(Quote(start_count)); + PvlKeyword &stop_count = pdsLabel.findKeyword("SPACECRAFT_CLOCK_STOP_COUNT", Pvl::Traverse); + stop_count.setValue(Quote(stop_count)); // For DDRs, the SOURCE_PRODUCT_ID is made up of SPICE kernels. I need to // go get em. Kernels kernels(from); QStringList kfiles = kernels.getKernelList(); - PvlKeyword &source_product_id = pdsLabel.FindKeyword("SOURCE_PRODUCT_ID", Pvl::Traverse); - source_product_id.Clear(); + PvlKeyword &source_product_id = pdsLabel.findKeyword("SOURCE_PRODUCT_ID", Pvl::Traverse); + source_product_id.clear(); for(int i = 0; i < kfiles.size(); i++) { FileName kfile(kfiles[i]); - source_product_id.AddValue(Quote(kfile.name())); + source_product_id.addValue(Quote(kfile.name())); } // Enforce parentheses for scalars - if(source_product_id.Size() == 1) - source_product_id.SetValue('(' + source_product_id[0] + ')'); + if(source_product_id.size() == 1) + source_product_id.setValue('(' + source_product_id[0] + ')'); // Removes keywords - PvlObject imageObject(pdsLabel.FindObject("IMAGE")); - if(imageObject.HasKeyword("CENTER_FILTER_WAVELENGTH")) imageObject.DeleteKeyword("CENTER_FILTER_WAVELENGTH"); - if(imageObject.HasKeyword("BANDWIDTH")) imageObject.DeleteKeyword("BANDWIDTH"); - if(imageObject.HasKeyword("UNIT")) imageObject.DeleteKeyword("UNIT"); - if(imageObject.HasKeyword("DARK_STRIP_MEAN")) imageObject.DeleteKeyword("DARK_STRIP_MEAN"); - if(imageObject.HasKeyword("OFFSET")) imageObject.DeleteKeyword("OFFSET"); - if(imageObject.HasKeyword("SCALING_FACTOR")) imageObject.DeleteKeyword("SCALING_FACTOR"); - if(imageObject.HasKeyword("SAMPLE_BIT_MASK")) imageObject.DeleteKeyword("SAMPLE_BIT_MASK"); + PvlObject imageObject(pdsLabel.findObject("IMAGE")); + if(imageObject.hasKeyword("CENTER_FILTER_WAVELENGTH")) imageObject.deleteKeyword("CENTER_FILTER_WAVELENGTH"); + if(imageObject.hasKeyword("BANDWIDTH")) imageObject.deleteKeyword("BANDWIDTH"); + if(imageObject.hasKeyword("UNIT")) imageObject.deleteKeyword("UNIT"); + if(imageObject.hasKeyword("DARK_STRIP_MEAN")) imageObject.deleteKeyword("DARK_STRIP_MEAN"); + if(imageObject.hasKeyword("OFFSET")) imageObject.deleteKeyword("OFFSET"); + if(imageObject.hasKeyword("SCALING_FACTOR")) imageObject.deleteKeyword("SCALING_FACTOR"); + if(imageObject.hasKeyword("SAMPLE_BIT_MASK")) imageObject.deleteKeyword("SAMPLE_BIT_MASK"); // Add band names to image object - PvlKeyword &bandNames = imageObject.FindKeyword("FILTER_NAME"); - bandNames.SetName("BAND_NAME"); - bandNames.Clear(); - bandNames.AddValue("Latitude, planetocentric, deg N"); - bandNames.AddValue("Longitude, planetocentric, deg E"); - bandNames.AddValue("Incidence angle at equipotential surface, deg"); - bandNames.AddValue("Emission angle at equipotential surface, deg"); - bandNames.AddValue("Phase angle at equipotential surface, deg"); - pdsLabel.DeleteObject("IMAGE"); - pdsLabel.AddObject(imageObject); + PvlKeyword &bandNames = imageObject.findKeyword("FILTER_NAME"); + bandNames.setName("BAND_NAME"); + bandNames.clear(); + bandNames.addValue("Latitude, planetocentric, deg N"); + bandNames.addValue("Longitude, planetocentric, deg E"); + bandNames.addValue("Incidence angle at equipotential surface, deg"); + bandNames.addValue("Emission angle at equipotential surface, deg"); + bandNames.addValue("Phase angle at equipotential surface, deg"); + pdsLabel.deleteObject("IMAGE"); + pdsLabel.addObject(imageObject); p.CheckStatus(); @@ -307,10 +307,10 @@ void IsisMain() { for(int i = 1 ; i <= 5 ; i++) { QString n(toString(i)); QString group = "SUBFRAME" + n + "_PARAMETERS"; - if(pdsLabel.HasGroup(group)) { - PvlGroup &grp = pdsLabel.FindGroup(group); - ValidateUnit(grp.FindKeyword("RETICLE_POINT_LATITUDE"), "DEG"); - ValidateUnit(grp.FindKeyword("RETICLE_POINT_LONGITUDE"), "DEG"); + if(pdsLabel.hasGroup(group)) { + PvlGroup &grp = pdsLabel.findGroup(group); + ValidateUnit(grp.findKeyword("RETICLE_POINT_LATITUDE"), "DEG"); + ValidateUnit(grp.findKeyword("RETICLE_POINT_LONGITUDE"), "DEG"); } } p.CheckStatus(); @@ -321,7 +321,7 @@ void IsisMain() { p.CheckStatus(); // All done...write result. - pdsLabel.SetFormatTemplate("$messenger/templates/labels/mdisPdsDDR.pft"); + pdsLabel.setFormatTemplate("$messenger/templates/labels/mdisPdsDDR.pft"); QString ofile(output.expanded()); ofstream outstream(ofile.toAscii().data()); processPds.OutputLabel(outstream); diff --git a/isis/src/messenger/apps/mdisedrinfo/MdisEdrKeys.h b/isis/src/messenger/apps/mdisedrinfo/MdisEdrKeys.h index b647d70fcd7a58d1ecdecff9a02dd136166686c7..7ecc54b0a3ef42268bc0048820800aa2a4127ede 100644 --- a/isis/src/messenger/apps/mdisedrinfo/MdisEdrKeys.h +++ b/isis/src/messenger/apps/mdisedrinfo/MdisEdrKeys.h @@ -122,7 +122,7 @@ namespace Isis { */ void add(const PvlKeyword &key, const QString &name = "") { if(name.isEmpty()) { - _keys.add(key.Name(), key); + _keys.add(key.name(), key); } else { _keys.add(name, key); @@ -217,20 +217,20 @@ namespace Isis { keyname = keyname.trimmed(); try { PvlKeyword &key = _keys.get(keyname); - if(group) group->AddKeyword(key); - if((key.Size() == 0) || (key.IsNull())) { + if(group) group->addKeyword(key); + if((key.size() == 0) || (key.isNull())) { out << loopSep << "NULL"; } - else if(key.Size() == 1) { - out << loopSep << key[0] << formatUnit(key.Unit(0)); + else if(key.size() == 1) { + out << loopSep << key[0] << formatUnit(key.unit(0)); } else { out << loopSep << "("; QString vsep(""); - for(int iv = 0 ; iv < key.Size() ; iv++) { + for(int iv = 0 ; iv < key.size() ; iv++) { out << vsep << key[iv]; if(key[iv] != NAstr) { - out << formatUnit(key.Unit(iv)); + out << formatUnit(key.unit(iv)); } vsep = ","; } @@ -274,11 +274,11 @@ namespace Isis { const QString prefix = "") { QString prekey(prefix); if(!prefix.isEmpty()) prekey += "/"; - PvlContainer::PvlKeywordIterator keyIter = p.Begin(); - for(; keyIter != p.End() ; ++keyIter) { - QString keyname = prefix + keyIter->Name(); + PvlContainer::PvlKeywordIterator keyIter = p.begin(); + for(; keyIter != p.end() ; ++keyIter) { + QString keyname = prefix + keyIter->name(); PvlKeyword key = *keyIter; - key.SetName(keyname); + key.setName(keyname); keys.add(keyname, key); } return; @@ -294,8 +294,8 @@ namespace Isis { * @param keys Container to add the group keywords to */ void LoadGroups(PvlObject &obj, KeyList &keys) { - PvlObject::PvlGroupIterator current = obj.BeginGroup(); - for(; current != obj.EndGroup() ; ++current) { + PvlObject::PvlGroupIterator current = obj.beginGroup(); + for(; current != obj.endGroup() ; ++current) { MapKeys(*current, keys); } return; @@ -317,13 +317,13 @@ namespace Isis { // Now load all the rest of the object keywords ingnoring // all SUBFRAME[12345]_PARAMETERS since they are unsupported. - PvlObject::PvlObjectIterator objIter = obj.BeginObject(); - for(; objIter != obj.EndObject() ; ++objIter) { - QString objname(objIter->Name()); + PvlObject::PvlObjectIterator objIter = obj.beginObject(); + for(; objIter != obj.endObject() ; ++objIter) { + QString objname(objIter->name()); objname = objname.toUpper(); int gotSubframe = objname.indexOf("SUBFRAME"); if(gotSubframe != -1) { - LoadKeys(*objIter, keys, objIter->Name()); + LoadKeys(*objIter, keys, objIter->name()); } else { LoadKeys(*objIter, keys); diff --git a/isis/src/messenger/apps/mdisedrinfo/MdisGeometry.cpp b/isis/src/messenger/apps/mdisedrinfo/MdisGeometry.cpp index 95bd6a1e2fcc11ac690358adc3a7904813d29c65..55a0da9731b0af3160d558fa2525d4c30a2bea8a 100644 --- a/isis/src/messenger/apps/mdisedrinfo/MdisGeometry.cpp +++ b/isis/src/messenger/apps/mdisedrinfo/MdisGeometry.cpp @@ -111,14 +111,14 @@ namespace Isis { naif.add("$base/kernels/pck/pck?????.tpc"); // Get the target and check for validity - PvlKeyword &target = label.FindKeyword("TargetName", PvlObject::Traverse); + PvlKeyword &target = label.findKeyword("TargetName", PvlObject::Traverse); SpiceInt tcode; SpiceBoolean found; (void) bodn2c_c(target[0].toAscii().data(), &tcode, &found); if(found) return (true); if(makeValid) { - target.SetValue("Sky"); + target.setValue("Sky"); } return (false); } @@ -283,7 +283,7 @@ namespace Isis { void MdisGeometry::init(Cube &cube) { _label = *cube.label(); _orglabel = OriginalLabel(cube.fileName()).ReturnLabels(); - _nSubframes = (int) _orglabel.FindKeyword("MESS:SUBFRAME", + _nSubframes = (int) _orglabel.findKeyword("MESS:SUBFRAME", PvlObject::Traverse); _camera = CameraFactory::Create(_label); _digitsPrecision = _defaultDigits; @@ -664,13 +664,13 @@ namespace Isis { else { // It does exist, extract coordinates from original image label QString n(toString(frameno)); - sample = (double) _orglabel.FindKeyword("MESS:SUBF_X" + n, + sample = (double) _orglabel.findKeyword("MESS:SUBF_X" + n, PvlObject::Traverse); - line = (double) _orglabel.FindKeyword("MESS:SUBF_Y" + n, + line = (double) _orglabel.findKeyword("MESS:SUBF_Y" + n, PvlObject::Traverse); - width = (double) _orglabel.FindKeyword("MESS:SUBF_DX" + n, + width = (double) _orglabel.findKeyword("MESS:SUBF_DX" + n, PvlObject::Traverse); - height = (double) _orglabel.FindKeyword("MESS:SUBF_DY" + n, + height = (double) _orglabel.findKeyword("MESS:SUBF_DY" + n, PvlObject::Traverse); } @@ -743,10 +743,10 @@ namespace Isis { (void) sce2c_c(scCode, rotate->EphemerisTime(), &sclkdp); // Determine instrument ID (inst) - PvlKeyword &key = _label.FindKeyword("NaifIkCode", PvlObject::Traverse); + PvlKeyword &key = _label.findKeyword("NaifIkCode", PvlObject::Traverse); SpiceInt inst = (int) key; IString iCode((int) inst); - key = _label.FindKeyword("Number", PvlObject::Traverse); + key = _label.findKeyword("Number", PvlObject::Traverse); inst -= (int) key; // Get CK time tolerance (tol) @@ -840,7 +840,7 @@ namespace Isis { // dvf has units for mm/sec. Scale by pixel pitch and multiply // by exposure length to obtain smear - key = _label.FindKeyword("ExposureDuration", PvlObject::Traverse); + key = _label.findKeyword("ExposureDuration", PvlObject::Traverse); double explen = (double) key; // in milliseconds SpiceDouble smear[2]; @@ -1100,10 +1100,10 @@ namespace Isis { PvlKeyword key(name); for(unsigned int i = 0 ; i < values.size() ; i++) { if(IsSpecial(values[i])) { - key.AddValue(_NullDefault); + key.addValue(_NullDefault); } else { - key.AddValue(DoubleToString(values[i]), unit); + key.addValue(DoubleToString(values[i]), unit); } } return (key); @@ -1130,10 +1130,10 @@ namespace Isis { PvlKeyword key(name); for(unsigned int i = 0 ; i < values.size() ; i++) { if(values[i].empty()) { - key.AddValue(_NullDefault); + key.addValue(_NullDefault); } else { - key.AddValue(values[i].c_str(), unit); + key.addValue(values[i].c_str(), unit); } } return (key); @@ -1160,10 +1160,10 @@ namespace Isis { PvlKeyword key(name); for(unsigned int i = 0 ; i < values.size() ; i++) { if(values[i].isEmpty()) { - key.AddValue(_NullDefault); + key.addValue(_NullDefault); } else { - key.AddValue(values[i], unit); + key.addValue(values[i], unit); } } return (key); diff --git a/isis/src/messenger/apps/mdisedrinfo/SpiceManager.cpp b/isis/src/messenger/apps/mdisedrinfo/SpiceManager.cpp index fde7b8fc11289770ac809caef2306c39f722a0d1..e0ff9cb89d56ba4ab5d96400d8175b6c610c1085 100644 --- a/isis/src/messenger/apps/mdisedrinfo/SpiceManager.cpp +++ b/isis/src/messenger/apps/mdisedrinfo/SpiceManager.cpp @@ -88,13 +88,13 @@ namespace Isis { QString kernlist; // Get the kernel group and load main kernels - PvlGroup kernels = pvl.FindGroup("Kernels", Pvl::Traverse); + PvlGroup kernels = pvl.findGroup("Kernels", Pvl::Traverse); // Changed 2008-02-27 to load planetary ephemeris before spacecraft // since MESSENGER team may update planet data in the s/c SPK. loadKernelFromTable(kernels["TargetPosition"], "SunPosition", pvl); // Now do s/c ephemeris - if(kernels.HasKeyword("SpacecraftPosition")) { + if(kernels.hasKeyword("SpacecraftPosition")) { loadKernel(kernels["SpacecraftPosition"]); } else { @@ -102,7 +102,7 @@ namespace Isis { pvl); } - if(kernels.HasKeyword("SpacecraftPointing")) { + if(kernels.hasKeyword("SpacecraftPointing")) { loadKernel(kernels["SpacecraftPointing"]); } else { @@ -110,11 +110,11 @@ namespace Isis { pvl); } - if(kernels.HasKeyword("Frame")) { + if(kernels.hasKeyword("Frame")) { loadKernel(kernels["Frame"]); } - if(kernels.HasKeyword("Extra")) { + if(kernels.hasKeyword("Extra")) { loadKernel(kernels["Extra"]); } @@ -215,7 +215,7 @@ namespace Isis { * @see loadKernelFromTable() */ void SpiceManager::loadKernel(PvlKeyword &key) { - for(int i = 0; i < key.Size(); i++) { + for(int i = 0; i < key.size(); i++) { if(key[i] == "") continue; if(IString(key[i]).UpCase() == "NULL") continue; if(IString(key[i]).UpCase() == "NADIR") continue; @@ -249,11 +249,11 @@ namespace Isis { } else { PvlObject::PvlObjectIterator objIter; - for(objIter = pvl.BeginObject() ; objIter != pvl.EndObject() ; ++objIter) { - if(objIter->Name().toUpper() == "TABLE") { - if(objIter->HasKeyword("Name")) { - if(objIter->FindKeyword("Name")[0].toUpper() == tblname.toUpper()) { - loadKernel(objIter->FindKeyword("Kernels")); + for(objIter = pvl.beginObject() ; objIter != pvl.endObject() ; ++objIter) { + if(objIter->name().toUpper() == "TABLE") { + if(objIter->hasKeyword("Name")) { + if(objIter->findKeyword("Name")[0].toUpper() == tblname.toUpper()) { + loadKernel(objIter->findKeyword("Kernels")); return; } } diff --git a/isis/src/messenger/apps/mdisedrinfo/mdisedrinfo.cpp b/isis/src/messenger/apps/mdisedrinfo/mdisedrinfo.cpp index ceea92cc57e725399d60b3d4eb3fe9a9fbe80d08..83e545dd9e9e8e54cdfb5778eda06c5478149178 100644 --- a/isis/src/messenger/apps/mdisedrinfo/mdisedrinfo.cpp +++ b/isis/src/messenger/apps/mdisedrinfo/mdisedrinfo.cpp @@ -144,17 +144,17 @@ void IsisMain() { } } else { - PvlContainer::PvlKeywordIterator keyIter = geomkeys.Begin(); - for(; keyIter != geomkeys.End() ; ++keyIter) { - mdiskeys.AddKeyword(*keyIter); + PvlContainer::PvlKeywordIterator keyIter = geomkeys.begin(); + for(; keyIter != geomkeys.end() ; ++keyIter) { + mdiskeys.addKeyword(*keyIter); } } // See if the user wants to write out the PVL keywords if(!pvl.isEmpty()) { Pvl pout; - pout.AddGroup(mdiskeys); - pout.Write(pvl); + pout.addGroup(mdiskeys); + pout.write(pvl); } // Log the results to the log/terminal/gui diff --git a/isis/src/messenger/objs/MdisCamera/MdisCamera.cpp b/isis/src/messenger/objs/MdisCamera/MdisCamera.cpp index aca03cf90bb5aa12404ce33eeb3d50aae018137d..ce4bbb7136ca43c7a5abca784f747c30badd0777 100644 --- a/isis/src/messenger/objs/MdisCamera/MdisCamera.cpp +++ b/isis/src/messenger/objs/MdisCamera/MdisCamera.cpp @@ -66,7 +66,7 @@ namespace Isis { const int MdisWac(-236800); // const int MdisNac(-236820); - PvlGroup &inst = lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup &inst = lab.findGroup("Instrument", Pvl::Traverse); // Clarification on MDIS subframe image mode provides us the ability to // support this mode now. The entire MDIS frame is geometrically valid @@ -96,7 +96,7 @@ namespace Isis { // NAC and WAC support! int filterNumber(0); // Default appropriate for MDIS-NAC if(naifIkCode() == MdisWac) { - PvlGroup &bandBin = lab.FindGroup("BandBin", Pvl::Traverse); + PvlGroup &bandBin = lab.findGroup("BandBin", Pvl::Traverse); filterNumber = bandBin["Number"]; } @@ -318,7 +318,7 @@ namespace Isis { // Wrap a try clause all around this so that if it fails, will return // default try { - PvlGroup &inst = label.FindGroup("Instrument", Pvl::Traverse); + PvlGroup &inst = label.findGroup("Instrument", Pvl::Traverse); double fpTemp = inst["FocalPlaneTemperature"]; double fl(0.0); QString fptCoeffs = "INS" + filterCode + "_FL_TEMP_COEFFS"; diff --git a/isis/src/messenger/objs/MdisCamera/unitTest.cpp b/isis/src/messenger/objs/MdisCamera/unitTest.cpp index 27bf69e3fce78b2c815fe83c7a2c8210a6b993d0..7514fe79e78ed1a732b33ec04b6ee9138db099ef 100644 --- a/isis/src/messenger/objs/MdisCamera/unitTest.cpp +++ b/isis/src/messenger/objs/MdisCamera/unitTest.cpp @@ -53,7 +53,7 @@ int main(void) { //Pvl p("$mgs/testData/lub0428b.cub"); Pvl p("$messenger/testData/EW0089570936I.cub"); MdisCamera *cam = (MdisCamera *) CameraFactory::Create(p); - cout << "FileName: " << FileName(p.FileName()).name() << endl; + cout << "FileName: " << FileName(p.fileName()).name() << endl; cout << "CK Frame: " << cam->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); @@ -66,7 +66,7 @@ int main(void) { cout << "SPK Reference ID = " << cam->SpkReferenceId() << endl << endl; // Test Shutter Open/Close - const PvlGroup &inst = p.FindGroup("Instrument", Pvl::Traverse); + const PvlGroup &inst = p.findGroup("Instrument", Pvl::Traverse); double exposureDuration = ((double) inst["ExposureDuration"])/1000; QString stime = inst["StartTime"]; double et; // StartTime keyword is the center exposure time diff --git a/isis/src/mex/apps/hrsc2isis/hrsc2isis.cpp b/isis/src/mex/apps/hrsc2isis/hrsc2isis.cpp index 07c20660842c039da3b1ea26f167e9e8a7debd4a..7ef7c14ccffebd19afff815296a0425b8ca2dbba 100644 --- a/isis/src/mex/apps/hrsc2isis/hrsc2isis.cpp +++ b/isis/src/mex/apps/hrsc2isis/hrsc2isis.cpp @@ -89,7 +89,7 @@ void IsisMain() { Table timesTable("LineScanTimes", timesRecord); if(hasPrefix) { - p.SetDataPrefixBytes((int)label.FindObject("IMAGE")["LINE_PREFIX_BYTES"]); + p.SetDataPrefixBytes((int)label.findObject("IMAGE")["LINE_PREFIX_BYTES"]); p.SaveDataPrefix(); p.Progress()->SetText("Reading Prefix Data"); @@ -165,29 +165,29 @@ void IsisMain() { //p.TranslatePdsLabels (otherLabels); TranslateHrscLabels(label, otherLabels); - if(otherLabels.HasGroup("Mapping") && - (otherLabels.FindGroup("Mapping").Keywords() > 0)) { - outCube->putGroup(otherLabels.FindGroup("Mapping")); + if(otherLabels.hasGroup("Mapping") && + (otherLabels.findGroup("Mapping").keywords() > 0)) { + outCube->putGroup(otherLabels.findGroup("Mapping")); } - if(otherLabels.HasGroup("Instrument") && - (otherLabels.FindGroup("Instrument").Keywords() > 0)) { - outCube->putGroup(otherLabels.FindGroup("Instrument")); + if(otherLabels.hasGroup("Instrument") && + (otherLabels.findGroup("Instrument").keywords() > 0)) { + outCube->putGroup(otherLabels.findGroup("Instrument")); } - if(otherLabels.HasGroup("BandBin") && - (otherLabels.FindGroup("BandBin").Keywords() > 0)) { - outCube->putGroup(otherLabels.FindGroup("BandBin")); + if(otherLabels.hasGroup("BandBin") && + (otherLabels.findGroup("BandBin").keywords() > 0)) { + outCube->putGroup(otherLabels.findGroup("BandBin")); } - if(otherLabels.HasGroup("Archive") && - (otherLabels.FindGroup("Archive").Keywords() > 0)) { - outCube->putGroup(otherLabels.FindGroup("Archive")); + if(otherLabels.hasGroup("Archive") && + (otherLabels.findGroup("Archive").keywords() > 0)) { + outCube->putGroup(otherLabels.findGroup("Archive")); } - if(otherLabels.HasGroup("Kernels") && - (otherLabels.FindGroup("Kernels").Keywords() > 0)) { - outCube->putGroup(otherLabels.FindGroup("Kernels")); + if(otherLabels.hasGroup("Kernels") && + (otherLabels.findGroup("Kernels").keywords() > 0)) { + outCube->putGroup(otherLabels.findGroup("Kernels")); } p.EndProcess(); @@ -224,7 +224,7 @@ void WriteOutput(Isis::Buffer &buf) { void TranslateHrscLabels(Pvl &inLabels, Pvl &outLabel) { // Get the directory where the MRO HiRISE translation tables are. - PvlGroup dataDir(Preference::Preferences().FindGroup("DataDirectory")); + PvlGroup dataDir(Preference::Preferences().findGroup("DataDirectory")); QString transDir = (QString) dataDir["Mex"] + "/translations/"; // Translate the Instrument group @@ -232,21 +232,21 @@ void TranslateHrscLabels(Pvl &inLabels, Pvl &outLabel) { PvlTranslationManager instrumentXlater(inLabels, transFile.expanded()); instrumentXlater.Auto(outLabel); - if(inLabels.HasKeyword("MACROPIXEL_SIZE")) { - outLabel.FindGroup("Instrument", Pvl::Traverse) += PvlKeyword("Summing", inLabels["MACROPIXEL_SIZE"][0]); + if(inLabels.hasKeyword("MACROPIXEL_SIZE")) { + outLabel.findGroup("Instrument", Pvl::Traverse) += PvlKeyword("Summing", inLabels["MACROPIXEL_SIZE"][0]); } else { - outLabel.FindGroup("Instrument", Pvl::Traverse) += PvlKeyword("Summing", "1"); + outLabel.findGroup("Instrument", Pvl::Traverse) += PvlKeyword("Summing", "1"); } // Remove 'Z' from times - QString startTime = outLabel.FindGroup("Instrument", Pvl::Traverse)["StartTime"][0]; + QString startTime = outLabel.findGroup("Instrument", Pvl::Traverse)["StartTime"][0]; startTime = startTime.mid(0, startTime.size() - 1); - outLabel.FindGroup("Instrument", Pvl::Traverse)["StartTime"] = startTime; + outLabel.findGroup("Instrument", Pvl::Traverse)["StartTime"] = startTime; - QString stopTime = outLabel.FindGroup("Instrument", Pvl::Traverse)["StopTime"][0]; + QString stopTime = outLabel.findGroup("Instrument", Pvl::Traverse)["StopTime"][0]; stopTime = stopTime.mid(0, stopTime.size() - 1); - outLabel.FindGroup("Instrument", Pvl::Traverse)["StopTime"] = stopTime; + outLabel.findGroup("Instrument", Pvl::Traverse)["StopTime"] = stopTime; // Translate the BandBin group transFile = transDir + "hrscBandBin.trn"; @@ -271,7 +271,7 @@ void TranslateHrscLabels(Pvl &inLabels, Pvl &outLabel) { naifIkCodes.insert(std::pair("MEX_HRSC_S1", -41219)); naifIkCodes.insert(std::pair("MEX_HRSC_SRC", -41220)); - QString key = outLabel.FindGroup("Archive", Pvl::Traverse)["DetectorId"]; + QString key = outLabel.findGroup("Archive", Pvl::Traverse)["DetectorId"]; int ikCode = naifIkCodes[key]; if(ikCode < -41220 || ikCode > -41210) { @@ -283,5 +283,5 @@ void TranslateHrscLabels(Pvl &inLabels, Pvl &outLabel) { PvlGroup kerns("Kernels"); kerns += PvlKeyword("NaifIkCode", toString(ikCode)); - outLabel.AddGroup(kerns); + outLabel.addGroup(kerns); } diff --git a/isis/src/mex/objs/HrscCamera/HrscCamera.cpp b/isis/src/mex/objs/HrscCamera/HrscCamera.cpp index b1f8b907fdfe89f6c53e4d9e7715da0ab0d56cbd..278fcbf4b0425616a1f6dd247c5aa2a1871ab5f0 100644 --- a/isis/src/mex/objs/HrscCamera/HrscCamera.cpp +++ b/isis/src/mex/objs/HrscCamera/HrscCamera.cpp @@ -50,9 +50,9 @@ namespace Isis { instrumentRotation()->SetFrame(-41210); // Get required keywords from instrument group - PvlGroup &inst = lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup &inst = lab.findGroup("Instrument", Pvl::Traverse); - ReadLineRates(lab.FileName()); + ReadLineRates(lab.fileName()); // Setup detector map for transform of image pixels to detector position new VariableLineScanCameraDetectorMap(this, p_lineRates); diff --git a/isis/src/mex/objs/HrscCamera/unitTest.cpp b/isis/src/mex/objs/HrscCamera/unitTest.cpp index 338f19bc5c3e3bc67e383419bce109251418e75d..d50310ff82f8ed7171d7c1c6e4ab44209f9b0bff 100644 --- a/isis/src/mex/objs/HrscCamera/unitTest.cpp +++ b/isis/src/mex/objs/HrscCamera/unitTest.cpp @@ -61,7 +61,7 @@ int main(void) { Pvl p("$mex/testData/h2254_0000_s12.cub"); Camera *cam = CameraFactory::Create(p); - cout << "FileName: " << FileName(p.FileName()).name() << endl; + cout << "FileName: " << FileName(p.fileName()).name() << endl; cout << "CK Frame: " << cam->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); diff --git a/isis/src/mgs/apps/moc2isis/moc2isis.cpp b/isis/src/mgs/apps/moc2isis/moc2isis.cpp index c9a5aef4cd7cde61b89aa4bd6c31167a1e437bf3..c3ddb8600d7dad0ef729414c6dcf6c5b254cd1f5 100644 --- a/isis/src/mgs/apps/moc2isis/moc2isis.cpp +++ b/isis/src/mgs/apps/moc2isis/moc2isis.cpp @@ -30,8 +30,8 @@ void IsisMain() { try { Pvl lab(in.expanded()); id = (QString) lab["DATA_SET_ID"]; - if(lab.FindObject("IMAGE").HasKeyword("ENCODING_TYPE")) compressed = true; - projected = lab.HasObject("IMAGE_MAP_PROJECTION"); + if(lab.findObject("IMAGE").hasKeyword("ENCODING_TYPE")) compressed = true; + projected = lab.hasObject("IMAGE_MAP_PROJECTION"); } catch(IException &e) { QString msg = "Unable to read [DATA_SET_ID] from input file [" + @@ -95,7 +95,7 @@ void TranslateMocEdrLabels(FileName &labelFile, Cube *ocube) { QString startTime, productId, clockCount; // Get the directory where the MOC translation tables are. - PvlGroup &dataDir = Preference::Preferences().FindGroup("DataDirectory"); + PvlGroup &dataDir = Preference::Preferences().findGroup("DataDirectory"); // Transfer the instrument group to the output cube QString transDir = (QString) dataDir["Mgs"]; @@ -125,14 +125,14 @@ void TranslateMocEdrLabels(FileName &labelFile, Cube *ocube) { if(instrumentXlater.InputHasKeyword("StartTime")) { QString str = instrumentXlater.Translate("StartTime"); inst += PvlKeyword("StartTime", str); - // isisLab.AddKeyword ("StartTime", str+"Z"); + // isisLab.addKeyword ("StartTime", str+"Z"); startTime = str; } if(instrumentXlater.InputHasKeyword("StopTime")) { QString str = instrumentXlater.Translate("StopTime"); inst += PvlKeyword("StopTime", str); - // isisLab.AddKeyword ("StopTime", str+"Z"); + // isisLab.addKeyword ("StopTime", str+"Z"); } if(instrumentXlater.InputHasKeyword("CrosstrackSumming")) { diff --git a/isis/src/mgs/apps/moccal/moccal.cpp b/isis/src/mgs/apps/moccal/moccal.cpp index 4fd4e72dcca3b41e6c82d5589012dd93aa8c55fc..2b393d8a0b3e1bddab65c082f1da01f11282d5a1 100644 --- a/isis/src/mgs/apps/moccal/moccal.cpp +++ b/isis/src/mgs/apps/moccal/moccal.cpp @@ -109,7 +109,7 @@ void IsisMain() { else { camera = "NarrowAngleA"; } - PvlGroup &calCamera = calKernel.FindGroup(camera); + PvlGroup &calCamera = calKernel.findGroup(camera); // Get the camera specific calibration parameters from the kernel file // and load detector coefficients (gain/offsets at each pixel) @@ -163,8 +163,8 @@ void IsisMain() { calgrp += PvlKeyword("CoefficientFile", coefFile); calgrp += PvlKeyword("a", toString(gbl::a)); - calgrp["a"].AddComment("Radiometric equation in moccal"); - calgrp["a"].AddComment("r = (pixel - z + off) / a - g / ex - dc"); + calgrp["a"].addComment("Radiometric equation in moccal"); + calgrp["a"].addComment("r = (pixel - z + off) / a - g / ex - dc"); calgrp += PvlKeyword("off", toString(gbl::off)); calgrp += PvlKeyword("ex", toString(gbl::ex)); calgrp += PvlKeyword("z", toString(gbl::z)); @@ -172,7 +172,7 @@ void IsisMain() { calgrp += PvlKeyword("g", toString(gbl::g)); calgrp += PvlKeyword("w0", toString(gbl::w0)); - calgrp["w0"].AddComment("Reflectance = r * iof, where iof = (s * s) / w0"); + calgrp["w0"].addComment("Reflectance = r * iof, where iof = (s * s) / w0"); calgrp += PvlKeyword("s", toString(sunAU)); calgrp += PvlKeyword("iof", toString(gbl::iof)); diff --git a/isis/src/mgs/apps/mocproc/mocproc.cpp b/isis/src/mgs/apps/mocproc/mocproc.cpp index c726f4880fc57ce3415b5c8d516371fe34fce836..6aca4d6282e80fc9d14369a0e1d346620c838494 100644 --- a/isis/src/mgs/apps/mocproc/mocproc.cpp +++ b/isis/src/mgs/apps/mocproc/mocproc.cpp @@ -62,12 +62,12 @@ void IsisMain() { int summingMode = 0; bool isNarrowAngle = false; - if(inputPvl.HasKeyword("CROSSTRACK_SUMMING")) { + if(inputPvl.hasKeyword("CROSSTRACK_SUMMING")) { summingMode = inputPvl["CROSSTRACK_SUMMING"]; isNarrowAngle = ((QString)inputPvl["INSTRUMENT_ID"] == "MOC-NA"); } else { - PvlGroup &inst = inputPvl.FindGroup("Instrument", Pvl::Traverse); + PvlGroup &inst = inputPvl.findGroup("Instrument", Pvl::Traverse); summingMode = inst["CrosstrackSumming"]; isNarrowAngle = ((QString)inst["InstrumentId"] == "MOC-NA"); } @@ -94,7 +94,7 @@ void IsisMain() { } else if(ui.WasEntered("MAP")) { Pvl mapPvl(FileName(ui.GetFileName("MAP")).expanded()); - if(mapPvl.FindGroup("Mapping", Pvl::Traverse).HasKeyword("PixelResolution")) { + if(mapPvl.findGroup("Mapping", Pvl::Traverse).hasKeyword("PixelResolution")) { p.Application("cam2map").AddConstParameter("PIXRES", "MAP"); } } diff --git a/isis/src/mgs/objs/MocLabels/MocLabels.cpp b/isis/src/mgs/objs/MocLabels/MocLabels.cpp index 95f3259a97d1da0ed63648393f1e378c863b7714..437384311f4bf5e4572e7d61f8318ab3ef3e8580 100644 --- a/isis/src/mgs/objs/MocLabels/MocLabels.cpp +++ b/isis/src/mgs/objs/MocLabels/MocLabels.cpp @@ -54,7 +54,7 @@ namespace Isis { */ void MocLabels::ReadLabels(Pvl &lab) { // Get stuff out of the instrument group - PvlGroup &inst = lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup &inst = lab.findGroup("Instrument", Pvl::Traverse); p_instrumentId = (QString) inst["InstrumentId"]; p_startingSample = inst["FirstLineSample"]; p_crosstrackSumming = inst["CrosstrackSumming"]; @@ -63,7 +63,7 @@ namespace Isis { p_focalPlaneTemp = inst["FocalPlaneTemperature"]; p_clockCount = (QString) inst["SpacecraftClockCount"]; p_orbitNumber = 0; - if(inst.HasKeyword("OrbitNumber")) { + if(inst.hasKeyword("OrbitNumber")) { p_orbitNumber = inst["OrbitNumber"]; } p_gainModeId = (QString) inst["GainModeId"]; @@ -72,13 +72,13 @@ namespace Isis { // Get stuff out of the archive group p_dataQuality = "Unknown"; - PvlGroup &arch = lab.FindGroup("Archive", Pvl::Traverse); - if(arch.HasKeyword("DataQualityDesc")) { + PvlGroup &arch = lab.findGroup("Archive", Pvl::Traverse); + if(arch.hasKeyword("DataQualityDesc")) { p_dataQuality = (QString) arch["DataQualityDesc"]; } // Get Stuff out of the band bind group - PvlGroup &bandBin = lab.FindGroup("BandBin", Pvl::Traverse); + PvlGroup &bandBin = lab.findGroup("BandBin", Pvl::Traverse); p_filter = (QString) bandBin["FilterName"]; // Get the number of samples in the initial cube as it may have been @@ -88,7 +88,7 @@ namespace Isis { p_nl = a.AlphaLines(); // Get the two kernels for time computations - PvlGroup &kerns = lab.FindGroup("Kernels", Pvl::Traverse); + PvlGroup &kerns = lab.findGroup("Kernels", Pvl::Traverse); p_lsk = FileName(kerns["LeapSecond"][0]); p_sclk = FileName(kerns["SpacecraftClock"][0]); } diff --git a/isis/src/mgs/objs/MocNarrowAngleCamera/MocNarrowAngleCamera.cpp b/isis/src/mgs/objs/MocNarrowAngleCamera/MocNarrowAngleCamera.cpp index eda91b70c3240276dfb19b171eb740b91fa2eb4a..f4e8a91d6ac0bfe02c7ba841409e2d44b9e06700 100644 --- a/isis/src/mgs/objs/MocNarrowAngleCamera/MocNarrowAngleCamera.cpp +++ b/isis/src/mgs/objs/MocNarrowAngleCamera/MocNarrowAngleCamera.cpp @@ -48,7 +48,7 @@ namespace Isis { instrumentRotation()->SetTimeBias(-1.15); // Get the start time from labels - PvlGroup &inst = lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup &inst = lab.findGroup("Instrument", Pvl::Traverse); QString stime = inst["SpacecraftClockCount"]; double etStart = getClockTime(stime).Et(); diff --git a/isis/src/mgs/objs/MocNarrowAngleCamera/unitTest.cpp b/isis/src/mgs/objs/MocNarrowAngleCamera/unitTest.cpp index b93ad8129d283255e020c13d3669f0eb965dde05..df7cfdad08275229e3503cd0b59cb74b5a693701 100644 --- a/isis/src/mgs/objs/MocNarrowAngleCamera/unitTest.cpp +++ b/isis/src/mgs/objs/MocNarrowAngleCamera/unitTest.cpp @@ -73,7 +73,7 @@ int main(void) { Pvl p("$mgs/testData/fha00491.lev1.cub"); Camera *cam = CameraFactory::Create(p); - cout << "FileName: " << FileName(p.FileName()).name() << endl; + cout << "FileName: " << FileName(p.fileName()).name() << endl; cout << "CK Frame: " << cam->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); diff --git a/isis/src/mgs/objs/MocWideAngleCamera/MocWideAngleCamera.cpp b/isis/src/mgs/objs/MocWideAngleCamera/MocWideAngleCamera.cpp index 16ba4c7f2487757df21511d596e53e82425da77f..754b57613ceb1517f53655fb0acfc0aa465cc012 100644 --- a/isis/src/mgs/objs/MocWideAngleCamera/MocWideAngleCamera.cpp +++ b/isis/src/mgs/objs/MocWideAngleCamera/MocWideAngleCamera.cpp @@ -65,7 +65,7 @@ namespace Isis { instrumentRotation()->SetTimeBias(-1.15); // Get the start time from labels - PvlGroup &inst = lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup &inst = lab.findGroup("Instrument", Pvl::Traverse); QString stime = inst["SpacecraftClockCount"]; double etStart = getClockTime(stime).Et(); diff --git a/isis/src/mgs/objs/MocWideAngleCamera/unitTest.cpp b/isis/src/mgs/objs/MocWideAngleCamera/unitTest.cpp index 4fdf69885e37caa9cb9a91ddae9c3ae6481b3cee..96089a2d661336ed8d3ea2f63b70ac490bc92d7b 100644 --- a/isis/src/mgs/objs/MocWideAngleCamera/unitTest.cpp +++ b/isis/src/mgs/objs/MocWideAngleCamera/unitTest.cpp @@ -64,7 +64,7 @@ int main(void) { Pvl p("$mgs/testData/ab102401.cub"); Camera *cam = CameraFactory::Create(p); - cout << "FileName: " << FileName(p.FileName()).name() << endl; + cout << "FileName: " << FileName(p.fileName()).name() << endl; cout << "CK Frame: " << cam->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); diff --git a/isis/src/mro/apps/crism2isis/crism2isis.cpp b/isis/src/mro/apps/crism2isis/crism2isis.cpp index 1635028bd38857b7881d9a6935cf8c8b988a1f63..4479487eb44925616b0c3384297aaf42e114cce1 100644 --- a/isis/src/mro/apps/crism2isis/crism2isis.cpp +++ b/isis/src/mro/apps/crism2isis/crism2isis.cpp @@ -27,8 +27,8 @@ void IsisMain() { QString prodType; - if (labelPvl.HasKeyword("PRODUCT_TYPE")) { - prodType = (QString)labelPvl.FindKeyword("PRODUCT_TYPE"); + if (labelPvl.hasKeyword("PRODUCT_TYPE")) { + prodType = (QString)labelPvl.findKeyword("PRODUCT_TYPE"); } else { QString msg = "Unsupported CRISM file type, supported types are: DDR, MRDR, and TRDR"; @@ -37,8 +37,8 @@ void IsisMain() { if (prodType.toUpper() == "MAP_PROJECTED_MULTISPECTRAL_RDR") { QString prodId; - if (labelPvl.HasKeyword("PRODUCT_ID")) { - prodId = (QString)labelPvl.FindKeyword("PRODUCT_ID"); + if (labelPvl.hasKeyword("PRODUCT_ID")) { + prodId = (QString)labelPvl.findKeyword("PRODUCT_ID"); prodId = prodId.mid(prodId.indexOf("_") + 1, prodId.indexOf("_")); } else { @@ -51,11 +51,11 @@ void IsisMain() { //widths in the band bin group if (prodId.toUpper() == "MRRAL" || prodId.toUpper() == "MRRIF") { //If the wavelength file is specified in the label - if (labelPvl.HasKeyword("MRO:WAVELENGTH_FILE_NAME")) { + if (labelPvl.hasKeyword("MRO:WAVELENGTH_FILE_NAME")) { PvlGroup bandBin = PvlGroup("BandBin"); PvlKeyword origBand = PvlKeyword("OriginalBand"); PvlKeyword widths = PvlKeyword("Width"); - QString tablePath = (QString)labelPvl.FindKeyword("MRO:WAVELENGTH_FILE_NAME"); + QString tablePath = (QString)labelPvl.findKeyword("MRO:WAVELENGTH_FILE_NAME"); tablePath = tablePath.toLower(); FileName tableFile(inFile.path() + "/" + tablePath); //Check if the wavelength file exists @@ -81,8 +81,8 @@ void IsisMain() { } delete fin; - bandBin.AddKeyword(origBand); - bandBin.AddKeyword(widths); + bandBin.addKeyword(origBand); + bandBin.addKeyword(widths); ocube->putGroup(bandBin); } //Otherwise throw an error @@ -99,18 +99,18 @@ void IsisMain() { PvlGroup bandBin = PvlGroup("BandBin"); PvlKeyword origBand = PvlKeyword("OriginalBand"); PvlKeyword bandName = PvlKeyword("BandName"); - PvlKeyword bandNames = labelPvl.FindObject("IMAGE").FindKeyword("BAND_NAME"); - for (int i = 0; i < bandNames.Size(); i++) { + PvlKeyword bandNames = labelPvl.findObject("IMAGE").findKeyword("BAND_NAME"); + for (int i = 0; i < bandNames.size(); i++) { origBand += toString(i + 1); bandName += bandNames[i]; } - bandBin.AddKeyword(origBand); - bandBin.AddKeyword(bandName); + bandBin.addKeyword(origBand); + bandBin.addKeyword(bandName); ocube->putGroup(bandBin); } //Translate the Mapping group p.TranslatePdsProjection(outLabel); - ocube->putGroup(outLabel.FindGroup("Mapping", Pvl::Traverse)); + ocube->putGroup(outLabel.findGroup("Mapping", Pvl::Traverse)); } else if (prodType.toUpper() == "TARGETED_RDR") { } @@ -118,13 +118,13 @@ void IsisMain() { PvlGroup bandBin = PvlGroup("BandBin"); PvlKeyword origBand = PvlKeyword("OriginalBand"); PvlKeyword bandName = PvlKeyword("BandName"); - PvlKeyword bandNames = labelPvl.FindObject("FILE").FindObject("IMAGE").FindKeyword("BAND_NAME"); - for (int i = 0; i < bandNames.Size(); i++) { + PvlKeyword bandNames = labelPvl.findObject("FILE").findObject("IMAGE").findKeyword("BAND_NAME"); + for (int i = 0; i < bandNames.size(); i++) { origBand += toString(i + 1); bandName += bandNames[i]; } - bandBin.AddKeyword(origBand); - bandBin.AddKeyword(bandName); + bandBin.addKeyword(origBand); + bandBin.addKeyword(bandName); ocube->putGroup(bandBin); } else { @@ -142,8 +142,8 @@ void IsisMain() { PvlTranslationManager archiveXlater(labelPvl, transFile.expanded()); archiveXlater.Auto(outLabel); - ocube->putGroup(outLabel.FindGroup("Instrument", Pvl::Traverse)); - ocube->putGroup(outLabel.FindGroup("Archive", Pvl::Traverse)); + ocube->putGroup(outLabel.findGroup("Instrument", Pvl::Traverse)); + ocube->putGroup(outLabel.findGroup("Archive", Pvl::Traverse)); p.StartProcess(); p.EndProcess(); diff --git a/isis/src/mro/apps/ctxcal/ctxcal.cpp b/isis/src/mro/apps/ctxcal/ctxcal.cpp index 9bef4c27d1e1a7d9948b24e599aadc556de934c1..f41f928a67b1db7efbb60b534a856f2c06e27595 100644 --- a/isis/src/mro/apps/ctxcal/ctxcal.cpp +++ b/isis/src/mro/apps/ctxcal/ctxcal.cpp @@ -36,7 +36,7 @@ void IsisMain() { Isis::Pvl lab(ui.GetFileName("FROM")); Isis::PvlGroup &inst = - lab.FindGroup("Instrument", Pvl::Traverse); + lab.findGroup("Instrument", Pvl::Traverse); QString instId = inst["InstrumentId"]; if(instId != "CTX") { diff --git a/isis/src/mro/apps/ctxevenodd/ctxevenodd.cpp b/isis/src/mro/apps/ctxevenodd/ctxevenodd.cpp index 409bd29c405801f11fb733985a6f0413f79cca3e..d8745a03e3ee7cf409f4484ed529b85570c508e7 100644 --- a/isis/src/mro/apps/ctxevenodd/ctxevenodd.cpp +++ b/isis/src/mro/apps/ctxevenodd/ctxevenodd.cpp @@ -35,7 +35,7 @@ void IsisMain() { UserInterface &ui = Application::GetUserInterface(); Isis::Pvl lab(ui.GetFileName("FROM")); Isis::PvlGroup &inst = - lab.FindGroup("Instrument", Pvl::Traverse); + lab.findGroup("Instrument", Pvl::Traverse); QString instId = inst["InstrumentId"]; if(instId != "CTX") { diff --git a/isis/src/mro/apps/hi2isis/hi2isis.cpp b/isis/src/mro/apps/hi2isis/hi2isis.cpp index 6d4ecdfbc55631a0340d57193323b87328faa5dd..36a582421447ffa54c68be0717eababa936e4fea 100644 --- a/isis/src/mro/apps/hi2isis/hi2isis.cpp +++ b/isis/src/mro/apps/hi2isis/hi2isis.cpp @@ -68,8 +68,8 @@ void IsisMain() { bool projected; try { Pvl lab(inFile.expanded()); - id = (QString) lab.FindKeyword("DATA_SET_ID"); - projected = lab.HasObject("IMAGE_MAP_PROJECTION"); + id = (QString) lab.findKeyword("DATA_SET_ID"); + projected = lab.hasObject("IMAGE_MAP_PROJECTION"); } catch(IException &e) { QString msg = "Unable to read [DATA_SET_ID] from input file [" + @@ -123,26 +123,26 @@ void IsisMain() { // Set up the Stretch object with the info from the lookup table // If the first entry is (0,0) then no lut was applied. - if((lutKey.IsNull()) || + if((lutKey.isNull()) || (lutSeq.Size() == 1 && lutSeq[0][0] == "0" && lutSeq[0][1] == "0")) { stretch.AddPair(0.0, 0.0); stretch.AddPair(65536.0, 65536.0); - instgrp.AddKeyword(PvlKeyword("Unlutted", "TRUE")); - instgrp.DeleteKeyword("LookupTable"); + instgrp.addKeyword(PvlKeyword("Unlutted", "TRUE")); + instgrp.deleteKeyword("LookupTable"); } // The user wants it unlutted else if(ui.GetBoolean("UNLUT")) { for(int i = 0; i < lutSeq.Size(); i++) { stretch.AddPair(i, ((toDouble(lutSeq[i][0]) + toDouble(lutSeq[i][1])) / 2.0)); } - instgrp.AddKeyword(PvlKeyword("Unlutted", "TRUE")); - instgrp.DeleteKeyword("LookupTable"); + instgrp.addKeyword(PvlKeyword("Unlutted", "TRUE")); + instgrp.deleteKeyword("LookupTable"); } // The user does not want the data unlutted else { stretch.AddPair(0.0, 0.0); stretch.AddPair(65536.0, 65536.0); - instgrp.AddKeyword(PvlKeyword("Unlutted", "FALSE")); + instgrp.addKeyword(PvlKeyword("Unlutted", "FALSE")); } // Save the calibration and ancillary data as BLOBs. Both get run thru the @@ -231,7 +231,7 @@ void TranslateHiriseEdrLabels(FileName &labelFile, Cube *ocube) { Pvl outLabel; // Get the directory where the MRO HiRISE translation tables are. - PvlGroup dataDir(Preference::Preferences().FindGroup("DataDirectory")); + PvlGroup dataDir(Preference::Preferences().findGroup("DataDirectory")); QString transDir = (QString) dataDir["Mro"] + "/translations/"; // Get a filename for the HiRISE EDR label @@ -254,12 +254,12 @@ void TranslateHiriseEdrLabels(FileName &labelFile, Cube *ocube) { // Create the Instrument group keyword CcdId from the ProductId // SCS 28-03-06 Do it in the instrument translation table instead of here -// PvlGroup &archiveGroup(outLabel.FindGroup("Archive", Pvl::Traverse)); -// QString productId = (QString)archiveGroup.FindKeyword("ProductId"); +// PvlGroup &archiveGroup(outLabel.findGroup("Archive", Pvl::Traverse)); +// QString productId = (QString)archiveGroup.findKeyword("ProductId"); // productId.Token("_"); // productId.Token("_"); // productId = productId.Token("_"); -// outLabel.FindGroup("Instrument", Pvl::Traverse) += +// outLabel.findGroup("Instrument", Pvl::Traverse) += // PvlKeyword ("CcdId", productId); // Create the Kernel Group @@ -268,9 +268,9 @@ void TranslateHiriseEdrLabels(FileName &labelFile, Cube *ocube) { // Write the Instrument, BandBin, Archive, and Kernels groups to the output // cube label - ocube->putGroup(outLabel.FindGroup("Instrument", Pvl::Traverse)); - ocube->putGroup(outLabel.FindGroup("BandBin", Pvl::Traverse)); - ocube->putGroup(outLabel.FindGroup("Archive", Pvl::Traverse)); + ocube->putGroup(outLabel.findGroup("Instrument", Pvl::Traverse)); + ocube->putGroup(outLabel.findGroup("BandBin", Pvl::Traverse)); + ocube->putGroup(outLabel.findGroup("Archive", Pvl::Traverse)); ocube->putGroup(kerns); } diff --git a/isis/src/mro/apps/hi2isis/hiCalibration.cpp b/isis/src/mro/apps/hi2isis/hiCalibration.cpp index d5766fb9d89acf2fa9f39f36fe9cb340fa42c41b..35f6480cf8ef9009657bf38775d302a11e1f6c96 100644 --- a/isis/src/mro/apps/hi2isis/hiCalibration.cpp +++ b/isis/src/mro/apps/hi2isis/hiCalibration.cpp @@ -55,7 +55,7 @@ void SaveHiriseCalibrationData(ProcessImportPds &process, Cube *ocube, // Get the number of lines in the calibration area. This includes the // calibration, mask and ramp lines - int calsize = (int)(pdsLabel.FindObject("CALIBRATION_IMAGE")["LINES"]); + int calsize = (int)(pdsLabel.findObject("CALIBRATION_IMAGE")["LINES"]); // Loop through the calibration lines and extract the info needed for the // tables. diff --git a/isis/src/mro/apps/hical/HiCalConf.cpp b/isis/src/mro/apps/hical/HiCalConf.cpp index 1d73c5e51a5e6832d98aa7117a401210b5dba483..0e9fecbfca65c55c9486ec0eb378e1079e69b822 100644 --- a/isis/src/mro/apps/hical/HiCalConf.cpp +++ b/isis/src/mro/apps/hical/HiCalConf.cpp @@ -70,7 +70,7 @@ bool HiCalConf::_naifLoaded = false; * @param conf Name of configuration file to use */ HiCalConf::HiCalConf(Pvl &label, const QString &conf) : - DbAccess(Pvl(filepath(conf)).FindObject("Hical", PvlObject::Traverse)) { + DbAccess(Pvl(filepath(conf)).findObject("Hical", PvlObject::Traverse)) { _profName.clear(); init(label); } @@ -121,7 +121,7 @@ bool HiCalConf::_naifLoaded = false; * @param conf Name of configuration file to use */ void HiCalConf::setConf(const QString &conf) { - load(Pvl(filepath(conf)).FindObject("Hical", PvlObject::Traverse)); + load(Pvl(filepath(conf)).findObject("Hical", PvlObject::Traverse)); } /** @@ -431,7 +431,7 @@ void HiCalConf::loadNaifTiming( ) { * @brief Intialization of object variables */ void HiCalConf::init() { - _label.Clear(); + _label.clear(); return; } @@ -464,11 +464,11 @@ void HiCalConf::init(Pvl &label) { PvlKeyword &HiCalConf::getKey(const QString &key, const QString &group) { if (!group.isEmpty()) { - PvlGroup &grp = _label.FindGroup(group, Pvl::Traverse); + PvlGroup &grp = _label.findGroup(group, Pvl::Traverse); return (grp[key]); } else { - return (_label.FindKeyword(key)); + return (_label.findKeyword(key)); } } @@ -528,7 +528,7 @@ DbProfile HiCalConf::getLabelProfile(const DbProfile &profile) const { Pvl label = _label; for ( int g = 0 ; g < ngroups ; g++ ) { QString group = profile("LabelGroups", g); - PvlGroup grp = label.FindGroup(group, Pvl::Traverse); + PvlGroup grp = label.findGroup(group, Pvl::Traverse); lblprof = DbProfile(lblprof,DbProfile(grp)); } } @@ -540,7 +540,7 @@ int HiCalConf::getChannelIndex(const int &ccd, const int &channel) const { } DbProfile HiCalConf::makeParameters(Pvl &label) const { - PvlGroup inst = label.FindGroup("Instrument", Pvl::Traverse); + PvlGroup inst = label.findGroup("Instrument", Pvl::Traverse); DbProfile parms("Parameters"); int ccd = CpmmToCcd((int) inst["CpmmNumber"]); diff --git a/isis/src/mro/apps/hical/HiCalTypes.h b/isis/src/mro/apps/hical/HiCalTypes.h index 9b99025987c4ce565812ad9fda4458960ee094c2..04e17cbc2a2a8e211f8f99fc2f7f6271d4943679 100644 --- a/isis/src/mro/apps/hical/HiCalTypes.h +++ b/isis/src/mro/apps/hical/HiCalTypes.h @@ -83,7 +83,7 @@ class HiHistory { PvlKeyword makekey(const QString &name = "History") const { PvlKeyword key(name); for (unsigned int i = 0 ; i < _events.size() ; i++) { - key.AddValue(_events[i]); + key.addValue(_events[i]); } return (key); } diff --git a/isis/src/mro/apps/hical/HiCalUtil.h b/isis/src/mro/apps/hical/HiCalUtil.h index 2b7275f483c35eea81398d8f70e2f2ade57bdc0c..313496f1475ba20dee236076995ea887b9890775 100644 --- a/isis/src/mro/apps/hical/HiCalUtil.h +++ b/isis/src/mro/apps/hical/HiCalUtil.h @@ -461,13 +461,13 @@ inline HiVector rebin(const HiVector &v, int n) { * blobs */ inline void RemoveHiBlobs(Pvl &label) { - for ( int blob = 0 ; blob < label.Objects() ; blob++ ) { - if ( label.Object(blob).IsNamed("Table") ) { - QString name = label.Object(blob)["Name"][0]; + for ( int blob = 0 ; blob < label.objects() ; blob++ ) { + if ( label.object(blob).isNamed("Table") ) { + QString name = label.object(blob)["Name"][0]; if ( name.toLower() == "hirise calibration ancillary" || name.toLower() == "hirise calibration image" || name.toLower() == "hirise ancillary" ) { - label.DeleteObject(blob); + label.deleteObject(blob); blob--; } } diff --git a/isis/src/mro/apps/hical/ZeroReverse.h b/isis/src/mro/apps/hical/ZeroReverse.h index b9e46001b0bce5aed7426ef03ce139be4abbc91a..7fe974a8ab4b80007b787bef4715d6b5f9eb58d9 100644 --- a/isis/src/mro/apps/hical/ZeroReverse.h +++ b/isis/src/mro/apps/hical/ZeroReverse.h @@ -123,7 +123,7 @@ namespace Isis { "],HisPixels["+ToString(_stats.HisPixels()) + "],NulPixels["+ToString(_stats.NullPixels())+ "])"); - DbAccess triggers(Pvl(tfile).FindObject("ReverseClockStatistics")); + DbAccess triggers(Pvl(tfile).findObject("ReverseClockStatistics")); QString tprofName = conf.resolve("{FILTER}{CCD}_{CHANNEL}_{BIN}",prof); _history.add("ReverseClockStatistics(File["+tfile+ "],Profile["+tprofName+"])"); diff --git a/isis/src/mro/apps/hical/hical.cpp b/isis/src/mro/apps/hical/hical.cpp index 6efa4f81e489f7581dc19a6535cb55f3458ae50f..e7c04bd859df2af436984703b08b97a4dfbdf0df 100644 --- a/isis/src/mro/apps/hical/hical.cpp +++ b/isis/src/mro/apps/hical/hical.cpp @@ -445,12 +445,12 @@ void IsisMain(){ rcal += PvlKeyword("Revision",hical_revision); PvlKeyword key("Conf", conf_file); - key.AddCommentWrapped("/* " + hical_program + " application equation */"); - key.AddComment("/* hdn = idn - ZeroBufferFit(ZeroBufferSmooth) */"); - key.AddComment("/* - ZeroReverse - ZeroDark */"); - key.AddComment("/* odn = hdn / GainLineDrift * GainNonLinearity */"); - key.AddComment("/* * GainChannelNormalize * GainFlatField */"); - key.AddComment("/* * GainTemperature / GainUnitConversion */"); + key.addCommentWrapped("/* " + hical_program + " application equation */"); + key.addComment("/* hdn = idn - ZeroBufferFit(ZeroBufferSmooth) */"); + key.addComment("/* - ZeroReverse - ZeroDark */"); + key.addComment("/* odn = hdn / GainLineDrift * GainNonLinearity */"); + key.addComment("/* * GainChannelNormalize * GainFlatField */"); + key.addComment("/* * GainTemperature / GainUnitConversion */"); rcal += key; // Record parameter generation history. Controllable in configuration diff --git a/isis/src/mro/apps/hicalbeta/HiCalConf.cpp b/isis/src/mro/apps/hicalbeta/HiCalConf.cpp index a22816dcf78594baac1b19541046dbe2c176d0e6..6dc38dd169aff5fa7d05f76075cbaf94154341b9 100644 --- a/isis/src/mro/apps/hicalbeta/HiCalConf.cpp +++ b/isis/src/mro/apps/hicalbeta/HiCalConf.cpp @@ -70,7 +70,7 @@ bool HiCalConf::_naifLoaded = false; * @param conf Name of configuration file to use */ HiCalConf::HiCalConf(Pvl &label, const QString &conf) : - DbAccess(Pvl(filepath(conf)).FindObject("Hical", PvlObject::Traverse)) { + DbAccess(Pvl(filepath(conf)).findObject("Hical", PvlObject::Traverse)) { _profName.clear(); init(label); } @@ -121,7 +121,7 @@ bool HiCalConf::_naifLoaded = false; * @param conf Name of configuration file to use */ void HiCalConf::setConf(const QString &conf) { - load(Pvl(filepath(conf)).FindObject("Hical", PvlObject::Traverse)); + load(Pvl(filepath(conf)).findObject("Hical", PvlObject::Traverse)); } /** @@ -431,7 +431,7 @@ void HiCalConf::loadNaifTiming( ) { * @brief Intialization of object variables */ void HiCalConf::init() { - _label.Clear(); + _label.clear(); return; } @@ -464,11 +464,11 @@ void HiCalConf::init(Pvl &label) { PvlKeyword &HiCalConf::getKey(const QString &key, const QString &group) { if (!group.isEmpty()) { - PvlGroup &grp = _label.FindGroup(group, Pvl::Traverse); + PvlGroup &grp = _label.findGroup(group, Pvl::Traverse); return (grp[key]); } else { - return (_label.FindKeyword(key)); + return (_label.findKeyword(key)); } } @@ -528,7 +528,7 @@ DbProfile HiCalConf::getLabelProfile(const DbProfile &profile) const { Pvl label = _label; for ( int g = 0 ; g < ngroups ; g++ ) { QString group = profile("LabelGroups", g); - PvlGroup grp = label.FindGroup(group, Pvl::Traverse); + PvlGroup grp = label.findGroup(group, Pvl::Traverse); lblprof = DbProfile(lblprof,DbProfile(grp)); } } @@ -540,7 +540,7 @@ int HiCalConf::getChannelIndex(const int &ccd, const int &channel) const { } DbProfile HiCalConf::makeParameters(Pvl &label) const { - PvlGroup inst = label.FindGroup("Instrument", Pvl::Traverse); + PvlGroup inst = label.findGroup("Instrument", Pvl::Traverse); DbProfile parms("Parameters"); int ccd = CpmmToCcd((int) inst["CpmmNumber"]); diff --git a/isis/src/mro/apps/hicalbeta/HiCalTypes.h b/isis/src/mro/apps/hicalbeta/HiCalTypes.h index 50ce0b7b4f2df521d06da9ea8fa899b9c6e4cbc7..8d4c60fdf7e4664132dcee81fb99d57460ad2721 100644 --- a/isis/src/mro/apps/hicalbeta/HiCalTypes.h +++ b/isis/src/mro/apps/hicalbeta/HiCalTypes.h @@ -80,7 +80,7 @@ class HiHistory { PvlKeyword makekey(const QString &name = "History") const { PvlKeyword key(name); for (unsigned int i = 0 ; i < _events.size() ; i++) { - key.AddValue(_events[i]); + key.addValue(_events[i]); } return (key); } diff --git a/isis/src/mro/apps/hicalbeta/HiCalUtil.h b/isis/src/mro/apps/hicalbeta/HiCalUtil.h index 4298bf408cadd246925965d5ce32363d9a10afb3..15c86545a78928f63465e517e09fdde3bb2e5840 100644 --- a/isis/src/mro/apps/hicalbeta/HiCalUtil.h +++ b/isis/src/mro/apps/hicalbeta/HiCalUtil.h @@ -457,13 +457,13 @@ inline HiVector rebin(const HiVector &v, int n) { * blobs */ inline void RemoveHiBlobs(Pvl &label) { - for ( int blob = 0 ; blob < label.Objects() ; blob++ ) { - if ( label.Object(blob).IsNamed("Table") ) { - QString name = label.Object(blob)["Name"][0]; + for ( int blob = 0 ; blob < label.objects() ; blob++ ) { + if ( label.object(blob).isNamed("Table") ) { + QString name = label.object(blob)["Name"][0]; if ( name.toLower() == "hirise calibration ancillary" || name.toLower() == "hirise calibration images" || name.toLower() == "hirise ancillary") { - label.DeleteObject(blob); + label.deleteObject(blob); blob--; } } diff --git a/isis/src/mro/apps/hicalbeta/ZeroReverse.h b/isis/src/mro/apps/hicalbeta/ZeroReverse.h index f2eeec4be8600e265297bb7a4f90d52d5a2c8527..c317fa84c7d2b2934c3e7cc7108a3a721ad73b08 100644 --- a/isis/src/mro/apps/hicalbeta/ZeroReverse.h +++ b/isis/src/mro/apps/hicalbeta/ZeroReverse.h @@ -123,7 +123,7 @@ namespace Isis { "],HisPixels["+ToString(_stats.HisPixels()) + "],NulPixels["+ToString(_stats.NullPixels())+ "])"); - DbAccess triggers(Pvl(tfile).FindObject("ReverseClockStatistics")); + DbAccess triggers(Pvl(tfile).findObject("ReverseClockStatistics")); QString tprofName = conf.resolve("{FILTER}{CCD}_{CHANNEL}_{BIN}",prof); _history.add("ReverseClockStatistics(File["+tfile+ "],Profile["+tprofName+"])"); diff --git a/isis/src/mro/apps/hicalbeta/hicalbeta.cpp b/isis/src/mro/apps/hicalbeta/hicalbeta.cpp index 9f6640d3eb45085daac73e6521a4276c5663b519..b558e733cd1781f983a925ac7011cff493599082 100644 --- a/isis/src/mro/apps/hicalbeta/hicalbeta.cpp +++ b/isis/src/mro/apps/hicalbeta/hicalbeta.cpp @@ -445,12 +445,12 @@ void IsisMain(){ rcal += PvlKeyword("Revision",hical_revision); PvlKeyword key("Conf", conf_file); - key.AddCommentWrapped("/* " + hical_program + " application equation */"); - key.AddComment("/* hdn = idn - ZeroBufferFit(ZeroBufferSmooth) */"); - key.AddComment("/* - ZeroReverse - ZeroDark */"); - key.AddComment("/* odn = hdn / GainLineDrift * GainNonLinearity */"); - key.AddComment("/* * GainChannelNormalize * GainFlatField */"); - key.AddComment("/* * GainTemperature / GainUnitConversion */"); + key.addCommentWrapped("/* " + hical_program + " application equation */"); + key.addComment("/* hdn = idn - ZeroBufferFit(ZeroBufferSmooth) */"); + key.addComment("/* - ZeroReverse - ZeroDark */"); + key.addComment("/* odn = hdn / GainLineDrift * GainNonLinearity */"); + key.addComment("/* * GainChannelNormalize * GainFlatField */"); + key.addComment("/* * GainTemperature / GainUnitConversion */"); rcal += key; // Record parameter generation history. Controllable in configuration diff --git a/isis/src/mro/apps/hicalproc/hicalproc.cpp b/isis/src/mro/apps/hicalproc/hicalproc.cpp index 371fe2ad624917c382d88267d642019661cd8805..5417d89ccf3495cc27270b00a55068e49bd5e9c3 100644 --- a/isis/src/mro/apps/hicalproc/hicalproc.cpp +++ b/isis/src/mro/apps/hicalproc/hicalproc.cpp @@ -53,7 +53,7 @@ void IsisMain() { cubeLabel = Pvl(inFile); } // Get the Summing from the label - int iSumming = toInt(cubeLabel.FindObject("IsisCube").FindGroup("Instrument").FindKeyword("Summing")[0]); + int iSumming = toInt(cubeLabel.findObject("IsisCube").findGroup("Instrument").findKeyword("Summing")[0]); Pipeline p1("hicalproc1"); p1.SetInputFile("FROM"); @@ -439,15 +439,15 @@ void GetCCD_Channel_Coefficients(Pvl & pCubeLabel) int iChannel=-1, iSumming=-1; QString sCcd=""; - PvlGroup instrGrp = pCubeLabel.FindObject("IsisCube").FindGroup("Instrument"); + PvlGroup instrGrp = pCubeLabel.findObject("IsisCube").findGroup("Instrument"); // Summing keyword - if (!instrGrp.HasKeyword("Summing")) { + if (!instrGrp.hasKeyword("Summing")) { QString sMsg = "Summing keyword not found"; throw IException(IException::User, sMsg, _FILEINFO_); } else { - PvlKeyword binKey = instrGrp.FindKeyword("Summing"); + PvlKeyword binKey = instrGrp.findKeyword("Summing"); iSumming = toInt(binKey[0]); if (iSumming != 1 && iSumming != 2 && iSumming != 4) { QString sMsg = "Invalid Summing value in input file, must be 1,2,or 4"; @@ -456,22 +456,22 @@ void GetCCD_Channel_Coefficients(Pvl & pCubeLabel) } // CCD Keyword - if (!instrGrp.HasKeyword("CcdId")) { + if (!instrGrp.hasKeyword("CcdId")) { QString sMsg = "CcdId keyword not found"; throw IException(IException::User, sMsg, _FILEINFO_); } else { - PvlKeyword ccdKey = instrGrp.FindKeyword("CcdId"); + PvlKeyword ccdKey = instrGrp.findKeyword("CcdId"); sCcd = ccdKey[0]; } // Channel Keyword - if (!instrGrp.HasKeyword("ChannelNumber")) { + if (!instrGrp.hasKeyword("ChannelNumber")) { QString sMsg = "ChannelNumber keyword not found"; throw IException(IException::User, sMsg, _FILEINFO_); } else { - PvlKeyword channelKey = instrGrp.FindKeyword("ChannelNumber"); + PvlKeyword channelKey = instrGrp.findKeyword("ChannelNumber"); iChannel = toInt(channelKey[0]); } diff --git a/isis/src/mro/apps/hiccdstitch/hiccdstitch.cpp b/isis/src/mro/apps/hiccdstitch/hiccdstitch.cpp index ce6ea16120528133ecc8f9e3570c55b16bf0f75e..02d2e06eae5f3364927e0ed94f6c025db4dec003 100644 --- a/isis/src/mro/apps/hiccdstitch/hiccdstitch.cpp +++ b/isis/src/mro/apps/hiccdstitch/hiccdstitch.cpp @@ -140,9 +140,9 @@ void IsisMain() { // Open the shift definitions file Pvl shiftdef; - shiftdef.Read(ui.GetFileName("SHIFTDEF")); + shiftdef.read(ui.GetFileName("SHIFTDEF")); - PvlObject &stitch = shiftdef.FindObject("Hiccdstitch", Pvl::Traverse); + PvlObject &stitch = shiftdef.findObject("Hiccdstitch", Pvl::Traverse); // Get information about each of the input cubes bool gotRed = false; @@ -157,7 +157,7 @@ void IsisMain() { Cube *cube = new Cube(); cube->open(list[i].toString()); - PvlGroup arch = cube->label()->FindGroup("Archive", Pvl::Traverse); + PvlGroup arch = cube->label()->findGroup("Archive", Pvl::Traverse); if(first) { obsId = (QString) arch["ObservationId"]; first = false; @@ -170,7 +170,7 @@ void IsisMain() { } } - PvlGroup inst = cube->label()->FindGroup("Instrument", Pvl::Traverse); + PvlGroup inst = cube->label()->findGroup("Instrument", Pvl::Traverse); int chan = inst["ChannelNumber"]; if(chan != 2) { QString msg = "Input file " + list[i].toString() + " contains a single channel"; @@ -226,24 +226,24 @@ void IsisMain() { toString(CCDinfo.tdi); QString ccdId = ccdNames[ccd]; - if(stitch.HasObject(ccdId)) { - PvlObject &ccddef = stitch.FindObject(ccdId, Pvl::Traverse); - if(ccddef.HasKeyword("MosaicOrder")) { + if(stitch.hasObject(ccdId)) { + PvlObject &ccddef = stitch.findObject(ccdId, Pvl::Traverse); + if(ccddef.hasKeyword("MosaicOrder")) { CCDinfo.mosOrder = (int) ccddef["MosaicOrder"]; } - if(ccddef.HasKeyword("SampleOffset")) { + if(ccddef.hasKeyword("SampleOffset")) { CCDinfo.fpsamp = xoffset[ccd] + (int) ccddef["SampleOffset"]; } - if(ccddef.HasKeyword("LineOffset")) { + if(ccddef.hasKeyword("LineOffset")) { CCDinfo.fpline = yoffset[ccd] + (int) ccddef["LineOffset"]; } // See if there is a binning group - if(ccddef.HasGroup(sumTdi)) { - PvlGroup &sumGroup = ccddef.FindGroup(sumTdi); - if(sumGroup.HasKeyword("SampleOffset")) { + if(ccddef.hasGroup(sumTdi)) { + PvlGroup &sumGroup = ccddef.findGroup(sumTdi); + if(sumGroup.hasKeyword("SampleOffset")) { CCDinfo.fpsamp = xoffset[ccd] + (int) sumGroup["SampleOffset"]; } - if(sumGroup.HasKeyword("LineOffset")) { + if(sumGroup.hasKeyword("LineOffset")) { CCDinfo.fpline = yoffset[ccd] + (int) sumGroup["LineOffset"]; } } @@ -349,8 +349,8 @@ void IsisMain() { // Delete ChannelNumber and CpmmNumber so that the output cannot be projected. PvlGroup oinst = ocube->group("Instrument"); - oinst.DeleteKeyword("ChannelNumber"); - oinst.DeleteKeyword("CpmmNumber"); + oinst.deleteKeyword("ChannelNumber"); + oinst.deleteKeyword("CpmmNumber"); ocube->putGroup(oinst); placing.ClearInputCubes(); @@ -378,7 +378,7 @@ void IsisMain() { ccdGroup += PvlKeyword("SampleOffset", toString(CCDlist[CCDindex].fpsamp - xoffset[ccd])); ccdGroup += PvlKeyword("LineOffset", toString(CCDlist[CCDindex].fpline - yoffset[ccd])); - results.AddGroup(ccdGroup); + results.addGroup(ccdGroup); } // Process by output file @@ -520,7 +520,7 @@ void helperButtonLog() { UserInterface &ui = Application::GetUserInterface(); QString file(ui.GetFileName("SHIFTDEF")); Pvl p; - p.Read(file); + p.read(file); Application::GuiLog(p); } //...........end of helper function ........ diff --git a/isis/src/mro/apps/hiccdstitch/template/genTemplate.cpp b/isis/src/mro/apps/hiccdstitch/template/genTemplate.cpp index 8a7c86e009eae58fbc7eef2343870da5daee3fc2..5f07f913f7fe0442f210f1ff2cdd06688edb4a6c 100644 --- a/isis/src/mro/apps/hiccdstitch/template/genTemplate.cpp +++ b/isis/src/mro/apps/hiccdstitch/template/genTemplate.cpp @@ -34,9 +34,9 @@ int main(int argc, char *argv[]) { }; PvlObject hiCCD("Hiccdstitch"); - hiCCD.AddComment("This file describes the line and sample offsets for each HiRISE"); - hiCCD.AddComment("CCD in the focal plane. Negative values shift CCDs left and up."); - hiCCD.AddComment("Positive values shift CCD right and down."); + hiCCD.addComment("This file describes the line and sample offsets for each HiRISE"); + hiCCD.addComment("CCD in the focal plane. Negative values shift CCDs left and up."); + hiCCD.addComment("Positive values shift CCD right and down."); for(int i = 0 ; i < 14 ; i++) { PvlGroup ccdGroup(ccdNames[i]); @@ -51,11 +51,11 @@ int main(int argc, char *argv[]) { ccdGroup += PvlKeyword("SampleOffset", 0); ccdGroup += PvlKeyword("LineOffset", 0); #endif - hiCCD.AddGroup(ccdGroup); + hiCCD.addGroup(ccdGroup); } Pvl pvl; - pvl.AddObject(hiCCD); + pvl.addObject(hiCCD); #if defined(RED_00001_0000) pvl.Write("hiccdstitch.000001_0000_RED.def"); #else diff --git a/isis/src/mro/apps/hicolormos/hicolormos.cpp b/isis/src/mro/apps/hicolormos/hicolormos.cpp index 0d5d7b215d7837724ed7084838a69508c91d6956..1918b85f4bd7631af46fcba81822960f35b8a6c4 100644 --- a/isis/src/mro/apps/hicolormos/hicolormos.cpp +++ b/isis/src/mro/apps/hicolormos/hicolormos.cpp @@ -35,10 +35,10 @@ void IsisMain() { tf.PutLine(from1 + "\n"); Pvl from1lab(from1); - PvlGroup from1Mosaic = from1lab.FindGroup("Mosaic", Pvl::Traverse); + PvlGroup from1Mosaic = from1lab.findGroup("Mosaic", Pvl::Traverse); // Make the procuct ID (from1 archive group) - QString ProdId = from1lab.FindGroup("Archive", Pvl::Traverse)["ObservationId"]; + QString ProdId = from1lab.findGroup("Archive", Pvl::Traverse)["ObservationId"]; ProdId += "_COLOR"; // Prep for second image if we have one @@ -48,16 +48,16 @@ void IsisMain() { QString from2 = ui.GetFileName("FROM2"); //Add from2 file to the temporary automos input list tf.PutLine(from2 + "\n"); - from2lab.Read(from2); + from2lab.read(from2); // Test the observation ID between from1 and from2 - if((QString)from1lab.FindGroup("Archive", Pvl::Traverse)["ObservationId"] != - (QString)from2lab.FindGroup("Archive", Pvl::Traverse)["ObservationId"]) { + if((QString)from1lab.findGroup("Archive", Pvl::Traverse)["ObservationId"] != + (QString)from2lab.findGroup("Archive", Pvl::Traverse)["ObservationId"]) { QString msg = "Images not from the same observation"; throw IException(IException::User, msg, _FILEINFO_); } - from2Mosaic = from2lab.FindGroup("Mosaic", Pvl::Traverse); + from2Mosaic = from2lab.findGroup("Mosaic", Pvl::Traverse); } tf.Close(); // Close list remember to delete @@ -66,7 +66,7 @@ void IsisMain() { if(ui.WasEntered("FROM2")) { // Add source product Id for from2 PvlKeyword from2SPI = from2Mosaic["SourceProductId"]; - for(int i = 0; i < (int)from2SPI.Size(); i++) { + for(int i = 0; i < (int)from2SPI.size(); i++) { sourceProductId += from2SPI[i]; } } @@ -141,8 +141,8 @@ void IsisMain() { proj->SetWorld(0.5, 0.5); double startX = proj->XCoord(); double endY = proj->YCoord(); - double nlines = from1lab.FindGroup("Dimensions", Pvl::Traverse)["Lines"]; - double nsamps = from1lab.FindGroup("Dimensions", Pvl::Traverse)["Samples"]; + double nlines = from1lab.findGroup("Dimensions", Pvl::Traverse)["Lines"]; + double nsamps = from1lab.findGroup("Dimensions", Pvl::Traverse)["Samples"]; proj->SetWorld((nsamps + 0.5), (nlines + 0.5)); double endX = proj->XCoord(); double startY = proj->YCoord(); @@ -152,8 +152,8 @@ void IsisMain() { proj->SetWorld(0.5, 0.5); if(proj->XCoord() < startX) startX = proj->XCoord(); if(proj->YCoord() > endY) endY = proj->YCoord(); - nlines = from2lab.FindGroup("Dimensions", Pvl::Traverse)["Lines"]; - nsamps = from2lab.FindGroup("Dimensions", Pvl::Traverse)["Samples"]; + nlines = from2lab.findGroup("Dimensions", Pvl::Traverse)["Lines"]; + nsamps = from2lab.findGroup("Dimensions", Pvl::Traverse)["Samples"]; proj->SetWorld((nsamps + 0.5), (nlines + 0.5)); if(proj->XCoord() > endX) endX = proj->XCoord(); if(proj->YCoord() < startY) startY = proj->YCoord(); @@ -215,13 +215,13 @@ void IsisMain() { PvlKeyword specialProcessingFlag = from1Mosaic["SpecialProcessingFlag"]; if(ui.WasEntered("FROM2")) { for(int i = 0; i < 14; i++) { - if(! from2Mosaic["cpmmTdiFlag"].IsNull(i)) { + if(! from2Mosaic["cpmmTdiFlag"].isNull(i)) { cpmmTdiFlag[i] = from2Mosaic["cpmmTdiFlag"][i]; } - if(!from2Mosaic["cpmmSummingFlag"].IsNull(i)) { + if(!from2Mosaic["cpmmSummingFlag"].isNull(i)) { cpmmSummingFlag[i] = from2Mosaic["cpmmSummingFlag"][i]; } - if(!from2Mosaic["SpecialProcessingFlag"].IsNull()) { + if(!from2Mosaic["SpecialProcessingFlag"].isNull()) { specialProcessingFlag[i] = from2Mosaic["SpecialProcessingFlag"][i]; } } @@ -260,7 +260,7 @@ void IsisMain() { Cube c; c.open(ui.GetFileName("TO"), "rw"); - c.label()->FindObject("IsisCube", Pvl::Traverse).AddGroup(mos); + c.label()->findObject("IsisCube", Pvl::Traverse).addGroup(mos); c.write(from1OrgLab); c.close(); diff --git a/isis/src/mro/apps/hicrop/hicrop.cpp b/isis/src/mro/apps/hicrop/hicrop.cpp index ffce8cff9f4725ddcb495fb5488aa5fb212b2a6e..0fa6c2d276a28f272d191fdafaf66614b0465921 100644 --- a/isis/src/mro/apps/hicrop/hicrop.cpp +++ b/isis/src/mro/apps/hicrop/hicrop.cpp @@ -105,7 +105,7 @@ void IsisMain() { // get values from the labels needed to compute the line rate and the // actual start time of the input cube Pvl &inLabels = *g_cube.label(); - PvlGroup &inputInst = inLabels.FindObject("IsisCube").FindGroup("Instrument"); + PvlGroup &inputInst = inLabels.findObject("IsisCube").findGroup("Instrument"); QString instId = (inputInst["InstrumentId"]); if (instId.toUpper() != "HIRISE") { IString msg = "Input cube has invalid InstrumentId = [" + instId + "]. " @@ -313,10 +313,10 @@ void IsisMain() { p.ClearInputCubes(); // Loop through the labels looking for object = Table - for (int labelObj = 0; labelObj < inLabels.Objects(); labelObj++) { - PvlObject &obj = inLabels.Object(labelObj); + for (int labelObj = 0; labelObj < inLabels.objects(); labelObj++) { + PvlObject &obj = inLabels.object(labelObj); - if (obj.Name() != "Table") continue; + if (obj.name() != "Table") continue; // Read the table into a table object Table table(obj["Name"], inputFileName); @@ -328,7 +328,7 @@ void IsisMain() { // test to see what happens if I don't have this code ??? Pvl &outLabels = *ocube->label(); // Change the start/end times and spacecraft start/stop counts in the labels - PvlGroup &outputInst = outLabels.FindObject("IsisCube").FindGroup("Instrument"); + PvlGroup &outputInst = outLabels.findObject("IsisCube").findGroup("Instrument"); outputInst["StartTime"][0] = cropStartTime.UTC(); //??? use actual or adjusted like clock counts ??? outputInst["StopTime"][0] = cropStopTime.UTC(); // adjustedCropStopTime ??? outputInst["SpacecraftClockStartCount"][0] = adjustedCropStartClockCount; diff --git a/isis/src/mro/apps/hicubeit/hicubeit.cpp b/isis/src/mro/apps/hicubeit/hicubeit.cpp index 63e7ae37511508b6539361af414af5c7653ed9d9..1fc1d6247f8fd3d5f844ec233089eeb4764e15e0 100644 --- a/isis/src/mro/apps/hicubeit/hicubeit.cpp +++ b/isis/src/mro/apps/hicubeit/hicubeit.cpp @@ -34,9 +34,9 @@ void IsisMain() { Pvl irLab(irFile); Pvl bgLab(bgFile); - PvlGroup redInst = redLab.FindGroup("Instrument", Pvl::Traverse); - PvlGroup irInst = irLab.FindGroup("Instrument", Pvl::Traverse); - PvlGroup bgInst = bgLab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup redInst = redLab.findGroup("Instrument", Pvl::Traverse); + PvlGroup irInst = irLab.findGroup("Instrument", Pvl::Traverse); + PvlGroup bgInst = bgLab.findGroup("Instrument", Pvl::Traverse); // Error check to make sure the proper ccds are stacked if((int)redInst["CpmmNumber"] == 5) { @@ -62,15 +62,15 @@ void IsisMain() { // Concatenate all the source products into one keyword PvlKeyword sourceProductId("SourceProductId"); sourceProductId += (QString)bgInst["StitchedProductIds"][0]; - if(bgInst["StitchedProductIds"].Size() > 1) { + if(bgInst["StitchedProductIds"].size() > 1) { sourceProductId += (QString)bgInst["StitchedProductIds"][1]; } sourceProductId += (QString)redInst["StitchedProductIds"][0]; - if(redInst["StitchedProductIds"].Size() > 1) { + if(redInst["StitchedProductIds"].size() > 1) { sourceProductId += (QString)redInst["StitchedProductIds"][1]; } sourceProductId += (QString)irInst["StitchedProductIds"][0]; - if(irInst["StitchedProductIds"].Size() > 1) { + if(irInst["StitchedProductIds"].size() > 1) { sourceProductId += (QString)irInst["StitchedProductIds"][1]; } @@ -116,9 +116,9 @@ void IsisMain() { OriginalLabel bgOrgLab; bgOrgLab.Blob::Read(bgFile); - PvlGroup redGrp = redOrgLab.ReturnLabels().FindGroup("INSTRUMENT_SETTING_PARAMETERS", Pvl::Traverse); - PvlGroup irGrp = irOrgLab.ReturnLabels().FindGroup("INSTRUMENT_SETTING_PARAMETERS", Pvl::Traverse); - PvlGroup bgGrp = bgOrgLab.ReturnLabels().FindGroup("INSTRUMENT_SETTING_PARAMETERS", Pvl::Traverse); + PvlGroup redGrp = redOrgLab.ReturnLabels().findGroup("INSTRUMENT_SETTING_PARAMETERS", Pvl::Traverse); + PvlGroup irGrp = irOrgLab.ReturnLabels().findGroup("INSTRUMENT_SETTING_PARAMETERS", Pvl::Traverse); + PvlGroup bgGrp = bgOrgLab.ReturnLabels().findGroup("INSTRUMENT_SETTING_PARAMETERS", Pvl::Traverse); PvlKeyword cpmmTdiFlag("cpmmTdiFlag"); for(int i = 0; i < 14; i++) { @@ -144,19 +144,19 @@ void IsisMain() { } //keyword Special_Processing_Flag may not be present so need to test // if not present set to NOMINAL - if(redInst.HasKeyword("Special_Processing_Flag")) { + if(redInst.hasKeyword("Special_Processing_Flag")) { specialProcessingFlag[redInst["CpmmNumber"]] = (QString) redInst["Special_Processing_Flag"]; } else { specialProcessingFlag[redInst["CpmmNumber"]] = "NOMINAL"; } - if(irInst.HasKeyword("Special_Processing_Flag")) { + if(irInst.hasKeyword("Special_Processing_Flag")) { specialProcessingFlag[irInst["CpmmNumber"]] = (QString) irInst["Special_Processing_Flag"]; } else { specialProcessingFlag[irInst["CpmmNumber"]] = "NOMINAL"; } - if(bgInst.HasKeyword("Special_Processing_Flag")) { + if(bgInst.hasKeyword("Special_Processing_Flag")) { specialProcessingFlag[bgInst["CpmmNumber"]] = (QString) bgInst["Special_Processing_Flag"]; } else { @@ -176,6 +176,6 @@ void IsisMain() { // Add the group to the output cube Cube c; c.open(ui.GetFileName("TO"), "rw"); - c.label()->FindObject("IsisCube", Pvl::Traverse).AddGroup(mos); + c.label()->findObject("IsisCube", Pvl::Traverse).addGroup(mos); c.close(); } diff --git a/isis/src/mro/apps/hicubenorm/hicubenorm.cpp b/isis/src/mro/apps/hicubenorm/hicubenorm.cpp index af1b5d64509f785711b8e4d3c18167985d6f0384..86ade896d4e8c2deb7d5b462be20945e4cf8def7 100644 --- a/isis/src/mro/apps/hicubenorm/hicubenorm.cpp +++ b/isis/src/mro/apps/hicubenorm/hicubenorm.cpp @@ -263,8 +263,8 @@ void pvlOut(const QString &StatFile) { } Pvl t; - t.AddGroup(results); - t.Write(StatFile); + t.addGroup(results); + t.write(StatFile); } //******************************************************** @@ -322,11 +322,11 @@ void tableOut(const QString &StatFile) { //******************************************************* void PVLIn(const Isis::FileName &filename) { Pvl pvlFileIn; - pvlFileIn.Read(filename.name()); - PvlGroup results = pvlFileIn.FindGroup("Results"); - PvlObject::PvlKeywordIterator itr = results.Begin(); + pvlFileIn.read(filename.name()); + PvlGroup results = pvlFileIn.findGroup("Results"); + PvlObject::PvlKeywordIterator itr = results.begin(); - while(itr != results.End()) { + while(itr != results.end()) { band.push_back(toInt((*itr)[0])); itr++; element.push_back(toInt((*itr)[0])); diff --git a/isis/src/mro/apps/hideal2pds/hideal2pds.cpp b/isis/src/mro/apps/hideal2pds/hideal2pds.cpp index a43969640fdd0587c2492fc9317e5a1b52de9843..591df60f986db6a5a4bd6b76b9b44f0bfe68f726 100644 --- a/isis/src/mro/apps/hideal2pds/hideal2pds.cpp +++ b/isis/src/mro/apps/hideal2pds/hideal2pds.cpp @@ -42,23 +42,23 @@ void IsisMain() { PvlObject *isisCubeLab = inputCube->label(); // Error check to make sure this is a valid cube for this program - QString origInstrument = isisCubeLab->FindObject("IsisCube") - .FindGroup("OriginalInstrument")["InstrumentId"][0]; + QString origInstrument = isisCubeLab->findObject("IsisCube") + .findGroup("OriginalInstrument")["InstrumentId"][0]; if (origInstrument != "HIRISE") { QString msg = "Input cube must from a HiRISE image. The original " "InstrumentId = [" + origInstrument + "] is unsupported by hideal2pds."; throw IException(IException::Io, msg, _FILEINFO_); } - QString instrumentId = isisCubeLab->FindObject("IsisCube") - .FindGroup("Instrument")["InstrumentId"][0]; + QString instrumentId = isisCubeLab->findObject("IsisCube") + .findGroup("Instrument")["InstrumentId"][0]; if (instrumentId != "IdealCamera") { QString msg = "Input cube must be IdealCamera. InstrumentId = [" + instrumentId + "] is unsupported by hideal2pds."; throw IException(IException::Io, msg, _FILEINFO_); } - QString target = isisCubeLab->FindObject("IsisCube") - .FindGroup("Instrument")["TargetName"][0]; + QString target = isisCubeLab->findObject("IsisCube") + .findGroup("Instrument")["TargetName"][0]; if (target.toUpper() != "MARS") { QString msg = "Input cube must from a HiRise image. The target = [" + target + "] is unsupported by hideal2pds."; @@ -79,7 +79,7 @@ void IsisMain() { p.SetOutputRange(VALID_MINU2, VALID_MAXU2); // output byte order will be MSB p.SetOutputEndian(Isis::Msb); - p.SetFormat(ProcessExport::BSQ); + p.setFormat(ProcessExport::BSQ); // multiple table files should be Fixed according to PDS documentation p.SetExportType(ProcessExportPds::Fixed); p.SetPdsResolution(ProcessExportPds::Meter); @@ -103,8 +103,8 @@ void IsisMain() { inputCube->read(origBlob); Pvl origLabel; PvlObject origLabelObj = origBlob.ReturnLabels(); - origLabelObj.SetName("OriginalLabelObject"); - origLabel.AddObject(origLabelObj); + origLabelObj.setName("OriginalLabelObject"); + origLabel.addObject(origLabelObj); PvlTranslationManager orig(origLabel, "$mro/translations/hirisePdsRdrOriginalLabel.trn"); orig.Auto(pdsLabel); @@ -125,64 +125,64 @@ void IsisMain() { Table instRotationTable = cam->instrumentRotation()->Cache("InstrumentPointing"); p.ExportTable(instRotationTable, pdsTableFile); PvlObject isisTableLab = instRotationTable.Label(); - PvlObject &instPtTabLab = pdsLabel.FindObject("INSTRUMENT_POINTING_TABLE"); - PvlKeyword tableKeyword = isisTableLab.FindKeyword("TimeDependentFrames"); - tableKeyword.SetName("TIME_DEPENDENT_FRAMES"); + PvlObject &instPtTabLab = pdsLabel.findObject("INSTRUMENT_POINTING_TABLE"); + PvlKeyword tableKeyword = isisTableLab.findKeyword("TimeDependentFrames"); + tableKeyword.setName("TIME_DEPENDENT_FRAMES"); instPtTabLab += tableKeyword; - tableKeyword = isisTableLab.FindKeyword("ConstantFrames"); - tableKeyword.SetName("CONSTANT_FRAMES"); + tableKeyword = isisTableLab.findKeyword("ConstantFrames"); + tableKeyword.setName("CONSTANT_FRAMES"); instPtTabLab += tableKeyword; - tableKeyword = isisTableLab.FindKeyword("ConstantRotation"); - tableKeyword.SetName("CONSTANT_ROTATION"); + tableKeyword = isisTableLab.findKeyword("ConstantRotation"); + tableKeyword.setName("CONSTANT_ROTATION"); instPtTabLab += tableKeyword; - tableKeyword = isisTableLab.FindKeyword("CkTableStartTime"); - tableKeyword.SetName("CK_TABLE_START_TIME"); + tableKeyword = isisTableLab.findKeyword("CkTableStartTime"); + tableKeyword.setName("CK_TABLE_START_TIME"); instPtTabLab += tableKeyword; - tableKeyword = isisTableLab.FindKeyword("CkTableEndTime"); - tableKeyword.SetName("CK_TABLE_END_TIME"); + tableKeyword = isisTableLab.findKeyword("CkTableEndTime"); + tableKeyword.setName("CK_TABLE_END_TIME"); instPtTabLab += tableKeyword; - tableKeyword = isisTableLab.FindKeyword("CkTableOriginalSize"); - tableKeyword.SetName("CK_TABLE_ORIGINAL_SIZE"); + tableKeyword = isisTableLab.findKeyword("CkTableOriginalSize"); + tableKeyword.setName("CK_TABLE_ORIGINAL_SIZE"); instPtTabLab += tableKeyword; pdsTableFile = outPdsFile.baseName() + "_INSTRUMENT_POSITION_TABLE.dat"; Table instPositionTable = cam->instrumentPosition()->Cache("InstrumentPosition"); p.ExportTable(instPositionTable, pdsTableFile); isisTableLab = instPositionTable.Label(); - PvlObject &instPosTabLab = pdsLabel.FindObject("INSTRUMENT_POSITION_TABLE"); - tableKeyword = isisTableLab.FindKeyword("CacheType"); - tableKeyword.SetName("CACHE_TYPE"); + PvlObject &instPosTabLab = pdsLabel.findObject("INSTRUMENT_POSITION_TABLE"); + tableKeyword = isisTableLab.findKeyword("CacheType"); + tableKeyword.setName("CACHE_TYPE"); instPosTabLab += tableKeyword; - tableKeyword = isisTableLab.FindKeyword("SpkTableStartTime"); - tableKeyword.SetName("SPK_TABLE_START_TIME"); + tableKeyword = isisTableLab.findKeyword("SpkTableStartTime"); + tableKeyword.setName("SPK_TABLE_START_TIME"); instPosTabLab += tableKeyword; - tableKeyword = isisTableLab.FindKeyword("SpkTableEndTime"); - tableKeyword.SetName("SPK_TABLE_END_TIME"); + tableKeyword = isisTableLab.findKeyword("SpkTableEndTime"); + tableKeyword.setName("SPK_TABLE_END_TIME"); instPosTabLab += tableKeyword; - tableKeyword = isisTableLab.FindKeyword("SpkTableOriginalSize"); - tableKeyword.SetName("SPK_TABLE_ORIGINAL_SIZE"); + tableKeyword = isisTableLab.findKeyword("SpkTableOriginalSize"); + tableKeyword.setName("SPK_TABLE_ORIGINAL_SIZE"); instPosTabLab += tableKeyword; pdsTableFile = outPdsFile.baseName() + "_BODY_ROTATION_TABLE.dat"; Table bodyRotationTable = cam->bodyRotation()->Cache("BodyRotation"); p.ExportTable(bodyRotationTable, pdsTableFile); isisTableLab = bodyRotationTable.Label(); - PvlObject &bodyRotTabLab = pdsLabel.FindObject("BODY_ROTATION_TABLE"); - tableKeyword = isisTableLab.FindKeyword("TimeDependentFrames"); - tableKeyword.SetName("TIME_DEPENDENT_FRAMES"); + PvlObject &bodyRotTabLab = pdsLabel.findObject("BODY_ROTATION_TABLE"); + tableKeyword = isisTableLab.findKeyword("TimeDependentFrames"); + tableKeyword.setName("TIME_DEPENDENT_FRAMES"); bodyRotTabLab += tableKeyword; - tableKeyword = isisTableLab.FindKeyword("CkTableStartTime"); - tableKeyword.SetName("CK_TABLE_START_TIME"); + tableKeyword = isisTableLab.findKeyword("CkTableStartTime"); + tableKeyword.setName("CK_TABLE_START_TIME"); bodyRotTabLab += tableKeyword; - tableKeyword = isisTableLab.FindKeyword("CkTableEndTime"); - tableKeyword.SetName("CK_TABLE_END_TIME"); + tableKeyword = isisTableLab.findKeyword("CkTableEndTime"); + tableKeyword.setName("CK_TABLE_END_TIME"); bodyRotTabLab += tableKeyword; - tableKeyword = isisTableLab.FindKeyword("CkTableOriginalSize"); - tableKeyword.SetName("CK_TABLE_ORIGINAL_SIZE"); + tableKeyword = isisTableLab.findKeyword("CkTableOriginalSize"); + tableKeyword.setName("CK_TABLE_ORIGINAL_SIZE"); bodyRotTabLab += tableKeyword; - if (isisTableLab.HasKeyword("SolarLongitude")) { - tableKeyword = isisTableLab.FindKeyword("SolarLongitude"); - tableKeyword.SetName("SOLAR_LONGITUDE"); + if (isisTableLab.hasKeyword("SolarLongitude")) { + tableKeyword = isisTableLab.findKeyword("SolarLongitude"); + tableKeyword.setName("SOLAR_LONGITUDE"); } else { tableKeyword = PvlKeyword("SOLAR_LONGITUDE", @@ -196,27 +196,27 @@ void IsisMain() { Table sunPositionTable = cam->sunPosition()->Cache("SunPosition"); p.ExportTable(sunPositionTable, pdsTableFile); isisTableLab = sunPositionTable.Label(); - PvlObject &sunPosTabLab = pdsLabel.FindObject("SUN_POSITION_TABLE"); - tableKeyword = isisTableLab.FindKeyword("CacheType"); - tableKeyword.SetName("CACHE_TYPE"); + PvlObject &sunPosTabLab = pdsLabel.findObject("SUN_POSITION_TABLE"); + tableKeyword = isisTableLab.findKeyword("CacheType"); + tableKeyword.setName("CACHE_TYPE"); sunPosTabLab += tableKeyword; - tableKeyword = isisTableLab.FindKeyword("SpkTableStartTime"); - tableKeyword.SetName("SPK_TABLE_START_TIME"); + tableKeyword = isisTableLab.findKeyword("SpkTableStartTime"); + tableKeyword.setName("SPK_TABLE_START_TIME"); sunPosTabLab += tableKeyword; - tableKeyword = isisTableLab.FindKeyword("SpkTableEndTime"); - tableKeyword.SetName("SPK_TABLE_END_TIME"); + tableKeyword = isisTableLab.findKeyword("SpkTableEndTime"); + tableKeyword.setName("SPK_TABLE_END_TIME"); sunPosTabLab += tableKeyword; - tableKeyword = isisTableLab.FindKeyword("SpkTableOriginalSize"); - tableKeyword.SetName("SPK_TABLE_ORIGINAL_SIZE"); + tableKeyword = isisTableLab.findKeyword("SpkTableOriginalSize"); + tableKeyword.setName("SPK_TABLE_ORIGINAL_SIZE"); sunPosTabLab += tableKeyword; // Read in the proper keyword types (Real, Enum, String, Integer, etc) for // each PvlKeyword so that the PDS labels have proper format - PvlFormat *formatter = pdsLabel.GetFormat(); - formatter->Add("$mro/templates/labels/hiriseIdealPds.typ"); + PvlFormat *formatter = pdsLabel.format(); + formatter->add("$mro/templates/labels/hiriseIdealPds.typ"); // Format ordering of keywords/objects/groups/comments in the PDS labels - pdsLabel.SetFormatTemplate("$mro/templates/labels/hiriseIdealPds.pft"); + pdsLabel.setFormatTemplate("$mro/templates/labels/hiriseIdealPds.pft"); // image line/byte offsets are calculated and values are updated in the labels // now that all translations/additions/modifications to the labels have been @@ -279,7 +279,7 @@ pair inputRange(Cube *inputCube) { */ void updatePdsLabelImageObject(PvlObject *isisCubeLab, Pvl &pdsLabel) { // Add the image description to the IMAGE object in the label of the PDS product - PvlObject &image = pdsLabel.FindObject("IMAGE"); + PvlObject &image = pdsLabel.findObject("IMAGE"); image += PvlKeyword("DESCRIPTION", "HiRISE mosaicked product, not map projected"); @@ -289,9 +289,9 @@ void updatePdsLabelImageObject(PvlObject *isisCubeLab, Pvl &pdsLabel) { double sourceLines = double(image["LINES"]); double firstSample = 0.5; double firstLine = 0.5; - if (isisCubeLab->FindObject("IsisCube").HasGroup("AlphaCube")) { - PvlGroup alphaCubeGroup = isisCubeLab->FindObject("IsisCube") - .FindGroup("AlphaCube"); + if (isisCubeLab->findObject("IsisCube").hasGroup("AlphaCube")) { + PvlGroup alphaCubeGroup = isisCubeLab->findObject("IsisCube") + .findGroup("AlphaCube"); int alphaSamples = int(alphaCubeGroup["AlphaSamples"]); int alphaLines = int(alphaCubeGroup["AlphaLines"]); @@ -333,27 +333,27 @@ void updatePdsLabelImageObject(PvlObject *isisCubeLab, Pvl &pdsLabel) { // Add center wavelength and bandwidth with correct units to the IMAGE object PvlKeyword &oldCenter = image["CENTER_FILTER_WAVELENGTH"]; PvlKeyword newCenter("CENTER_FILTER_WAVELENGTH"); - for(int val = 0; val < oldCenter.Size(); ++val) { - if(((QString)(oldCenter.Unit(val))).toUpper() == "NANOMETERS") { - newCenter.AddValue(oldCenter[val], "NM"); + for(int val = 0; val < oldCenter.size(); ++val) { + if(((QString)(oldCenter.unit(val))).toUpper() == "NANOMETERS") { + newCenter.addValue(oldCenter[val], "NM"); } else { - newCenter.AddValue(oldCenter[val], oldCenter.Unit(val)); + newCenter.addValue(oldCenter[val], oldCenter.unit(val)); } } - image.AddKeyword(newCenter, Pvl::Replace); + image.addKeyword(newCenter, Pvl::Replace); PvlKeyword &oldBandWidth = image["BAND_WIDTH"]; PvlKeyword newBandWidth("BAND_WIDTH"); - for(int val = 0; val < oldBandWidth.Size(); ++val) { - if(((QString)(oldBandWidth.Unit(val))).toUpper() == "NANOMETERS") { - newBandWidth.AddValue(oldBandWidth[val], "NM"); + for(int val = 0; val < oldBandWidth.size(); ++val) { + if(((QString)(oldBandWidth.unit(val))).toUpper() == "NANOMETERS") { + newBandWidth.addValue(oldBandWidth[val], "NM"); } else { - newBandWidth.AddValue(oldBandWidth[val], oldBandWidth.Unit(val)); + newBandWidth.addValue(oldBandWidth[val], oldBandWidth.unit(val)); } } - image.AddKeyword(newBandWidth, Pvl::Replace); + image.addKeyword(newBandWidth, Pvl::Replace); } @@ -391,14 +391,14 @@ void updatePdsLabelRootObject(PvlObject *isisCubeLab, Pvl &pdsLabel, UserInterface &ui, Camera *cam) { // Replace INSTRUMENT_ID value in the output labels PvlKeyword instId("INSTRUMENT_ID", "HIRISE_IDEAL_CAMERA"); - pdsLabel.AddKeyword(instId, PvlContainer::Replace); + pdsLabel.addKeyword(instId, PvlContainer::Replace); // Add user-entered keywords to ROOT object in the label of the PDS product if(ui.WasEntered("RATIONALE_DESC")) { PvlKeyword rationale("RATIONALE_DESC", ui.GetAsString("RATIONALE_DESC")); - pdsLabel.AddKeyword(rationale, PvlContainer::Replace); + pdsLabel.addKeyword(rationale, PvlContainer::Replace); } - else if ( !pdsLabel.HasKeyword("RATIONALE_DESC") + else if ( !pdsLabel.hasKeyword("RATIONALE_DESC") || QString(pdsLabel["RATIONALE_DESC"]) == "NULL" ){ QString msg = "Unable to export HiRise product to PDS without " "RationaleDescription value. The input cube value for this " @@ -416,17 +416,17 @@ void updatePdsLabelRootObject(PvlObject *isisCubeLab, Pvl &pdsLabel, sfname += "Isis " + Application::Version() + " " + Application::GetUserInterface().ProgramName(); pdsLabel += PvlKeyword("SOFTWARE_NAME", sfname); - QString matchedCube = isisCubeLab->FindObject("IsisCube").FindGroup("Instrument") - .FindKeyword("MatchedCube")[0]; + QString matchedCube = isisCubeLab->findObject("IsisCube").findGroup("Instrument") + .findKeyword("MatchedCube")[0]; FileName matchedCubeFileNoPath(matchedCube); pdsLabel += PvlKeyword("MATCHED_CUBE", matchedCubeFileNoPath.name()); // Add jitter correction flag value to the ROOT object bool jitter = false; - if (isisCubeLab->FindObject("IsisCube").FindGroup("Instrument") - .HasKeyword("ImageJitterCorrected")) { - jitter = toInt(isisCubeLab->FindObject("IsisCube") - .FindGroup("Instrument")["ImageJitterCorrected"][0]); + if (isisCubeLab->findObject("IsisCube").findGroup("Instrument") + .hasKeyword("ImageJitterCorrected")) { + jitter = toInt(isisCubeLab->findObject("IsisCube") + .findGroup("Instrument")["ImageJitterCorrected"][0]); pdsLabel += PvlKeyword("IMAGE_JITTER_CORRECTED", toString((int)jitter)); } else { @@ -434,8 +434,8 @@ void updatePdsLabelRootObject(PvlObject *isisCubeLab, Pvl &pdsLabel, } // Add Isis Kernels group keywords to the ROOT object - QString shapeModel = isisCubeLab->FindObject("IsisCube").FindGroup("Kernels") - .FindKeyword("ShapeModel")[0]; + QString shapeModel = isisCubeLab->findObject("IsisCube").findGroup("Kernels") + .findKeyword("ShapeModel")[0]; FileName shapeModelFileNoPath(shapeModel); pdsLabel += PvlKeyword("SHAPE_MODEL", shapeModelFileNoPath.name()); @@ -446,8 +446,8 @@ void updatePdsLabelRootObject(PvlObject *isisCubeLab, Pvl &pdsLabel, QString radiiName = "BODY" + QString(cam->naifBodyCode()) + "_RADII"; PvlObject naifKeywordGroup = cam->getStoredNaifKeywords(); - if (naifKeywordGroup.HasKeyword(radiiName)) { - PvlKeyword naifBodyRadii = naifKeywordGroup.FindKeyword(radiiName); + if (naifKeywordGroup.hasKeyword(radiiName)) { + PvlKeyword naifBodyRadii = naifKeywordGroup.findKeyword(radiiName); pdsLabel += PvlKeyword("A_AXIS_RADIUS", naifBodyRadii[0], "KILOMETERS"); pdsLabel += PvlKeyword("B_AXIS_RADIUS", naifBodyRadii[1], "KILOMETERS"); pdsLabel += PvlKeyword("C_AXIS_RADIUS", naifBodyRadii[2], "KILOMETERS"); @@ -460,29 +460,29 @@ void updatePdsLabelRootObject(PvlObject *isisCubeLab, Pvl &pdsLabel, pdsLabel += PvlKeyword("C_AXIS_RADIUS", toString(naifBodyRadii[2].kilometers()), "KILOMETERS"); } - if (naifKeywordGroup.HasKeyword("BODY_FRAME_CODE")) { - pdsLabel += naifKeywordGroup.FindKeyword("BODY_FRAME_CODE"); + if (naifKeywordGroup.hasKeyword("BODY_FRAME_CODE")) { + pdsLabel += naifKeywordGroup.findKeyword("BODY_FRAME_CODE"); } else { pdsLabel += PvlKeyword("BODY_FRAME_CODE", toString(cam->naifBodyFrameCode())); } - if (naifKeywordGroup.HasKeyword("IDEAL_FOCAL_LENGTH")) { - pdsLabel += naifKeywordGroup.FindKeyword("IDEAL_FOCAL_LENGTH"); + if (naifKeywordGroup.hasKeyword("IDEAL_FOCAL_LENGTH")) { + pdsLabel += naifKeywordGroup.findKeyword("IDEAL_FOCAL_LENGTH"); } else { pdsLabel += PvlKeyword("IDEAL_FOCAL_LENGTH", toString(cam->FocalLength())); } - if (naifKeywordGroup.HasKeyword("IDEAL_PIXEL_PITCH")) { - pdsLabel += naifKeywordGroup.FindKeyword("IDEAL_PIXEL_PITCH"); + if (naifKeywordGroup.hasKeyword("IDEAL_PIXEL_PITCH")) { + pdsLabel += naifKeywordGroup.findKeyword("IDEAL_PIXEL_PITCH"); } else { pdsLabel += PvlKeyword("IDEAL_PIXEL_PITCH", toString(cam->PixelPitch())); } - if (naifKeywordGroup.HasKeyword("IDEAL_TRANSX")) { - pdsLabel += naifKeywordGroup.FindKeyword("IDEAL_TRANSX"); + if (naifKeywordGroup.hasKeyword("IDEAL_TRANSX")) { + pdsLabel += naifKeywordGroup.findKeyword("IDEAL_TRANSX"); } else { const double *transXValues = cam->FocalPlaneMap()->TransX(); @@ -493,8 +493,8 @@ void updatePdsLabelRootObject(PvlObject *isisCubeLab, Pvl &pdsLabel, pdsLabel += transX; } - if (naifKeywordGroup.HasKeyword("IDEAL_TRANSY")) { - pdsLabel += naifKeywordGroup.FindKeyword("IDEAL_TRANSY"); + if (naifKeywordGroup.hasKeyword("IDEAL_TRANSY")) { + pdsLabel += naifKeywordGroup.findKeyword("IDEAL_TRANSY"); } else { const double *transYValues = cam->FocalPlaneMap()->TransY(); @@ -505,8 +505,8 @@ void updatePdsLabelRootObject(PvlObject *isisCubeLab, Pvl &pdsLabel, pdsLabel += transY; } - if (naifKeywordGroup.HasKeyword("IDEAL_TRANSS")) { - pdsLabel += naifKeywordGroup.FindKeyword("IDEAL_TRANSS"); + if (naifKeywordGroup.hasKeyword("IDEAL_TRANSS")) { + pdsLabel += naifKeywordGroup.findKeyword("IDEAL_TRANSS"); } else { const double *transSValues = cam->FocalPlaneMap()->TransS(); @@ -517,8 +517,8 @@ void updatePdsLabelRootObject(PvlObject *isisCubeLab, Pvl &pdsLabel, pdsLabel += transS; } - if (naifKeywordGroup.HasKeyword("IDEAL_TRANSL")) { - pdsLabel += naifKeywordGroup.FindKeyword("IDEAL_TRANSL"); + if (naifKeywordGroup.hasKeyword("IDEAL_TRANSL")) { + pdsLabel += naifKeywordGroup.findKeyword("IDEAL_TRANSL"); } else { const double *transLValues = cam->FocalPlaneMap()->TransL(); @@ -548,7 +548,7 @@ void updatePdsLabelTimeParametersGroup(Pvl &pdsLabel) { strftime(timestr, 80, "%Y-%m-%dT%H:%M:%S", tmbuf); QString dateTime = (QString) timestr; iTime tmpDateTime(dateTime); - PvlGroup &timeParam = pdsLabel.FindGroup("TIME_PARAMETERS"); + PvlGroup &timeParam = pdsLabel.findGroup("TIME_PARAMETERS"); timeParam += PvlKeyword("PRODUCT_CREATION_TIME", tmpDateTime.UTC()); } diff --git a/isis/src/mro/apps/hidtmgen/hidtmgen.cpp b/isis/src/mro/apps/hidtmgen/hidtmgen.cpp index aca7470f97dce64dfedf07f1e107c4af0cd33144..95fb5debb09cbe9dc26fe14719a81b8fbbbff4e1 100644 --- a/isis/src/mro/apps/hidtmgen/hidtmgen.cpp +++ b/isis/src/mro/apps/hidtmgen/hidtmgen.cpp @@ -35,7 +35,7 @@ void IsisMain() { // Verify HiRISE if (inCube->bandCount() > 1 || - inCube->label()->HasObject("Instrument")) { + inCube->label()->hasObject("Instrument")) { QString msg = "Input cube [" + ui.GetFileName("FROM") + "] does not appear" + "to be a DTM"; throw IException(IException::User, msg, _FILEINFO_); @@ -90,12 +90,12 @@ void IsisMain() { // Do not use this after calling AddObject on pdsLabel, there is a note // at that location. - PvlObject & mapping = pdsLabel.FindObject("IMAGE_MAP_PROJECTION"); + PvlObject & mapping = pdsLabel.findObject("IMAGE_MAP_PROJECTION"); // Set data for VIEWING_PARAMETERS keyword // Also set radius values if (mapping["MAP_PROJECTION_TYPE"][0] == "EQUIRECTANGULAR") { - mapping["MAP_PROJECTION_TYPE"].SetValue("\"EQUIRECTANGULAR\""); + mapping["MAP_PROJECTION_TYPE"].setValue("\"EQUIRECTANGULAR\""); northAzimuth = 270; isEquirectangular = true; @@ -105,12 +105,12 @@ void IsisMain() { // Convert radius to KM newRadius /= 1000; - mapping.FindKeyword("A_AXIS_RADIUS").SetValue(toString(newRadius)); - mapping.FindKeyword("A_AXIS_RADIUS").SetUnits("KM"); - mapping.FindKeyword("B_AXIS_RADIUS").SetValue(toString(newRadius)); - mapping.FindKeyword("B_AXIS_RADIUS").SetUnits("KM"); - mapping.FindKeyword("C_AXIS_RADIUS").SetValue(toString(newRadius)); - mapping.FindKeyword("C_AXIS_RADIUS").SetUnits("KM"); + mapping.findKeyword("A_AXIS_RADIUS").setValue(toString(newRadius)); + mapping.findKeyword("A_AXIS_RADIUS").setUnits("KM"); + mapping.findKeyword("B_AXIS_RADIUS").setValue(toString(newRadius)); + mapping.findKeyword("B_AXIS_RADIUS").setUnits("KM"); + mapping.findKeyword("C_AXIS_RADIUS").setValue(toString(newRadius)); + mapping.findKeyword("C_AXIS_RADIUS").setUnits("KM"); } else if (mapping["MAP_PROJECTION_TYPE"][0] == "POLAR STEREOGRAPHIC") { double clat = ((toDouble(mapping["MAXIMUM_LATITUDE"][0]) - @@ -150,26 +150,26 @@ void IsisMain() { // Create and then add object, this will be used later in orthos as well. PvlObject viewingParameters("VIEWING_PARAMETERS"); - viewingParameters.AddKeyword(PvlKeyword("NORTH_AZIMUTH",toString(northAzimuth),"DEG")); + viewingParameters.addKeyword(PvlKeyword("NORTH_AZIMUTH",toString(northAzimuth),"DEG")); - pdsLabel.AddObject(viewingParameters); + pdsLabel.addObject(viewingParameters); // This is our replacement for mapping - PvlObject & projection = pdsLabel.FindObject("IMAGE_MAP_PROJECTION"); - projection.AddKeyword( + PvlObject & projection = pdsLabel.findObject("IMAGE_MAP_PROJECTION"); + projection.addKeyword( PvlKeyword("^DATA_SET_MAP_PROJECTION","DSMAP.CAT")); // Delete unneeded keywords in object - projection.DeleteKeyword("FIRST_STANDARD_PARALLEL"); - projection.DeleteKeyword("SECOND_STANDARD_PARALLEL"); + projection.deleteKeyword("FIRST_STANDARD_PARALLEL"); + projection.deleteKeyword("SECOND_STANDARD_PARALLEL"); // Set format and template, Template is the order of keywords, format is // well, format, like integer, real, (hex, 4) if (isEquirectangular) { - pdsLabel.SetFormatTemplate("$mro/templates/labels/hirisePdsDTMEqui.pft"); + pdsLabel.setFormatTemplate("$mro/templates/labels/hirisePdsDTMEqui.pft"); } else { - pdsLabel.SetFormatTemplate("$mro/templates/labels/hirisePdsDTMPolar.pft"); + pdsLabel.setFormatTemplate("$mro/templates/labels/hirisePdsDTMPolar.pft"); } Pvl format; @@ -177,19 +177,19 @@ void IsisMain() { // Have to do things this way to get an array of values PvlKeyword validMin("VALID_MINIMUM","REAL"); validMin += "2"; - format.AddKeyword(validMin); + format.addKeyword(validMin); PvlKeyword validMax("VALID_MAXIMUM","REAL"); validMax += "2"; - format.AddKeyword(validMax); + format.addKeyword(validMax); - format.AddKeyword(PvlKeyword("SAMPLE_BIT_MASK","BINARY")); + format.addKeyword(PvlKeyword("SAMPLE_BIT_MASK","BINARY")); // Aiming for MISSING_CONSTANT = (HEX, 4); Two separate items. PvlKeyword mc("MISSING_CONSTANT","HEX"); mc += "4"; - format.AddKeyword(mc); - PvlFormat * form = pdsLabel.GetFormat(); - form->Add(format); - pdsLabel.SetFormat(form); + format.addKeyword(mc); + PvlFormat * form = pdsLabel.format(); + form->add(format); + pdsLabel.setFormat(form); QString note = "Pixel values in this file represent elevations in meters " "above the martian equipotential surface (Mars 2000 Datum) defined by " @@ -197,26 +197,26 @@ void IsisMain() { "units is given by the keyvalues for SCALING_FACTOR and OFFSET. This " "DTM was produced using ISIS and SOCET Set (copyright BAE Systems) " "software as described in Kirk et al. (2008)."; - pdsLabel.FindObject("IMAGE").AddKeyword(PvlKeyword("NOTE", note)); + pdsLabel.findObject("IMAGE").addKeyword(PvlKeyword("NOTE", note)); // Four labels that are pretty set in stone - pdsLabel.AddKeyword(PvlKeyword("INSTRUMENT_HOST_NAME","MARS RECONNAISSANCE ORBITER")); - pdsLabel.AddKeyword(PvlKeyword("INSTRUMENT_HOST_ID","MRO")); - pdsLabel.AddKeyword(PvlKeyword("INSTRUMENT_NAME","HIGH RESOLUTION IMAGING SCIENCE EXPERIMENT")); - pdsLabel.AddKeyword(PvlKeyword("INSTRUMENT_ID","HIRISE")); + pdsLabel.addKeyword(PvlKeyword("INSTRUMENT_HOST_NAME","MARS RECONNAISSANCE ORBITER")); + pdsLabel.addKeyword(PvlKeyword("INSTRUMENT_HOST_ID","MRO")); + pdsLabel.addKeyword(PvlKeyword("INSTRUMENT_NAME","HIGH RESOLUTION IMAGING SCIENCE EXPERIMENT")); + pdsLabel.addKeyword(PvlKeyword("INSTRUMENT_ID","HIRISE")); Pvl inputParameters(ui.GetFileName("PARAMSPVL")); // These come from the user, mostly, and are in the order they appear in the output labels. - pdsLabel.AddKeyword(inputParameters["DATA_SET_ID"]); - pdsLabel.AddKeyword(inputParameters["DATA_SET_NAME"]); - pdsLabel.AddKeyword(inputParameters["PRODUCER_INSTITUTION_NAME"]); - pdsLabel.AddKeyword(inputParameters["PRODUCER_ID"]); + pdsLabel.addKeyword(inputParameters["DATA_SET_ID"]); + pdsLabel.addKeyword(inputParameters["DATA_SET_NAME"]); + pdsLabel.addKeyword(inputParameters["PRODUCER_INSTITUTION_NAME"]); + pdsLabel.addKeyword(inputParameters["PRODUCER_ID"]); if (ui.WasEntered("PRODUCER_FULL_NAME")) { - pdsLabel.AddKeyword(PvlKeyword("PRODUCER_FULL_NAME",ui.GetString("PRODUCER_FULL_NAME"))); + pdsLabel.addKeyword(PvlKeyword("PRODUCER_FULL_NAME",ui.GetString("PRODUCER_FULL_NAME"))); } else { - pdsLabel.AddKeyword(inputParameters["PRODUCER_FULL_NAME"]); + pdsLabel.addKeyword(inputParameters["PRODUCER_FULL_NAME"]); } // Will we be using the default names? @@ -228,8 +228,8 @@ void IsisMain() { if (!defaultNames) { IString pId = ui.GetFileName("DTMTO"); pId.substr(0, pId.find_first_of('.')+1); - pdsLabel.AddKeyword(PvlKeyword("PRODUCT_ID",ui.GetString("DTM_PRODUCT_ID"))); - pdsLabel.AddKeyword(PvlKeyword("SOURCE_PRODUCT_ID",ui.GetString("SOURCE_PRODUCT_ID"))); + pdsLabel.addKeyword(PvlKeyword("PRODUCT_ID",ui.GetString("DTM_PRODUCT_ID"))); + pdsLabel.addKeyword(PvlKeyword("SOURCE_PRODUCT_ID",ui.GetString("SOURCE_PRODUCT_ID"))); } else { // Set projection letter @@ -237,7 +237,7 @@ void IsisMain() { pId += isEquirectangular ? "E" : "P"; // Find scale letter - pId += findScaleLetter(projection.FindKeyword("MAP_SCALE")); + pId += findScaleLetter(projection.findKeyword("MAP_SCALE")); // Product ids of orthos pId += ortho1.baseName().mid(3,12); @@ -291,35 +291,35 @@ void IsisMain() { // Finish off name string pId += vers; - pdsLabel.AddKeyword(PvlKeyword("PRODUCT_ID",pId)); + pdsLabel.addKeyword(PvlKeyword("PRODUCT_ID",pId)); // Source product ids QString orthoS1 = ortho1.baseName().mid(0,15); QString orthoS3 = ortho3.baseName().mid(0,15); QString sourceId = "("+orthoS1+","+orthoS3+")"; // (######_####,######_####) - pdsLabel.AddKeyword(PvlKeyword("SOURCE_PRODUCT_ID",sourceId)); + pdsLabel.addKeyword(PvlKeyword("SOURCE_PRODUCT_ID",sourceId)); } // End scope of defaultNames true - pdsLabel.AddKeyword(PvlKeyword("PRODUCT_VERSION_ID",ui.GetAsString("PRODUCT_VERSION_ID"))); - pdsLabel.AddKeyword(PvlKeyword("RATIONALE_DESC",ui.GetString("RATIONALE_DESC"))); - pdsLabel.AddKeyword(inputParameters["SOFTWARE_NAME"]); + pdsLabel.addKeyword(PvlKeyword("PRODUCT_VERSION_ID",ui.GetAsString("PRODUCT_VERSION_ID"))); + pdsLabel.addKeyword(PvlKeyword("RATIONALE_DESC",ui.GetString("RATIONALE_DESC"))); + pdsLabel.addKeyword(inputParameters["SOFTWARE_NAME"]); // Label records should always be 1, my example didn't included it, so we won't. - pdsLabel.DeleteKeyword("LABEL_RECORDS"); + pdsLabel.deleteKeyword("LABEL_RECORDS"); // Delete or change unneeded keywords in image group - PvlObject & image = pdsLabel.FindObject("IMAGE"); - image.FindKeyword("CORE_NULL").SetName("MISSING_CONSTANT"); - image.DeleteKeyword("BAND_STORAGE_TYPE"); - image.DeleteKeyword("CORE_LOW_REPR_SATURATION"); - image.DeleteKeyword("CORE_LOW_INSTR_SATURATION"); - image.DeleteKeyword("CORE_HIGH_REPR_SATURATION"); - image.DeleteKeyword("CORE_HIGH_INSTR_SATURATION"); + PvlObject & image = pdsLabel.findObject("IMAGE"); + image.findKeyword("CORE_NULL").setName("MISSING_CONSTANT"); + image.deleteKeyword("BAND_STORAGE_TYPE"); + image.deleteKeyword("CORE_LOW_REPR_SATURATION"); + image.deleteKeyword("CORE_LOW_INSTR_SATURATION"); + image.deleteKeyword("CORE_HIGH_REPR_SATURATION"); + image.deleteKeyword("CORE_HIGH_INSTR_SATURATION"); // Create statistics and add to image group Statistics * stat = inCube->statistics(); - image.AddKeyword(PvlKeyword("VALID_MINIMUM",toString(stat->Minimum()))); - image.AddKeyword(PvlKeyword("VALID_MAXIMUM",toString(stat->Maximum()))); + image.addKeyword(PvlKeyword("VALID_MINIMUM",toString(stat->Minimum()))); + image.addKeyword(PvlKeyword("VALID_MAXIMUM",toString(stat->Maximum()))); // The output directory, will be used for ortho images as well FileName outDir = FileName(ui.GetString("OUTPUTDIR")); @@ -336,7 +336,7 @@ void IsisMain() { FileName outFile; if (defaultNames) { QString dir = outDir.expanded(); - outFile = FileName(dir + pdsLabel.FindKeyword("PRODUCT_ID")[0] + ".IMG"); + outFile = FileName(dir + pdsLabel.findKeyword("PRODUCT_ID")[0] + ".IMG"); } else { outFile = FileName(ui.GetFileName("DTMTO")); @@ -391,7 +391,7 @@ void IsisMain() { Cube * orthoInCube = p.SetInputCube(ortho); Pvl & orthoLabel = p.StandardPdsLabel(ProcessExportPds::Image); - PvlObject & orthoMap = orthoLabel.FindObject("IMAGE_MAP_PROJECTION"); + PvlObject & orthoMap = orthoLabel.findObject("IMAGE_MAP_PROJECTION"); QString orthoOut; if (!defaultNames) { @@ -406,7 +406,7 @@ void IsisMain() { orthoOut += isEquirectangular ? "E" : "P"; // Find scale letter - orthoOut += findScaleLetter(orthoMap.FindKeyword("MAP_SCALE")); + orthoOut += findScaleLetter(orthoMap.findKeyword("MAP_SCALE")); // continue building name orthoOut += ortho1.baseName().mid(3,12); @@ -420,10 +420,10 @@ void IsisMain() { // Found the version above orthoOut += vers; - orthoLabel.AddKeyword(PvlKeyword("PRODUCT_ID",orthoOut)); + orthoLabel.addKeyword(PvlKeyword("PRODUCT_ID",orthoOut)); } - orthoMap.AddKeyword( + orthoMap.addKeyword( PvlKeyword("^DATA_SET_MAP_PROJECTION","DSMAP.CAT")); if (isEquirectangular) { @@ -433,12 +433,12 @@ void IsisMain() { // Convert radius to KM newRadius /= 1000; - orthoMap.FindKeyword("A_AXIS_RADIUS").SetValue(toString(newRadius)); - orthoMap.FindKeyword("A_AXIS_RADIUS").SetUnits("KM"); - orthoMap.FindKeyword("B_AXIS_RADIUS").SetValue(toString(newRadius)); - orthoMap.FindKeyword("B_AXIS_RADIUS").SetUnits("KM"); - orthoMap.FindKeyword("C_AXIS_RADIUS").SetValue(toString(newRadius)); - orthoMap.FindKeyword("C_AXIS_RADIUS").SetUnits("KM"); + orthoMap.findKeyword("A_AXIS_RADIUS").setValue(toString(newRadius)); + orthoMap.findKeyword("A_AXIS_RADIUS").setUnits("KM"); + orthoMap.findKeyword("B_AXIS_RADIUS").setValue(toString(newRadius)); + orthoMap.findKeyword("B_AXIS_RADIUS").setUnits("KM"); + orthoMap.findKeyword("C_AXIS_RADIUS").setValue(toString(newRadius)); + orthoMap.findKeyword("C_AXIS_RADIUS").setUnits("KM"); } // Else case for Polar Stereographic is unnecessary as all it does is // calculate view parameters which we already have. @@ -446,55 +446,55 @@ void IsisMain() { // Set format and template if (isEquirectangular) { - orthoLabel.SetFormatTemplate("$mro/templates/labels/hirisePdsDTMEqui.pft"); + orthoLabel.setFormatTemplate("$mro/templates/labels/hirisePdsDTMEqui.pft"); } else { - orthoLabel.SetFormatTemplate("$mro/templates/labels/hirisePdsDTMPolar.pft"); + orthoLabel.setFormatTemplate("$mro/templates/labels/hirisePdsDTMPolar.pft"); } if (!defaultNames) { - orthoLabel.AddKeyword(PvlKeyword("PRODUCT_ID",ui.GetString(ortho+"_PRODUCT_ID"))); - orthoLabel.AddKeyword(PvlKeyword("SOURCE_PRODUCT_ID",ui.GetString("SOURCE_PRODUCT_ID"))); + orthoLabel.addKeyword(PvlKeyword("PRODUCT_ID",ui.GetString(ortho+"_PRODUCT_ID"))); + orthoLabel.addKeyword(PvlKeyword("SOURCE_PRODUCT_ID",ui.GetString("SOURCE_PRODUCT_ID"))); } else { QString orthoS1 = ortho1.baseName().mid(0,15); QString orthoS3 = ortho3.baseName().mid(0,15); QString sourceId = "("+orthoS1+","+orthoS3+")"; // (######_####,######_####) - orthoLabel.AddKeyword(PvlKeyword("SOURCE_PRODUCT_ID",sourceId)); + orthoLabel.addKeyword(PvlKeyword("SOURCE_PRODUCT_ID",sourceId)); } // Four labels that are pretty set in stone - orthoLabel.AddKeyword(PvlKeyword("INSTRUMENT_HOST_NAME","MARS RECONNAISSANCE ORBITER")); - orthoLabel.AddKeyword(PvlKeyword("INSTRUMENT_HOST_ID","MRO")); - orthoLabel.AddKeyword(PvlKeyword("INSTRUMENT_NAME","HIGH RESOLUTION IMAGING SCIENCE EXPERIMENT")); - orthoLabel.AddKeyword(PvlKeyword("INSTRUMENT_ID","HIRISE")); + orthoLabel.addKeyword(PvlKeyword("INSTRUMENT_HOST_NAME","MARS RECONNAISSANCE ORBITER")); + orthoLabel.addKeyword(PvlKeyword("INSTRUMENT_HOST_ID","MRO")); + orthoLabel.addKeyword(PvlKeyword("INSTRUMENT_NAME","HIGH RESOLUTION IMAGING SCIENCE EXPERIMENT")); + orthoLabel.addKeyword(PvlKeyword("INSTRUMENT_ID","HIRISE")); // These come from the user, mostly, and are in the order they appear in the output // labels. - orthoLabel.AddKeyword(inputParameters["DATA_SET_ID"]); - orthoLabel.AddKeyword(inputParameters["DATA_SET_NAME"]); - orthoLabel.AddKeyword(inputParameters["PRODUCER_INSTITUTION_NAME"]); - orthoLabel.AddKeyword(inputParameters["PRODUCER_ID"]); + orthoLabel.addKeyword(inputParameters["DATA_SET_ID"]); + orthoLabel.addKeyword(inputParameters["DATA_SET_NAME"]); + orthoLabel.addKeyword(inputParameters["PRODUCER_INSTITUTION_NAME"]); + orthoLabel.addKeyword(inputParameters["PRODUCER_ID"]); if (ui.WasEntered("PRODUCER_FULL_NAME")) { - orthoLabel.AddKeyword(PvlKeyword("PRODUCER_FULL_NAME",ui.GetString("PRODUCER_FULL_NAME"))); + orthoLabel.addKeyword(PvlKeyword("PRODUCER_FULL_NAME",ui.GetString("PRODUCER_FULL_NAME"))); } else { - orthoLabel.AddKeyword(inputParameters["PRODUCER_FULL_NAME"]); + orthoLabel.addKeyword(inputParameters["PRODUCER_FULL_NAME"]); } - orthoLabel.AddKeyword(PvlKeyword("PRODUCT_VERSION_ID",ui.GetAsString("PRODUCT_VERSION_ID"))); - orthoLabel.AddKeyword(PvlKeyword("RATIONALE_DESC",ui.GetString("RATIONALE_DESC"))); - orthoLabel.AddKeyword(inputParameters["SOFTWARE_NAME"]); + orthoLabel.addKeyword(PvlKeyword("PRODUCT_VERSION_ID",ui.GetAsString("PRODUCT_VERSION_ID"))); + orthoLabel.addKeyword(PvlKeyword("RATIONALE_DESC",ui.GetString("RATIONALE_DESC"))); + orthoLabel.addKeyword(inputParameters["SOFTWARE_NAME"]); // Long ago we made a VIEWING_PARAMETERS object, it still is correct // Need to be careful to not use any object references from the Pvl // after this call, known problem with Pvl and vector reallocation. - orthoLabel.AddObject(viewingParameters); + orthoLabel.addObject(viewingParameters); FileName orthoFile; if (defaultNames) { QString dir = outDir.expanded(); - orthoFile = FileName(dir + orthoLabel.FindKeyword("PRODUCT_ID")[0] + ".IMG"); + orthoFile = FileName(dir + orthoLabel.findKeyword("PRODUCT_ID")[0] + ".IMG"); } else { orthoFile = FileName(ui.GetFileName(ortho + "TO")); diff --git a/isis/src/mro/apps/hifringe/hifringe.cpp b/isis/src/mro/apps/hifringe/hifringe.cpp index e9e806f163a638ea5b8d40633ec7a0cf8da0d1ad..28dee6b7d7929660d4f96c48314c9638869e7696 100644 --- a/isis/src/mro/apps/hifringe/hifringe.cpp +++ b/isis/src/mro/apps/hifringe/hifringe.cpp @@ -172,20 +172,20 @@ void IsisMain() { sourceInfo += PvlKeyword("From", fromFile.expanded()); sourceInfo += icube->group("Archive")["ProductId"]; - outputPvl.AddGroup(sourceInfo); + outputPvl.addGroup(sourceInfo); if(numSections > 0) { - outputPvl.AddObject(leftSide); - outputPvl.AddObject(rightSide); + outputPvl.addObject(leftSide); + outputPvl.addObject(rightSide); } else { - PvlGroup leftGroup = leftSide.FindGroup("Total"); - PvlGroup rightGroup = rightSide.FindGroup("Total"); - leftGroup.SetName("LeftSide"); - rightGroup.SetName("RightSide"); - outputPvl.AddGroup(leftGroup); - outputPvl.AddGroup(rightGroup); + PvlGroup leftGroup = leftSide.findGroup("Total"); + PvlGroup rightGroup = rightSide.findGroup("Total"); + leftGroup.setName("LeftSide"); + rightGroup.setName("RightSide"); + outputPvl.addGroup(leftGroup); + outputPvl.addGroup(rightGroup); } - outputPvl.Write(ui.GetFileName("TO")); + outputPvl.write(ui.GetFileName("TO")); } void pvlOut(Statistics stats1, Statistics stats2, QString name, int start, @@ -201,7 +201,7 @@ void pvlOut(Statistics stats1, Statistics stats2, QString name, int start, left += PvlKeyword("Minimum", toString(stats1.Minimum())); left += PvlKeyword("Maximum", toString(stats1.Maximum())); } - one->AddGroup(left); + one->addGroup(left); PvlGroup right(name); right += PvlKeyword("StartLine", toString(start + 1)); @@ -214,5 +214,5 @@ void pvlOut(Statistics stats1, Statistics stats2, QString name, int start, right += PvlKeyword("Minimum", toString(stats2.Minimum())); right += PvlKeyword("Maximum", toString(stats2.Maximum())); } - two->AddGroup(right); + two->addGroup(right); } diff --git a/isis/src/mro/apps/hijitreg/HiJitCube.cpp b/isis/src/mro/apps/hijitreg/HiJitCube.cpp index 9fde32530df4fb5a5b12bb7a20ad3b6cad5003f7..9656dcce645b03bfdef62b69febdb6b944ebd10f 100644 --- a/isis/src/mro/apps/hijitreg/HiJitCube.cpp +++ b/isis/src/mro/apps/hijitreg/HiJitCube.cpp @@ -103,12 +103,12 @@ namespace Isis { OpenCube(filename); // Determine if a shift of the CCD exists in the definitions file - if(shift.HasGroup(jdata.ccdName)) { - PvlGroup &ccddef = shift.FindGroup(jdata.ccdName, Pvl::Traverse); - if(ccddef.HasKeyword("SampleOffset")) { + if(shift.hasGroup(jdata.ccdName)) { + PvlGroup &ccddef = shift.findGroup(jdata.ccdName, Pvl::Traverse); + if(ccddef.hasKeyword("SampleOffset")) { jdata.sampOffset = (int) ccddef["SampleOffset"]; } - if(ccddef.HasKeyword("LineOffset")) { + if(ccddef.hasKeyword("LineOffset")) { jdata.lineOffset = (int) ccddef["LineOffset"]; } computePoly(); @@ -225,27 +225,27 @@ namespace Isis { Isis::PvlGroup inst; Isis::PvlGroup idinst; jdata.filename = fileName(); - Isis::PvlGroup &archive = labelPvl->FindGroup("Archive", Isis::Pvl::Traverse); + Isis::PvlGroup &archive = labelPvl->findGroup("Archive", Isis::Pvl::Traverse); jdata.productId = (QString) archive["ProductId"]; jdata.lines = lineCount(); - if(labelPvl->FindObject("IsisCube").HasGroup("OriginalInstrument")) { - inst = labelPvl->FindGroup("OriginalInstrument", Isis::Pvl::Traverse); + if(labelPvl->findObject("IsisCube").hasGroup("OriginalInstrument")) { + inst = labelPvl->findGroup("OriginalInstrument", Isis::Pvl::Traverse); originst = true; } else { - inst = labelPvl->FindGroup("Instrument", Isis::Pvl::Traverse); + inst = labelPvl->findGroup("Instrument", Isis::Pvl::Traverse); originst = false; } jdata.tdiMode = inst["Tdi"]; jdata.summing = inst["Summing"]; - if(labelPvl->FindObject("IsisCube").HasGroup("Instrument") && originst) { - idinst = labelPvl->FindGroup("Instrument", Isis::Pvl::Traverse); - if (idinst.HasKeyword("PixelPitch")) { + if(labelPvl->findObject("IsisCube").hasGroup("Instrument") && originst) { + idinst = labelPvl->findGroup("Instrument", Isis::Pvl::Traverse); + if (idinst.hasKeyword("PixelPitch")) { jdata.pixpitch = idinst["PixelPitch"]; } else { - jdata.pixpitch = labelPvl->FindObject("NaifKeywords")["IDEAL_PIXEL_PITCH"]; + jdata.pixpitch = labelPvl->findObject("NaifKeywords")["IDEAL_PIXEL_PITCH"]; } jdata.summing = (int)(jdata.pixpitch / .012); } diff --git a/isis/src/mro/apps/hijitreg/hijitreg.cpp b/isis/src/mro/apps/hijitreg/hijitreg.cpp index d26719996b1e5ceb36872aca763a0b11ce1d447d..3618e4863d26b934acc7d2a90dd47505e9a179d8 100644 --- a/isis/src/mro/apps/hijitreg/hijitreg.cpp +++ b/isis/src/mro/apps/hijitreg/hijitreg.cpp @@ -73,13 +73,13 @@ void IsisMain() { // Open the shift definitions file Pvl shiftdef; if(ui.WasEntered("SHIFTDEF")) { - shiftdef.Read(ui.GetFileName("SHIFTDEF")); + shiftdef.read(ui.GetFileName("SHIFTDEF")); } else { - shiftdef.AddObject(PvlObject("Hiccdstitch")); + shiftdef.addObject(PvlObject("Hiccdstitch")); } - PvlObject &stitch = shiftdef.FindObject("Hiccdstitch", Pvl::Traverse); + PvlObject &stitch = shiftdef.findObject("Hiccdstitch", Pvl::Traverse); // Open the first cube. It will be matched to the second input cube. @@ -136,7 +136,7 @@ void IsisMain() { // of the grid points. Pvl regdef; FileName regFile(ui.GetFileName("REGDEF")); - regdef.Read(regFile.expanded()); + regdef.read(regFile.expanded()); AutoReg *ar = AutoRegFactory::Create(regdef); @@ -186,7 +186,7 @@ void IsisMain() { QString transSN = SerialNumber::Compose(trans, true); QString matchSN = SerialNumber::Compose(match, true); - PvlGroup &instrument = trans.label()->FindGroup("Instrument", Pvl::Traverse); + PvlGroup &instrument = trans.label()->findGroup("Instrument", Pvl::Traverse); cn.SetTarget(instrument["TargetName"][0]); cn.SetDescription("Records s/c jitter between two adjacent HiRISE images"); diff --git a/isis/src/mro/apps/hijitter/hijitter.cpp b/isis/src/mro/apps/hijitter/hijitter.cpp index 4010995c37583593c347fe89440c018e8ea290d8..9b69822074dfa08d98afbce6d5ca4737e04fa80d 100644 --- a/isis/src/mro/apps/hijitter/hijitter.cpp +++ b/isis/src/mro/apps/hijitter/hijitter.cpp @@ -351,7 +351,7 @@ void init(FileList &inList) { try { FileName currentFileName(inList[i]); Pvl labels(currentFileName.expanded()); - PvlGroup &inst = labels.FindGroup("Instrument", Pvl::Traverse); + PvlGroup &inst = labels.findGroup("Instrument", Pvl::Traverse); QString ccdKeywordValue = (QString)inst["CcdId"]; int ccdNumber = 0; diff --git a/isis/src/mro/apps/himos/himos.cpp b/isis/src/mro/apps/himos/himos.cpp index 677cd0cfe7277b28a00d02b8c1ca45395b6d45e3..2610997669ae6e0b9272cf8c97b10dd8ac2b5dce 100644 --- a/isis/src/mro/apps/himos/himos.cpp +++ b/isis/src/mro/apps/himos/himos.cpp @@ -58,15 +58,15 @@ void IsisMain() { Pvl *pmatch = clist[0]->label(); Pvl *pcomp = clist[i]->label(); CompareLabels(*pmatch, *pcomp); - PvlGroup g = pcomp->FindGroup("Instrument", Pvl::Traverse); - if(g.HasKeyword("StitchedProductIds")) { + PvlGroup g = pcomp->findGroup("Instrument", Pvl::Traverse); + if(g.hasKeyword("StitchedProductIds")) { PvlKeyword k = g["StitchedProductIds"]; - for(int j = 0; j < (int)k.Size(); j++) { + for(int j = 0; j < (int)k.size(); j++) { sourceProductId += g["stitchedProductIds"][j]; } } - ProdId = (QString)pmatch->FindGroup("Archive", Pvl::Traverse)["ObservationId"]; - QString bandname = (QString)pmatch->FindGroup("BandBin", Pvl::Traverse)["Name"]; + ProdId = (QString)pmatch->findGroup("Archive", Pvl::Traverse)["ObservationId"]; + QString bandname = (QString)pmatch->findGroup("BandBin", Pvl::Traverse)["Name"]; bandname = bandname.toUpper(); ProdId = ProdId + "_" + bandname; } @@ -137,8 +137,8 @@ void IsisMain() { if(proj->YCoord() > endY) endY = proj->YCoord(); } Pvl *p = clist[i]->label(); - double nlines = p->FindGroup("Dimensions", Pvl::Traverse)["Lines"]; - double nsamps = p->FindGroup("Dimensions", Pvl::Traverse)["Samples"]; + double nlines = p->findGroup("Dimensions", Pvl::Traverse)["Lines"]; + double nsamps = p->findGroup("Dimensions", Pvl::Traverse)["Samples"]; proj->SetWorld((nsamps + 0.5), (nlines + 0.5)); if(i == 0) { @@ -185,7 +185,7 @@ void IsisMain() { for(int i = 0; i < (int)clist.size(); i++) { OriginalLabel origLab; clist[i]->read(origLab); - PvlGroup timegrp = origLab.ReturnLabels().FindGroup("TIME_PARAMETERS", Pvl::Traverse); + PvlGroup timegrp = origLab.ReturnLabels().findGroup("TIME_PARAMETERS", Pvl::Traverse); if(i == 0) { startClock = (QString)timegrp["SpacecraftClockStartCount"]; stopClock = (QString)timegrp["SpacecraftClockStopCount"]; @@ -218,14 +218,14 @@ void IsisMain() { for(int i = 0; i < (int)clist.size(); i++) { Pvl *clab = clist[i]->label(); - PvlGroup cInst = clab->FindGroup("Instrument", Pvl::Traverse); + PvlGroup cInst = clab->findGroup("Instrument", Pvl::Traverse); OriginalLabel cOrgLab; clist[i]->read(cOrgLab); - PvlGroup cGrp = cOrgLab.ReturnLabels().FindGroup("INSTRUMENT_SETTING_PARAMETERS", Pvl::Traverse); + PvlGroup cGrp = cOrgLab.ReturnLabels().findGroup("INSTRUMENT_SETTING_PARAMETERS", Pvl::Traverse); cpmmTdiFlag[(int)cInst["CpmmNumber"]] = (QString) cGrp["MRO:TDI"]; cpmmSummingFlag[(int)cInst["CpmmNumber"]] = (QString) cGrp["MRO:BINNING"]; - if(cInst.HasKeyword("Special_Processing_Flag")) { + if(cInst.hasKeyword("Special_Processing_Flag")) { specialProcessingFlag[cInst["CpmmNumber"]] = (QString) cInst["Special_Processing_Flag"]; } else { @@ -277,8 +277,8 @@ void IsisMain() { Cube mosCube; mosCube.open(ui.GetFileName("TO"), "rw"); - PvlObject &lab = mosCube.label()->FindObject("IsisCube"); - lab.AddGroup(mos); + PvlObject &lab = mosCube.label()->findObject("IsisCube"); + lab.addGroup(mos); //add orginal label blob to the output cube mosCube.write(org); mosCube.close(); @@ -297,8 +297,8 @@ void IsisMain() { //Function to compare label - CompareLabels void CompareLabels(Pvl &pmatch, Pvl &pcomp) { // test of the ObservationId - PvlGroup matchgrp = pmatch.FindGroup("Archive", Pvl::Traverse); - PvlGroup compgrp = pcomp.FindGroup("Archive", Pvl::Traverse); + PvlGroup matchgrp = pmatch.findGroup("Archive", Pvl::Traverse); + PvlGroup compgrp = pcomp.findGroup("Archive", Pvl::Traverse); QString obsMatch = matchgrp["ObservationId"]; QString obsComp = compgrp["ObservationId"]; @@ -308,8 +308,8 @@ void CompareLabels(Pvl &pmatch, Pvl &pcomp) { } // Test of the BandBin filter name - PvlGroup bmatchgrp = pmatch.FindGroup("BandBin", Pvl::Traverse); - PvlGroup bcompgrp = pcomp.FindGroup("BandBin", Pvl::Traverse); + PvlGroup bmatchgrp = pmatch.findGroup("BandBin", Pvl::Traverse); + PvlGroup bcompgrp = pcomp.findGroup("BandBin", Pvl::Traverse); QString bandMatch = bmatchgrp["Name"]; QString bandComp = bcompgrp["Name"]; diff --git a/isis/src/mro/apps/hinoise/hinoise.cpp b/isis/src/mro/apps/hinoise/hinoise.cpp index 4ecf4aaeb157ece136695aa0156940cb34627448..c521793888a06bb7d8306d7d9f0c644f7f8686c3 100644 --- a/isis/src/mro/apps/hinoise/hinoise.cpp +++ b/isis/src/mro/apps/hinoise/hinoise.cpp @@ -79,9 +79,9 @@ void IsisMain() { // Get Summing, CcdId and Channel Number from the cube label Pvl cubeLabel = Pvl(sInputFile); - int iSumming = toInt (cubeLabel.FindObject("IsisCube").FindGroup("Instrument").FindKeyword("Summing")[0]); - int iChannel = toInt (cubeLabel.FindObject("IsisCube").FindGroup("Instrument").FindKeyword("ChannelNumber")[0]); - QString sCcdId = cubeLabel.FindObject("IsisCube").FindGroup("Instrument").FindKeyword("CcdId"); + int iSumming = toInt (cubeLabel.findObject("IsisCube").findGroup("Instrument").findKeyword("Summing")[0]); + int iChannel = toInt (cubeLabel.findObject("IsisCube").findGroup("Instrument").findKeyword("ChannelNumber")[0]); + QString sCcdId = cubeLabel.findObject("IsisCube").findGroup("Instrument").findKeyword("CcdId"); // Get the image histogram Pipeline p1("hinoise1"); diff --git a/isis/src/mro/apps/hirdr2isis/hirdr2isis.cpp b/isis/src/mro/apps/hirdr2isis/hirdr2isis.cpp index b9861576bdd7d176d3f1666264d4215d2b6bd70b..2073ebe3e847a57b37d4b236f7646942ca89305b 100644 --- a/isis/src/mro/apps/hirdr2isis/hirdr2isis.cpp +++ b/isis/src/mro/apps/hirdr2isis/hirdr2isis.cpp @@ -29,7 +29,7 @@ void IsisMain() { p.TranslatePdsProjection(otherLabels); // Get the directory where the MRO HiRISE RDR translation tables are. - PvlGroup dataDir(Preference::Preferences().FindGroup("DataDirectory")); + PvlGroup dataDir(Preference::Preferences().findGroup("DataDirectory")); QString transDir = (QString) dataDir["Mro"] + "/translations/"; // Translate the BandBin group @@ -43,14 +43,14 @@ void IsisMain() { archiveXlater.Auto(otherLabels); // Write the BandBin, Archive, and Mapping groups to the output cube label - ocube->putGroup(otherLabels.FindGroup("BandBin")); + ocube->putGroup(otherLabels.findGroup("BandBin")); // Reorder CPMM keywords back to original arrangement. This copies the values // back to keywords in place. - PvlGroup mosgrp = otherLabels.FindGroup("Mosaic"); - PvlKeyword &ccdFlag = mosgrp.FindKeyword("SpecialProcessingFlag"); - PvlKeyword &ccdBin = mosgrp.FindKeyword("cpmmSummingFlag"); - PvlKeyword &ccdTdi = mosgrp.FindKeyword("cpmmTdiFlag"); + PvlGroup mosgrp = otherLabels.findGroup("Mosaic"); + PvlKeyword &ccdFlag = mosgrp.findKeyword("SpecialProcessingFlag"); + PvlKeyword &ccdBin = mosgrp.findKeyword("cpmmSummingFlag"); + PvlKeyword &ccdTdi = mosgrp.findKeyword("cpmmTdiFlag"); // Make temp copies of keywords PvlKeyword tempccdFlag = ccdFlag; @@ -66,7 +66,7 @@ void IsisMain() { // Modify the output Mosaic group if the Projection is of type // Equirectangular. - PvlGroup mapgrp = otherLabels.FindGroup("Mapping"); + PvlGroup mapgrp = otherLabels.findGroup("Mapping"); if(mapgrp["ProjectionName"][0].toUpper() == "EQUIRECTANGULAR") { static bool pckLoaded(false); if(!pckLoaded) { @@ -77,7 +77,7 @@ void IsisMain() { } // Get the target and check for validity - PvlKeyword &target = label.FindKeyword("TargetName", PvlObject::Traverse); + PvlKeyword &target = label.findKeyword("TargetName", PvlObject::Traverse); SpiceInt tcode; SpiceBoolean found; (void) bodn2c_c(target[0].toAscii().data(), &tcode, &found); @@ -88,17 +88,17 @@ void IsisMain() { bodvar_c(tcode, "RADII", &n, radii); // Set existing radius to CenterLatitudeRadius - PvlKeyword &eqRadius = mapgrp.FindKeyword("EquatorialRadius"); - PvlKeyword &polRadius = mapgrp.FindKeyword("PolarRadius"); + PvlKeyword &eqRadius = mapgrp.findKeyword("EquatorialRadius"); + PvlKeyword &polRadius = mapgrp.findKeyword("PolarRadius"); // Derive (copy, actually) the center radius from the equator radii and // update the name PvlKeyword clatrad = eqRadius; - clatrad.SetName("CenterLatitudeRadius"); + clatrad.setName("CenterLatitudeRadius"); // Assign the proper radii to the group keywords - eqRadius.SetValue(toString(radii[0] * 1000.0), "meters"); - polRadius.SetValue(toString(radii[2] * 1000.0), "meters"); + eqRadius.setValue(toString(radii[0] * 1000.0), "meters"); + polRadius.setValue(toString(radii[2] * 1000.0), "meters"); mapgrp += clatrad; // Don't do this before updating the above // keyword references! Bad things happen! } diff --git a/isis/src/mro/apps/hirdrgen/hirdrgen.cpp b/isis/src/mro/apps/hirdrgen/hirdrgen.cpp index e6d3a0d24bf566ded4e89e15ce5a1a106f662213..aab9429e6d3d40308abe88d005dd039e92834d28 100644 --- a/isis/src/mro/apps/hirdrgen/hirdrgen.cpp +++ b/isis/src/mro/apps/hirdrgen/hirdrgen.cpp @@ -104,7 +104,7 @@ void IsisMain() { FileName lblFile(ui.GetFileName("TO")); QString lblFileName = lblFile.path() + "/" + lblFile.baseName() + ".lbl"; p.SetDetached(lblFileName); - p.SetFormat(ProcessExport::JP2); + p.setFormat(ProcessExport::JP2); } // Set the output pixel type and the special pixel values @@ -178,8 +178,8 @@ void IsisMain() { icube2->read(origBlob); Pvl origLabel; PvlObject origLabelObj = origBlob.ReturnLabels(); - origLabelObj.SetName("OriginalLabelObject"); - origLabel.AddObject(origLabelObj); + origLabelObj.setName("OriginalLabelObject"); + origLabel.addObject(origLabelObj); PvlTranslationManager orig(origLabel, "$mro/translations/hirisePdsRdrOriginalLabel.trn"); orig.Auto(pdsLabel); @@ -187,7 +187,7 @@ void IsisMain() { // Add labels to the PDS product that could not be handled by the translater if (ui.WasEntered("RATIONALE_DESC")) { - pdsLabel.AddKeyword( + pdsLabel.addKeyword( PvlKeyword("RATIONALE_DESC", ui.GetString("RATIONALE_DESC")), Pvl::Replace); } @@ -199,7 +199,7 @@ void IsisMain() { strftime(timestr, 80, "%Y-%m-%dT%H:%M:%S", tmbuf); QString dateTime = (QString) timestr; iTime tmpDateTime(dateTime); - PvlGroup &timeParam = pdsLabel.FindGroup("TIME_PARAMETERS"); + PvlGroup &timeParam = pdsLabel.findGroup("TIME_PARAMETERS"); timeParam += PvlKeyword("PRODUCT_CREATION_TIME", tmpDateTime.UTC()); // Add the N/A constant keyword to the ROOT @@ -219,77 +219,77 @@ void IsisMain() { // As pulled from the input Isis cube, the values are in CPMM order, so // convert them to CCD order PvlKeyword ccdFlag("MRO:CCD_FLAG"); - PvlKeyword &cpmmFlag = origLabel.FindObject("OriginalLabelObject"). - FindGroup("INSTRUMENT_SETTING_PARAMETERS"). - FindKeyword("MRO:POWERED_CPMM_FLAG"); + PvlKeyword &cpmmFlag = origLabel.findObject("OriginalLabelObject"). + findGroup("INSTRUMENT_SETTING_PARAMETERS"). + findKeyword("MRO:POWERED_CPMM_FLAG"); PvlKeyword ccdBin("MRO:BINNING"); - PvlKeyword &cpmmBin = icube2->label()->FindObject("IsisCube"). - FindGroup("Mosaic")["cpmmSummingFlag"]; + PvlKeyword &cpmmBin = icube2->label()->findObject("IsisCube"). + findGroup("Mosaic")["cpmmSummingFlag"]; PvlKeyword ccdTdi("MRO:TDI"); - PvlKeyword &cpmmTdi = icube2->label()->FindObject("IsisCube"). - FindGroup("Mosaic")["cpmmTdiFlag"]; + PvlKeyword &cpmmTdi = icube2->label()->findObject("IsisCube"). + findGroup("Mosaic")["cpmmTdiFlag"]; PvlKeyword ccdSpecial("MRO:SPECIAL_PROCESSING_FLAG"); - PvlKeyword &cpmmSpecial = icube2->label()->FindObject("IsisCube"). - FindGroup("Mosaic")["SpecialProcessingFlag"]; + PvlKeyword &cpmmSpecial = icube2->label()->findObject("IsisCube"). + findGroup("Mosaic")["SpecialProcessingFlag"]; for (int ccd = 0; ccd < 14; ++ccd) { const unsigned int cpmmByCcd[] = {0, 1, 2, 3, 5, 8, 10, 11, 12, 13, 6, 7, 4, 9}; - ccdFlag.AddValue(cpmmFlag[cpmmByCcd[ccd]]); - ccdBin.AddValue(cpmmBin[cpmmByCcd[ccd]] != "Null" ? cpmmBin[cpmmByCcd[ccd]] : "-9998"); - ccdTdi.AddValue(cpmmTdi[cpmmByCcd[ccd]] != "Null" ? cpmmTdi[cpmmByCcd[ccd]] : "-9998"); + ccdFlag.addValue(cpmmFlag[cpmmByCcd[ccd]]); + ccdBin.addValue(cpmmBin[cpmmByCcd[ccd]] != "Null" ? cpmmBin[cpmmByCcd[ccd]] : "-9998"); + ccdTdi.addValue(cpmmTdi[cpmmByCcd[ccd]] != "Null" ? cpmmTdi[cpmmByCcd[ccd]] : "-9998"); IString tmp = cpmmSpecial[cpmmByCcd[ccd]]; tmp.Trim("\""); - ccdSpecial.AddValue(tmp.ToQt()); + ccdSpecial.addValue(tmp.ToQt()); } - if (!pdsLabel.HasGroup("INSTRUMENT_SETTING_PARAMETERS")) { - pdsLabel.AddGroup(PvlGroup("INSTRUMENT_SETTING_PARAMETERS")); + if (!pdsLabel.hasGroup("INSTRUMENT_SETTING_PARAMETERS")) { + pdsLabel.addGroup(PvlGroup("INSTRUMENT_SETTING_PARAMETERS")); } - pdsLabel.FindGroup("INSTRUMENT_SETTING_PARAMETERS") += ccdFlag; - pdsLabel.FindGroup("INSTRUMENT_SETTING_PARAMETERS") += ccdBin; - pdsLabel.FindGroup("INSTRUMENT_SETTING_PARAMETERS") += ccdTdi; - pdsLabel.FindGroup("INSTRUMENT_SETTING_PARAMETERS") += ccdSpecial; + pdsLabel.findGroup("INSTRUMENT_SETTING_PARAMETERS") += ccdFlag; + pdsLabel.findGroup("INSTRUMENT_SETTING_PARAMETERS") += ccdBin; + pdsLabel.findGroup("INSTRUMENT_SETTING_PARAMETERS") += ccdTdi; + pdsLabel.findGroup("INSTRUMENT_SETTING_PARAMETERS") += ccdSpecial; // Add/modify projection info if there is a projection - if (pdsLabel.HasObject("IMAGE_MAP_PROJECTION")) { - PvlObject &mapObject = pdsLabel.FindObject("IMAGE_MAP_PROJECTION"); + if (pdsLabel.hasObject("IMAGE_MAP_PROJECTION")) { + PvlObject &mapObject = pdsLabel.findObject("IMAGE_MAP_PROJECTION"); mapObject += PvlKeyword("^DATA_SET_MAP_PROJECTION", "DSMAP.CAT"); // Add the HiRISE comment to the CENTER_LATITUDE keyword PvlKeyword &clat = mapObject["CENTER_LATITUDE"]; - clat.AddComment("/* NOTE: CENTER_LATITUDE and CENTER_LONGITUDE describe the location */"); - clat.AddComment("/* of the center of projection, which is not necessarily equal to the */"); - clat.AddComment("/* location of the center point of the image. */"); + clat.addComment("/* NOTE: CENTER_LATITUDE and CENTER_LONGITUDE describe the location */"); + clat.addComment("/* of the center of projection, which is not necessarily equal to the */"); + clat.addComment("/* location of the center point of the image. */"); - if (mapObject.HasKeyword("CENTER_LATITUDE")) { + if (mapObject.hasKeyword("CENTER_LATITUDE")) { PvlKeyword ¢erLat = mapObject["CENTER_LATITUDE"]; // if (centerLat[0] == "N/A") centerLat = -9998; - if (centerLat[0] == "N/A") mapObject.DeleteKeyword("CENTER_LATITUDE"); + if (centerLat[0] == "N/A") mapObject.deleteKeyword("CENTER_LATITUDE"); } - if (mapObject.HasKeyword("CENTER_LONGITUDE")) { + if (mapObject.hasKeyword("CENTER_LONGITUDE")) { PvlKeyword ¢erLon = mapObject["CENTER_LONGITUDE"]; // if (centerLon[0] == "N/A") centerLon = -9998; - if (centerLon[0] == "N/A") mapObject.DeleteKeyword("CENTER_LONGITUDE"); + if (centerLon[0] == "N/A") mapObject.deleteKeyword("CENTER_LONGITUDE"); } - if (mapObject.HasKeyword("REFERENCE_LATITUDE")) { + if (mapObject.hasKeyword("REFERENCE_LATITUDE")) { PvlKeyword &refLat = mapObject["REFERENCE_LATITUDE"]; // if (refLat[0] == "N/A") refLat = -9998; - if (refLat[0] == "N/A") mapObject.DeleteKeyword("REFERENCE_LATITUDE"); + if (refLat[0] == "N/A") mapObject.deleteKeyword("REFERENCE_LATITUDE"); } - if (mapObject.HasKeyword("REFERENCE_LONGITUE")) { + if (mapObject.hasKeyword("REFERENCE_LONGITUE")) { PvlKeyword &refLon = mapObject["REFERENCE_LONGITUDE"]; // if (refLon[0] == "N/A") refLon = -9998; - if (refLon[0] == "N/A") mapObject.DeleteKeyword("REFERENCE_LONGITUDE"); + if (refLon[0] == "N/A") mapObject.deleteKeyword("REFERENCE_LONGITUDE"); } - if (mapObject.HasKeyword("FIRST_STANDARD_PARALLEL")) { + if (mapObject.hasKeyword("FIRST_STANDARD_PARALLEL")) { PvlKeyword &firstSP = mapObject["FIRST_STANDARD_PARALLEL"]; // if (firstSP[0] == "N/A") firstSP = -9998; - if (firstSP[0] == "N/A") mapObject.DeleteKeyword("FIRST_STANDARD_PARALLEL"); + if (firstSP[0] == "N/A") mapObject.deleteKeyword("FIRST_STANDARD_PARALLEL"); } - if (mapObject.HasKeyword("SECOND_STANDARD_PARALLEL")) { + if (mapObject.hasKeyword("SECOND_STANDARD_PARALLEL")) { PvlKeyword &secondSP = mapObject["SECOND_STANDARD_PARALLEL"]; // if (secondSP[0] == "N/A") secondSP = -9998; - if (secondSP[0] == "N/A") mapObject.DeleteKeyword("SECOND_STANDARD_PARALLEL"); + if (secondSP[0] == "N/A") mapObject.deleteKeyword("SECOND_STANDARD_PARALLEL"); } // For Equirectangular ONLY @@ -297,11 +297,11 @@ void IsisMain() { // instead of the target radii from NAIF if (mapObject["MAP_PROJECTION_TYPE"][0] == "EQUIRECTANGULAR") { Projection *proj = ProjectionFactory::CreateFromCube(*icube2); - PvlGroup &mapping = icube2->label()->FindGroup("MAPPING", Pvl::Traverse); + PvlGroup &mapping = icube2->label()->findGroup("MAPPING", Pvl::Traverse); double radius = proj->LocalRadius((double)mapping["CenterLatitude"]) / 1000.0; - mapObject["A_AXIS_RADIUS"].SetValue(toString(radius), "KM"); - mapObject["B_AXIS_RADIUS"].SetValue(toString(radius), "KM"); - mapObject["C_AXIS_RADIUS"].SetValue(toString(radius), "KM"); + mapObject["A_AXIS_RADIUS"].setValue(toString(radius), "KM"); + mapObject["B_AXIS_RADIUS"].setValue(toString(radius), "KM"); + mapObject["C_AXIS_RADIUS"].setValue(toString(radius), "KM"); } projName = mapObject["MAP_PROJECTION_TYPE"][0]; @@ -321,50 +321,50 @@ void IsisMain() { if (enctype.Equal("jp2")) { // Add keywords to the PDS JP2 IMAGE object - PvlObject &imagejp2 = pdsLabel.FindObject("UNCOMPRESSED_FILE").FindObject("IMAGE"); + PvlObject &imagejp2 = pdsLabel.findObject("UNCOMPRESSED_FILE").findObject("IMAGE"); // Add the HiRISE specific description of the IMAGE object imagejp2 += PvlKeyword("DESCRIPTION", "HiRISE projected and mosaicked product"); // Add the SCALLING_FACTOR and OFFSET keywords - imagejp2.AddKeyword(PvlKeyword("SCALING_FACTOR", toString(slope)), Pvl::Replace); - imagejp2.AddKeyword(PvlKeyword("OFFSET", toString(intercept)), Pvl::Replace); + imagejp2.addKeyword(PvlKeyword("SCALING_FACTOR", toString(slope)), Pvl::Replace); + imagejp2.addKeyword(PvlKeyword("OFFSET", toString(intercept)), Pvl::Replace); // Reformat some keyword units in the image object // This is lame, but PDS units are difficult to work with, so for now??? PvlKeyword &oldFilterNamejp2 = imagejp2["FILTER_NAME"]; PvlKeyword newFilterName("FILTER_NAME"); - for (int val = 0; val < oldFilterNamejp2.Size(); ++val) { + for (int val = 0; val < oldFilterNamejp2.size(); ++val) { QString filtname(oldFilterNamejp2[val].toUpper()); if (filtname == "BLUEGREEN") filtname = "BLUE-GREEN"; else if (filtname == "NEARINFRARED") filtname = "NEAR-INFRARED"; - newFilterName.AddValue(filtname); + newFilterName.addValue(filtname); } - imagejp2.AddKeyword(newFilterName, Pvl::Replace); + imagejp2.addKeyword(newFilterName, Pvl::Replace); PvlKeyword &oldCenterjp2 = imagejp2["CENTER_FILTER_WAVELENGTH"]; PvlKeyword newCenter("CENTER_FILTER_WAVELENGTH"); - for (int val = 0; val < oldCenterjp2.Size(); ++val) { - if (((IString)(oldCenterjp2.Unit(val))).UpCase() == "NANOMETERS") { - newCenter.AddValue(oldCenterjp2[val], "NM"); + for (int val = 0; val < oldCenterjp2.size(); ++val) { + if (((IString)(oldCenterjp2.unit(val))).UpCase() == "NANOMETERS") { + newCenter.addValue(oldCenterjp2[val], "NM"); } else { - newCenter.AddValue(oldCenterjp2[val], oldCenterjp2.Unit(val)); + newCenter.addValue(oldCenterjp2[val], oldCenterjp2.unit(val)); } } - imagejp2.AddKeyword(newCenter, Pvl::Replace); + imagejp2.addKeyword(newCenter, Pvl::Replace); PvlKeyword &oldBandWidthjp2 = imagejp2["BAND_WIDTH"]; PvlKeyword newBandWidth("BAND_WIDTH"); - for (int val = 0; val < oldBandWidthjp2.Size(); ++val) { - if (((IString)(oldBandWidthjp2.Unit(val))).UpCase() == "NANOMETERS") { - newBandWidth.AddValue(oldBandWidthjp2[val], "nm"); + for (int val = 0; val < oldBandWidthjp2.size(); ++val) { + if (((IString)(oldBandWidthjp2.unit(val))).UpCase() == "NANOMETERS") { + newBandWidth.addValue(oldBandWidthjp2[val], "nm"); } else { - newBandWidth.AddValue(oldBandWidthjp2[val], oldBandWidthjp2.Unit(val)); + newBandWidth.addValue(oldBandWidthjp2[val], oldBandWidthjp2.unit(val)); } } - imagejp2.AddKeyword(newBandWidth, Pvl::Replace); + imagejp2.addKeyword(newBandWidth, Pvl::Replace); // Add the min/max per band keywords imagejp2 += minimum; @@ -373,14 +373,14 @@ void IsisMain() { // Modify the default SAMPLE_BIT_MASK keyword placed there by the // ProcessExportPds if (nbits != 8 && nbits != 16) { - imagejp2.AddKeyword(PvlKeyword("SAMPLE_BIT_MASK", + imagejp2.addKeyword(PvlKeyword("SAMPLE_BIT_MASK", toString((int)pow(2.0, (double)ui.GetInteger("BITS")) - 1)), Pvl::Replace); } } else { // Add keywords to the PDS IMAGE object - PvlObject &image = pdsLabel.FindObject("IMAGE"); + PvlObject &image = pdsLabel.findObject("IMAGE"); // Add the HiRISE specific description of the IMAGE object image += PvlKeyword("DESCRIPTION", "HiRISE projected and mosaicked product"); @@ -395,44 +395,44 @@ void IsisMain() { // ??? unneccessary calculation - this is done by ProcessExportPds class. double slope = (maxmax - minmin) / (p.GetOutputMaximum() - p.GetOutputMinimum()); double intercept = maxmax - slope * p.GetOutputMaximum(); - image.AddKeyword(PvlKeyword("SCALING_FACTOR", toString(slope)), Pvl::Replace); - image.AddKeyword(PvlKeyword("OFFSET", toString(intercept)), Pvl::Replace); + image.addKeyword(PvlKeyword("SCALING_FACTOR", toString(slope)), Pvl::Replace); + image.addKeyword(PvlKeyword("OFFSET", toString(intercept)), Pvl::Replace); // Reformat some keyword units in the image object // This is lame, but PDS units are difficult to work with, so for now PvlKeyword &oldFilterName = image["FILTER_NAME"]; PvlKeyword newFilterName("FILTER_NAME"); - for (int val = 0; val < oldFilterName.Size(); ++val) { + for (int val = 0; val < oldFilterName.size(); ++val) { QString filtname(oldFilterName[val].toUpper()); if (filtname == "BLUEGREEN") filtname = "BLUE-GREEN"; else if (filtname == "NEARINFRARED") filtname = "NEAR-INFRARED"; - newFilterName.AddValue(filtname); + newFilterName.addValue(filtname); } - image.AddKeyword(newFilterName, Pvl::Replace); + image.addKeyword(newFilterName, Pvl::Replace); PvlKeyword &oldCenter = image["CENTER_FILTER_WAVELENGTH"]; PvlKeyword newCenter("CENTER_FILTER_WAVELENGTH"); - for (int val = 0; val < oldCenter.Size(); ++val) { - if (((IString)(oldCenter.Unit(val))).UpCase() == "NANOMETERS") { - newCenter.AddValue(oldCenter[val], "NM"); + for (int val = 0; val < oldCenter.size(); ++val) { + if (((IString)(oldCenter.unit(val))).UpCase() == "NANOMETERS") { + newCenter.addValue(oldCenter[val], "NM"); } else { - newCenter.AddValue(oldCenter[val], oldCenter.Unit(val)); + newCenter.addValue(oldCenter[val], oldCenter.unit(val)); } } - image.AddKeyword(newCenter, Pvl::Replace); + image.addKeyword(newCenter, Pvl::Replace); PvlKeyword &oldBandWidth = image["BAND_WIDTH"]; PvlKeyword newBandWidth("BAND_WIDTH"); - for (int val = 0; val < oldBandWidth.Size(); ++val) { - if (((IString)(oldBandWidth.Unit(val))).UpCase() == "NANOMETERS") { - newBandWidth.AddValue(oldBandWidth[val], "NM"); + for (int val = 0; val < oldBandWidth.size(); ++val) { + if (((IString)(oldBandWidth.unit(val))).UpCase() == "NANOMETERS") { + newBandWidth.addValue(oldBandWidth[val], "NM"); } else { - newBandWidth.AddValue(oldBandWidth[val], oldBandWidth.Unit(val)); + newBandWidth.addValue(oldBandWidth[val], oldBandWidth.unit(val)); } } - image.AddKeyword(newBandWidth, Pvl::Replace); + image.addKeyword(newBandWidth, Pvl::Replace); // Add the min/max per band keywords image += minimum; @@ -441,57 +441,57 @@ void IsisMain() { // Modify the default SAMPLE_BIT_MASK keyword placed there by the // ProcessExportPds if (nbits != 8 && nbits != 16) { - image.AddKeyword(PvlKeyword("SAMPLE_BIT_MASK", + image.addKeyword(PvlKeyword("SAMPLE_BIT_MASK", toString((int)pow(2.0, (double)ui.GetInteger("BITS")) - 1)), Pvl::Replace); } } // Modify the units in the viewing_parameters group -// if (pdsLabel.HasGroup("VIEWING_PARAMETERS")) { -// PvlGroup &viewGroup = pdsLabel.FindGroup("VIEWING_PARAMETERS"); +// if (pdsLabel.hasGroup("VIEWING_PARAMETERS")) { +// PvlGroup &viewGroup = pdsLabel.findGroup("VIEWING_PARAMETERS"); // PvlKeyword &incidence = viewGroup["INCIDENCE_ANGLE"]; -// IString tstr = incidence.Unit(); -// if (tstr.UpCase() == "DEG") incidence.SetValue((QString)incidence, "deg"); +// IString tstr = incidence.unit(); +// if (tstr.UpCase() == "DEG") incidence.setValue((QString)incidence, "deg"); // PvlKeyword &emission = viewGroup["EMISSION_ANGLE"]; -// tstr = emission.Unit(); -// if (tstr.UpCase() == "DEG") emission.SetValue((QString)emission, "deg"); +// tstr = emission.unit(); +// if (tstr.UpCase() == "DEG") emission.setValue((QString)emission, "deg"); // PvlKeyword &phase = viewGroup["PHASE_ANGLE"]; -// tstr = phase.Unit(); -// if (tstr.UpCase() == "DEG") phase.SetValue((QString)phase, "deg"); +// tstr = phase.unit(); +// if (tstr.UpCase() == "DEG") phase.setValue((QString)phase, "deg"); // PvlKeyword &solarLon = viewGroup["SOLAR_LONGITUDE"]; -// tstr = solarLon.Unit(); q -// if (tstr.UpCase() == "DEG") solarLon.SetValue((QString)solarLon, "deg"); +// tstr = solarLon.unit(); q +// if (tstr.UpCase() == "DEG") solarLon.setValue((QString)solarLon, "deg"); // PvlKeyword &localTime = viewGroup["LOCAL_TIME"]; -// tstr = localTime.Unit(); -// if (tstr.UpCase() == "LOCALDAY/24") localTime.SetValue((QString)localTime, "local day/24"); +// tstr = localTime.unit(); +// if (tstr.UpCase() == "LOCALDAY/24") localTime.setValue((QString)localTime, "local day/24"); // } // Add a keyword type (i.e., QString, bool, int...) file to the PDS label Pvl - PvlFormat *formatter = pdsLabel.GetFormat(); - formatter->Add("$mro/translations/hirisePdsRdrExtras.typ"); + PvlFormat *formatter = pdsLabel.format(); + formatter->add("$mro/translations/hirisePdsRdrExtras.typ"); // Add an output format template (group, object, & keyword output order) to // the PDS PVL if (projName == "EQUIRECTANGULAR") { if (enctype.Equal("jp2")) { - pdsLabel.SetFormatTemplate("$mro/templates/labels/hirisePdsRdrEquiJP2.pft"); + pdsLabel.setFormatTemplate("$mro/templates/labels/hirisePdsRdrEquiJP2.pft"); } else { - pdsLabel.SetFormatTemplate("$mro/templates/labels/hirisePdsRdrEqui.pft"); + pdsLabel.setFormatTemplate("$mro/templates/labels/hirisePdsRdrEqui.pft"); } } else { if (enctype.Equal("jp2")) { - pdsLabel.SetFormatTemplate("$mro/templates/labels/hirisePdsRdrPolarJP2.pft"); + pdsLabel.setFormatTemplate("$mro/templates/labels/hirisePdsRdrPolarJP2.pft"); } else { - pdsLabel.SetFormatTemplate("$mro/templates/labels/hirisePdsRdrPolar.pft"); + pdsLabel.setFormatTemplate("$mro/templates/labels/hirisePdsRdrPolar.pft"); } } diff --git a/isis/src/mro/apps/hisharpen/hisharpen.cpp b/isis/src/mro/apps/hisharpen/hisharpen.cpp index 4e44cf481973e7bd8f34b169f812a7f40152e554..00cd25c31caaf1ee2a94ad37fb9d2fa2a3605089 100644 --- a/isis/src/mro/apps/hisharpen/hisharpen.cpp +++ b/isis/src/mro/apps/hisharpen/hisharpen.cpp @@ -134,7 +134,7 @@ void CreatePsf(Pipeline &p) { // Verify the image looks like a hirise image try { - const PvlGroup &instGrp = fromCube.label()->FindGroup("Instrument", Pvl::Traverse); + const PvlGroup &instGrp = fromCube.label()->findGroup("Instrument", Pvl::Traverse); QString instrument = (QString)instGrp["InstrumentId"]; if(instrument != "HIRISE") { @@ -158,7 +158,7 @@ void CreatePsf(Pipeline &p) { // Let's figure out which point spread function we're supposed to be using QString psfFile = "$mro/calibration/psf/PSF_"; - QString filter = (QString)fromCube.label()->FindGroup("Instrument", Pvl::Traverse)["CcdId"]; + QString filter = (QString)fromCube.label()->findGroup("Instrument", Pvl::Traverse)["CcdId"]; if(filter.contains("RED")) { psfFile += "RED"; diff --git a/isis/src/mro/apps/histat/histat.cpp b/isis/src/mro/apps/histat/histat.cpp index 7af48c6170aba673f66af4b1b179a3d8a2cc4698..779acaa7aa3058010a449096040411ebde35fa81 100644 --- a/isis/src/mro/apps/histat/histat.cpp +++ b/isis/src/mro/apps/histat/histat.cpp @@ -292,9 +292,9 @@ void IsisMain() { if(ui.WasEntered("TO")) { Pvl temp; for(int i = 0 ; i < NUM_GROUPS ; i++) { - temp.AddGroup(groups[i]); + temp.addGroup(groups[i]); } - temp.Write(ui.GetFileName("TO")); + temp.write(ui.GetFileName("TO")); } else { // Log the results diff --git a/isis/src/mro/apps/histitch/histitch.cpp b/isis/src/mro/apps/histitch/histitch.cpp index 3d83b01d2d97bd97714c20d2ee3b840c9ca9c4d9..264faca7e814dfb5ae6cf0fb082c18b2189eda0e 100644 --- a/isis/src/mro/apps/histitch/histitch.cpp +++ b/isis/src/mro/apps/histitch/histitch.cpp @@ -357,8 +357,8 @@ void IsisMain() { } PvlGroup stitch = results; - stitch.SetName("HiStitch"); - table.Label().AddGroup(stitch); + stitch.setName("HiStitch"); + table.Label().addGroup(stitch); ocube->write(table); } } @@ -369,7 +369,7 @@ void IsisMain() { p.StartProcess(histitch); // All Done PvlGroup stitch = results; - stitch.SetName("HiStitch"); + stitch.setName("HiStitch"); ocube->putGroup(stitch); p.EndProcess(); Application::Log(results); diff --git a/isis/src/mro/apps/marci2isis/marci2isis.cpp b/isis/src/mro/apps/marci2isis/marci2isis.cpp index b16e3936416b656cd4dbe2c15a62c0893b730f98..9fa258c4b054b0b376de17078bb687734bf5e8c1 100644 --- a/isis/src/mro/apps/marci2isis/marci2isis.cpp +++ b/isis/src/mro/apps/marci2isis/marci2isis.cpp @@ -48,7 +48,7 @@ void IsisMain() { //Checks if in file is rdr Pvl lab(inFile.expanded()); - if(lab.HasObject("IMAGE_MAP_PROJECTION")) { + if(lab.hasObject("IMAGE_MAP_PROJECTION")) { QString msg = "[" + inFile.name() + "] appears to be an rdr file."; msg += " Use pds2isis."; throw IException(IException::User, msg, _FILEINFO_); @@ -62,7 +62,7 @@ void IsisMain() { } // We need to know how many filters and their height to import the data properly - numFilters = pdsLab["FILTER_NAME"].Size(); + numFilters = pdsLab["FILTER_NAME"].size(); currentLine.resize(numFilters); filterHeight = 16 / (int)pdsLab["SAMPLING_FACTOR"]; @@ -106,7 +106,7 @@ void IsisMain() { // Output lines/samps. int numLines = (int)p.Lines() / numFilters + maxPadding; - int numSamples = pdsLab.FindKeyword("LINE_SAMPLES", Pvl::Traverse); + int numSamples = pdsLab.findKeyword("LINE_SAMPLES", Pvl::Traverse); cubeHeight = numLines; outputCubes.push_back(new Isis::Cube()); @@ -149,8 +149,8 @@ void IsisMain() { for(unsigned int i = 0; i < outputCubes.size(); i++) { translateMarciLabels(pdsLab, *outputCubes[i]->label()); - PvlObject &isisCube = outputCubes[i]->label()->FindObject("IsisCube"); - isisCube.FindGroup("Instrument").AddKeyword(PvlKeyword("Framelets", framelets[i])); + PvlObject &isisCube = outputCubes[i]->label()->findObject("IsisCube"); + isisCube.findGroup("Instrument").addKeyword(PvlKeyword("Framelets", framelets[i])); outputCubes[i]->write(origLabel); delete outputCubes[i]; @@ -273,7 +273,7 @@ void writeCubeOutput(Isis::Buffer &data) { void translateMarciLabels(Pvl &pdsLabel, Pvl &cubeLabel) { PvlGroup arch("Archive"); - if(pdsLabel.HasKeyword("SAMPLE_BIT_MODE_ID")) { + if(pdsLabel.hasKeyword("SAMPLE_BIT_MODE_ID")) { arch += PvlKeyword("SampleBitModeId", (QString)pdsLabel["SAMPLE_BIT_MODE_ID"]); } @@ -306,7 +306,7 @@ void translateMarciLabels(Pvl &pdsLabel, Pvl &cubeLabel) { PvlGroup bandBin("BandBin"); PvlKeyword filterName("FilterName"); PvlKeyword origBands("OriginalBand"); - for(int filter = 0; filter < pdsLabel["FILTER_NAME"].Size(); filter++) { + for(int filter = 0; filter < pdsLabel["FILTER_NAME"].size(); filter++) { filterName += pdsLabel["FILTER_NAME"][filter]; origBands += toString(filter + 1); } @@ -314,10 +314,10 @@ void translateMarciLabels(Pvl &pdsLabel, Pvl &cubeLabel) { bandBin += filterName; bandBin += origBands; - PvlObject &isisCube = cubeLabel.FindObject("IsisCube"); - isisCube.AddGroup(inst); - isisCube.AddGroup(bandBin); - isisCube.AddGroup(arch); + PvlObject &isisCube = cubeLabel.findObject("IsisCube"); + isisCube.addGroup(inst); + isisCube.addGroup(bandBin); + isisCube.addGroup(arch); // Map VIS/UV to NaifIkCode std::map naifIkCodes; @@ -340,7 +340,7 @@ void translateMarciLabels(Pvl &pdsLabel, Pvl &cubeLabel) { int iakCode = naifIkCodes.find(uvvis)->second; kerns += PvlKeyword("NaifIkCode", toString(iakCode)); - isisCube.AddGroup(kerns); + isisCube.addGroup(kerns); } /** diff --git a/isis/src/mro/apps/marcical/marcical.cpp b/isis/src/mro/apps/marcical/marcical.cpp index bf6f057a8bef9fbd915d2932effdced769ff1c62..e7cadd323ce54d48a796dd03c7269f75b6237aee 100644 --- a/isis/src/mro/apps/marcical/marcical.cpp +++ b/isis/src/mro/apps/marcical/marcical.cpp @@ -35,7 +35,7 @@ void IsisMain() { throw IException(); } - if(!icube.group("Archive").HasKeyword("SampleBitModeId")) { + if(!icube.group("Archive").hasKeyword("SampleBitModeId")) { throw IException(); } } @@ -62,7 +62,7 @@ void IsisMain() { decimation.push_back(1.0); } - QString startTime = icube.label()->FindGroup("Instrument", Pvl::Traverse)["StartTime"][0]; + QString startTime = icube.label()->findGroup("Instrument", Pvl::Traverse)["StartTime"][0]; iTime start(startTime); iTime changeTime("November 6, 2006 21:30:00 UTC"); @@ -99,15 +99,15 @@ void IsisMain() { vector< pair > calibrationCoeffs; // Check our coefficient file - if(calibrationData.Objects() != 7) { + if(calibrationData.objects() != 7) { QString msg = "Calibration file [" + calFile.expanded() + "] must contain data for 7 filters in ascending order;"; - msg += " only [" + QString(calibrationData.Objects()) + "] objects were found"; + msg += " only [" + QString(calibrationData.objects()) + "] objects were found"; throw IException(IException::Programmer, msg, _FILEINFO_); } // Read it, make sure it's ordered - for(int obj = 0; obj < calibrationData.Objects(); obj ++) { - PvlObject &calObj = calibrationData.Object(obj); + for(int obj = 0; obj < calibrationData.objects(); obj ++) { + PvlObject &calObj = calibrationData.object(obj); if((int)calObj["FilterNumber"] != obj + 1) { QString msg = "Calibration file [" + calFile.expanded() + "] must have the filters in ascending order"; @@ -179,8 +179,8 @@ void IsisMain() { filterNameToFilterIndex.insert(pair("SHORT_UV", 6)); filterNameToFilterIndex.insert(pair("LONG_UV", 7)); - PvlKeyword &filtNames = icube.label()->FindGroup("BandBin", Pvl::Traverse)["FilterName"];; - for(int i = 0; i < filtNames.Size(); i++) { + PvlKeyword &filtNames = icube.label()->findGroup("BandBin", Pvl::Traverse)["FilterName"];; + for(int i = 0; i < filtNames.size(); i++) { if(filterNameToFilterIndex.find(filtNames[i]) != filterNameToFilterIndex.end()) { filter.push_back(filterNameToFilterIndex.find(filtNames[i])->second); } @@ -191,7 +191,7 @@ void IsisMain() { } bool iof = ui.GetBoolean("IOF"); - double exposure = ((double)icube.label()->FindGroup("Instrument", Pvl::Traverse)["ExposureDuration"]) * 1000.0; + double exposure = ((double)icube.label()->findGroup("Instrument", Pvl::Traverse)["ExposureDuration"]) * 1000.0; Camera *cam = NULL; double solarDist = Isis::Null; @@ -265,16 +265,16 @@ void IsisMain() { while(!ocubeMgr.end()); // Propagate labels and objects (in case of spice data) - PvlObject &inCubeObj = icube.label()->FindObject("IsisCube"); - PvlObject &outCubeObj = ocube.label()->FindObject("IsisCube"); + PvlObject &inCubeObj = icube.label()->findObject("IsisCube"); + PvlObject &outCubeObj = ocube.label()->findObject("IsisCube"); - for(int g = 0; g < inCubeObj.Groups(); g++) { - outCubeObj.AddGroup(inCubeObj.Group(g)); + for(int g = 0; g < inCubeObj.groups(); g++) { + outCubeObj.addGroup(inCubeObj.group(g)); } - for(int o = 0; o < icube.label()->Objects(); o++) { - if(icube.label()->Object(o).IsNamed("Table")) { - Blob t(icube.label()->Object(o)["Name"], icube.label()->Object(o).Name()); + for(int o = 0; o < icube.label()->objects(); o++) { + if(icube.label()->object(o).isNamed("Table")) { + Blob t(icube.label()->object(o)["Name"], icube.label()->object(o).name()); icube.read(t); ocube.write(t); } diff --git a/isis/src/mro/apps/marciflip/marciflip.cpp b/isis/src/mro/apps/marciflip/marciflip.cpp index eaec2457f57cf3c3d1423a642baa533f31b8a4ba..394ccfed7482010ae2396fe1de377c921a444a16 100644 --- a/isis/src/mro/apps/marciflip/marciflip.cpp +++ b/isis/src/mro/apps/marciflip/marciflip.cpp @@ -35,15 +35,15 @@ void IsisMain() { // change flipped keyword inst["DataFlipped"] = toString(((int)inst["DataFlipped"] + 1) % 2); - outputCube->label()->FindObject("IsisCube").AddGroup(inst); + outputCube->label()->findObject("IsisCube").addGroup(inst); } if(icube->hasGroup("BandBin")) { - outputCube->label()->FindObject("IsisCube").AddGroup( + outputCube->label()->findObject("IsisCube").addGroup( icube->group("BandBin")); } - if(icube->label()->HasObject("OriginalLabel")) { + if(icube->label()->hasObject("OriginalLabel")) { OriginalLabel origLabel; icube->read(origLabel); outputCube->write(origLabel); diff --git a/isis/src/mro/apps/mroctx2isis/mroctx2isis.cpp b/isis/src/mro/apps/mroctx2isis/mroctx2isis.cpp index a6c8c886deb897b0a2b3f5b4c0868f689aa53e5e..334291abe09b1d310fd7f65311bc7d6a2ae0b624 100644 --- a/isis/src/mro/apps/mroctx2isis/mroctx2isis.cpp +++ b/isis/src/mro/apps/mroctx2isis/mroctx2isis.cpp @@ -37,21 +37,21 @@ void IsisMain() { bool projected; try { Pvl lab(inFile.expanded()); - id = (QString) lab.FindKeyword("DATA_SET_ID"); - projected = lab.HasObject("IMAGE_MAP_PROJECTION"); - if(lab.HasKeyword("SPATIAL_SUMMING")) { - sumMode = (int)lab.FindKeyword("SPATIAL_SUMMING"); + id = (QString) lab.findKeyword("DATA_SET_ID"); + projected = lab.hasObject("IMAGE_MAP_PROJECTION"); + if(lab.hasKeyword("SPATIAL_SUMMING")) { + sumMode = (int)lab.findKeyword("SPATIAL_SUMMING"); } else { - sumMode = (int)lab.FindKeyword("SAMPLING_FACTOR"); + sumMode = (int)lab.findKeyword("SAMPLING_FACTOR"); } - bitMode = (QString) lab.FindKeyword("SAMPLE_BIT_MODE_ID"); - if(lab.HasKeyword("EDIT_MODE_ID")) { - editMode = (int)lab.FindKeyword("EDIT_MODE_ID"); + bitMode = (QString) lab.findKeyword("SAMPLE_BIT_MODE_ID"); + if(lab.hasKeyword("EDIT_MODE_ID")) { + editMode = (int)lab.findKeyword("EDIT_MODE_ID"); } else { - editMode = (int)lab.FindKeyword("SAMPLE_FIRST_PIXEL"); + editMode = (int)lab.findKeyword("SAMPLE_FIRST_PIXEL"); } } @@ -206,7 +206,7 @@ void TranslateMroCtxLabels(FileName &labelFile, Cube *ocube) { //Pvl to store the labels Pvl outLabel; //Set up the directory where the translations are - PvlGroup dataDir(Preference::Preferences().FindGroup("DataDirectory")); + PvlGroup dataDir(Preference::Preferences().findGroup("DataDirectory")); QString transDir = (QString) dataDir["Mro"] + "/translations/"; Pvl labelPvl(labelFile.expanded()); @@ -232,25 +232,25 @@ void TranslateMroCtxLabels(FileName &labelFile, Cube *ocube) { Pvl lab(labelFile.expanded()); int sumMode, startSamp; - if(lab.HasKeyword("SPATIAL_SUMMING")) { - sumMode = (int)lab.FindKeyword("SPATIAL_SUMMING"); + if(lab.hasKeyword("SPATIAL_SUMMING")) { + sumMode = (int)lab.findKeyword("SPATIAL_SUMMING"); } else { - sumMode = (int)lab.FindKeyword("SAMPLING_FACTOR"); + sumMode = (int)lab.findKeyword("SAMPLING_FACTOR"); } - if(lab.HasKeyword("EDIT_MODE_ID")) { - startSamp = (int)lab.FindKeyword("EDIT_MODE_ID"); + if(lab.hasKeyword("EDIT_MODE_ID")) { + startSamp = (int)lab.findKeyword("EDIT_MODE_ID"); } else { - startSamp = (int)lab.FindKeyword("SAMPLE_FIRST_PIXEL"); + startSamp = (int)lab.findKeyword("SAMPLE_FIRST_PIXEL"); } - PvlGroup inst = outLabel.FindGroup("Instrument", Pvl::Traverse); + PvlGroup inst = outLabel.findGroup("Instrument", Pvl::Traverse); inst += PvlKeyword("SpatialSumming", toString(sumMode)); inst += PvlKeyword("SampleFirstPixel", toString(startSamp)); //Add all groups to the output cube ocube->putGroup(inst); - ocube->putGroup(outLabel.FindGroup("Archive", Pvl::Traverse)); + ocube->putGroup(outLabel.findGroup("Archive", Pvl::Traverse)); ocube->putGroup(bbin); ocube->putGroup(kern); } diff --git a/isis/src/mro/apps/pds2hideal/pds2hideal.cpp b/isis/src/mro/apps/pds2hideal/pds2hideal.cpp index 54e0dadd774fa8135fd86bee000ecc83c7973dd4..612dcae08fb04b36ef26e757d0016e840278c0a0 100644 --- a/isis/src/mro/apps/pds2hideal/pds2hideal.cpp +++ b/isis/src/mro/apps/pds2hideal/pds2hideal.cpp @@ -47,8 +47,8 @@ void IsisMain() { p.StartProcess(); // add translated values from band bin and archive groups to the output cube - outputCube->putGroup(otherGroups.FindGroup("BandBin")); - outputCube->putGroup(otherGroups.FindGroup("Archive")); + outputCube->putGroup(otherGroups.findGroup("BandBin")); + outputCube->putGroup(otherGroups.findGroup("Archive")); PvlGroup kernelGroup("Kernels"); kernelGroup += PvlKeyword("NaifIkCode", toString(-74699)); @@ -69,21 +69,21 @@ void IsisMain() { "$mro/translations/hiriseIdealPdsImportLabel.trn"); labelXlater.Auto(*isisLabel); - PvlObject &naifKeywords = isisLabel->FindObject("NaifKeywords"); + PvlObject &naifKeywords = isisLabel->findObject("NaifKeywords"); PvlKeyword bodyRadii("BODY499_RADII"); - bodyRadii.AddValue(QString(pdsLabelPvl["A_AXIS_RADIUS"])); - bodyRadii.AddValue(QString(pdsLabelPvl["B_AXIS_RADIUS"])); - bodyRadii.AddValue(QString(pdsLabelPvl["C_AXIS_RADIUS"])); + bodyRadii.addValue(QString(pdsLabelPvl["A_AXIS_RADIUS"])); + bodyRadii.addValue(QString(pdsLabelPvl["B_AXIS_RADIUS"])); + bodyRadii.addValue(QString(pdsLabelPvl["C_AXIS_RADIUS"])); naifKeywords += bodyRadii; - PvlObject &isisCubeObject = isisLabel->FindObject("IsisCube"); + PvlObject &isisCubeObject = isisLabel->findObject("IsisCube"); // Compute and add SOFTWARE_NAME to the Archive Group QString sfname = "Isis " + Application::Version() + " " + Application::GetUserInterface().ProgramName(); - PvlGroup &archiveGroup = isisCubeObject.FindGroup("Archive"); + PvlGroup &archiveGroup = isisCubeObject.findGroup("Archive"); archiveGroup += PvlKeyword("SOFTWARE_NAME", sfname); - PvlObject &pdsImageObj = pdsLabelPvl.FindObject("IMAGE"); + PvlObject &pdsImageObj = pdsLabelPvl.findObject("IMAGE"); double samples = double(pdsImageObj["LINE_SAMPLES"]); double lines = double(pdsImageObj["LINES"]); double firstSamp = double(pdsImageObj["FIRST_LINE_SAMPLE"]); @@ -118,73 +118,73 @@ void IsisMain() { */ void addTableKeywords(Pvl *isisLabel, Pvl pdsLabelPvl) { // add keywords to appropriate tables - for (int i = 0; i < isisLabel->Objects(); i++) { - if (isisLabel->Object(i).Name() == "Table") { + for (int i = 0; i < isisLabel->objects(); i++) { + if (isisLabel->object(i).name() == "Table") { PvlKeyword keyword; - if (QString(isisLabel->Object(i)["Name"]) == "InstrumentPointing") { - keyword = pdsLabelPvl.FindObject("INSTRUMENT_POINTING_TABLE")["TIME_DEPENDENT_FRAMES"]; - keyword.SetName("TimeDependentFrames"); - isisLabel->Object(i) += keyword; - keyword = pdsLabelPvl.FindObject("INSTRUMENT_POINTING_TABLE")["CONSTANT_FRAMES"]; - keyword.SetName("ConstantFrames"); - isisLabel->Object(i) += keyword; - keyword = pdsLabelPvl.FindObject("INSTRUMENT_POINTING_TABLE")["CONSTANT_ROTATION"]; - keyword.SetName("ConstantRotation"); - isisLabel->Object(i) += keyword; - keyword = pdsLabelPvl.FindObject("INSTRUMENT_POINTING_TABLE")["CK_TABLE_START_TIME"]; - keyword.SetName("CkTableStartTime"); - isisLabel->Object(i) += keyword; - keyword = pdsLabelPvl.FindObject("INSTRUMENT_POINTING_TABLE")["CK_TABLE_END_TIME"]; - keyword.SetName("CkTableEndTime"); - isisLabel->Object(i) += keyword; - keyword = pdsLabelPvl.FindObject("INSTRUMENT_POINTING_TABLE")["CK_TABLE_ORIGINAL_SIZE"]; - keyword.SetName("CkTableOriginalSize"); - isisLabel->Object(i) += keyword; + if (QString(isisLabel->object(i)["Name"]) == "InstrumentPointing") { + keyword = pdsLabelPvl.findObject("INSTRUMENT_POINTING_TABLE")["TIME_DEPENDENT_FRAMES"]; + keyword.setName("TimeDependentFrames"); + isisLabel->object(i) += keyword; + keyword = pdsLabelPvl.findObject("INSTRUMENT_POINTING_TABLE")["CONSTANT_FRAMES"]; + keyword.setName("ConstantFrames"); + isisLabel->object(i) += keyword; + keyword = pdsLabelPvl.findObject("INSTRUMENT_POINTING_TABLE")["CONSTANT_ROTATION"]; + keyword.setName("ConstantRotation"); + isisLabel->object(i) += keyword; + keyword = pdsLabelPvl.findObject("INSTRUMENT_POINTING_TABLE")["CK_TABLE_START_TIME"]; + keyword.setName("CkTableStartTime"); + isisLabel->object(i) += keyword; + keyword = pdsLabelPvl.findObject("INSTRUMENT_POINTING_TABLE")["CK_TABLE_END_TIME"]; + keyword.setName("CkTableEndTime"); + isisLabel->object(i) += keyword; + keyword = pdsLabelPvl.findObject("INSTRUMENT_POINTING_TABLE")["CK_TABLE_ORIGINAL_SIZE"]; + keyword.setName("CkTableOriginalSize"); + isisLabel->object(i) += keyword; } - if (QString(isisLabel->Object(i)["Name"]) == "InstrumentPosition") { - keyword = pdsLabelPvl.FindObject("INSTRUMENT_POSITION_TABLE")["CACHE_TYPE"]; - keyword.SetName("CacheType"); - isisLabel->Object(i) += keyword; - keyword = pdsLabelPvl.FindObject("INSTRUMENT_POSITION_TABLE")["SPK_TABLE_START_TIME"]; - keyword.SetName("SpkTableStartTime"); - isisLabel->Object(i) += keyword; - keyword = pdsLabelPvl.FindObject("INSTRUMENT_POSITION_TABLE")["SPK_TABLE_END_TIME"]; - keyword.SetName("SpkTableEndTime"); - isisLabel->Object(i) += keyword; - keyword = pdsLabelPvl.FindObject("INSTRUMENT_POSITION_TABLE")["SPK_TABLE_ORIGINAL_SIZE"]; - keyword.SetName("SpkTableOriginalSize"); - isisLabel->Object(i) += keyword; + if (QString(isisLabel->object(i)["Name"]) == "InstrumentPosition") { + keyword = pdsLabelPvl.findObject("INSTRUMENT_POSITION_TABLE")["CACHE_TYPE"]; + keyword.setName("CacheType"); + isisLabel->object(i) += keyword; + keyword = pdsLabelPvl.findObject("INSTRUMENT_POSITION_TABLE")["SPK_TABLE_START_TIME"]; + keyword.setName("SpkTableStartTime"); + isisLabel->object(i) += keyword; + keyword = pdsLabelPvl.findObject("INSTRUMENT_POSITION_TABLE")["SPK_TABLE_END_TIME"]; + keyword.setName("SpkTableEndTime"); + isisLabel->object(i) += keyword; + keyword = pdsLabelPvl.findObject("INSTRUMENT_POSITION_TABLE")["SPK_TABLE_ORIGINAL_SIZE"]; + keyword.setName("SpkTableOriginalSize"); + isisLabel->object(i) += keyword; } - if (QString(isisLabel->Object(i)["Name"]) == "BodyRotation") { - keyword = pdsLabelPvl.FindObject("BODY_ROTATION_TABLE")["TIME_DEPENDENT_FRAMES"]; - keyword.SetName("TimeDependentFrames"); - isisLabel->Object(i) += keyword; - keyword = pdsLabelPvl.FindObject("BODY_ROTATION_TABLE")["CK_TABLE_START_TIME"]; - keyword.SetName("CkTableStartTime"); - isisLabel->Object(i) += keyword; - keyword = pdsLabelPvl.FindObject("BODY_ROTATION_TABLE")["CK_TABLE_END_TIME"]; - keyword.SetName("CkTableEndTime"); - isisLabel->Object(i) += keyword; - keyword = pdsLabelPvl.FindObject("BODY_ROTATION_TABLE")["CK_TABLE_ORIGINAL_SIZE"]; - keyword.SetName("CkTableOriginalSize"); - isisLabel->Object(i) += keyword; - keyword = pdsLabelPvl.FindObject("BODY_ROTATION_TABLE")["SOLAR_LONGITUDE"]; - keyword.SetName("SolarLongitude"); - isisLabel->Object(i) += keyword; + if (QString(isisLabel->object(i)["Name"]) == "BodyRotation") { + keyword = pdsLabelPvl.findObject("BODY_ROTATION_TABLE")["TIME_DEPENDENT_FRAMES"]; + keyword.setName("TimeDependentFrames"); + isisLabel->object(i) += keyword; + keyword = pdsLabelPvl.findObject("BODY_ROTATION_TABLE")["CK_TABLE_START_TIME"]; + keyword.setName("CkTableStartTime"); + isisLabel->object(i) += keyword; + keyword = pdsLabelPvl.findObject("BODY_ROTATION_TABLE")["CK_TABLE_END_TIME"]; + keyword.setName("CkTableEndTime"); + isisLabel->object(i) += keyword; + keyword = pdsLabelPvl.findObject("BODY_ROTATION_TABLE")["CK_TABLE_ORIGINAL_SIZE"]; + keyword.setName("CkTableOriginalSize"); + isisLabel->object(i) += keyword; + keyword = pdsLabelPvl.findObject("BODY_ROTATION_TABLE")["SOLAR_LONGITUDE"]; + keyword.setName("SolarLongitude"); + isisLabel->object(i) += keyword; } - if (QString(isisLabel->Object(i)["Name"]) == "SunPosition") { - keyword = pdsLabelPvl.FindObject("SUN_POSITION_TABLE")["CACHE_TYPE"]; - keyword.SetName("CacheType"); - isisLabel->Object(i) += keyword; - keyword = pdsLabelPvl.FindObject("SUN_POSITION_TABLE")["SPK_TABLE_START_TIME"]; - keyword.SetName("SpkTableStartTime"); - isisLabel->Object(i) += keyword; - keyword = pdsLabelPvl.FindObject("SUN_POSITION_TABLE")["SPK_TABLE_END_TIME"]; - keyword.SetName("SpkTableEndTime"); - isisLabel->Object(i) += keyword; - keyword = pdsLabelPvl.FindObject("SUN_POSITION_TABLE")["SPK_TABLE_ORIGINAL_SIZE"]; - keyword.SetName("SpkTableOriginalSize"); - isisLabel->Object(i) += keyword; + if (QString(isisLabel->object(i)["Name"]) == "SunPosition") { + keyword = pdsLabelPvl.findObject("SUN_POSITION_TABLE")["CACHE_TYPE"]; + keyword.setName("CacheType"); + isisLabel->object(i) += keyword; + keyword = pdsLabelPvl.findObject("SUN_POSITION_TABLE")["SPK_TABLE_START_TIME"]; + keyword.setName("SpkTableStartTime"); + isisLabel->object(i) += keyword; + keyword = pdsLabelPvl.findObject("SUN_POSITION_TABLE")["SPK_TABLE_END_TIME"]; + keyword.setName("SpkTableEndTime"); + isisLabel->object(i) += keyword; + keyword = pdsLabelPvl.findObject("SUN_POSITION_TABLE")["SPK_TABLE_ORIGINAL_SIZE"]; + keyword.setName("SpkTableOriginalSize"); + isisLabel->object(i) += keyword; } } } diff --git a/isis/src/mro/objs/CTXCamera/CTXCamera.cpp b/isis/src/mro/objs/CTXCamera/CTXCamera.cpp index 85ad0f5615ee7154016d4ba07c819b3ab91e8d42..717cb51999b2c397733d6b3d8169fd0369ee3d9f 100644 --- a/isis/src/mro/objs/CTXCamera/CTXCamera.cpp +++ b/isis/src/mro/objs/CTXCamera/CTXCamera.cpp @@ -47,7 +47,7 @@ namespace Isis { SetPixelPitch(); // Get the start time from labels - PvlGroup &inst = lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup &inst = lab.findGroup("Instrument", Pvl::Traverse); QString stime = inst["SpacecraftClockCount"]; double etStart = getClockTime(stime).Et(); diff --git a/isis/src/mro/objs/CTXCamera/unitTest.cpp b/isis/src/mro/objs/CTXCamera/unitTest.cpp index dc02994891aa08efe5a01b66a883b8568fac5676..67bba251ee0af5c7c90aed452eff8093c49bf5eb 100644 --- a/isis/src/mro/objs/CTXCamera/unitTest.cpp +++ b/isis/src/mro/objs/CTXCamera/unitTest.cpp @@ -63,7 +63,7 @@ int main(int argc, char *argv[]) { for(unsigned int i = 0; i < sizeof(knownLat) / sizeof(double); i++) { Pvl p(files[i]); Camera *cam = CameraFactory::Create(p); - cout << "FileName: " << FileName(p.FileName()).name() << endl; + cout << "FileName: " << FileName(p.fileName()).name() << endl; cout << "CK Frame: " << cam->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); diff --git a/isis/src/mro/objs/CrismCamera/CrismCamera.cpp b/isis/src/mro/objs/CrismCamera/CrismCamera.cpp index 6ae162640aa8d4255f89566876480859d90b3f60..74f3af0bb5884dd5bd13380ef2ca9e085beaba7e 100644 --- a/isis/src/mro/objs/CrismCamera/CrismCamera.cpp +++ b/isis/src/mro/objs/CrismCamera/CrismCamera.cpp @@ -54,7 +54,7 @@ namespace Isis { m_isBandDependent(true) { NaifStatus::CheckErrors(); - PvlGroup inst = lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup inst = lab.findGroup("Instrument", Pvl::Traverse); // SensorId = S (VNIR), = L (IR) = J (JOINT) QString sensor = (QString) inst ["SensorId"]; diff --git a/isis/src/mro/objs/CrismCamera/unitTest.cpp b/isis/src/mro/objs/CrismCamera/unitTest.cpp index 097c595a57173c5c41bf61c55096f0b30297627f..722a8e719fe5ab950187633a782dbc5b836e57ec 100644 --- a/isis/src/mro/objs/CrismCamera/unitTest.cpp +++ b/isis/src/mro/objs/CrismCamera/unitTest.cpp @@ -52,7 +52,7 @@ int main(void) { Pvl p("$mro/testData/frt0001cfd8_07_if124s_trr3_b24.cub"); Camera *cam = CameraFactory::Create(p); - cout << "FileName: " << FileName(p.FileName()).name() << endl; + cout << "FileName: " << FileName(p.fileName()).name() << endl; cout << "CK Frame: " << cam->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(4); diff --git a/isis/src/mro/objs/HiLab/HiLab.cpp b/isis/src/mro/objs/HiLab/HiLab.cpp index 45b009a09ef8aa7be8c7414341abbd364666fbbe..84eb74a360c4270b8706f8d431caebca9a994b01 100644 --- a/isis/src/mro/objs/HiLab/HiLab.cpp +++ b/isis/src/mro/objs/HiLab/HiLab.cpp @@ -32,7 +32,7 @@ namespace Isis { p_cpmmNumber = group["CpmmNumber"]; p_channel = group["ChannelNumber"]; - if(group.HasKeyword("Summing")) { + if(group.hasKeyword("Summing")) { p_bin = group["Summing"]; } else { @@ -40,7 +40,7 @@ namespace Isis { throw IException(IException::Io, msg, _FILEINFO_); } - if(group.HasKeyword("Tdi")) { + if(group.hasKeyword("Tdi")) { p_tdi = group["Tdi"]; } else { diff --git a/isis/src/mro/objs/HiriseCamera/HiriseCamera.cpp b/isis/src/mro/objs/HiriseCamera/HiriseCamera.cpp index cc5182a340895449097eb908244e130784dff2d1..e37af08fa764b56ce0c9d19a77c4a7103f8dc1cb 100644 --- a/isis/src/mro/objs/HiriseCamera/HiriseCamera.cpp +++ b/isis/src/mro/objs/HiriseCamera/HiriseCamera.cpp @@ -51,7 +51,7 @@ namespace Isis { instrumentRotation()->SetFrame(-74690); // Get required keywords from instrument group - PvlGroup &inst = lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup &inst = lab.findGroup("Instrument", Pvl::Traverse); int tdiMode = inst["Tdi"]; double binMode = inst["Summing"]; int chan = inst["ChannelNumber"]; diff --git a/isis/src/mro/objs/HiriseCamera/unitTest.cpp b/isis/src/mro/objs/HiriseCamera/unitTest.cpp index 44de2ef0f192c0d569aaf0735c0c5acffd7f4a9e..b0f20419b86f299bde5ebf963fec2908a9867ace 100644 --- a/isis/src/mro/objs/HiriseCamera/unitTest.cpp +++ b/isis/src/mro/objs/HiriseCamera/unitTest.cpp @@ -48,7 +48,7 @@ int main(void) { Pvl p("$mro/testData/PSP_001446_1790_BG12_0.cub"); Camera *cam = CameraFactory::Create(p); - cout << "FileName: " << FileName(p.FileName()).name() << endl; + cout << "FileName: " << FileName(p.fileName()).name() << endl; cout << "CK Frame: " << cam->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); diff --git a/isis/src/mro/objs/MarciCamera/MarciCamera.cpp b/isis/src/mro/objs/MarciCamera/MarciCamera.cpp index e4fc82a2b1a61655b9feb9d727a30d34158551ea..618c3f78783a86923ac8ffde8617e2c85d7a3fa2 100644 --- a/isis/src/mro/objs/MarciCamera/MarciCamera.cpp +++ b/isis/src/mro/objs/MarciCamera/MarciCamera.cpp @@ -45,7 +45,7 @@ namespace Isis { */ MarciCamera::MarciCamera(Pvl &lab) : PushFrameCamera(lab) { NaifStatus::CheckErrors(); - PvlGroup &inst = lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup &inst = lab.findGroup("Instrument", Pvl::Traverse); // make sure it is a marci image if(inst["InstrumentId"][0] != "Marci") { string msg = "The image does not appear to be a Marci Image"; @@ -102,10 +102,10 @@ namespace Isis { filterToFrameletOffset.insert(pair("SHORT_UV", 6 * frameletOffsetFactor)); // Get the keywords from labels - const PvlGroup &bandBin = lab.FindGroup("BandBin", Pvl::Traverse); + const PvlGroup &bandBin = lab.findGroup("BandBin", Pvl::Traverse); const PvlKeyword &filtNames = bandBin["FilterName"]; - for(int i = 0; i < filtNames.Size(); i++) { + for(int i = 0; i < filtNames.size(); i++) { if(filterToDetectorOffset.find(filtNames[i]) == filterToDetectorOffset.end()) { QString msg = "Unrecognized filter name [" + filtNames[i] + "]"; throw IException(IException::Programmer, msg, _FILEINFO_); diff --git a/isis/src/mro/objs/MarciCamera/unitTest.cpp b/isis/src/mro/objs/MarciCamera/unitTest.cpp index 39286718fcbe4d030044662725357ba055e28fa6..3ff59ffa01158fada99ab44c88867a62b8184594 100644 --- a/isis/src/mro/objs/MarciCamera/unitTest.cpp +++ b/isis/src/mro/objs/MarciCamera/unitTest.cpp @@ -49,7 +49,7 @@ int main(void) { Pvl p("$mro/testData/P12_005911_3396_MA_00N009W.cropped.cub"); Camera *cam = CameraFactory::Create(p); - cout << "FileName: " << FileName(p.FileName()).name() << endl; + cout << "FileName: " << FileName(p.fileName()).name() << endl; cout << "CK Frame: " << cam->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); diff --git a/isis/src/odyssey/apps/thm2isis/thm2isis.cpp b/isis/src/odyssey/apps/thm2isis/thm2isis.cpp index 70cc87c72c06305ec483066079e1abfc1a051d7b..ec45f3da5895ff282762544c09e3bf5fa5fd8fe8 100644 --- a/isis/src/odyssey/apps/thm2isis/thm2isis.cpp +++ b/isis/src/odyssey/apps/thm2isis/thm2isis.cpp @@ -34,7 +34,7 @@ void IsisMain() { bool projected; try { Pvl lab(in.expanded()); - projected = lab.HasObject("IMAGE_MAP_PROJECTION"); + projected = lab.hasObject("IMAGE_MAP_PROJECTION"); QString id; id = (QString)lab["DATA_SET_ID"]; id = id.simplified().trimmed(); @@ -68,7 +68,7 @@ void IsisMain() { // Set up the output cube FileName outFile(ui.GetFileName("TO")); - PvlGroup &inst = isis3Lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup &inst = isis3Lab.findGroup("Instrument", Pvl::Traverse); if((QString)inst["InstrumentId"] == "THEMIS_VIS") { Cube *even = new Cube(); @@ -104,22 +104,22 @@ void IsisMain() { p.EndProcess(); for(int i = 0; i < (int)outputCubes.size(); i++) { - for(int grp = 0; grp < isis3Lab.Groups(); grp++) { + for(int grp = 0; grp < isis3Lab.groups(); grp++) { // vis image? if(outputCubes.size() != 1) { int numFramelets = p.Lines() / frameletLines; - isis3Lab.FindGroup("Instrument").AddKeyword( + isis3Lab.findGroup("Instrument").addKeyword( PvlKeyword("NumFramelets", toString(numFramelets)), Pvl::Replace ); QString frameletType = ((i == 0) ? "Odd" : "Even"); - isis3Lab.FindGroup("Instrument").AddKeyword( + isis3Lab.findGroup("Instrument").addKeyword( PvlKeyword("Framelets", frameletType), Pvl::Replace ); } - outputCubes[i]->putGroup(isis3Lab.Group(grp)); + outputCubes[i]->putGroup(isis3Lab.group(grp)); } outputCubes[i]->write(origLabels); @@ -172,14 +172,14 @@ void TranslateLabels(Pvl &pdsLab, Pvl &isis3, int numBands) { inst += PvlKeyword("SpacecraftClockCount", (QString) pdsLab["SpacecraftClockStartCount"]); - PvlObject &sqube = pdsLab.FindObject("SPECTRAL_QUBE"); + PvlObject &sqube = pdsLab.findObject("SPECTRAL_QUBE"); if(instId == "THEMIS_IR") { inst += PvlKeyword("GainNumber", (QString)sqube["GainNumber"]); inst += PvlKeyword("OffsetNumber", (QString)sqube["OffsetNumber"]); inst += PvlKeyword("MissingScanLines", (QString)sqube["MissingScanLines"]); inst += PvlKeyword("TimeDelayIntegration", (QString)sqube["TimeDelayIntegrationFlag"]); - if(sqube.HasKeyword("SpatialSumming")) { + if(sqube.hasKeyword("SpatialSumming")) { inst += PvlKeyword("SpatialSumming", (QString)sqube["SpatialSumming"]); } } @@ -194,22 +194,22 @@ void TranslateLabels(Pvl &pdsLab, Pvl &isis3, int numBands) { double spacecraftClockOffset = ui.GetDouble("TIMEOFFSET"); inst += PvlKeyword("SpacecraftClockOffset", toString(spacecraftClockOffset), "seconds"); - isis3.AddGroup(inst); + isis3.addGroup(inst); // Create the Band bin Group PvlGroup bandBin("BandBin"); PvlKeyword originalBand("OriginalBand"); for(int i = 1; i <= numBands; i++) { - originalBand.AddValue(toString(i)); + originalBand.addValue(toString(i)); } bandBin += originalBand; - bandBin += sqube.FindGroup("BandBin")["BandBinCenter"]; - bandBin += sqube.FindGroup("BandBin")["BandBinWidth"]; - bandBin += sqube.FindGroup("BandBin")["BandBinFilterNumber"]; - bandBin["BandBinCenter"].SetName("Center"); - bandBin["BandBinWidth"].SetName("Width"); - bandBin["BandBinFilterNumber"].SetName("FilterNumber"); - isis3.AddGroup(bandBin); + bandBin += sqube.findGroup("BandBin")["BandBinCenter"]; + bandBin += sqube.findGroup("BandBin")["BandBinWidth"]; + bandBin += sqube.findGroup("BandBin")["BandBinFilterNumber"]; + bandBin["BandBinCenter"].setName("Center"); + bandBin["BandBinWidth"].setName("Width"); + bandBin["BandBinFilterNumber"].setName("FilterNumber"); + isis3.addGroup(bandBin); // Create the archive Group PvlGroup arch("Archive"); @@ -227,7 +227,7 @@ void TranslateLabels(Pvl &pdsLab, Pvl &isis3, int numBands) { arch += PvlKeyword("CommandSequenceNumber", (QString)sqube["CommandSequenceNumber"]); arch += PvlKeyword("Description", (QString)sqube["Description"]); - isis3.AddGroup(arch); + isis3.addGroup(arch); // Create the Kernel Group PvlGroup kerns("Kernels"); @@ -237,5 +237,5 @@ void TranslateLabels(Pvl &pdsLab, Pvl &isis3, int numBands) { else { kerns += PvlKeyword("NaifFrameCode", toString(-53032)); } - isis3.AddGroup(kerns); + isis3.addGroup(kerns); } diff --git a/isis/src/odyssey/apps/thmbasemap1/thmbasemap1.cpp b/isis/src/odyssey/apps/thmbasemap1/thmbasemap1.cpp index 1971763e426489cf10050532dc351fbc510de84c..7b031c9b606d9700e2ad92faad103bfedc16f6f8 100644 --- a/isis/src/odyssey/apps/thmbasemap1/thmbasemap1.cpp +++ b/isis/src/odyssey/apps/thmbasemap1/thmbasemap1.cpp @@ -26,7 +26,7 @@ void IsisMain(){ // Input file options FileList cubes; Pvl &pref = Preference::Preferences(); - QString pathName = (QString)pref.FindGroup("DataDirectory")["Temporary"] + "/"; + QString pathName = (QString)pref.findGroup("DataDirectory")["Temporary"] + "/"; if (ui.WasEntered("TOPATH")) { pathName = (QString)ui.GetString("TOPATH") + "/"; } @@ -179,16 +179,16 @@ void IsisMain(){ pdsSanFile = true; } - QString duration =(QString)lab.FindObject("SPECTRAL_QUBE",Isis::PvlObject::Traverse)["IMAGE_DURATION"]; + QString duration =(QString)lab.findObject("SPECTRAL_QUBE",Isis::PvlObject::Traverse)["IMAGE_DURATION"]; // Make sure we have THEMIS IR at wavelength 12.57. // 12.57um wavelength has the best signal to noise ratio, and 14.88um wavelenght is atmospheric band - PvlKeyword bandcenter = lab.FindGroup("BAND_BIN",Pvl::Traverse)["BAND_BIN_CENTER"]; + PvlKeyword bandcenter = lab.findGroup("BAND_BIN",Pvl::Traverse)["BAND_BIN_CENTER"]; bool band12_57 = false; bool band14_88 = false; int procBand = 0; int atmosBand = 0; - for (int index=0; index 90, then exit if (!processNight && incAngle >= 90) { @@ -341,10 +341,10 @@ void IsisMain(){ " TO=" + tempgaps + " APPEND=no"; ProgramLauncher::RunIsisProgram("stats", parameters); Pvl tg; - tg.Read(tempgaps); - QString totalpixels = tg.FindGroup("Results",Pvl::Traverse)["TotalPixels"]; - QString validpixels = tg.FindGroup("Results",Pvl::Traverse)["ValidPixels"]; - //if (tg.HasGroup("Gap")) { + tg.read(tempgaps); + QString totalpixels = tg.findGroup("Results",Pvl::Traverse)["TotalPixels"]; + QString validpixels = tg.findGroup("Results",Pvl::Traverse)["ValidPixels"]; + //if (tg.hasGroup("Gap")) { if (IString(totalpixels).ToInteger() != IString(validpixels).ToInteger()) { cout << tg << endl; sgap = "yes"; @@ -365,18 +365,18 @@ void IsisMain(){ ProgramLauncher::RunIsisProgram("camstats", parameters); Pvl p2; - p2.Read(tempstat2); - QString incavg = p2.FindGroup("IncidenceAngle",Pvl::Traverse)["IncidenceAverage"]; - QString resavg = p2.FindGroup("Resolution",Pvl::Traverse)["ResolutionAverage"]; - QString incmin = p2.FindGroup("IncidenceAngle",Pvl::Traverse)["IncidenceMinimum"]; - QString incmax = p2.FindGroup("IncidenceAngle",Pvl::Traverse)["IncidenceMaximum"]; + p2.read(tempstat2); + QString incavg = p2.findGroup("IncidenceAngle",Pvl::Traverse)["IncidenceAverage"]; + QString resavg = p2.findGroup("Resolution",Pvl::Traverse)["ResolutionAverage"]; + QString incmin = p2.findGroup("IncidenceAngle",Pvl::Traverse)["IncidenceMinimum"]; + QString incmax = p2.findGroup("IncidenceAngle",Pvl::Traverse)["IncidenceMaximum"]; remove (tstat2.expanded().toAscii().data()); double summing = 1; FileName tosum = FileName(outFile); Pvl sumlab(tosum.expanded()); - PvlGroup InstGrp = sumlab.FindGroup("Instrument",Pvl::Traverse); - if (InstGrp.HasKeyword("SpatialSumming")) { + PvlGroup InstGrp = sumlab.findGroup("Instrument",Pvl::Traverse); + if (InstGrp.hasKeyword("SpatialSumming")) { summing = InstGrp["SpatialSumming"]; } diff --git a/isis/src/odyssey/apps/thmvisflat/thmvisflat.cpp b/isis/src/odyssey/apps/thmvisflat/thmvisflat.cpp index 5451b1d447ed266f4577c63d1721ec9c4fa95dba..dda6039dbc68d326908c15072349e1ca529590d1 100644 --- a/isis/src/odyssey/apps/thmvisflat/thmvisflat.cpp +++ b/isis/src/odyssey/apps/thmvisflat/thmvisflat.cpp @@ -69,8 +69,8 @@ void IsisMain() { vector filter; PvlKeyword &filtNums = - icube.label()->FindGroup("BandBin", Pvl::Traverse)["FilterNumber"]; - for(int i = 0; i < filtNums.Size(); i++) { + icube.label()->findGroup("BandBin", Pvl::Traverse)["FilterNumber"]; + for(int i = 0; i < filtNums.size(); i++) { filter.push_back(toInt(filtNums[i])); } @@ -119,17 +119,17 @@ void IsisMain() { while(!ocubeMgr.end()); // Propagate labels and objects (in case of spice data) - PvlObject &inCubeObj = icube.label()->FindObject("IsisCube"); - PvlObject &outCubeObj = ocube.label()->FindObject("IsisCube"); + PvlObject &inCubeObj = icube.label()->findObject("IsisCube"); + PvlObject &outCubeObj = ocube.label()->findObject("IsisCube"); - for(int g = 0; g < inCubeObj.Groups(); g++) { - outCubeObj.AddGroup(inCubeObj.Group(g)); + for(int g = 0; g < inCubeObj.groups(); g++) { + outCubeObj.addGroup(inCubeObj.group(g)); } - for(int o = 0; o < icube.label()->Objects(); o++) { - if(icube.label()->Object(o).IsNamed("Table")) { - Blob t(icube.label()->Object(o)["Name"], - icube.label()->Object(o).Name()); + for(int o = 0; o < icube.label()->objects(); o++) { + if(icube.label()->object(o).isNamed("Table")) { + Blob t(icube.label()->object(o)["Name"], + icube.label()->object(o).name()); icube.read(t); ocube.write(t); } diff --git a/isis/src/odyssey/apps/thmvistrim/thmvistrim.cpp b/isis/src/odyssey/apps/thmvistrim/thmvistrim.cpp index 43f1f49891024eaf0e0a598e68079226bf433e4d..d6dac29c20ced89920072afceebb9bb92478ca22 100644 --- a/isis/src/odyssey/apps/thmvistrim/thmvistrim.cpp +++ b/isis/src/odyssey/apps/thmvistrim/thmvistrim.cpp @@ -105,7 +105,7 @@ void CalculateBottomTrim(Cube *icube) { // to get these, we change the cube labels in a local copy and create an // odd framelet and an even framelet camera. Pvl cubeLabels = *icube->label(); - PvlKeyword &framelets = cubeLabels.FindGroup("Instrument", Pvl::Traverse)["Framelets"]; + PvlKeyword &framelets = cubeLabels.findGroup("Instrument", Pvl::Traverse)["Framelets"]; framelets = "Even"; Camera *camEven = CameraFactory::Create(cubeLabels); diff --git a/isis/src/odyssey/objs/ThemisIrCamera/ThemisIrCamera.cpp b/isis/src/odyssey/objs/ThemisIrCamera/ThemisIrCamera.cpp index 7ac3f64a24070befe251a49559c38ce39488d838..e40c6f6b506153bfdb9e560ed8fcfad5826b036c 100644 --- a/isis/src/odyssey/objs/ThemisIrCamera/ThemisIrCamera.cpp +++ b/isis/src/odyssey/objs/ThemisIrCamera/ThemisIrCamera.cpp @@ -48,7 +48,7 @@ namespace Isis { // Get the start time. This includes adding a time offset that could // have been put in the labels during ingestion (thm2isis). This is meant // to handle a random timing errors which can be up to four pixels - PvlGroup &inst = lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup &inst = lab.findGroup("Instrument", Pvl::Traverse); QString stime = inst["SpacecraftClockCount"]; p_etStart = getClockTime(stime).Et(); @@ -58,9 +58,9 @@ namespace Isis { // If bands have been extracted from the original image then we // need to read the band bin group so we can map from the cube band // number to the instrument band number - PvlGroup &bandBin = lab.FindGroup("BandBin", Pvl::Traverse); + PvlGroup &bandBin = lab.findGroup("BandBin", Pvl::Traverse); PvlKeyword &orgBand = bandBin["FilterNumber"]; - for(int i = 0; i < orgBand.Size(); i++) { + for(int i = 0; i < orgBand.size(); i++) { p_originalBand.push_back(toInt(orgBand[i])); } @@ -70,7 +70,7 @@ namespace Isis { // Duxbury model it is 33.2871 based on 1/22/2009 email with a readout // rate of 30.0417 lines/second int sumMode = 1; - if(inst.HasKeyword("SpatialSumming")) { + if(inst.hasKeyword("SpatialSumming")) { sumMode = inst["SpatialSumming"]; } p_lineRate = 33.2871 / 1000.0 * sumMode; diff --git a/isis/src/odyssey/objs/ThemisIrCamera/unitTest.cpp b/isis/src/odyssey/objs/ThemisIrCamera/unitTest.cpp index 0b630e5b2397d1ce7755e12d35cf754436c4c644..a2c873b2aaf90543ca45d38e5385da4ab005f595 100644 --- a/isis/src/odyssey/objs/ThemisIrCamera/unitTest.cpp +++ b/isis/src/odyssey/objs/ThemisIrCamera/unitTest.cpp @@ -49,7 +49,7 @@ int main(void) { Pvl p("$odyssey/testData/I00831002RDR.cub"); Camera *cam = CameraFactory::Create(p); - cout << "FileName: " << FileName(p.FileName()).name() << endl; + cout << "FileName: " << FileName(p.fileName()).name() << endl; cout << "CK Frame: " << cam->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); diff --git a/isis/src/odyssey/objs/ThemisVisCamera/ThemisVisCamera.cpp b/isis/src/odyssey/objs/ThemisVisCamera/ThemisVisCamera.cpp index 464dfac1d0fd1d66169e257722c9389c45bc6384..5e3ca2cdf791a007231a446166ceda32a56eab8e 100644 --- a/isis/src/odyssey/objs/ThemisVisCamera/ThemisVisCamera.cpp +++ b/isis/src/odyssey/objs/ThemisVisCamera/ThemisVisCamera.cpp @@ -53,7 +53,7 @@ namespace Isis { SetFocalLength(202.059); SetPixelPitch(0.009); - PvlGroup &inst = lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup &inst = lab.findGroup("Instrument", Pvl::Traverse); // make sure it is a themis vis image if(inst["InstrumentId"][0] != "THEMIS_VIS") { string msg = "The image does not appear to be a Themis Vis Image"; @@ -75,9 +75,9 @@ namespace Isis { p_nframes = inst["NumFramelets"]; // Get the keywords from labels - PvlGroup &bandBin = lab.FindGroup("BandBin", Pvl::Traverse); + PvlGroup &bandBin = lab.findGroup("BandBin", Pvl::Traverse); PvlKeyword &orgBand = bandBin["OriginalBand"]; - for(int i = 0; i < orgBand.Size(); i++) { + for(int i = 0; i < orgBand.size(); i++) { p_originalBand.push_back(toInt(orgBand[i])); } diff --git a/isis/src/odyssey/objs/ThemisVisCamera/unitTest.cpp b/isis/src/odyssey/objs/ThemisVisCamera/unitTest.cpp index 52f257aa32add977d3ab78a7c0c340527b996b6c..f2516364aa2e4325ab5be9c34283e3e24d9c7830 100644 --- a/isis/src/odyssey/objs/ThemisVisCamera/unitTest.cpp +++ b/isis/src/odyssey/objs/ThemisVisCamera/unitTest.cpp @@ -51,7 +51,7 @@ int main(void) { Pvl p("$odyssey/testData/V14093008RDR.even.cub"); Camera *cam = CameraFactory::Create(p); - cout << "FileName: " << FileName(p.FileName()).name() << endl; + cout << "FileName: " << FileName(p.fileName()).name() << endl; cout << "CK Frame: " << cam->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); diff --git a/isis/src/qisis/apps/cneteditor/CnetEditorWindow.cpp b/isis/src/qisis/apps/cneteditor/CnetEditorWindow.cpp index 2e520aacb1ca032e077ec2754ecc7a892c4c6810..11525bf97083b3d95e077134df1365454200287b 100644 --- a/isis/src/qisis/apps/cneteditor/CnetEditorWindow.cpp +++ b/isis/src/qisis/apps/cneteditor/CnetEditorWindow.cpp @@ -719,7 +719,7 @@ namespace Isis editorWidget->connectionFilterWidget()); setFileState(HasFile, *curFile); - saveAsPvl = !Pvl(*curFile).HasObject("ProtoBuffer"); + saveAsPvl = !Pvl(*curFile).hasObject("ProtoBuffer"); } diff --git a/isis/src/qisis/apps/qmos/qmos.cpp b/isis/src/qisis/apps/qmos/qmos.cpp index 9eb468e5f7b27cbb85203dfb7d34ea77f8bb5a2d..dd3ece1a858fce1c76927336cea85b3399e25d88 100644 --- a/isis/src/qisis/apps/qmos/qmos.cpp +++ b/isis/src/qisis/apps/qmos/qmos.cpp @@ -25,7 +25,7 @@ int main(int argc, char *argv[]) { QApplication::setApplicationName("qmos"); // check for forcing of gui style -// PvlGroup &uiPref = Preference::Preferences().FindGroup( +// PvlGroup &uiPref = Preference::Preferences().findGroup( // "UserInterface"); // if(uiPref.HasKeyword("GuiStyle")) { // string style = uiPref["GuiStyle"]; diff --git a/isis/src/qisis/apps/qnet/QnetTool.cpp b/isis/src/qisis/apps/qnet/QnetTool.cpp index e33cee701109ed87b1be3bfef8165e4252effb24..a4f0162c22189f2e5bf160bd5ee22d08578a947a 100644 --- a/isis/src/qisis/apps/qnet/QnetTool.cpp +++ b/isis/src/qisis/apps/qnet/QnetTool.cpp @@ -3239,7 +3239,7 @@ namespace Isis { // to view and/or edit the template PvlEditDialog registrationDialog(templatePvl); registrationDialog.setWindowTitle("View or Edit Template File: " - + (templatePvl.FileName())); + + (templatePvl.fileName())); registrationDialog.resize(550,360); registrationDialog.exec(); } diff --git a/isis/src/qisis/apps/qnet/qnet.cpp b/isis/src/qisis/apps/qnet/qnet.cpp index 130312893b6781c0f3429234f128c1702506d369..acd16e6d77247d8d2ca562c5f2fe800c834019df 100644 --- a/isis/src/qisis/apps/qnet/qnet.cpp +++ b/isis/src/qisis/apps/qnet/qnet.cpp @@ -55,9 +55,9 @@ int main(int argc, char *argv[]) { QApplication::setApplicationName("qnet"); // check for forcing of gui style - PvlGroup &uiPref = Preference::Preferences().FindGroup( + PvlGroup &uiPref = Preference::Preferences().findGroup( "UserInterface"); - if (uiPref.HasKeyword("GuiStyle")) { + if (uiPref.hasKeyword("GuiStyle")) { QString style = uiPref["GuiStyle"]; QApplication::setStyle((QString) style); } diff --git a/isis/src/qisis/apps/qtie/QtieTool.cpp b/isis/src/qisis/apps/qtie/QtieTool.cpp index fe6b621c044ee97c056f7fad4a15c3b06f76f6e0..d22a55ae2abae239abfc0a69e82bf19fa51ac430 100644 --- a/isis/src/qisis/apps/qtie/QtieTool.cpp +++ b/isis/src/qisis/apps/qtie/QtieTool.cpp @@ -850,8 +850,8 @@ namespace Isis { void QtieTool::writeNewCmatrix(Table *cmatrix) { //check for existing polygon, if exists delete it - if (p_matchCube->label()->HasObject("Polygon")) { - p_matchCube->label()->DeleteObject("Polygon"); + if (p_matchCube->label()->hasObject("Polygon")) { + p_matchCube->label()->deleteObject("Polygon"); } // Update the cube history @@ -927,7 +927,7 @@ namespace Isis { // to view and/or edit the template PvlEditDialog registrationDialog(templatePvl); registrationDialog.setWindowTitle("View or Edit Template File: " - + (templatePvl.FileName())); + + (templatePvl.fileName())); registrationDialog.resize(550, 360); registrationDialog.exec(); } diff --git a/isis/src/qisis/apps/qview/qview.cpp b/isis/src/qisis/apps/qview/qview.cpp index 6dcd30abd9f02f8171c7b5a67b543dea21430ab1..51a3af1a505bbf0ba57543d89dd082a1f1adfecd 100644 --- a/isis/src/qisis/apps/qview/qview.cpp +++ b/isis/src/qisis/apps/qview/qview.cpp @@ -113,9 +113,9 @@ int main(int argc, char *argv[]) { QApplication::setApplicationName("qview"); // check for forcing of gui style - PvlGroup &uiPref = Preference::Preferences().FindGroup( + PvlGroup &uiPref = Preference::Preferences().findGroup( "UserInterface"); - if(uiPref.HasKeyword("GuiStyle")) { + if(uiPref.hasKeyword("GuiStyle")) { QString style = uiPref["GuiStyle"]; QApplication::setStyle((QString) style); } diff --git a/isis/src/qisis/objs/AdvancedTrackTool/AdvancedTrackTool.cpp b/isis/src/qisis/objs/AdvancedTrackTool/AdvancedTrackTool.cpp index 2bc6b79d741b3bdd0fd0db88b8326b69207af528..94a1463bb7a7b9db63ef38a36da4f09fb6eaa216 100644 --- a/isis/src/qisis/objs/AdvancedTrackTool/AdvancedTrackTool.cpp +++ b/isis/src/qisis/objs/AdvancedTrackTool/AdvancedTrackTool.cpp @@ -489,11 +489,11 @@ namespace Isis { if(cCube->hasTable(TABLE_MOSAIC_SRC)) { Pvl *cPvl = cCube->label(); - PvlObject cObjIsisCube = cPvl->FindObject("IsisCube"); - PvlGroup cGrpBandBin = cObjIsisCube.FindGroup("BandBin"); - for(int i = 0; i < cGrpBandBin.Keywords(); i++) { + PvlObject cObjIsisCube = cPvl->findObject("IsisCube"); + PvlGroup cGrpBandBin = cObjIsisCube.findGroup("BandBin"); + for(int i = 0; i < cGrpBandBin.keywords(); i++) { PvlKeyword &cKeyTrackBand = cGrpBandBin[i]; - for(int j = 0; j < cKeyTrackBand.Size(); j++) { + for(int j = 0; j < cKeyTrackBand.size(); j++) { if(cKeyTrackBand[j] == "TRACKING") { iTrackBand = j; break; diff --git a/isis/src/qisis/objs/BandSpinBox/BandSpinBox.cpp b/isis/src/qisis/objs/BandSpinBox/BandSpinBox.cpp index 81ecbcb34961b6264cfc3e4a30621abc7c31591e..4fff0158c1debc6129f011b07d88edd1ab27e21c 100644 --- a/isis/src/qisis/objs/BandSpinBox/BandSpinBox.cpp +++ b/isis/src/qisis/objs/BandSpinBox/BandSpinBox.cpp @@ -36,9 +36,9 @@ namespace Isis { p_map.clear(); // Get the number of bands and setup the spin box - PvlGroup &dim = pvl.FindObject("IsisCube") - .FindObject("Core") - .FindGroup("Dimensions"); + PvlGroup &dim = pvl.findObject("IsisCube") + .findObject("Core") + .findGroup("Dimensions"); p_bands = dim["Bands"]; // Put in the default BandNumber list @@ -49,16 +49,16 @@ namespace Isis { p_map["BandNumber"] = list; // Add any other lists - if(pvl.FindObject("IsisCube").HasGroup("BandBin")) { - PvlGroup &bandBin = pvl.FindObject("IsisCube") - .FindGroup("BandBin"); - for(int i = 0; i < bandBin.Keywords(); i++) { + if(pvl.findObject("IsisCube").hasGroup("BandBin")) { + PvlGroup &bandBin = pvl.findObject("IsisCube") + .findGroup("BandBin"); + for(int i = 0; i < bandBin.keywords(); i++) { list.clear(); - if(bandBin[i].Size() == p_bands) { - for(int j = 0; j < bandBin[i].Size(); j++) { + if(bandBin[i].size() == p_bands) { + for(int j = 0; j < bandBin[i].size(); j++) { list.push_back(QString(bandBin[i][j])); } - QString bandBinName = bandBin[i].Name(); + QString bandBinName = bandBin[i].name(); p_map[bandBinName] = list; } } diff --git a/isis/src/qisis/objs/BandTool/BandTool.cpp b/isis/src/qisis/objs/BandTool/BandTool.cpp index cb50577deac2676558f665acb199b647ff7c6c15..f99e05b749daa6dc8f155688e1757f826bcc47a6 100644 --- a/isis/src/qisis/objs/BandTool/BandTool.cpp +++ b/isis/src/qisis/objs/BandTool/BandTool.cpp @@ -208,21 +208,21 @@ namespace Isis { * These are the values shown in the gray boxes. */ void BandTool::setList() { - if(p_pvl.FindObject("IsisCube").HasGroup("BandBin") && + if(p_pvl.findObject("IsisCube").hasGroup("BandBin") && p_comboBox->count() > 0) { - PvlGroup &bandBin = p_pvl.FindObject("IsisCube") - .FindGroup("BandBin"); + PvlGroup &bandBin = p_pvl.findObject("IsisCube") + .findGroup("BandBin"); p_comboBox->setVisible(true); p_grayDisplay->setVisible(true); p_redDisplay->setVisible(true); p_greenDisplay->setVisible(true); p_blueDisplay->setVisible(true); - for(int i = 0; i < bandBin.Keywords(); i++) { - if(bandBin[i].Name() == p_comboBox->currentText()) { + for(int i = 0; i < bandBin.keywords(); i++) { + if(bandBin[i].name() == p_comboBox->currentText()) { p_lineEditValueList.clear(); - for(int j = 0; j < bandBin[i].Size(); j++) { + for(int j = 0; j < bandBin[i].size(); j++) { p_lineEditValueList.push_back(QString(bandBin[i][j])); } } @@ -251,9 +251,9 @@ namespace Isis { void BandTool::setBandBin(Pvl &pvl) { // Get the number of bands and setup the spin box - PvlGroup &dim = pvl.FindObject("IsisCube") - .FindObject("Core") - .FindGroup("Dimensions"); + PvlGroup &dim = pvl.findObject("IsisCube") + .findObject("Core") + .findGroup("Dimensions"); p_pvl = pvl; p_bands = dim["Bands"]; @@ -275,13 +275,13 @@ namespace Isis { p_grnSpin->setMaximum(p_bands); p_comboBox->clear(); - if(pvl.FindObject("IsisCube").HasGroup("BandBin")) { - PvlGroup &bandBin = pvl.FindObject("IsisCube") - .FindGroup("BandBin"); - for(int i = 0; i < bandBin.Keywords(); i++) { + if(pvl.findObject("IsisCube").hasGroup("BandBin")) { + PvlGroup &bandBin = pvl.findObject("IsisCube") + .findGroup("BandBin"); + for(int i = 0; i < bandBin.keywords(); i++) { //only add band bin keywords have a size that equals the number of bands - if(bandBin[i].Size() == p_bands) { - QString bandBinName = bandBin[i].Name(); + if(bandBin[i].size() == p_bands) { + QString bandBinName = bandBin[i].name(); p_comboBox->addItem(QString(bandBinName)); } diff --git a/isis/src/qisis/objs/CubeViewport/CubeViewport.cpp b/isis/src/qisis/objs/CubeViewport/CubeViewport.cpp index 353c265fe59f021f0e8ee8663963228c69d931a0..6407182cead9c58d3ad9bc36fa014fb0d48ef339 100644 --- a/isis/src/qisis/objs/CubeViewport/CubeViewport.cpp +++ b/isis/src/qisis/objs/CubeViewport/CubeViewport.cpp @@ -1380,7 +1380,7 @@ namespace Isis { PvlKeyword filterName; getBandFilterName(filterName); - int iFilterSize = filterName.Size(); + int iFilterSize = filterName.size(); // color if(p_color ) { @@ -1462,11 +1462,11 @@ namespace Isis { { // get the band info Pvl* cubeLbl = p_cube->label(); - PvlObject isisObj = cubeLbl->FindObject("IsisCube"); - if (isisObj.HasGroup("BandBin")) { - PvlGroup bandBinGrp = isisObj.FindGroup("BandBin"); - if(bandBinGrp.HasKeyword("FilterName")) { - pFilterNameKey =bandBinGrp.FindKeyword("FilterName") ; + PvlObject isisObj = cubeLbl->findObject("IsisCube"); + if (isisObj.hasGroup("BandBin")) { + PvlGroup bandBinGrp = isisObj.findGroup("BandBin"); + if(bandBinGrp.hasKeyword("FilterName")) { + pFilterNameKey =bandBinGrp.findKeyword("FilterName") ; } } } @@ -1512,7 +1512,7 @@ namespace Isis { QString sBandInfo ; PvlKeyword filterNameKey; getBandFilterName(filterNameKey); - int iFilterSize = filterNameKey.Size(); + int iFilterSize = filterNameKey.size(); // color if(p_color ) { diff --git a/isis/src/qisis/objs/FeatureNomenclatureTool/FeatureNomenclatureTool.cpp b/isis/src/qisis/objs/FeatureNomenclatureTool/FeatureNomenclatureTool.cpp index 33ba9a3ce7f664a379259f86740bec325fb610cf..880ebe1638d483c77ee42eeb40793a4a18f682d5 100644 --- a/isis/src/qisis/objs/FeatureNomenclatureTool/FeatureNomenclatureTool.cpp +++ b/isis/src/qisis/objs/FeatureNomenclatureTool/FeatureNomenclatureTool.cpp @@ -745,7 +745,7 @@ namespace Isis { else if (vp->projection()) { PvlGroup mappingGrp = vp->projection()->Mapping(); - if (mappingGrp.HasKeyword("TargetName")) + if (mappingGrp.hasKeyword("TargetName")) target = mappingGrp["TargetName"][0]; } diff --git a/isis/src/qisis/objs/FileTool/FileTool.cpp b/isis/src/qisis/objs/FileTool/FileTool.cpp index 1e67c68dbfaa4a47435f71ee2a6344fbbbc32bb8..42307a13c53c93acf933af050ba7bef35e3205e2 100644 --- a/isis/src/qisis/objs/FileTool/FileTool.cpp +++ b/isis/src/qisis/objs/FileTool/FileTool.cpp @@ -570,17 +570,17 @@ namespace Isis { ocube->create(psOutFile); // Transfer labels from the first input cube - PvlObject &incube = icube->label()->FindObject("IsisCube"); - PvlObject &outcube = ocube->label()->FindObject("IsisCube"); - for(int i = 0; i < incube.Groups(); i++) { - outcube.AddGroup(incube.Group(i)); + PvlObject &incube = icube->label()->findObject("IsisCube"); + PvlObject &outcube = ocube->label()->findObject("IsisCube"); + for(int i = 0; i < incube.groups(); i++) { + outcube.addGroup(incube.group(i)); } // Transfer tables from the first input cube Pvl &inlab = *icube->label(); - for(int i = 0; i < inlab.Objects(); i++) { - if (inlab.Object(i).IsNamed("Table")) { - Blob t((QString)inlab.Object(i)["Name"], inlab.Object(i).Name()); + for(int i = 0; i < inlab.objects(); i++) { + if (inlab.object(i).isNamed("Table")) { + Blob t((QString)inlab.object(i)["Name"], inlab.object(i).name()); icube->read(t); ocube->write(t); } @@ -588,9 +588,9 @@ namespace Isis { // Transfer blobs from the first input cube inlab = *icube->label(); - for(int i = 0; i < inlab.Objects(); i++) { - if (inlab.Object(i).IsNamed("Polygon")) { - Blob t((QString)inlab.Object(i)["Name"], inlab.Object(i).Name()); + for(int i = 0; i < inlab.objects(); i++) { + if (inlab.object(i).isNamed("Polygon")) { + Blob t((QString)inlab.object(i)["Name"], inlab.object(i).name()); icube->read(t); ocube->write(t); } @@ -598,8 +598,8 @@ namespace Isis { // Transfer tables from the first input cube inlab = *icube->label(); - for(int i = 0; i < inlab.Objects(); i++) { - if (inlab.Object(i).IsNamed("OriginalLabel")) { + for(int i = 0; i < inlab.objects(); i++) { + if (inlab.object(i).isNamed("OriginalLabel")) { OriginalLabel ol; icube->read(ol); ocube->write(ol); @@ -730,7 +730,7 @@ namespace Isis { Pvl whatsThisPvl; cubeViewport()->getAllWhatsThisInfo(whatsThisPvl); - whatsThisPvl.Write(output); + whatsThisPvl.write(output); } /** diff --git a/isis/src/qisis/objs/HelpTool/HelpTool.cpp b/isis/src/qisis/objs/HelpTool/HelpTool.cpp index 15774927e4ade465269ae3b02dfcc8b752dc442a..0da295af503f4b60b7b1bfd41697f1e57526be66 100644 --- a/isis/src/qisis/objs/HelpTool/HelpTool.cpp +++ b/isis/src/qisis/objs/HelpTool/HelpTool.cpp @@ -63,7 +63,7 @@ namespace Isis { QApplication::applicationName() + "/" + QApplication::applicationName() + ".html"); - PvlGroup &uig = Preference::Preferences().FindGroup("UserInterface"); + PvlGroup &uig = Preference::Preferences().findGroup("UserInterface"); QString command = (QString) uig["GuiHelpBrowser"] + (QString)" file:" + file.expanded() + " &"; if(system(command.toAscii().data()) != 0) { diff --git a/isis/src/qisis/objs/MatchTool/MatchTool.cpp b/isis/src/qisis/objs/MatchTool/MatchTool.cpp index 781ca0c0cba74fffa16c6daf2d30dad07287d9ba..b2f9e409a8f85beb91dbdde43fd96a9d0f01b262 100644 --- a/isis/src/qisis/objs/MatchTool/MatchTool.cpp +++ b/isis/src/qisis/objs/MatchTool/MatchTool.cpp @@ -2774,7 +2774,7 @@ namespace Isis { // to view and/or edit the template PvlEditDialog registrationDialog(templatePvl); registrationDialog.setWindowTitle("View or Edit Template File: " - + templatePvl.FileName()); + + templatePvl.fileName()); registrationDialog.resize(550,360); registrationDialog.exec(); } diff --git a/isis/src/qisis/objs/MosaicFileList/MosaicFileListWidget.cpp b/isis/src/qisis/objs/MosaicFileList/MosaicFileListWidget.cpp index d32e40525d2db81ae3c2b44aeeb105e35ce03f05..9f01c8bf7af518c452c02c7dfdce2888da2cf34e 100644 --- a/isis/src/qisis/objs/MosaicFileList/MosaicFileListWidget.cpp +++ b/isis/src/qisis/objs/MosaicFileList/MosaicFileListWidget.cpp @@ -48,14 +48,14 @@ namespace Isis { void MosaicFileListWidget::fromPvl(PvlObject &pvl) { - if(pvl.Name() == "MosaicFileList") { + if(pvl.name() == "MosaicFileList") { MosaicTreeWidgetItem::TreeColumn col = MosaicTreeWidgetItem::FootprintColumn; while(col < MosaicTreeWidgetItem::BlankColumn) { IString key = MosaicTreeWidgetItem::treeColumnToString(col) + "Visible"; key = key.Convert(" ", '_'); - if (pvl.HasKeyword(key.ToQt())) { + if (pvl.hasKeyword(key.ToQt())) { bool visible = toBool(pvl[key.ToQt()][0]); if(visible) { @@ -84,20 +84,20 @@ namespace Isis { } // Now re-build the tree items - for(int cubeGrp = 0; cubeGrp < pvl.Objects(); cubeGrp ++) { - PvlObject &cubes = pvl.Object(cubeGrp); + for(int cubeGrp = 0; cubeGrp < pvl.objects(); cubeGrp ++) { + PvlObject &cubes = pvl.object(cubeGrp); - QTreeWidgetItem *newCubeGrp = p_tree->addGroup(cubes.Name()); + QTreeWidgetItem *newCubeGrp = p_tree->addGroup(cubes.name()); - if (cubes.HasKeyword("Expanded")) { + if (cubes.hasKeyword("Expanded")) { bool expanded = (cubes["Expanded"][0] != "No"); newCubeGrp->setExpanded(expanded); } for(int cubeFileNameIndex = 0; - cubeFileNameIndex < cubes.Keywords(); + cubeFileNameIndex < cubes.keywords(); cubeFileNameIndex ++) { - if (cubes[cubeFileNameIndex].IsNamed("Cube")) { + if (cubes[cubeFileNameIndex].isNamed("Cube")) { QString cubeFileName = cubes[cubeFileNameIndex][0]; newCubeGrp->addChild(takeItem(cubeFileName, allCubes)); } diff --git a/isis/src/qisis/objs/MosaicMainWindow/MosaicController.cpp b/isis/src/qisis/objs/MosaicMainWindow/MosaicController.cpp index 6a2b3345419ae753b313fe80b481ebc570a16dee..f75bd8f42fb6aed060138f18f1fab90fb593d62e 100644 --- a/isis/src/qisis/objs/MosaicMainWindow/MosaicController.cpp +++ b/isis/src/qisis/objs/MosaicMainWindow/MosaicController.cpp @@ -131,7 +131,7 @@ namespace Isis { projFile += p_fileList->toPvl(); projFile += p_scene->toPvl(); - projFile.Write(projFileName); + projFile.write(projFileName); } @@ -384,11 +384,11 @@ namespace Isis { openCubes(QStringList()); } else { - if(m_projectPvl && m_projectPvl->HasObject("MosaicFileList")) - p_fileList->fromPvl(m_projectPvl->FindObject("MosaicFileList")); + if(m_projectPvl && m_projectPvl->hasObject("MosaicFileList")) + p_fileList->fromPvl(m_projectPvl->findObject("MosaicFileList")); - if(m_projectPvl && m_projectPvl->HasObject("MosaicScene")) - p_scene->fromPvl(m_projectPvl->FindObject("MosaicScene")); + if(m_projectPvl && m_projectPvl->hasObject("MosaicScene")) + p_scene->fromPvl(m_projectPvl->findObject("MosaicScene")); if(m_projectPvl) { delete m_projectPvl; @@ -464,16 +464,16 @@ namespace Isis { void MosaicController::readProject(QString filename) { try { m_projectPvl = new Pvl(filename); - PvlObject &cubes(m_projectPvl->FindObject("Cubes")); + PvlObject &cubes(m_projectPvl->findObject("Cubes")); QList cubesList; - for (int i = 0; i < cubes.Objects(); i++) { - cubesList.append(cubes.Object(i)); + for (int i = 0; i < cubes.objects(); i++) { + cubesList.append(cubes.object(i)); } - if(m_projectPvl && m_projectPvl->HasObject("MosaicScene")) - p_scene->preloadFromPvl(m_projectPvl->FindObject("MosaicScene")); + if(m_projectPvl && m_projectPvl->hasObject("MosaicScene")) + p_scene->preloadFromPvl(m_projectPvl->findObject("MosaicScene")); openProjectCubes(cubesList); } diff --git a/isis/src/qisis/objs/MosaicSceneWidget/MosaicAreaTool.cpp b/isis/src/qisis/objs/MosaicSceneWidget/MosaicAreaTool.cpp index 5e3b5146f3e0f35c165b47fb4eaeb9dd10a31c83..0fe94ab078172a157f09312101d2559c12aa4fee 100644 --- a/isis/src/qisis/objs/MosaicSceneWidget/MosaicAreaTool.cpp +++ b/isis/src/qisis/objs/MosaicSceneWidget/MosaicAreaTool.cpp @@ -295,14 +295,14 @@ namespace Isis { void MosaicAreaTool::fromPvl(const PvlObject &obj) { - if(obj.HasKeyword("Visible")) { - if(obj.HasKeyword("Latitude") && obj["Latitude"][0] != "Null") + if(obj.hasKeyword("Visible")) { + if(obj.hasKeyword("Latitude") && obj["Latitude"][0] != "Null") m_latLineEdit->setText(obj["Latitude"][0]); - if(obj.HasKeyword("Longitude") && obj["Longitude"][0] != "Null") + if(obj.hasKeyword("Longitude") && obj["Longitude"][0] != "Null") m_lonLineEdit->setText(obj["Longitude"][0]); - if(obj.HasKeyword("Area") && obj["Area"][0] != "Null") + if(obj.hasKeyword("Area") && obj["Area"][0] != "Null") m_areaLineEdit->setText(obj["Area"][0]); if(toBool(obj["Visible"][0]) != false) { diff --git a/isis/src/qisis/objs/MosaicSceneWidget/MosaicControlNetTool.cpp b/isis/src/qisis/objs/MosaicSceneWidget/MosaicControlNetTool.cpp index a793c01460071fce89ad136728186bb89919aeb6..a3ee3931e7603f9bdb4d935db929daec721e3edd 100644 --- a/isis/src/qisis/objs/MosaicSceneWidget/MosaicControlNetTool.cpp +++ b/isis/src/qisis/objs/MosaicSceneWidget/MosaicControlNetTool.cpp @@ -152,15 +152,15 @@ namespace Isis { if (m_controlNetFile == "Null") m_controlNetFile = ""; - if (obj.HasKeyword("Movement")) { + if (obj.hasKeyword("Movement")) { m_movementArrowColorSource = fromMovementColorSourceString(obj["Movement"]); } - if (obj.HasKeyword("MovementColorMaxMeasureCount")) { + if (obj.hasKeyword("MovementColorMaxMeasureCount")) { m_measureCount = toInt(obj["MovementColorMaxMeasureCount"][0]); } - if (obj.HasKeyword("MovementColorMaxResidualMagnitude")) { + if (obj.hasKeyword("MovementColorMaxResidualMagnitude")) { m_residualMagnitude = toDouble(obj["MovementColorMaxResidualMagnitude"][0]); } diff --git a/isis/src/qisis/objs/MosaicSceneWidget/MosaicGridTool.cpp b/isis/src/qisis/objs/MosaicSceneWidget/MosaicGridTool.cpp index 8358eaf1bb68792c19494e878984c7fdbdab4b37..ec5fa6b3ea9bb588cc01428aef9805a7071e2ba6 100644 --- a/isis/src/qisis/objs/MosaicSceneWidget/MosaicGridTool.cpp +++ b/isis/src/qisis/objs/MosaicSceneWidget/MosaicGridTool.cpp @@ -562,34 +562,34 @@ namespace Isis { if (obj["LongitudeIncrement"][0] != "Null") m_lonInc = Angle(toDouble(obj["LongitudeIncrement"][0]), Angle::Degrees); - if (obj.HasKeyword("LatitudeExtentType")) { + if (obj.hasKeyword("LatitudeExtentType")) { if (obj["LatitudeExtentType"][0] != "Null") m_latExtents = (GridExtentSource)toInt(obj["LatitudeExtentType"][0]); } - if (obj.HasKeyword("MinimumLatitude")) { + if (obj.hasKeyword("MinimumLatitude")) { if (obj["MinimumLatitude"][0] != "Null") m_minLat = Latitude(toDouble(obj["MinimumLatitude"][0]), equatorialRadius, polarRadius, Latitude::Planetocentric, Angle::Degrees); } - if (obj.HasKeyword("MaximumLatitude")) { + if (obj.hasKeyword("MaximumLatitude")) { if (obj["MaximumLatitude"][0] != "Null") m_maxLat = Latitude(toDouble(obj["MaximumLatitude"][0]), equatorialRadius, polarRadius, Latitude::Planetocentric, Angle::Degrees); } - if (obj.HasKeyword("LongitudeExtentType")) { + if (obj.hasKeyword("LongitudeExtentType")) { if (obj["LongitudeExtentType"][0] != "Null") m_lonExtents = (GridExtentSource)toInt(obj["LongitudeExtentType"][0]); } - if (obj.HasKeyword("MinimumLongitude")) { + if (obj.hasKeyword("MinimumLongitude")) { if (obj["MinimumLongitude"][0] != "Null") m_minLon = Longitude(toDouble(obj["MinimumLongitude"][0]), Angle::Degrees); } - if (obj.HasKeyword("MaximumLongitude")) { + if (obj.hasKeyword("MaximumLongitude")) { if (obj["MaximumLongitude"][0] != "Null") m_maxLon = Longitude(toDouble(obj["MaximumLongitude"][0]), Angle::Degrees); } @@ -598,7 +598,7 @@ namespace Isis { m_density = toDouble(obj["Density"][0]); - if (obj.HasKeyword("CheckTheBoxes")) { + if (obj.hasKeyword("CheckTheBoxes")) { if (obj["CheckTheBoxes"][0] != "Null") { m_shouldCheckBoxes = (obj["CheckTheBoxes"][0] == "true"); } diff --git a/isis/src/qisis/objs/MosaicSceneWidget/MosaicSceneWidget.cpp b/isis/src/qisis/objs/MosaicSceneWidget/MosaicSceneWidget.cpp index 769572ffb9bef2752ef367cd320784a491a3e283..038c98aa3f99bbe3b6b8b68c3efb8719248c6b13 100644 --- a/isis/src/qisis/objs/MosaicSceneWidget/MosaicSceneWidget.cpp +++ b/isis/src/qisis/objs/MosaicSceneWidget/MosaicSceneWidget.cpp @@ -148,10 +148,10 @@ namespace Isis { Pvl tmp; tmp += mapping; - if(!mapping.HasKeyword("EquatorialRadius")) { + if(!mapping.hasKeyword("EquatorialRadius")) { PvlGroup radii = Projection::TargetRadii(mapping["TargetName"]); - tmp.FindGroup("Mapping") += radii["EquatorialRadius"]; - tmp.FindGroup("Mapping") += radii["PolarRadius"]; + tmp.findGroup("Mapping") += radii["EquatorialRadius"]; + tmp.findGroup("Mapping") += radii["PolarRadius"]; } setProjection(ProjectionFactory::Create(tmp)); @@ -165,7 +165,7 @@ namespace Isis { PvlGroup mapping(proj->Mapping()); if (m_mapButton) { - PvlKeyword projectionKeyword = mapping.FindKeyword("ProjectionName"); + PvlKeyword projectionKeyword = mapping.findKeyword("ProjectionName"); QString projName = projectionKeyword[0]; m_mapButton->setText(tr("View/Edit %1 Projection").arg(projName)); } @@ -217,7 +217,7 @@ namespace Isis { } catch(IException &) { Pvl mappingPvl("$base/templates/maps/equirectangular.map"); - PvlGroup &mappingGrp = mappingPvl.FindGroup("Mapping"); + PvlGroup &mappingGrp = mappingPvl.findGroup("Mapping"); mappingGrp += PvlKeyword("LatitudeType", "Planetocentric"); mappingGrp += PvlKeyword("LongitudeDirection", "PositiveEast"); mappingGrp += PvlKeyword("LongitudeDomain", "360"); @@ -242,7 +242,7 @@ namespace Isis { } catch(IException &) { mappingGrp += - label->FindGroup("Instrument", Pvl::Traverse)["TargetName"]; + label->findGroup("Instrument", Pvl::Traverse)["TargetName"]; } return mappingGrp; @@ -285,7 +285,7 @@ namespace Isis { if(m_projection) { PvlKeyword projectionKeyword = - m_projection->Mapping().FindKeyword("ProjectionName"); + m_projection->Mapping().findKeyword("ProjectionName"); QString projName = projectionKeyword[0]; m_mapButton->setText(projName); } @@ -385,7 +385,7 @@ namespace Isis { foreach(tool, *m_tools) { if(tool->projectPvlObjectName() != "") { PvlObject toolObj = tool->toPvl(); - toolObj.SetName(tool->projectPvlObjectName()); + toolObj.setName(tool->projectPvlObjectName()); output += toolObj; } } @@ -419,18 +419,18 @@ namespace Isis { MosaicTool *tool; foreach(tool, *m_tools) { if(tool->projectPvlObjectName() != "") { - if(project.HasObject(tool->projectPvlObjectName())) { + if(project.hasObject(tool->projectPvlObjectName())) { const PvlObject &toolSettings( - project.FindObject(tool->projectPvlObjectName())); + project.findObject(tool->projectPvlObjectName())); tool->fromPvl(toolSettings); } } - if (project.HasObject("ZOrdering")) { - const PvlObject &zOrders = project.FindObject("ZOrdering"); + if (project.hasObject("ZOrdering")) { + const PvlObject &zOrders = project.findObject("ZOrdering"); for (int zOrderIndex = 0; - zOrderIndex < zOrders.Keywords(); + zOrderIndex < zOrders.keywords(); zOrderIndex ++) { const PvlKeyword &zOrder = zOrders[zOrderIndex]; @@ -451,9 +451,9 @@ namespace Isis { } } - if (project.HasObject("SceneVisiblePosition")) { + if (project.hasObject("SceneVisiblePosition")) { const PvlObject &positionInfo = - project.FindObject("SceneVisiblePosition"); + project.findObject("SceneVisiblePosition"); QByteArray hexValues(positionInfo["ViewTransform"][0].toAscii()); QDataStream transformStream(QByteArray::fromHex(hexValues)); @@ -477,7 +477,7 @@ namespace Isis { * @param project The project Pvl */ void MosaicSceneWidget::preloadFromPvl(const PvlObject &project) { - setProjection(project.FindGroup("Mapping")); + setProjection(project.findGroup("Mapping")); recalcSceneRect(); } @@ -1164,13 +1164,13 @@ namespace Isis { // file. try { PvlGroup mapping(m_projection->Mapping()); - PvlKeyword minLatKeyword = mapping.FindKeyword("MinimumLatitude"); + PvlKeyword minLatKeyword = mapping.findKeyword("MinimumLatitude"); Latitude minLat(toDouble(minLatKeyword[0]), mapping, Angle::Degrees); - PvlKeyword minLonKeyword = mapping.FindKeyword("MinimumLongitude"); + PvlKeyword minLonKeyword = mapping.findKeyword("MinimumLongitude"); Longitude minLon(toDouble(minLonKeyword[0]), mapping, Angle::Degrees); - PvlKeyword maxLatKeyword = mapping.FindKeyword("MaximumLatitude"); + PvlKeyword maxLatKeyword = mapping.findKeyword("MaximumLatitude"); Latitude maxLat(toDouble(maxLatKeyword[0]), mapping, Angle::Degrees); - PvlKeyword maxLonKeyword = mapping.FindKeyword("MaximumLongitude"); + PvlKeyword maxLonKeyword = mapping.findKeyword("MaximumLongitude"); Longitude maxLon(toDouble(maxLonKeyword[0]), mapping, Angle::Degrees); Angle increment(1, Angle::Degrees); diff --git a/isis/src/qisis/objs/MosaicSceneWidget/ProjectionConfigDialog.cpp b/isis/src/qisis/objs/MosaicSceneWidget/ProjectionConfigDialog.cpp index 89672533ebe796a1ca8bd29f88b98dcca22a5d62..416f0c24eeb675f1a7c57d556995496cedf0b960 100644 --- a/isis/src/qisis/objs/MosaicSceneWidget/ProjectionConfigDialog.cpp +++ b/isis/src/qisis/objs/MosaicSceneWidget/ProjectionConfigDialog.cpp @@ -215,22 +215,22 @@ namespace Isis { * Get a modified mapping pvl that the mosaic scene will be compatible with */ Pvl ProjectionConfigDialog::addMissingKeywords(Pvl mappingPvl) { - PvlGroup &mapping = mappingPvl.FindGroup("Mapping", Pvl::Traverse); + PvlGroup &mapping = mappingPvl.findGroup("Mapping", Pvl::Traverse); - if(!mapping.HasKeyword("MinimumLatitude")) + if(!mapping.hasKeyword("MinimumLatitude")) mapping += PvlKeyword("MinimumLatitude", "-90"); - if(!mapping.HasKeyword("MaximumLatitude")) + if(!mapping.hasKeyword("MaximumLatitude")) mapping += PvlKeyword("MaximumLatitude", "90"); - if(!mapping.HasKeyword("MinimumLongitude")) { + if(!mapping.hasKeyword("MinimumLongitude")) { if(mapping["LongitudeDomain"][0] == "360") mapping += PvlKeyword("MinimumLongitude", "0"); else mapping += PvlKeyword("MinimumLongitude", "-180"); } - if(!mapping.HasKeyword("MaximumLongitude")) { + if(!mapping.hasKeyword("MaximumLongitude")) { if(mapping["LongitudeDomain"][0] == "360") mapping += PvlKeyword("MaximumLongitude", "360"); else @@ -283,7 +283,7 @@ namespace Isis { try { Pvl mapFilePvl(mapFile); - PvlGroup &mapping = mapFilePvl.FindGroup("Mapping", PvlObject::Traverse); + PvlGroup &mapping = mapFilePvl.findGroup("Mapping", PvlObject::Traverse); Pvl trimmedMapFilePvl; trimmedMapFilePvl += mapping; diff --git a/isis/src/qisis/objs/SpectralPlotTool/SpectralPlotTool.cpp b/isis/src/qisis/objs/SpectralPlotTool/SpectralPlotTool.cpp index 89761f5e55a459083e9cb725294b42a364a052fd..9e6e19a9ed4309e8edb8d88bed6ab3d47bf4b536 100644 --- a/isis/src/qisis/objs/SpectralPlotTool/SpectralPlotTool.cpp +++ b/isis/src/qisis/objs/SpectralPlotTool/SpectralPlotTool.cpp @@ -257,13 +257,13 @@ namespace Isis { // if single band then disable spectral plot Pvl &pvl = *cvp->cube()->label(); supportsWavelength = supportsWavelength && - pvl.FindObject("IsisCube").HasGroup("BandBin"); + pvl.findObject("IsisCube").hasGroup("BandBin"); if (supportsWavelength) { - PvlGroup &bandBin = pvl.FindObject("IsisCube").FindGroup("BandBin"); + PvlGroup &bandBin = pvl.findObject("IsisCube").findGroup("BandBin"); supportsWavelength = supportsWavelength && - bandBin.HasKeyword("Center") && - bandBin["Center"].Size() == bandCount; + bandBin.hasKeyword("Center") && + bandBin["Center"].size() == bandCount; } } @@ -647,11 +647,11 @@ namespace Isis { labels.push_back(band); } else if (targetUnits == PlotCurve::Wavelength) { - if (pvl.FindObject("IsisCube").HasGroup("BandBin")) { - PvlGroup &bandBin = pvl.FindObject("IsisCube").FindGroup("BandBin"); - if (bandBin.HasKeyword("Center")) { - PvlKeyword &wavelength = bandBin.FindKeyword("Center"); - if (wavelength.Size() > (band - 1)) { + if (pvl.findObject("IsisCube").hasGroup("BandBin")) { + PvlGroup &bandBin = pvl.findObject("IsisCube").findGroup("BandBin"); + if (bandBin.hasKeyword("Center")) { + PvlKeyword &wavelength = bandBin.findKeyword("Center"); + if (wavelength.size() > (band - 1)) { labels.push_back(toDouble(wavelength[band-1])); } } diff --git a/isis/src/qisis/objs/SpectralPlotTool/SpectralPlotWindow.cpp b/isis/src/qisis/objs/SpectralPlotTool/SpectralPlotWindow.cpp index a8c60bdd23fba187707cb882901a7644046022bd..b5bb64672771c38dedb4dc4b4c94681b98e695e5 100644 --- a/isis/src/qisis/objs/SpectralPlotTool/SpectralPlotWindow.cpp +++ b/isis/src/qisis/objs/SpectralPlotTool/SpectralPlotWindow.cpp @@ -101,10 +101,10 @@ namespace Isis { Pvl &pvl = *cube->label(); PvlKeyword wavelengths; - if (pvl.FindObject("IsisCube").HasGroup("BandBin")) { - PvlGroup &bandBin = pvl.FindObject("IsisCube").FindGroup("BandBin"); - if (bandBin.HasKeyword("Center")) { - wavelengths = bandBin.FindKeyword("Center"); + if (pvl.findObject("IsisCube").hasGroup("BandBin")) { + PvlGroup &bandBin = pvl.findObject("IsisCube").findGroup("BandBin"); + if (bandBin.hasKeyword("Center")) { + wavelengths = bandBin.findKeyword("Center"); } } diff --git a/isis/src/qisis/objs/StereoTool/StereoTool.cpp b/isis/src/qisis/objs/StereoTool/StereoTool.cpp index 9dc4c3310ad50bb124cf0eb06cdc89797b2df62e..eff7c2669a8ebfd7808cdbe29129e48f58b9a083 100644 --- a/isis/src/qisis/objs/StereoTool/StereoTool.cpp +++ b/isis/src/qisis/objs/StereoTool/StereoTool.cpp @@ -1549,7 +1549,7 @@ namespace Isis { // to view and/or edit the template PvlEditDialog registrationDialog(templatePvl); registrationDialog.setWindowTitle("View or Edit Template File: " - + templatePvl.FileName()); + + templatePvl.fileName()); registrationDialog.resize(550, 360); registrationDialog.exec(); } diff --git a/isis/src/rolo/apps/rolo2isis/rolo2isis.cpp b/isis/src/rolo/apps/rolo2isis/rolo2isis.cpp index 3b02655fd926d57416dfc43020d2e6a4e09c02ad..24c5b3413ac5f73ec6d25eb496a27090f2d26a46 100644 --- a/isis/src/rolo/apps/rolo2isis/rolo2isis.cpp +++ b/isis/src/rolo/apps/rolo2isis/rolo2isis.cpp @@ -18,7 +18,7 @@ void IsisMain() { Cube *ocube = p.SetOutputCube("TO"); p.StartProcess(); - PvlGroup &dataDir = Preference::Preferences().FindGroup("DataDirectory"); + PvlGroup &dataDir = Preference::Preferences().findGroup("DataDirectory"); QString transDir = (QString) dataDir["Rolo"]; FileName transFile; @@ -44,13 +44,13 @@ void IsisMain() { transFile = transDir + "/" + "translations/roloBandBin.trn"; translator = new PvlTranslationManager(inputLabel, transFile.expanded()); translator->Auto(outputLabel); - outputLabel.FindGroup("BandBin").FindKeyword("OriginalBand").SetUnits( + outputLabel.findGroup("BandBin").findKeyword("OriginalBand").setUnits( translator->Translate("BandBinUnit")); - outputLabel.FindGroup("BandBin").FindKeyword("Center").SetUnits(translator-> + outputLabel.findGroup("BandBin").findKeyword("Center").setUnits(translator-> Translate("BandBinUnit")); - outputLabel.FindGroup("BandBin").FindKeyword("Width").SetUnits(translator-> + outputLabel.findGroup("BandBin").findKeyword("Width").setUnits(translator-> Translate("BandBinUnit")); - outputLabel.FindGroup("BandBin").FindKeyword("Exposure").SetUnits(translator-> + outputLabel.findGroup("BandBin").findKeyword("Exposure").setUnits(translator-> Translate("ExposureUnit")); delete translator; translator = NULL; @@ -63,21 +63,21 @@ void IsisMain() { translator = NULL; // add outputLabel to cube - if(outputLabel.HasGroup("Mapping") && - (outputLabel.FindGroup("Mapping").Keywords() > 0)) { - ocube->putGroup(outputLabel.FindGroup("Mapping")); + if(outputLabel.hasGroup("Mapping") && + (outputLabel.findGroup("Mapping").keywords() > 0)) { + ocube->putGroup(outputLabel.findGroup("Mapping")); } - if(outputLabel.HasGroup("Instrument") && - (outputLabel.FindGroup("Instrument").Keywords() > 0)) { - ocube->putGroup(outputLabel.FindGroup("Instrument")); + if(outputLabel.hasGroup("Instrument") && + (outputLabel.findGroup("Instrument").keywords() > 0)) { + ocube->putGroup(outputLabel.findGroup("Instrument")); } - if(outputLabel.HasGroup("BandBin") && - (outputLabel.FindGroup("BandBin").Keywords() > 0)) { - ocube->putGroup(outputLabel.FindGroup("BandBin")); + if(outputLabel.hasGroup("BandBin") && + (outputLabel.findGroup("BandBin").keywords() > 0)) { + ocube->putGroup(outputLabel.findGroup("BandBin")); } - if(outputLabel.HasGroup("Archive") && - (outputLabel.FindGroup("Archive").Keywords() > 0)) { - ocube->putGroup(outputLabel.FindGroup("Archive")); + if(outputLabel.hasGroup("Archive") && + (outputLabel.findGroup("Archive").keywords() > 0)) { + ocube->putGroup(outputLabel.findGroup("Archive")); } p.EndProcess(); diff --git a/isis/src/socet/apps/socetframesettings/socetframesettings.cpp b/isis/src/socet/apps/socetframesettings/socetframesettings.cpp index f798c1974cd7d761ec51cc9e6a174720974ede95..6b41555a9304ef2d688a92e662f54a1c323a474b 100644 --- a/isis/src/socet/apps/socetframesettings/socetframesettings.cpp +++ b/isis/src/socet/apps/socetframesettings/socetframesettings.cpp @@ -65,7 +65,7 @@ void IsisMain() { CameraFocalPlaneMap *focalMap = cam->FocalPlaneMap(); // Make sure the image contains the SPICE blobs/tables - PvlGroup test = cube.label()->FindGroup("Kernels", Pvl::Traverse); + PvlGroup test = cube.label()->findGroup("Kernels", Pvl::Traverse); QString instrumentPointing = (QString) test["InstrumentPointing"]; if (instrumentPointing != "Table") { QString msg = QString("Input image [%1] does not contain needed SPICE blobs. Please run " @@ -85,13 +85,13 @@ void IsisMain() { spice.setTime(et); // Get required keywords from instrument and band groups - PvlGroup inst = cube.label()->FindGroup("Instrument", Pvl::Traverse); + PvlGroup inst = cube.label()->findGroup("Instrument", Pvl::Traverse); QString instrumentId = (QString) inst["InstrumentId"]; QString spacecraftName = (QString) inst["SpacecraftName"]; // Compensate for noproj altering cube labels if (instrumentId == "IdealCamera") { - PvlGroup orig = cube.label()->FindGroup("OriginalInstrument", Pvl::Traverse); + PvlGroup orig = cube.label()->findGroup("OriginalInstrument", Pvl::Traverse); instrumentId = (QString) orig["InstrumentId"]; spacecraftName = (QString) orig["SpacecraftName"]; } @@ -163,7 +163,7 @@ void IsisMain() { } else if (spacecraftName == "Cassini-Huygens") { // Get the image filter and replace "/" with "_" - PvlGroup bandBin = cube.label()->FindGroup("BandBin", Pvl::Traverse); + PvlGroup bandBin = cube.label()->findGroup("BandBin", Pvl::Traverse); QString filter = (QString) bandBin["FilterName"]; filter.replace("/", "_"); @@ -355,7 +355,7 @@ void IsisMain() { QString swapObserverTarget; QString lightTimeCorrection; QString ltSurfaceCorrect; - PvlObject naifKeywordsObject = cube.label()->FindObject("NaifKeywords"); + PvlObject naifKeywordsObject = cube.label()->findObject("NaifKeywords"); if (instrumentId == "MDIS-NAC") { ikCode = "236820"; swapObserverTarget = (QString) naifKeywordsObject["INS-236820_SWAP_OBSERVER_TARGET"]; diff --git a/isis/src/socet/apps/socetlinescankeywords/socetlinescankeywords.cpp b/isis/src/socet/apps/socetlinescankeywords/socetlinescankeywords.cpp index fda49f97a308134dbf1e40f9406554ab6c52ec59..3ddee8ec27c0bcd1894b498a13f430cf05f6c41f 100644 --- a/isis/src/socet/apps/socetlinescankeywords/socetlinescankeywords.cpp +++ b/isis/src/socet/apps/socetlinescankeywords/socetlinescankeywords.cpp @@ -68,7 +68,7 @@ void IsisMain() { CameraGroundMap *groundMap = cam->GroundMap(); // Make sure the image contains the InstrumentPointing (aka CK) blob/table - PvlGroup test = cube.label()->FindGroup("Kernels", Pvl::Traverse); + PvlGroup test = cube.label()->findGroup("Kernels", Pvl::Traverse); QString InstrumentPointing = (QString) test["InstrumentPointing"]; if (InstrumentPointing != "Table") { QString msg = "Input image does not contain needed SPICE blobs...run spiceinit with attach=yes."; @@ -84,7 +84,7 @@ void IsisMain() { } // Get required keywords from instrument and band groups - PvlGroup inst = cube.label()->FindGroup("Instrument", Pvl::Traverse); + PvlGroup inst = cube.label()->findGroup("Instrument", Pvl::Traverse); QString instrumentId = (QString) inst["InstrumentId"]; bool isMocNA = false; @@ -97,7 +97,7 @@ void IsisMain() { bool isHRSC = false; //TO DO: UNCOMMENT THESE LINE ONCE MOC IS WORKING IN SS // if (instrumentId == "MOC") { -// PvlGroup band = cube.label()->FindGroup("BandBin", Pvl::Traverse); +// PvlGroup band = cube.label()->findGroup("BandBin", Pvl::Traverse); // QString filter = (QString) band["FilterName"]; // // if (strcmp(filter.toAscii().data(), "BROAD_BAND") == 0) @@ -112,7 +112,7 @@ void IsisMain() { // else if (instrumentId == "IdealCamera") { //TO DO: DELETE THIS LINE ONCE MOC IS WORKING IN SS if (instrumentId == "IdealCamera") { - PvlGroup orig = cube.label()->FindGroup("OriginalInstrument", Pvl::Traverse); + PvlGroup orig = cube.label()->findGroup("OriginalInstrument", Pvl::Traverse); QString origInstrumentId = (QString) orig["InstrumentId"]; if (origInstrumentId == "HIRISE") { isHiRise = true; @@ -385,7 +385,7 @@ void IsisMain() { QList< QList > ephemPts; QList< QList > ephemRates; - PvlGroup kernels = cube.label()->FindGroup("Kernels", Pvl::Traverse); + PvlGroup kernels = cube.label()->findGroup("Kernels", Pvl::Traverse); QString InstrumentPosition = (QString) kernels["InstrumentPosition"]; int numEphem = 0; // number of ephemeris points @@ -393,7 +393,7 @@ void IsisMain() { if (InstrumentPosition == "Table") { // Labels contain SPK blob // set up Ephem pts/rates number and spacing - Table tablePosition("InstrumentPosition", cubeHeader->FileName()); + Table tablePosition("InstrumentPosition", cubeHeader->fileName()); numEphem = tablePosition.Records(); // increase the number of ephem nodes by 20%. This is somewhat random but @@ -511,7 +511,7 @@ void IsisMain() { // quarternions //set up quaternions number and spacing - Table tablePointing("InstrumentPointing", cubeHeader->FileName()); + Table tablePointing("InstrumentPointing", cubeHeader->fileName()); //number of quaternions int numQuaternions = tablePointing.Records(); diff --git a/isis/src/system/apps/blobdump/blobdump.cpp b/isis/src/system/apps/blobdump/blobdump.cpp index e6cb3bec4dcefddd22772c732391b5d167fe68a5..8b152ee091a10c47dd1b4d3b68bf9dfe88474d3e 100644 --- a/isis/src/system/apps/blobdump/blobdump.cpp +++ b/isis/src/system/apps/blobdump/blobdump.cpp @@ -55,26 +55,26 @@ void helperButtonGetBlobList() { int cnt = 0; while(!match) { // If we've gone through all objects and found nothing, throw an exception - if(cnt >= label.Objects()) { + if(cnt >= label.objects()) { pos = 0; QString msg = "Parameter [FROM] has no blobs."; throw IException(IException::User, msg, _FILEINFO_); } // When the end of the objects is hit, // display "NAME" and "TYPE" parameters as blank - if(pos >= label.Objects()) { + if(pos >= label.objects()) { name = ""; type = ""; match = true; pos = 0; // Prepare to start over again } // When we find a blob, fetch its name and type to stick in the parameters - else if(label.Object(pos).Type() == "Object" && - label.Object(pos).HasKeyword("Name") && - label.Object(pos).HasKeyword("StartByte") && - label.Object(pos).HasKeyword("Bytes")) { - name = label.Object(pos)["Name"][0]; - type = label.Object(pos).Name(); + else if(label.object(pos).type() == "Object" && + label.object(pos).hasKeyword("Name") && + label.object(pos).hasKeyword("StartByte") && + label.object(pos).hasKeyword("Bytes")) { + name = label.object(pos)["Name"][0]; + type = label.object(pos).name(); match = true; pos++; } diff --git a/isis/src/system/apps/csspckgen/csspckgen.cpp b/isis/src/system/apps/csspckgen/csspckgen.cpp index 7a7a014c5b2ee814e2d3987b361d0dfaae525e91..f829efeeedbbb5cc95b259b7e7f5d204d7d47058 100644 --- a/isis/src/system/apps/csspckgen/csspckgen.cpp +++ b/isis/src/system/apps/csspckgen/csspckgen.cpp @@ -24,7 +24,7 @@ void IsisMain() { // Read PCK DB file into a PVL and search the PVL for the main object Pvl db(inputName.expanded()); - PvlObject &main = db.FindObject("TargetAttitudeShape"); + PvlObject &main = db.findObject("TargetAttitudeShape"); // Add a timestamp for when this file was created PvlObject latestMain("TargetAttitudeShape"); @@ -38,19 +38,19 @@ void IsisMain() { dependencies += PvlKeyword("LeapsecondKernel", lskString); latestMain += dependencies; - for (int g = 0; g < main.Groups(); g++) { - PvlGroup &group = main.Group(g); + for (int g = 0; g < main.groups(); g++) { + PvlGroup &group = main.group(g); // Look for Selection groups with date-versioned filenames - if (group.IsNamed("Selection")) { + if (group.isNamed("Selection")) { // Copy the Selection group in case we need to replace one or more // date-versioned filenames PvlGroup latestGroup = group; bool hasDateVersioning = false; - for (int k = 0; k < group.Keywords(); k++) { + for (int k = 0; k < group.keywords(); k++) { PvlKeyword &keyword = group[k]; - if (keyword.IsNamed("File")) { + if (keyword.isNamed("File")) { FileName pckName(keyword[0]); if (pckName.isDateVersioned()) { pckName = pckName.highestVersion(); @@ -70,16 +70,16 @@ void IsisMain() { // the PVL if (hasDateVersioning) { // Add back the date-versioned path for new versions of Isis - latestMain.AddGroup(group); + latestMain.addGroup(group); // Add comment specifying that this PCK is hardcoded for legacy support QString comment = "This PCK is hardcoded to support versions of " "Isis prior to v3.3.2"; - latestGroup.AddComment(comment); + latestGroup.addComment(comment); // Add the direct path to the DB file to support older versions of Isis // that do not support date-versioned filenames - latestMain.AddGroup(latestGroup); + latestMain.addGroup(latestGroup); } } } @@ -97,7 +97,7 @@ void IsisMain() { // Write the updated PVL as the new PCK DB file Pvl latestDb; - latestDb.AddObject(latestMain); - latestDb.Write(outputName.expanded()); + latestDb.addObject(latestMain); + latestDb.write(outputName.expanded()); } diff --git a/isis/src/system/apps/dempack/dempack.cpp b/isis/src/system/apps/dempack/dempack.cpp index efee1bdd76241e9bfec28600dad069d76879e12a..33c149890d799ae7dc7a8b71d8e4616479389556 100644 --- a/isis/src/system/apps/dempack/dempack.cpp +++ b/isis/src/system/apps/dempack/dempack.cpp @@ -35,15 +35,15 @@ void IsisMain() { } Pvl dems(dbFileName.expanded()); - PvlObject &demObject = dems.FindObject("Dem"); + PvlObject &demObject = dems.findObject("Dem"); QMap< QString, QList > demMap; - for (int i = 0; i < demObject.Groups(); i++) { - PvlGroup &group = demObject.Group(i); + for (int i = 0; i < demObject.groups(); i++) { + PvlGroup &group = demObject.group(i); - if (group.IsNamed("Selection")) { - PvlKeyword &match = group.FindKeyword("Match"); - PvlKeyword &file = group.FindKeyword("File"); + if (group.isNamed("Selection")) { + PvlKeyword &match = group.findKeyword("Match"); + PvlKeyword &file = group.findKeyword("File"); // The third element in the Match keyword describes the DEM target (e.g. // Mars) @@ -61,13 +61,13 @@ void IsisMain() { if (demFileName.isVersioned()) demFileName = demFileName.highestVersion(); // Find the corresponding Isis Preference if one exists - if (Preference::Preferences().HasGroup("DataDirectory")) { + if (Preference::Preferences().hasGroup("DataDirectory")) { PvlGroup &dataDir = - Preference::Preferences().FindGroup("DataDirectory"); + Preference::Preferences().findGroup("DataDirectory"); // If the mission name maps to a data area in the Isis Preferences file, // then replace the variable $MISSION with the path to that area - if (dataDir.HasKeyword(mission)) { + if (dataDir.hasKeyword(mission)) { area = (QString) dataDir[mission]; } } diff --git a/isis/src/system/apps/kerneldbgen/SpiceDbGen.cpp b/isis/src/system/apps/kerneldbgen/SpiceDbGen.cpp index 42abc7eb8ff4d0057a26a03f77297bc1ef8fef8f..854720c12a16611bbcfb867c6068be0305618692 100644 --- a/isis/src/system/apps/kerneldbgen/SpiceDbGen.cpp +++ b/isis/src/system/apps/kerneldbgen/SpiceDbGen.cpp @@ -89,38 +89,38 @@ PvlObject SpiceDbGen::Direct(QString quality, QString location, FileName currFile((QString) location + "/" + files[fileNum]); PvlGroup selection = AddSelection(currFile); selection += PvlKeyword("Type", quality); - result.AddGroup(selection); + result.addGroup(selection); } } //check each group to make sure it is the same type as others - PvlObject::PvlGroupIterator grp = result.BeginGroup(); - while(grp != result.EndGroup()) { + PvlObject::PvlGroupIterator grp = result.beginGroup(); + while(grp != result.endGroup()) { // The kernel did not have any time coverage, so ignore it - if(grp->Name() == "No coverage" || grp->Name() == "Null") { - result.DeleteGroup(grp->Name()); + if(grp->name() == "No coverage" || grp->name() == "Null") { + result.deleteGroup(grp->name()); } // This is used for the first time thru the while loop // DO NOT increment grp here else if(type == "none") { - type = grp->Name(); + type = grp->name(); } - else if(grp->Name() == type) { - grp->SetName("Selection"); + else if(grp->name() == type) { + grp->setName("Selection"); grp++; } else { - QString message = "A kernel of type [" + grp->Name() + "] has been found in a directory for type [" + type + "]" ; + QString message = "A kernel of type [" + grp->name() + "] has been found in a directory for type [" + type + "]" ; throw IException(IException::Programmer, message, _FILEINFO_); break; } } if(type == "SPK") { - result.SetName("SpacecraftPosition"); + result.setName("SpacecraftPosition"); } else if(type == "CK") { - result.SetName("SpacecraftPointing"); + result.setName("SpacecraftPointing"); } return result; diff --git a/isis/src/system/apps/kerneldbgen/kerneldbgen.cpp b/isis/src/system/apps/kerneldbgen/kerneldbgen.cpp index a2529db7aff1dccc37377f17cc840e2d5b361131..cefa22000e0e71e592f7955a1ff0f49ba5bc9eb0 100644 --- a/isis/src/system/apps/kerneldbgen/kerneldbgen.cpp +++ b/isis/src/system/apps/kerneldbgen/kerneldbgen.cpp @@ -38,7 +38,7 @@ void IsisMain() { PvlObject selections(kernelType); selections += PvlKeyword("RunTime", iTime::CurrentLocalTime()); - selections.AddGroup(dependency); + selections.addGroup(dependency); /* Removed because Nadir is not done using this*/ //if (ui.GetString("NADIRFILTER") != "none" && @@ -49,8 +49,8 @@ void IsisMain() { // std::vector filter; // ui.GetString("NADIRFILTER", filter); // PvlObject result = sdg.Direct("Nadir",location, filter); - // PvlObject::PvlGroupIterator grp = result.BeginGroup(); - // while(grp != result.EndGroup()){ selections.AddGroup(*grp);grp++;} + // PvlObject::PvlGroupIterator grp = result.beginGroup(); + // while(grp != result.endGroup()){ selections.addGroup(*grp);grp++;} //} if (ui.GetString("PREDICTFILTER") != "none" && ui.GetString("PREDICTDIR") != "none") { @@ -60,9 +60,9 @@ void IsisMain() { std::vector filter; ui.GetString("PREDICTFILTER", filter); PvlObject result = sdg.Direct("Predicted", location, filter); - PvlObject::PvlGroupIterator grp = result.BeginGroup(); - while(grp != result.EndGroup()) { - selections.AddGroup(*grp); + PvlObject::PvlGroupIterator grp = result.beginGroup(); + while(grp != result.endGroup()) { + selections.addGroup(*grp); grp++; } } @@ -75,9 +75,9 @@ void IsisMain() { std::vector filter; ui.GetString("RECONFILTER", filter); PvlObject result = sdg.Direct("Reconstructed", location, filter); - PvlObject::PvlGroupIterator grp = result.BeginGroup(); - while(grp != result.EndGroup()) { - selections.AddGroup(*grp); + PvlObject::PvlGroupIterator grp = result.beginGroup(); + while(grp != result.endGroup()) { + selections.addGroup(*grp); grp++; } } @@ -90,9 +90,9 @@ void IsisMain() { std::vector filter; ui.GetString("SMITHEDFILTER", filter); PvlObject result = sdg.Direct("Smithed", location, filter); - PvlObject::PvlGroupIterator grp = result.BeginGroup(); - while(grp != result.EndGroup()) { - selections.AddGroup(*grp); + PvlObject::PvlGroupIterator grp = result.beginGroup(); + while(grp != result.endGroup()) { + selections.addGroup(*grp); grp++; } } @@ -116,8 +116,8 @@ void IsisMain() { } Pvl writer; - writer.AddObject(selections); - writer.Write(to.expanded()); + writer.addObject(selections); + writer.write(to.expanded()); } @@ -165,19 +165,19 @@ QList evaluateDependencies(PvlGroup &dependencyGroup, QString kernelTy if (kernelFileName.extension() == "db") { Pvl kernelDbPvl(kernelFileName.expanded()); - if (kernelDbPvl.Objects() == 1) { - PvlObject &primaryObject = kernelDbPvl.Object(0); + if (kernelDbPvl.objects() == 1) { + PvlObject &primaryObject = kernelDbPvl.object(0); - if (primaryObject.Groups() == 1) { - PvlGroup &primaryGroup = primaryObject.Group(0); + if (primaryObject.groups() == 1) { + PvlGroup &primaryGroup = primaryObject.group(0); - if (primaryGroup.Name().toLower() == "selection") { + if (primaryGroup.name().toLower() == "selection") { - if (primaryGroup.Keywords() == 1) { + if (primaryGroup.keywords() == 1) { PvlKeyword &key = primaryGroup[0]; - if (key.IsNamed("File")) { - if (key.Size() == 2) { + if (key.isNamed("File")) { + if (key.size() == 2) { kernelFileName = safeHighestVersion(QString("$%1/%2").arg(key[0]).arg(key[1])); } else { @@ -185,7 +185,7 @@ QList evaluateDependencies(PvlGroup &dependencyGroup, QString kernelTy QObject::tr("Expected the keyword File in [%1] to have two " "values, a mission data directory and a path into " "that directory. The keyword has [%2] values.") - .arg(kernelFileName.original()).arg(key.Size()), + .arg(kernelFileName.original()).arg(key.size()), _FILEINFO_); } } @@ -195,8 +195,8 @@ QList evaluateDependencies(PvlGroup &dependencyGroup, QString kernelTy "[%2] in the DB file [%3] to have a single keyword " "named File, but the keyword was named [%4] " "instead") - .arg(primaryGroup.Name()).arg(primaryObject.Name()) - .arg(kernelFileName.original()).arg(key.Name()), + .arg(primaryGroup.name()).arg(primaryObject.name()) + .arg(kernelFileName.original()).arg(key.name()), _FILEINFO_); } } @@ -205,8 +205,8 @@ QList evaluateDependencies(PvlGroup &dependencyGroup, QString kernelTy QObject::tr("Expected Pvl Group [%1] in the first Pvl Object [%2] " "in the DB file [%3] to have a single keyword (named " "File), but found [%4] keywords") - .arg(primaryGroup.Name()).arg(primaryObject.Name()) - .arg(kernelFileName.original()).arg(primaryGroup.Keywords()), + .arg(primaryGroup.name()).arg(primaryObject.name()) + .arg(kernelFileName.original()).arg(primaryGroup.keywords()), _FILEINFO_); } } @@ -214,8 +214,8 @@ QList evaluateDependencies(PvlGroup &dependencyGroup, QString kernelTy throw IException(IException::Unknown, QObject::tr("Expected Pvl Group in the first Pvl Object [%1] in " "the DB file [%2] to be named Selection but found [%3]") - .arg(primaryObject.Name()).arg(kernelFileName.original()) - .arg(primaryGroup.Name()), + .arg(primaryObject.name()).arg(kernelFileName.original()) + .arg(primaryGroup.name()), _FILEINFO_); } } @@ -223,8 +223,8 @@ QList evaluateDependencies(PvlGroup &dependencyGroup, QString kernelTy throw IException(IException::Unknown, QObject::tr("Expected one Pvl Group in the first Pvl Object [%1] in " "the DB file [%2] but found [%3]") - .arg(primaryObject.Name()).arg(kernelFileName.original()) - .arg(primaryObject.Groups()), + .arg(primaryObject.name()).arg(kernelFileName.original()) + .arg(primaryObject.groups()), _FILEINFO_); } } @@ -232,7 +232,7 @@ QList evaluateDependencies(PvlGroup &dependencyGroup, QString kernelTy throw IException(IException::Unknown, QObject::tr("Expected one Pvl Object in the DB file [%1] but " "found [%2]") - .arg(kernelFileName.original()).arg(kernelDbPvl.Objects()), + .arg(kernelFileName.original()).arg(kernelDbPvl.objects()), _FILEINFO_); } } diff --git a/isis/src/system/apps/messckgen/messckgen.cpp b/isis/src/system/apps/messckgen/messckgen.cpp index 118edd0b801e3a60da6d87f5ac6d7fb15c51bf45..76013eeb988804ca5f9f4b021331333686b81723 100644 --- a/isis/src/system/apps/messckgen/messckgen.cpp +++ b/isis/src/system/apps/messckgen/messckgen.cpp @@ -79,28 +79,28 @@ void IsisMain() { } Pvl kernelDb(dbFileName.expanded()); - PvlObject &pointing = kernelDb.FindObject("SpacecraftPointing"); - PvlObject &pivotPointing = pivot.FindObject("SpacecraftPointing"); - PvlObject &atthistPointing = atthist.FindObject("SpacecraftPointing"); + PvlObject &pointing = kernelDb.findObject("SpacecraftPointing"); + PvlObject &pivotPointing = pivot.findObject("SpacecraftPointing"); + PvlObject &atthistPointing = atthist.findObject("SpacecraftPointing"); - PvlKeyword &runtime = pointing.FindKeyword("Runtime"); - runtime[0] = pivotPointing.FindKeyword("Runtime")[0]; + PvlKeyword &runtime = pointing.findKeyword("Runtime"); + runtime[0] = pivotPointing.findKeyword("Runtime")[0]; - PvlKeyword &clock = pointing.FindKeyword( + PvlKeyword &clock = pointing.findKeyword( "SpacecraftClockKernel", Pvl::Traverse); - clock[0] = pivotPointing.FindKeyword( + clock[0] = pivotPointing.findKeyword( "SpacecraftClockKernel", Pvl::Traverse)[0]; - PvlKeyword &leapsecond = pointing.FindKeyword( + PvlKeyword &leapsecond = pointing.findKeyword( "LeapsecondKernel", Pvl::Traverse); - leapsecond[0] = pivotPointing.FindKeyword( + leapsecond[0] = pivotPointing.findKeyword( "LeapsecondKernel", Pvl::Traverse)[0]; bool foundMapping = false; - for (int i = 0; i < pointing.Groups(); i++) { - PvlGroup &ckGroup = pointing.Group(i); + for (int i = 0; i < pointing.groups(); i++) { + PvlGroup &ckGroup = pointing.group(i); - if (ckGroup.IsNamed("Selection")) { + if (ckGroup.isNamed("Selection")) { // We've already found the mapping section, so just update the pivot and // atthist files for all remaining selection groups @@ -109,21 +109,21 @@ void IsisMain() { // We're looking for the group with a comment that says MAPPING, // signifying the beginning of the section we wish to update - for (int j = 0; j < ckGroup.Comments(); j++) { - QString comment = ckGroup.Comment(j); + for (int j = 0; j < ckGroup.comments(); j++) { + QString comment = ckGroup.comment(j); if (comment.contains("MAPPING")) { foundMapping = true; updatePointing(ckGroup, pivotPointing, atthistPointing); - PvlGroup &pivotSelection = pivotPointing.FindGroup("Selection"); + PvlGroup &pivotSelection = pivotPointing.findGroup("Selection"); // Find end time, if it's a week past the current start date, or more, // then create a new selection group. Otherwise, add new kernel // entries to the existing group. QString pivotEndRaw; - for (int k = pivotSelection.Keywords() - 1; k >= 0; k--) { + for (int k = pivotSelection.keywords() - 1; k >= 0; k--) { PvlKeyword &keyword = pivotSelection[k]; - if (keyword.IsNamed("Time")) { + if (keyword.isNamed("Time")) { pivotEndRaw = keyword[1]; break; } @@ -134,7 +134,7 @@ void IsisMain() { pivotEndRaw.remove(QRegExp(" TDB$")); QString pivotEnd = pivotEndRaw; - PvlKeyword &time = ckGroup.FindKeyword("Time"); + PvlKeyword &time = ckGroup.findKeyword("Time"); QString currentStartRaw = time[0]; currentStartRaw.remove(QRegExp(" TDB$")); QString currentStart = currentStartRaw; @@ -156,7 +156,7 @@ void IsisMain() { while (coveredTime <= pivotEndTime) { // Keep adding a new file for every day that doesn't have coverage // in the DB file, but is covered by the pivot and atthist files - PvlObject::PvlKeywordIterator itr = currentGroup->Begin(); + PvlObject::PvlKeywordIterator itr = currentGroup->begin(); itr++; // Until our covered time has exceeded a week past the current @@ -183,7 +183,7 @@ void IsisMain() { // then go ahead and add it if ((*itr)[0] != bcFileName) { PvlKeyword bcKeyword("File", bcFileName); - itr = currentGroup->AddKeyword(bcKeyword, itr); + itr = currentGroup->addKeyword(bcKeyword, itr); } itr++; @@ -204,25 +204,25 @@ void IsisMain() { coveredTime = weekFromStart; weekFromStart += 7 * 24 * 3600; - PvlKeyword ¤tTime = currentGroup->FindKeyword("Time"); + PvlKeyword ¤tTime = currentGroup->findKeyword("Time"); currentTime[1] = newEndTime; PvlKeyword latestTime(currentTime); latestTime[0] = newEndTime; latestTime[1] = newEnd; PvlGroup *latestGroup = new PvlGroup("Selection"); - latestGroup->AddKeyword(latestTime); + latestGroup->addKeyword(latestTime); PvlKeyword atthistPlaceholder("File"); atthistPlaceholder += ""; PvlKeyword pivotPlaceholder("File"); - pivotPlaceholder.AddComment("Regular pivot angle CK"); + pivotPlaceholder.addComment("Regular pivot angle CK"); pivotPlaceholder += ""; - latestGroup->AddKeyword(atthistPlaceholder); - latestGroup->AddKeyword(pivotPlaceholder); + latestGroup->addKeyword(atthistPlaceholder); + latestGroup->addKeyword(pivotPlaceholder); - latestGroup->AddKeyword(currentGroup->FindKeyword("Type")); + latestGroup->addKeyword(currentGroup->findKeyword("Type")); updatePointing(*latestGroup, pivotPointing, atthistPointing); currentGroup = insertGroup(pointing, *latestGroup, i); @@ -244,7 +244,7 @@ void IsisMain() { } // Write the updated PVL as the new CK DB file - kernelDb.Write(outDBfile.expanded()); + kernelDb.write(outDBfile.expanded()); } @@ -252,20 +252,20 @@ void updatePointing(PvlGroup &ckGroup, PvlObject &pivotPointing, PvlObject &atthistPointing) { bool foundPivot = false; - for (int k = ckGroup.Keywords() - 1; k >= 0; k--) { + for (int k = ckGroup.keywords() - 1; k >= 0; k--) { PvlKeyword &keyword = ckGroup[k]; - if (keyword.IsNamed("File")) { + if (keyword.isNamed("File")) { if (!foundPivot) { // Last file in the list is the pivot file - PvlGroup &pivotSelection = pivotPointing.FindGroup("Selection"); - keyword[0] = pivotSelection.FindKeyword("File")[0]; + PvlGroup &pivotSelection = pivotPointing.findGroup("Selection"); + keyword[0] = pivotSelection.findKeyword("File")[0]; foundPivot = true; } else { // Atthist file comes just before the pivot file in the // MAPPING group - PvlGroup &atthistSelection = atthistPointing.FindGroup("Selection"); - keyword[0] = atthistSelection.FindKeyword("File")[0]; + PvlGroup &atthistSelection = atthistPointing.findGroup("Selection"); + keyword[0] = atthistSelection.findKeyword("File")[0]; break; } } @@ -280,19 +280,19 @@ PvlGroup* insertGroup(PvlObject &object, PvlGroup &group, int index) { // Add a copy of the last group to the end so we can begin shifting all our // mapping selection groups down - object.AddGroup(object.Group(object.Groups() - 1)); - for (int i = object.Groups() - 2; i > index; i--) { + object.addGroup(object.group(object.groups() - 1)); + for (int i = object.groups() - 2; i > index; i--) { // Shift groups down until we reach the new beginning of the mapping section - object.Group(i) = object.Group(i - 1); + object.group(i) = object.group(i - 1); // See if we've found the mapping comments yet if (mappingComments.size() == 0) { // If not, let's get the comments from the current group and check them // against our criteria for the mapping comments - PvlGroup ¤tGroup = object.Group(i); + PvlGroup ¤tGroup = object.group(i); bool foundMapping = false; - for (int j = 0; j < currentGroup.Comments(); j++) { - QString comment = currentGroup.Comment(j); + for (int j = 0; j < currentGroup.comments(); j++) { + QString comment = currentGroup.comment(j); mappingComments.append(comment); if (comment.contains("MAPPING")) @@ -307,18 +307,18 @@ PvlGroup* insertGroup(PvlObject &object, PvlGroup &group, int index) { else { // We found the mapping comments, so now that we've extracted them we // can remove them from the former latest selection group - currentGroup.GetNameKeyword().ClearComments(); + currentGroup.nameKeyword().clearComment(); } } } // Add the new group - object.Group(index) = group; + object.group(index) = group; // Add all the mapping comments - PvlGroup ¤tGroup = object.Group(index); + PvlGroup ¤tGroup = object.group(index); for (int i = 0; i < mappingComments.size(); i++) - currentGroup.AddComment(mappingComments[i]); + currentGroup.addComment(mappingComments[i]); // Return the location of the new group return ¤tGroup; diff --git a/isis/src/system/apps/messspkgen/messspkgen.cpp b/isis/src/system/apps/messspkgen/messspkgen.cpp index 8d37cbee67330e5110bbb2f0741a95b2635d9bad..d2166c38025d176007c0a784eb20ab77b82283da 100644 --- a/isis/src/system/apps/messspkgen/messspkgen.cpp +++ b/isis/src/system/apps/messspkgen/messspkgen.cpp @@ -34,12 +34,12 @@ void IsisMain() { Pvl kernelDb(dbFileName.expanded()); // Get our main objects - PvlObject &position = kernelDb.FindObject("SpacecraftPosition"); + PvlObject &position = kernelDb.findObject("SpacecraftPosition"); // Pull out the reconstructed group and set the ending time to our orbit // cutoff - PvlGroup &reconstructed = position.FindGroup("Selection"); - PvlKeyword &time = reconstructed[reconstructed.Keywords() - 3]; + PvlGroup &reconstructed = position.findGroup("Selection"); + PvlKeyword &time = reconstructed[reconstructed.keywords() - 3]; QString reconstructedEnd = time[1]; time[1] = convertUtcToTdb(ui.GetString("TIME")); @@ -50,16 +50,16 @@ void IsisMain() { PvlKeyword predictedTime("Time"); predictedTime += time[1]; predictedTime += reconstructedEnd; - predicted.AddKeyword(predictedTime); + predicted.addKeyword(predictedTime); PvlKeyword predictedFile("File"); - predictedFile += reconstructed.FindKeyword("File")[0]; - predicted.AddKeyword(predictedFile); + predictedFile += reconstructed.findKeyword("File")[0]; + predicted.addKeyword(predictedFile); - predicted.AddKeyword(PvlKeyword("Type", "Predicted")); + predicted.addKeyword(PvlKeyword("Type", "Predicted")); // Add the modified predicted group to the new DB file - position.AddGroup(predicted); + position.addGroup(predicted); // Get the output filename, either user-specified or the latest version for // the kernels area (as run by makedb) @@ -72,7 +72,7 @@ void IsisMain() { } // Write the updated PVL as the new SPK DB file - kernelDb.Write(outDBfile.expanded()); + kernelDb.write(outDBfile.expanded()); } diff --git a/isis/src/system/apps/prtloganalyzer/ProgramAnalyzer.cpp b/isis/src/system/apps/prtloganalyzer/ProgramAnalyzer.cpp index 3a5e2085e37450d99338a60210b71e1c2b18658b..5970d2d966c2c849fac68799aa2ad86242be09f0 100644 --- a/isis/src/system/apps/prtloganalyzer/ProgramAnalyzer.cpp +++ b/isis/src/system/apps/prtloganalyzer/ProgramAnalyzer.cpp @@ -161,8 +161,8 @@ void ProgramAnalyzer::include(const QString &name) { */ void ProgramAnalyzer::add(const QString &logfile) { Pvl plog(logfile); - for(int i = 0; i < plog.Objects(); i++) { - add(plog.Object(i)); + for(int i = 0; i < plog.objects(); i++) { + add(plog.object(i)); } } @@ -178,7 +178,7 @@ void ProgramAnalyzer::add(const QString &logfile) { */ void ProgramAnalyzer::add(PvlObject &program) { _count++; - QString prog(program.Name()); + QString prog(program.name()); if ( _excludes.exists(prog) ) { _excludes.get(prog)++; return; @@ -375,7 +375,7 @@ QString ProgramAnalyzer::getKey(PvlObject &obj, const QString &key, QString value(""); if ( !grp.isEmpty() ) { - PvlGroup &g = obj.FindGroup(grp); + PvlGroup &g = obj.findGroup(grp); value = findKey(g, key); } else { @@ -438,12 +438,12 @@ bool ProgramAnalyzer::accounting(PvlObject &obj, ProgramAnalyzer::ProgramData &pdata) const { // Assume an error occured if the Accounting group is missing - if ( !obj.HasGroup("Accounting") ) { + if ( !obj.hasGroup("Accounting") ) { pdata.status = ERRORS; return (false); } - PvlGroup &acc = obj.FindGroup("Accounting"); + PvlGroup &acc = obj.findGroup("Accounting"); Status status = convertTime(findKey(acc,"ConnectTime"), pdata.connectTime); pdata.status = convertTime(findKey(acc, "CpuTime"), pdata.cpuTime); diff --git a/isis/src/system/apps/prtloganalyzer/ProgramAnalyzer.h b/isis/src/system/apps/prtloganalyzer/ProgramAnalyzer.h index db999645252c80308cf6761a064bbd7d8c4522c0..897144995789e7302e981cfa0ff5e4904c40ed41 100644 --- a/isis/src/system/apps/prtloganalyzer/ProgramAnalyzer.h +++ b/isis/src/system/apps/prtloganalyzer/ProgramAnalyzer.h @@ -143,7 +143,7 @@ namespace Isis { /** Find a string in a PvlContainer */ QString findKey(PvlContainer &kset, const QString &key) const { QString value(""); - if ( kset.HasKeyword(key) ) { + if ( kset.hasKeyword(key) ) { value = kset[key][0]; } return (value); diff --git a/isis/src/system/apps/prtloganalyzer/prtloganalyzer.cpp b/isis/src/system/apps/prtloganalyzer/prtloganalyzer.cpp index d69649374e4474b99be237f1f629d69dbb919a31..e0857c79cb650f684b540e0a9953eaaa41ec00fa 100644 --- a/isis/src/system/apps/prtloganalyzer/prtloganalyzer.cpp +++ b/isis/src/system/apps/prtloganalyzer/prtloganalyzer.cpp @@ -52,12 +52,12 @@ void IsisMain() { // Write the output file if requested for individual unique program summaries if(ui.WasEntered("SUMMARY")) { Pvl temp; - temp.AddGroup(analyzer.review()); - temp.AddGroup(analyzer.cumulative()); + temp.addGroup(analyzer.review()); + temp.addGroup(analyzer.cumulative()); for (int i = 0 ; i < analyzer.Programs() ; i++) { - temp.AddGroup(analyzer.summarize(i)); + temp.addGroup(analyzer.summarize(i)); } - temp.Write(ui.GetFileName("SUMMARY")); + temp.write(ui.GetFileName("SUMMARY")); } // Write the output file if requested of CSV formatted data diff --git a/isis/src/system/objs/KernelDb/KernelDb.cpp b/isis/src/system/objs/KernelDb/KernelDb.cpp index 8e49143e55102c18f05e5d15513fe8777b54581a..e64253300e7de599ee6b8390ec733d4de5e3b17a 100644 --- a/isis/src/system/objs/KernelDb/KernelDb.cpp +++ b/isis/src/system/objs/KernelDb/KernelDb.cpp @@ -378,7 +378,7 @@ namespace Isis { Pvl &lab) { QList< priority_queue > queues; - PvlObject &cube = lab.FindObject("IsisCube"); + PvlObject &cube = lab.findObject("IsisCube"); int cameraVersion = -1; try { @@ -388,7 +388,7 @@ namespace Isis { } // Make sure the entry has been loaded into memory - if (!m_kernelData.HasObject(entry)) { + if (!m_kernelData.hasObject(entry)) { priority_queue emptyKernelQueue; emptyKernelQueue.push(Kernel()); queues.push_back(emptyKernelQueue); @@ -399,35 +399,35 @@ namespace Isis { iTime start; iTime end; - if (cube.HasGroup("Instrument")) { - start = (QString) cube.FindGroup("Instrument")["StartTime"]; + if (cube.hasGroup("Instrument")) { + start = (QString) cube.findGroup("Instrument")["StartTime"]; - if (cube.FindGroup("Instrument").HasKeyword("StopTime")) { - end = ((QString) cube.FindGroup("Instrument")["StopTime"]); + if (cube.findGroup("Instrument").hasKeyword("StopTime")) { + end = ((QString) cube.findGroup("Instrument")["StopTime"]); } else { - end = ((QString) cube.FindGroup("Instrument")["StartTime"]); + end = ((QString) cube.findGroup("Instrument")["StartTime"]); } } // Loop through the objects to look for all matches to the entry value - for (int i = 0; i < m_kernelData.Objects(); i++) { - if (m_kernelData.Object(i).IsNamed(entry)) { + for (int i = 0; i < m_kernelData.objects(); i++) { + if (m_kernelData.object(i).isNamed(entry)) { priority_queue filesFound; - PvlObject &obj = m_kernelData.Object(i); + PvlObject &obj = m_kernelData.object(i); - for (int groupIndex = obj.Groups() - 1; groupIndex >= 0; groupIndex--) { + for (int groupIndex = obj.groups() - 1; groupIndex >= 0; groupIndex--) { // Get the group and start testing the cases in the keywords // to see if they all match this cube - PvlGroup &grp = obj.Group(groupIndex); + PvlGroup &grp = obj.group(groupIndex); // If the group name isn't selection, skip it. - if (!grp.IsNamed("Selection")) continue; + if (!grp.isNamed("Selection")) continue; QString type = ""; // Make sure the type is allowed - if (grp.HasKeyword("Type")) { + if (grp.hasKeyword("Type")) { type = (QString) grp["Type"]; if (!(Kernel::typeEnum(type) & m_allowedKernelTypes)) { // will return 1 for each bit that has 1 in both type and allowed and @@ -451,11 +451,11 @@ namespace Isis { else if (startMatches) { // Well, the selection start matched but not the end. // Let's look for a second selection to handle overlap areas. - for (int endTimeIndex = obj.Groups() - 1; + for (int endTimeIndex = obj.groups() - 1; endTimeIndex >= 0; endTimeIndex--) { - PvlGroup &endTimeGrp = obj.Group(endTimeIndex); + PvlGroup &endTimeGrp = obj.group(endTimeIndex); // The second selection must: // Not be the current selection @@ -466,9 +466,9 @@ namespace Isis { // *If start time is also matched, do not merge and simply take the // secondary match if (endTimeIndex == groupIndex) continue; - if (!endTimeGrp.IsNamed("Selection")) continue; - if (grp.HasKeyword("Type") != endTimeGrp.HasKeyword("Type")) continue; - if (grp.HasKeyword("Type") && + if (!endTimeGrp.isNamed("Selection")) continue; + if (grp.hasKeyword("Type") != endTimeGrp.hasKeyword("Type")) continue; + if (grp.hasKeyword("Type") && grp["Type"] != endTimeGrp["Type"]) continue; if (!matches(lab, endTimeGrp, end, cameraVersion)) continue; @@ -480,11 +480,11 @@ namespace Isis { // Check for matching time ranges for (int keyIndex = 0; - !betterMatch && keyIndex < grp.Keywords(); + !betterMatch && keyIndex < grp.keywords(); keyIndex++) { PvlKeyword &key = grp[keyIndex]; - if (!key.IsNamed("Time")) continue; + if (!key.isNamed("Time")) continue; iTime timeRangeStart((QString)key[0]); iTime timeRangeEnd((QString)key[1]); @@ -589,17 +589,17 @@ namespace Isis { // as such if and only if there are no time conditionals. If Time keywords // exist, one of them has to set matchTime to true. The matchKeywords is // true until a mismatch is found. - const PvlObject &cube = lab.FindObject("IsisCube"); - bool matchTime = !grp.HasKeyword("Time"); + const PvlObject &cube = lab.findObject("IsisCube"); + bool matchTime = !grp.hasKeyword("Time"); bool matchKeywords = true; // First, the time search. Loop through the keywords, if the name isn't // Time then skip it. If it is, then get the start/end times and keep // looking until one is found. - for (int keyword = 0; keyword < grp.Keywords(); keyword++) { + for (int keyword = 0; keyword < grp.keywords(); keyword++) { PvlKeyword key = grp[keyword]; - if (key.IsNamed("Time")) { + if (key.isNamed("Time")) { // Pull the selections start and end time out iTime kernelStart = (QString) key[0]; iTime kernelEnd = (QString) key[1]; @@ -610,13 +610,13 @@ namespace Isis { matchTime = true; } } - else if (key.IsNamed("Match")) { + else if (key.isNamed("Match")) { try { QString matchGroup = key[0]; QString matchKey = key[1]; QString matchValue = key[2]; - QString cubeValue = cube.FindGroup(matchGroup)[matchKey]; + QString cubeValue = cube.findGroup(matchGroup)[matchKey]; cubeValue = cubeValue.simplified().trimmed().toUpper(); matchValue = matchValue.simplified().trimmed().toUpper(); @@ -630,10 +630,10 @@ namespace Isis { matchKeywords = false; } } - else if (key.IsNamed("CameraVersion")) { + else if (key.isNamed("CameraVersion")) { try { for (int camVersionKeyIndex = 0; - camVersionKeyIndex < key.Size(); + camVersionKeyIndex < key.size(); camVersionKeyIndex++) { bool versionMatch = false; @@ -718,7 +718,7 @@ namespace Isis { void KernelDb::loadSystemDb(const QString &mission, const Pvl &lab) { // Get the base DataDirectory - PvlGroup &dataDir = Preference::Preferences().FindGroup("DataDirectory"); + PvlGroup &dataDir = Preference::Preferences().findGroup("DataDirectory"); QString baseDir = dataDir["Base"]; // Get the mission DataDirectory @@ -804,20 +804,20 @@ namespace Isis { m_kernelDbFiles.append(kernelDb.highestVersion()); } else { // else, read in the appropriate database files from the config file - PvlObject inst = Pvl(configFile.expanded()).FindObject("Instrument"); + PvlObject inst = Pvl(configFile.expanded()).findObject("Instrument"); bool foundMatch = false; // loop through each group until we find a match - for (int groupIndex = 0; groupIndex < inst.Groups(); groupIndex++) { + for (int groupIndex = 0; groupIndex < inst.groups(); groupIndex++) { if (!foundMatch) { - PvlGroup &grp = inst.Group(groupIndex); + PvlGroup &grp = inst.group(groupIndex); // Only add files in Selection groups with matching intrument id - if (grp.IsNamed("Selection") + if (grp.isNamed("Selection") && KernelDb::matches(lab, grp, iTime(), 1)) { foundMatch = true; // add each File keywords in the matching group to the list - for (int keyIndex = 0; keyIndex < grp.Keywords(); keyIndex++) { + for (int keyIndex = 0; keyIndex < grp.keywords(); keyIndex++) { PvlKeyword keyword = grp[keyIndex]; - if (keyword.IsNamed("File")) { + if (keyword.isNamed("File")) { QString dir = dataDir[keyword[0]]; FileName kernelDb( dir + "/" + keyword[1]); m_kernelDbFiles.append(kernelDb.highestVersion()); @@ -852,7 +852,7 @@ namespace Isis { // read each of the database files appended to the list into m_kernelData foreach (FileName kernelDbFile, m_kernelDbFiles) { try { - m_kernelData.Read(kernelDbFile.expanded()); + m_kernelData.read(kernelDbFile.expanded()); } catch (IException &e) { QString msg = "Unable to read kernel database file [" @@ -886,14 +886,14 @@ namespace Isis { QStringList KernelDb::files(PvlGroup &grp) { QStringList files; - for (int i = 0; i < grp.Keywords(); i++) { + for (int i = 0; i < grp.keywords(); i++) { PvlKeyword kfile = grp[i]; - if (kfile.Name() != "File") continue; + if (kfile.name() != "File") continue; // Two values in the "File" keyword from the DB, // indicates an ISIS preference in the DataDirectory section // and a filename - if (kfile.Size() == 2) { + if (kfile.size() == 2) { QString pref = kfile[0]; QString version = kfile[1]; FileName filename("$" + pref + "/" + version); @@ -902,7 +902,7 @@ namespace Isis { files.push_back(filename.originalPath() + "/" + filename.name()); } // One value in "File" indicates a full file spec - else if (kfile.Size() == 1) { + else if (kfile.size() == 1) { FileName filename(kfile[0]); if (filename.isVersioned()) filename = filename.highestVersion(); @@ -910,7 +910,7 @@ namespace Isis { } else { QString msg = "Invalid File keyword value in [Group = "; - msg += grp.Name() + "] in database file ["; + msg += grp.name() + "] in database file ["; msg += m_filename + "]"; throw IException(IException::Unknown, msg, _FILEINFO_); } diff --git a/isis/src/system/objs/KernelDb/unitTest.cpp b/isis/src/system/objs/KernelDb/unitTest.cpp index b37ecf4e97ba249f02145e38e559b01ee0f5d4ba..7a134cddb2118468e50cbfafeea46859318c90f7 100644 --- a/isis/src/system/objs/KernelDb/unitTest.cpp +++ b/isis/src/system/objs/KernelDb/unitTest.cpp @@ -33,21 +33,21 @@ int main(int argc, char *argv[]) { PvlKeyword instrument("InstrumentId", "IdealCamera"); PvlKeyword endKey("StopTime", "2005 DEC 15 12:00:00.000 TDB"); PvlKeyword endKey2("StopTime", "2005 JUN 15 12:14:00.000 TDB"); - group2.AddKeyword(keyword); - group.AddKeyword(startKey); - group.AddKeyword(endKey); - group.AddKeyword(spacecraft); - group.AddKeyword(instrument); - obj.AddGroup(group); - obj.AddGroup(group2); - lab.AddObject(obj); + group2.addKeyword(keyword); + group.addKeyword(startKey); + group.addKeyword(endKey); + group.addKeyword(spacecraft); + group.addKeyword(instrument); + obj.addGroup(group); + obj.addGroup(group2); + lab.addObject(obj); Pvl lab2; PvlObject obj2("IsisCube"); - group.AddKeyword(endKey2, Pvl::Replace); - obj2.AddGroup(group); - obj2.AddGroup(group2); - lab2.AddObject(obj2); + group.addKeyword(endKey2, Pvl::Replace); + obj2.addGroup(group); + obj2.addGroup(group2); + lab2.addObject(obj2); cout << "Pvl Label 1: " << endl; cout << lab << endl; @@ -74,19 +74,19 @@ int main(int argc, char *argv[]) { // (3) A config file exists with one match case and a default (Mro) // (a) test for default instrument settings // (b) test for the correct match to CRISM - lab.FindObject("IsisCube").FindGroup("Instrument") - .FindKeyword("StartTime").SetValue("2008 JAN 12 00:00:00.0"); - lab.FindObject("IsisCube").FindGroup("Instrument") - .FindKeyword("StopTime").SetValue("2008 JAN 12 00:00:00.0"); + lab.findObject("IsisCube").findGroup("Instrument") + .findKeyword("StartTime").setValue("2008 JAN 12 00:00:00.0"); + lab.findObject("IsisCube").findGroup("Instrument") + .findKeyword("StopTime").setValue("2008 JAN 12 00:00:00.0"); // Note: The following is temporarily commented out since currently there is // no conf file for Messenger ISS NAC and WAC #if 0 // (1) and (2a) - lab.FindObject("IsisCube").FindGroup("Instrument") - .FindKeyword("InstrumentId").SetValue("MDIS-NAC"); - lab.FindObject("IsisCube").FindGroup("Instrument") - .FindKeyword("SpacecraftName").SetValue("Messenger"); + lab.findObject("IsisCube").findGroup("Instrument") + .findKeyword("InstrumentId").setValue("MDIS-NAC"); + lab.findObject("IsisCube").findGroup("Instrument") + .findKeyword("SpacecraftName").setValue("Messenger"); cout << "/---------------------------------------/" << endl; cout << endl << endl; cout << "Messenger NAC Label: " << endl; @@ -96,8 +96,8 @@ int main(int argc, char *argv[]) { testKernelAccessors(messengerMatchNac, lab, true); // (1) and (2b) - lab.FindObject("IsisCube").FindGroup("Instrument") - .FindKeyword("InstrumentId").SetValue("MDIS-WAC"); + lab.findObject("IsisCube").findGroup("Instrument") + .findKeyword("InstrumentId").setValue("MDIS-WAC"); cout << "/---------------------------------------/" << endl; cout << endl << endl; cout << "Messenger WAC Label: " << endl; @@ -108,10 +108,10 @@ int main(int argc, char *argv[]) { #endif // (1) and (3a) - lab.FindObject("IsisCube").FindGroup("Instrument") - .FindKeyword("SpacecraftName").SetValue("MarsReconnaissanceOrbiter"); - lab.FindObject("IsisCube").FindGroup("Instrument") - .FindKeyword("InstrumentId").SetValue("HiRISE"); + lab.findObject("IsisCube").findGroup("Instrument") + .findKeyword("SpacecraftName").setValue("MarsReconnaissanceOrbiter"); + lab.findObject("IsisCube").findGroup("Instrument") + .findKeyword("InstrumentId").setValue("HiRISE"); cout << "/---------------------------------------/" << endl; cout << endl << endl; cout << "Mro (non-CRISM) Instrument Label: " << endl; @@ -121,8 +121,8 @@ int main(int argc, char *argv[]) { testKernelAccessors(defaultMroInstrument, lab, true); // (1) and (3b) - lab.FindObject("IsisCube").FindGroup("Instrument") - .FindKeyword("InstrumentId").SetValue("CRISM"); + lab.findObject("IsisCube").findGroup("Instrument") + .findKeyword("InstrumentId").setValue("CRISM"); cout << "/---------------------------------------/" << endl; cout << endl << endl; cout << "Mro CRISM Label: " << endl; @@ -164,51 +164,51 @@ int main(int argc, char *argv[]) { // this object's selection group has no kernel files PvlObject lsk("LeapSecond"); PvlGroup selGrpLsk("Selection"); - lsk.AddGroup(selGrpLsk); - kernelData.AddObject(lsk); + lsk.addGroup(selGrpLsk); + kernelData.addObject(lsk); // this object has a group that is not named Selection PvlObject pck("TargetAttitudeShape"); PvlGroup selGrpPck("Selection"); PvlGroup noSelGrpPck("NotSelectionGroup"); PvlKeyword filePck("File"); - pck.AddGroup(selGrpPck); - filePck.AddValue("pckTest????"); - selGrpPck.AddKeyword(filePck); - noSelGrpPck.AddKeyword(filePck); - pck.AddGroup(selGrpPck); - pck.AddGroup(noSelGrpPck); - kernelData.AddObject(pck); + pck.addGroup(selGrpPck); + filePck.addValue("pckTest????"); + selGrpPck.addKeyword(filePck); + noSelGrpPck.addKeyword(filePck); + pck.addGroup(selGrpPck); + pck.addGroup(noSelGrpPck); + kernelData.addObject(pck); // this selection group has different quality types allowed PvlObject spk("TargetPosition"); PvlGroup selGrp1("Selection"); PvlKeyword file1("File"); - file1.AddValue("missionName"); - file1.AddValue("spkPredict"); + file1.addValue("missionName"); + file1.addValue("spkPredict"); PvlKeyword type1("Type"); - type1.AddValue("Predicted"); - selGrp1.AddKeyword(file1); + type1.addValue("Predicted"); + selGrp1.addKeyword(file1); PvlGroup selGrp2("Selection"); PvlKeyword file2("File"); - file2.AddValue("missionName"); - file2.AddValue("spkRecon"); + file2.addValue("missionName"); + file2.addValue("spkRecon"); PvlKeyword type2("Type"); - type2.AddValue("Reconstructed"); - selGrp2.AddKeyword(file2); + type2.addValue("Reconstructed"); + selGrp2.addKeyword(file2); PvlGroup selGrp3("Selection"); PvlKeyword file3("File"); - file3.AddValue("missionName"); - file3.AddValue("spkSmith"); + file3.addValue("missionName"); + file3.addValue("spkSmith"); PvlKeyword type3("Type"); - type3.AddValue("Smithed"); - selGrp3.AddKeyword(file3); - spk.AddGroup(selGrp1); - spk.AddGroup(selGrp2); - spk.AddGroup(selGrp3); - kernelData.AddObject(spk); + type3.addValue("Smithed"); + selGrp3.addKeyword(file3); + spk.addGroup(selGrp1); + spk.addGroup(selGrp2); + spk.addGroup(selGrp3); + kernelData.addObject(spk); stringstream istrm; istrm << kernelData; KernelDb kdb2(istrm, 5); - lab.FindObject("IsisCube").FindGroup("Instrument").DeleteKeyword("StopTime"); + lab.findObject("IsisCube").findGroup("Instrument").deleteKeyword("StopTime"); cout << "Label, no StopTime: " << endl; cout << lab << endl << endl; testKernelAccessors(kdb2, lab, false); diff --git a/isis/src/viking/apps/vik2isis/vik2isis.cpp b/isis/src/viking/apps/vik2isis/vik2isis.cpp index 3c7f20e30ea438ff10514d7f1bc5e03ada30203f..54cc04c510d0f47a5ee32e8b7d8067eb6cf55794 100644 --- a/isis/src/viking/apps/vik2isis/vik2isis.cpp +++ b/isis/src/viking/apps/vik2isis/vik2isis.cpp @@ -33,8 +33,8 @@ void IsisMain() { try { Pvl compressionTest(in.expanded()); - if(compressionTest.Groups() == 0 && compressionTest.Objects() == 0 && - compressionTest.Keywords() < 2) { + if(compressionTest.groups() == 0 && compressionTest.objects() == 0 && + compressionTest.keywords() < 2) { throw IException(IException::Programmer, "", _FILEINFO_); } } @@ -225,7 +225,7 @@ void TranslateVikingLabels(Pvl &pdsLabel, Cube *ocube) { prefix = "VO2_VISB_"; } } - PvlKeyword key = nomRes.FindKeyword(prefix + "RESEAUS"); + PvlKeyword key = nomRes.findKeyword(prefix + "RESEAUS"); int numRes = nomRes[prefix + "NUMBER_RESEAUS"]; for(int i = 0; i < numRes * 3; i += 3) { lines += key[i]; diff --git a/isis/src/viking/apps/vikcal/CalParameters.cpp b/isis/src/viking/apps/vikcal/CalParameters.cpp index 3d975aad96d1677f3fdc982351696e62ab7b2452..1703ae305f3f239ee9ce3ab1993935c924537c85 100644 --- a/isis/src/viking/apps/vikcal/CalParameters.cpp +++ b/isis/src/viking/apps/vikcal/CalParameters.cpp @@ -42,7 +42,7 @@ namespace Isis { Pvl pvl(fname.toAscii().data()); // Get keywords from input cube label - PvlGroup &instrument = pvl.FindGroup("INSTRUMENT", Pvl::Traverse); + PvlGroup &instrument = pvl.findGroup("INSTRUMENT", Pvl::Traverse); // Make sure it is a viking mission QString spacecraft = (QString)instrument["SPACECRAFTNAME"]; @@ -98,7 +98,7 @@ namespace Isis { PvlKeyword cs3 = instrument["OFFSETMODEID"]; if((QString)cs3 == "ON") cs3 = "1"; else if((QString)cs3 == "OFF") cs3 = "0"; - PvlKeyword wav = pvl.FindGroup("BANDBIN", Pvl::Traverse)["FILTERID"]; + PvlKeyword wav = pvl.findGroup("BANDBIN", Pvl::Traverse)["FILTERID"]; // Set up calibration, linearity, and offset variables for the input file vikcalSetup(mission, spn, target, cam, wav, (int)cs1, (int)cs2, (int)cs3, (int)cs4); diff --git a/isis/src/viking/apps/vikcal/vikcal.cpp b/isis/src/viking/apps/vikcal/vikcal.cpp index c0f2d36f1f465d7185441e5d1a782cc9c5ad7a97..dbe1fd49e3c84f265d75be4f6cd100136ae78bc5 100644 --- a/isis/src/viking/apps/vikcal/vikcal.cpp +++ b/isis/src/viking/apps/vikcal/vikcal.cpp @@ -60,10 +60,10 @@ void IsisMain() { // Set up and add the radiometry group to the output cube label PvlGroup calgrp("Radiometry"); - calgrp.AddComment("Calibration equation in vikcal"); - calgrp.AddComment("DI(l,s) = (1.0/(exp*w1))*G(l,s)*(gain*DR(l,s)+DC(l,s)+offt+offc)"); - calgrp.AddComment("with w1 = w0*((dist0*dist0) / (dist1*dist1))"); - calgrp.AddComment("and offt(l,s) = A*l + B*l*l + C*s + D*l*s + E"); + calgrp.addComment("Calibration equation in vikcal"); + calgrp.addComment("DI(l,s) = (1.0/(exp*w1))*G(l,s)*(gain*DR(l,s)+DC(l,s)+offt+offc)"); + calgrp.addComment("with w1 = w0*((dist0*dist0) / (dist1*dist1))"); + calgrp.addComment("and offt(l,s) = A*l + B*l*l + C*s + D*l*s + E"); calgrp += PvlKeyword("offc", toString(calParam->Offset())); calgrp += PvlKeyword("exp", toString(calParam->Exposure())); calgrp += PvlKeyword("gain", toString(calParam->Gain())); diff --git a/isis/src/viking/apps/viknobutter/viknobutter.cpp b/isis/src/viking/apps/viknobutter/viknobutter.cpp index dc4cbc66d281753a5ba5faac56c33eb02a09d4b2..54ad5c5c4afd7647aceb347c21f9045ff4009654 100644 --- a/isis/src/viking/apps/viknobutter/viknobutter.cpp +++ b/isis/src/viking/apps/viknobutter/viknobutter.cpp @@ -16,7 +16,7 @@ void IsisMain() { // Figure out which masking cube to use Pvl p(ui.GetFileName("FROM")); - PvlGroup &inst = p.FindGroup("Instrument", Pvl::Traverse); + PvlGroup &inst = p.findGroup("Instrument", Pvl::Traverse); int spn; QString scn = (QString)inst["SpacecraftName"]; if(scn == "VIKING_ORBITER_1") spn = 1; @@ -27,7 +27,7 @@ void IsisMain() { } // determine if # of cols is even or odd bool even = true; - PvlGroup &arch = p.FindGroup("Archive", Pvl::Traverse); + PvlGroup &arch = p.findGroup("Archive", Pvl::Traverse); QString id = (QString)arch["ProductId"]; int num = toInt(id.mid(5, 1)); if(num == 1 || num == 3 || num == 5 || num == 7 || num == 9) even = false; diff --git a/isis/src/viking/objs/VikingCamera/VikingCamera.cpp b/isis/src/viking/objs/VikingCamera/VikingCamera.cpp index 742caf5a09c2794c23a2bf941132e1879b5f38f4..ca8443a256503e958e504f474f99740cc5385bee 100644 --- a/isis/src/viking/objs/VikingCamera/VikingCamera.cpp +++ b/isis/src/viking/objs/VikingCamera/VikingCamera.cpp @@ -59,7 +59,7 @@ namespace Isis { // Find out what camera is being used, and set the focal length, altinstcode, // raster orientation, cone, crosscone, and camera - PvlGroup inst = lab.FindGroup("Instrument", Pvl::Traverse); + PvlGroup inst = lab.findGroup("Instrument", Pvl::Traverse); QString spacecraft = inst["SPACECRAFTNAME"]; QString instId = inst["INSTRUMENTID"]; QString cam; diff --git a/isis/src/viking/objs/VikingCamera/unitTest.cpp b/isis/src/viking/objs/VikingCamera/unitTest.cpp index 9f97bc894780883d7d3922dbbbb06cb4c2cbf503..847d25f5dbc9d59d0765894b8a320ed75e116763 100644 --- a/isis/src/viking/objs/VikingCamera/unitTest.cpp +++ b/isis/src/viking/objs/VikingCamera/unitTest.cpp @@ -54,7 +54,7 @@ int main(void) { Pvl p("$viking2/testData/f348b26.cub"); VikingCamera *cam = (VikingCamera *) CameraFactory::Create(p); - cout << "FileName: " << FileName(p.FileName()).name() << endl; + cout << "FileName: " << FileName(p.fileName()).name() << endl; cout << "CK Frame: " << cam->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); @@ -67,7 +67,7 @@ int main(void) { cout << "SPK Reference ID = " << cam->SpkReferenceId() << endl << endl; // Test Shutter Open/Close - const PvlGroup &inst = p.FindGroup("Instrument", Pvl::Traverse); + const PvlGroup &inst = p.findGroup("Instrument", Pvl::Traverse); double exposureDuration = ((double) inst["ExposureDuration"])/1000; QString stime = inst["StartTime"]; double et; // StartTime keyword is the center exposure time diff --git a/isis/src/voyager/apps/voy2isis/voy2isis.cpp b/isis/src/voyager/apps/voy2isis/voy2isis.cpp index 04edd3dc4939f5c7c3d15a84b4cf1272cf662195..0cc2f0cf9cba48cafeb0aa0ab4001f90249490b2 100644 --- a/isis/src/voyager/apps/voy2isis/voy2isis.cpp +++ b/isis/src/voyager/apps/voy2isis/voy2isis.cpp @@ -129,7 +129,7 @@ void ConvertComments(FileName file) { */ void TranslateVoyagerLabels(Pvl &inputLabel, Cube *ocube) { // Get the directory where the Voyager translation tables are - PvlGroup &dataDir = Preference::Preferences().FindGroup("DataDirectory"); + PvlGroup &dataDir = Preference::Preferences().findGroup("DataDirectory"); QString missionDir = (QString) dataDir[(QString)inputLabel["SpacecraftName"]]; FileName transFile(missionDir + "/translations/voyager.trn"); @@ -141,7 +141,7 @@ void TranslateVoyagerLabels(Pvl &inputLabel, Cube *ocube) { labelXlater.Auto(*(outputLabel)); // Add needed keywords that are not in the translation table - PvlGroup &inst = outputLabel->FindGroup("Instrument", Pvl::Traverse); + PvlGroup &inst = outputLabel->findGroup("Instrument", Pvl::Traverse); // Add Camera_State_1 and Camera_State_2 // Camera_State_1 is the first number in ScanModeId @@ -149,15 +149,15 @@ void TranslateVoyagerLabels(Pvl &inputLabel, Cube *ocube) { // it is WA and BSIMAN or BOTSIM PvlKeyword sModeId = inst["ScanModeId"]; QString cs1 = sModeId[0].split(":").first(); - inst.AddKeyword(PvlKeyword("CameraState1",cs1)); + inst.addKeyword(PvlKeyword("CameraState1",cs1)); QString shutterMode = inst["ShutterModeId"]; QString cam = inst["InstrumentId"]; if (cam == "WIDE_ANGLE_CAMERA" && (shutterMode == "BOTSIM" || shutterMode == "BSIMAN")) { - inst.AddKeyword(PvlKeyword("CameraState2","1")); + inst.addKeyword(PvlKeyword("CameraState2","1")); } else { - inst.AddKeyword(PvlKeyword("CameraState2","0")); + inst.addKeyword(PvlKeyword("CameraState2","0")); } // Translate the band bin group information @@ -173,18 +173,18 @@ void TranslateVoyagerLabels(Pvl &inputLabel, Cube *ocube) { } // Add units of measurement to keywords from translation table - inst.FindKeyword("ExposureDuration").SetUnits("seconds"); + inst.findKeyword("ExposureDuration").setUnits("seconds"); - PvlGroup &bandBin = outputLabel->FindGroup("BandBin", Pvl::Traverse); - bandBin.FindKeyword("Center").SetUnits("micrometers"); - bandBin.FindKeyword("Width").SetUnits("micrometers"); + PvlGroup &bandBin = outputLabel->findGroup("BandBin", Pvl::Traverse); + bandBin.findKeyword("Center").setUnits("micrometers"); + bandBin.findKeyword("Width").setUnits("micrometers"); // Setup the kernel group PvlGroup kern("Kernels"); QString spacecraftNumber; int spacecraftCode = 0; - QString instId = (QString) inst.FindKeyword("InstrumentId"); - if((QString) inst.FindKeyword("SpacecraftName") == "VOYAGER_1") { + QString instId = (QString) inst.findKeyword("InstrumentId"); + if((QString) inst.findKeyword("SpacecraftName") == "VOYAGER_1") { spacecraftNumber = "1"; if(instId == "NARROW_ANGLE_CAMERA") { spacecraftCode = -31101; @@ -202,7 +202,7 @@ void TranslateVoyagerLabels(Pvl &inputLabel, Cube *ocube) { throw IException(IException::User, msg, _FILEINFO_); } } - else if((QString) inst.FindKeyword("SpacecraftName") == "VOYAGER_2") { + else if((QString) inst.findKeyword("SpacecraftName") == "VOYAGER_2") { spacecraftNumber = "2"; if(instId == "NARROW_ANGLE_CAMERA") { spacecraftCode = -32101; @@ -221,16 +221,16 @@ void TranslateVoyagerLabels(Pvl &inputLabel, Cube *ocube) { } } else { - QString msg = "Spacecraft name [" + (QString)inst.FindKeyword("SpacecraftName") + + QString msg = "Spacecraft name [" + (QString)inst.findKeyword("SpacecraftName") + "] does not match Voyager1 or Voyager2 spacecraft"; throw IException(IException::User, msg, _FILEINFO_); } ocube->putGroup(kern); // Modify time to remove Z from end - QString time = inst.FindKeyword("StartTime")[0]; + QString time = inst.findKeyword("StartTime")[0]; time.remove("Z"); - inst.FindKeyword("StartTime").SetValue(time); + inst.findKeyword("StartTime").setValue(time); // Fix image number - remove the period, if Wide angle camera and one of two // shutter modes, we must fix the wide angle image number for use below. @@ -367,7 +367,7 @@ void TranslateVoyagerLabels(Pvl &inputLabel, Cube *ocube) { char utcOut[25]; et2utc_c(approxEphemeris, "ISOC", 3, 26, utcOut); NaifStatus::CheckErrors(); - inst["StartTime"].SetValue(QString(utcOut)); + inst["StartTime"].setValue(QString(utcOut)); // Set up the nominal reseaus group PvlGroup res("Reseaus"); @@ -378,7 +378,7 @@ void TranslateVoyagerLabels(Pvl &inputLabel, Cube *ocube) { type = PvlKeyword("Type"); valid = PvlKeyword("Valid"); - PvlKeyword key = nomRes.FindKeyword("VG" + spacecraftNumber + "_" + PvlKeyword key = nomRes.findKeyword("VG" + spacecraftNumber + "_" + instId.toUpper() + "_RESEAUS"); int numRes = nomRes["VG" + spacecraftNumber + "_" + instId.toUpper() + "_NUMBER_RESEAUS"]; diff --git a/isis/src/voyager/apps/voycal/voycal.cpp b/isis/src/voyager/apps/voycal/voycal.cpp index db47c91db9e92fab745fb6148fe737a0743ed9e4..630c9616d2c15a6d58f9e1f6eac5ddc67ccc70bb 100644 --- a/isis/src/voyager/apps/voycal/voycal.cpp +++ b/isis/src/voyager/apps/voycal/voycal.cpp @@ -63,13 +63,13 @@ void IsisMain() { } // access important label objects, will be used later. - PvlObject isiscube = incube->label()->FindObject("IsisCube"); - PvlGroup instrument = isiscube.FindGroup("Instrument"); - PvlGroup archive = isiscube.FindGroup("Archive"); - PvlGroup bandbin = isiscube.FindGroup("BandBin"); + PvlObject isiscube = incube->label()->findObject("IsisCube"); + PvlGroup instrument = isiscube.findGroup("Instrument"); + PvlGroup archive = isiscube.findGroup("Archive"); + PvlGroup bandbin = isiscube.findGroup("BandBin"); // Verify not radiometrically corrected - if (isiscube.HasGroup("Radiometry")) { + if (isiscube.hasGroup("Radiometry")) { QString msg = "Cube [" + ui.GetFileName("FROM") + "] has already been" + " radiometrically corrected"; throw IException(IException::User,msg,_FILEINFO_); @@ -91,13 +91,13 @@ void IsisMain() { QList hierarchy; try { // Search voycal.pvl for appropriate object - hierarchy.append(instrument.FindKeyword("SpacecraftName")[0]); - hierarchy.append(instrument.FindKeyword("InstrumentId")[0]); + hierarchy.append(instrument.findKeyword("SpacecraftName")[0]); + hierarchy.append(instrument.findKeyword("InstrumentId")[0]); hierarchy.append( - QString("ShutterMode" + instrument.FindKeyword("CameraState2")[0])); - hierarchy.append(archive.FindKeyword("MissionPhaseName")[0]); + QString("ShutterMode" + instrument.findKeyword("CameraState2")[0])); + hierarchy.append(archive.findKeyword("MissionPhaseName")[0]); hierarchy.append( - QString("ScanRate" + instrument.FindKeyword("CameraState1")[0])); + QString("ScanRate" + instrument.findKeyword("CameraState1")[0])); hierarchy.append( QString(bandbin["FilterName"][0] + "_" + bandbin["FilterNumber"][0])); @@ -179,43 +179,43 @@ void IsisMain() { PvlGroup calgrp("Radiometry"); // Regular calibration equation and constants - calgrp.AddComment("Calibration equation in voycal:"); - calgrp.AddComment("OUT(i,j) = (IN(i,j)*GAIN)+DCF(i,j)*XMLT*FFF(i,j)"); - calgrp.AddComment("XMLT = 1.0/(EXPO*W1)"); - calgrp.AddComment("EXPO = EXPODUR + DELTAEXPO"); - calgrp.AddComment("W1 = (W0/1000)*(SUNDIST^2/CALCDIST^2)"); - calgrp.AddComment("DCF = OffsetCorrectionFile, FFF = GainCorrectionFile"); - calgrp.AddComment("IN = InputCube, GAIN = GainCorrection"); - calgrp.AddKeyword(calib[0]); - calgrp.AddKeyword(calib[1]); - calgrp.AddKeyword(calib[2]); - calgrp.AddKeyword(calib[3]); - calgrp.AddKeyword(calib[4]); - calgrp.AddKeyword(calib[5]); - calgrp.AddKeyword(calib[6]); - calgrp.AddKeyword(PvlKeyword("CalcSunDistance",toString(dist1))); - calgrp.AddKeyword(instrument["ExposureDuration"]); - calgrp.AddKeyword(PvlKeyword("XMLT",toString(XMLT))); - calgrp.AddKeyword(PvlKeyword("Omega_W1",toString(w1))); - calgrp.AddKeyword(PvlKeyword("CalcExpoDuration",toString(newExpo))); + calgrp.addComment("Calibration equation in voycal:"); + calgrp.addComment("OUT(i,j) = (IN(i,j)*GAIN)+DCF(i,j)*XMLT*FFF(i,j)"); + calgrp.addComment("XMLT = 1.0/(EXPO*W1)"); + calgrp.addComment("EXPO = EXPODUR + DELTAEXPO"); + calgrp.addComment("W1 = (W0/1000)*(SUNDIST^2/CALCDIST^2)"); + calgrp.addComment("DCF = OffsetCorrectionFile, FFF = GainCorrectionFile"); + calgrp.addComment("IN = InputCube, GAIN = GainCorrection"); + calgrp.addKeyword(calib[0]); + calgrp.addKeyword(calib[1]); + calgrp.addKeyword(calib[2]); + calgrp.addKeyword(calib[3]); + calgrp.addKeyword(calib[4]); + calgrp.addKeyword(calib[5]); + calgrp.addKeyword(calib[6]); + calgrp.addKeyword(PvlKeyword("CalcSunDistance",toString(dist1))); + calgrp.addKeyword(instrument["ExposureDuration"]); + calgrp.addKeyword(PvlKeyword("XMLT",toString(XMLT))); + calgrp.addKeyword(PvlKeyword("Omega_W1",toString(w1))); + calgrp.addKeyword(PvlKeyword("CalcExpoDuration",toString(newExpo))); // Linear correction equation and constants if (linear) { PvlKeyword linearity = PvlKeyword("LinearityCorrection","True"); - linearity.AddComment("Linearity correction equation:"); - linearity.AddComment("OUT(i,j) = LIN( (IN(i,j)*GAIN)+DCF(i,j) )*XMLT*FFF(i,j)"); - linearity.AddComment("LIN(X) = ACOEF*X+BCOEF*(X/XNORM)^KPOWER"); - linearity.AddComment("BCOEF = B_HighEndeNon-LinearityCorrection"); - linearity.AddComment("XNORM = NormalizingPower"); - linearity.AddComment("KPOWER = K_PowerOfNon-Linearity"); - calgrp.AddKeyword(linearity); - calgrp.AddKeyword(PvlKeyword("ACoefficient",toString(aCoef))); - calgrp.AddKeyword(PvlKeyword("B_HighEndNon-LinearityCorrection",toString(bHighEnd))); - calgrp.AddKeyword(PvlKeyword("K_PowerOfNon-Linearity",toString(kPowerOf))); - calgrp.AddKeyword(PvlKeyword("NormalizingPower",toString(normalizingPower))); + linearity.addComment("Linearity correction equation:"); + linearity.addComment("OUT(i,j) = LIN( (IN(i,j)*GAIN)+DCF(i,j) )*XMLT*FFF(i,j)"); + linearity.addComment("LIN(X) = ACOEF*X+BCOEF*(X/XNORM)^KPOWER"); + linearity.addComment("BCOEF = B_HighEndeNon-LinearityCorrection"); + linearity.addComment("XNORM = NormalizingPower"); + linearity.addComment("KPOWER = K_PowerOfNon-Linearity"); + calgrp.addKeyword(linearity); + calgrp.addKeyword(PvlKeyword("ACoefficient",toString(aCoef))); + calgrp.addKeyword(PvlKeyword("B_HighEndNon-LinearityCorrection",toString(bHighEnd))); + calgrp.addKeyword(PvlKeyword("K_PowerOfNon-Linearity",toString(kPowerOf))); + calgrp.addKeyword(PvlKeyword("NormalizingPower",toString(normalizingPower))); } else { - calgrp.AddKeyword(PvlKeyword("LinearityCorrection","False")); + calgrp.addKeyword(PvlKeyword("LinearityCorrection","False")); } // Add Radiometry group @@ -279,8 +279,8 @@ PvlObject fetchCoefficients(Pvl &calibration, QList &hierarchy) { PvlObject coefficients; // Add all the keywords from the calibration PVL top-level object - for (int k = 0; k < calibration.Keywords(); k++) - coefficients.AddKeyword(calibration[k]); + for (int k = 0; k < calibration.keywords(); k++) + coefficients.addKeyword(calibration[k]); // Iterate over every object in the hierarchy looking for coefficient // keywords. The first string is the name of the first object, the second @@ -291,26 +291,26 @@ PvlObject fetchCoefficients(Pvl &calibration, QList &hierarchy) { for (int o = 0; o < hierarchy.size() && validHierarchy; o++) { QString objectName = hierarchy[o]; - if (parent->HasObject(objectName)) { + if (parent->hasObject(objectName)) { // The object named in the hierarchy exists in the calibration file, so // grab it - PvlObject &object = parent->FindObject(objectName); + PvlObject &object = parent->findObject(objectName); // Find all the keywords at the object level - for (int k = 0; k < object.Keywords(); k++) { + for (int k = 0; k < object.keywords(); k++) { PvlKeyword &keyword = object[k]; - if (coefficients.HasKeyword(keyword.Name())) { + if (coefficients.hasKeyword(keyword.name())) { // The coefficients object already has a value for this coefficient // keyword. Because this one is lower down the chain, it is more // specifically defined, thus we should use it instead. - PvlKeyword &coefficient = coefficients.FindKeyword(keyword.Name()); - for (int i = 0; i < coefficient.Size(); i++) { + PvlKeyword &coefficient = coefficients.findKeyword(keyword.name()); + for (int i = 0; i < coefficient.size(); i++) { coefficient[i] = keyword[i]; } } else { // This is a new keyword, so add it to the coefficients object - coefficients.AddKeyword(object[k]); + coefficients.addKeyword(object[k]); } } @@ -329,7 +329,7 @@ PvlObject fetchCoefficients(Pvl &calibration, QList &hierarchy) { void checkCoefficient(PvlObject &coefficients, QString keyName) { - if (!coefficients.HasKeyword(keyName)) + if (!coefficients.hasKeyword(keyName)) throw IException( IException::Programmer, "Coefficient [" + keyName + "] was not found in the calibration PVL " diff --git a/isis/src/voyager/apps/voyramp/voyramp.cpp b/isis/src/voyager/apps/voyramp/voyramp.cpp index a483d226a1e9093c3fdaf276ea21526cab4684be..97caac8020a314b134cde1627824aaa8aab7d303 100644 --- a/isis/src/voyager/apps/voyramp/voyramp.cpp +++ b/isis/src/voyager/apps/voyramp/voyramp.cpp @@ -59,8 +59,8 @@ void IsisMain() { Cube * outCube = p.SetOutputCube("TO"); // FYI, labels are copied on SetOutputCube call, so In and Out labels match - PvlObject & isiscube = outCube->label()->FindObject("IsisCube"); - PvlGroup & inst = isiscube.FindGroup("Instrument"); + PvlObject & isiscube = outCube->label()->findObject("IsisCube"); + PvlGroup & inst = isiscube.findGroup("Instrument"); // Verify Voyager1 spacecraft if (inst["SpacecraftName"][0] != "VOYAGER_1") { @@ -70,7 +70,7 @@ void IsisMain() { } // Verify has been radiometrically calibrated - if (!isiscube.HasGroup("Radiometry")) { + if (!isiscube.hasGroup("Radiometry")) { QString msg = "The cube [" + ui.GetFileName("FROM") + "] has not been" + "radiometrically corrected, run voycal first"; } @@ -90,7 +90,7 @@ void IsisMain() { throw IException(IException::User, message, _FILEINFO_); } - PvlGroup & radio = isiscube.FindGroup("Radiometry"); + PvlGroup & radio = isiscube.findGroup("Radiometry"); double gain = radio["GainCorrection"]; double off = radio["OffsetCorrection"]; double XMLT = radio["XMLT"]; @@ -148,7 +148,7 @@ void IsisMain() { // Create data to go in Radiometry group PvlKeyword top = PvlKeyword("TopCorrectiveDN", toString(y1)); - top.AddComment("Voyramp plasma torus corrective DN values:"); + top.addComment("Voyramp plasma torus corrective DN values:"); PvlKeyword mid = PvlKeyword("MiddleCorrectiveDN", toString(y2)); PvlKeyword bot = PvlKeyword("BottomCorrectiveDN", toString(y3)); diff --git a/isis/src/voyager/objs/VoyagerCamera/VoyagerCamera.cpp b/isis/src/voyager/objs/VoyagerCamera/VoyagerCamera.cpp index cb78d64184d25bcc33b6fcdc549deb0ad4dfeaca..f8e2a46c573e1449ff1e7703941753c65a104355 100644 --- a/isis/src/voyager/objs/VoyagerCamera/VoyagerCamera.cpp +++ b/isis/src/voyager/objs/VoyagerCamera/VoyagerCamera.cpp @@ -67,7 +67,7 @@ namespace Isis { SetFocalLength(); // Find out what camera is being used, and set the focal length, altinstcode, // and camera - PvlGroup inst = lab.FindGroup ("Instrument",Pvl::Traverse); + PvlGroup inst = lab.findGroup ("Instrument",Pvl::Traverse); QString spacecraft = (QString)inst["SpacecraftName"]; QString instId = (QString)inst["InstrumentId"]; diff --git a/isis/src/voyager/objs/VoyagerCamera/unitTest.cpp b/isis/src/voyager/objs/VoyagerCamera/unitTest.cpp index 66d6b92f6864735195124b14c889db5ce6b272fa..3f45d395b11cf6df0f037c70e1bedfd574ce7a17 100644 --- a/isis/src/voyager/objs/VoyagerCamera/unitTest.cpp +++ b/isis/src/voyager/objs/VoyagerCamera/unitTest.cpp @@ -53,7 +53,7 @@ int main(void) { Pvl p("$voyager1/testData/c1639118.imq.cub"); VoyagerCamera *cam = (VoyagerCamera *) CameraFactory::Create(p); - cout << "FileName: " << FileName(p.FileName()).name() << endl; + cout << "FileName: " << FileName(p.fileName()).name() << endl; cout << "CK Frame: " << cam->instrumentRotation()->Frame() << endl << endl; cout.setf(std::ios::fixed); cout << setprecision(9); @@ -66,7 +66,7 @@ int main(void) { cout << "SPK Reference ID = " << cam->SpkReferenceId() << endl << endl; // Test Shutter Open/Close - const PvlGroup &inst = p.FindGroup("Instrument", Pvl::Traverse); + const PvlGroup &inst = p.findGroup("Instrument", Pvl::Traverse); double exposureDuration = ((double) inst["ExposureDuration"])/1000; QString stime = inst["StartTime"]; double et; // StartTime keyword is the center exposure time