Loading isis/src/base/apps/crop/crop.cpp +209 −186 Original line number Original line Diff line number Diff line Loading @@ -3,15 +3,37 @@ #include "crop.h" #include "crop.h" using namespace std; using namespace std; using namespace Isis; namespace Isis { /** * Crop a cube along a line, sample range. This is the programmatic interface to * the ISIS3 stats application. * * @param ui The User Interface to parse the parameters from */ PvlGroup crop(UserInterface &ui) { PvlGroup crop(UserInterface &ui) { Cube *icube = new Cube(); icube->open(ui.GetFileName("FROM")); return crop(icube, ui); } /** * Compute the stats for an ISIS cube. This is the programmatic interface to * the ISIS3 stats application. * * @param cube input cube to be cropped * @param ui The User Interface to parse the parameters from */ PvlGroup crop(Cube *cube, UserInterface &ui) { // Globals and prototypes // Globals and prototypes int ss, sl, sb; int ss, sl, sb; int ns, nl, nb; int ns, nl, nb; int sinc, linc; int sinc, linc; Cube *cube = NULL; LineManager *in = NULL; LineManager *in = NULL; // Line processing routine // Line processing routine Loading Loading @@ -208,3 +230,4 @@ PvlGroup crop(UserInterface &ui) { // Write the results to the log // Write the results to the log return results; return results; } } } isis/src/base/apps/crop/crop.h +4 −1 Original line number Original line Diff line number Diff line Loading @@ -13,6 +13,9 @@ #include "SubArea.h" #include "SubArea.h" #include "UserInterface.h" #include "UserInterface.h" extern Isis::PvlGroup crop(Isis::UserInterface &ui); namespace Isis { extern PvlGroup crop(Cube* cube, UserInterface &ui); extern PvlGroup crop(UserInterface &ui); } #endif #endif isis/src/base/apps/spiceinit/main.cpp +1 −0 Original line number Original line Diff line number Diff line Loading @@ -21,6 +21,7 @@ void IsisMain() { } } throw; throw; } } for (auto grpIt = appLog.beginGroup(); grpIt!= appLog.endGroup(); grpIt++) { for (auto grpIt = appLog.beginGroup(); grpIt!= appLog.endGroup(); grpIt++) { Application::Log(*grpIt); Application::Log(*grpIt); } } Loading isis/src/base/apps/spiceinit/spiceinit.cpp +124 −229 Original line number Original line Diff line number Diff line #include "spiceinit.h" #include <iomanip> #include <iomanip> #include <queue> #include <queue> Loading @@ -20,19 +18,15 @@ #include "SpiceClient.h" #include "SpiceClient.h" #include "SpiceClientStarter.h" #include "SpiceClientStarter.h" #include "Table.h" #include "Table.h" #include "UserInterface.h" #include "spiceinit.h" using namespace std; using namespace std; using namespace Isis; namespace Isis { namespace Isis { spiceinitOptions getSpiceinitOptions(UserInterface &ui); void getUserEnteredKernel(UserInterface &ui, const QString ¶m, Kernel &kernel); bool tryKernels(Cube *icube, Process &p, UserInterface &ui, Pvl *log, void getUserEnteredKernel(Kernel &kernel, const std::vector<QString> &userKernels); bool tryKernels(Cube *icube, Process &p, const spiceinitOptions &options, Pvl *log, Kernel lk, Kernel pck, Kernel lk, Kernel pck, Kernel targetSpk, Kernel ck, Kernel targetSpk, Kernel ck, Kernel fk, Kernel ik, Kernel fk, Kernel ik, Loading @@ -40,11 +34,7 @@ namespace Isis { Kernel iak, Kernel dem, Kernel iak, Kernel dem, Kernel exk); Kernel exk); void requestSpice(Cube *icube, void requestSpice(Cube *icube, UserInterface &ui, Pvl *log, Pvl &labels, QString missionName); Pvl &labels, QString missionName, const spiceinitOptions &options, Pvl *log); /** /** Loading @@ -56,13 +46,10 @@ namespace Isis { void spiceinit(UserInterface &ui, Pvl *log) { void spiceinit(UserInterface &ui, Pvl *log) { // Open the input cube // Open the input cube Process p; Process p; CubeAttributeInput cai; CubeAttributeInput cai; Cube *icube = p.SetInputCube(ui.GetFileName("FROM"), cai, ReadWrite); Cube *icube = p.SetInputCube(ui.GetFileName("FROM"), cai, ReadWrite); spiceinit(icube, ui, log); spiceinitOptions options = getSpiceinitOptions(ui); spiceinit(icube, options, log); p.EndProcess(); p.EndProcess(); } } Loading @@ -74,17 +61,19 @@ namespace Isis { * @param options The options for how the cube should be spiceinit'd * @param options The options for how the cube should be spiceinit'd * @param(out) log The Pvl that attempted kernel sets will be logged to * @param(out) log The Pvl that attempted kernel sets will be logged to */ */ void spiceinit(Cube *icube, const spiceinitOptions &options, Pvl *log) { void spiceinit(Cube *icube, UserInterface &ui, Pvl *log) { // Open the input cube // Open the input cube Process p; Process p; p.SetInputCube(icube); p.SetInputCube(icube); // Make sure at least one CK & SPK quality was selected // Make sure at least one CK & SPK quality was selected if (!(options.cksmithed || options.ckrecon || options.ckpredicted || options.cknadir)) { if (!ui.GetBoolean("CKPREDICTED") && !ui.GetBoolean("CKRECON") && !ui.GetBoolean("CKSMITHED") && !ui.GetBoolean("CKNADIR")) { QString msg = "At least one CK quality must be selected"; QString msg = "At least one CK quality must be selected"; throw IException(IException::User, msg, _FILEINFO_); throw IException(IException::User, msg, _FILEINFO_); } } if (!(options.spksmithed || options.spkrecon || options.spkpredicted)) { if (!ui.GetBoolean("SPKPREDICTED") && !ui.GetBoolean("SPKRECON") && !ui.GetBoolean("SPKSMITHED")) { QString msg = "At least one SPK quality must be selected"; QString msg = "At least one SPK quality must be selected"; throw IException(IException::User, msg, _FILEINFO_); throw IException(IException::User, msg, _FILEINFO_); } } Loading Loading @@ -121,8 +110,8 @@ namespace Isis { // Get the mission name so we can search the correct DB's for kernels // Get the mission name so we can search the correct DB's for kernels QString mission = missionXlater.Translate("MissionName"); QString mission = missionXlater.Translate("MissionName"); if (options.web) { if (ui.GetBoolean("WEB")) { requestSpice(icube, *icube->label(), mission, options, log); requestSpice(icube, ui, log, *icube->label(), mission); } } else { else { // Get system base kernels // Get system base kernels Loading @@ -130,19 +119,19 @@ namespace Isis { unsigned int allowedCK = 0; unsigned int allowedCK = 0; unsigned int allowedSPK = 0; unsigned int allowedSPK = 0; if (options.ckpredicted) if (ui.GetBoolean("CKPREDICTED")) allowedCK |= Kernel::typeEnum("PREDICTED"); allowedCK |= Kernel::typeEnum("PREDICTED"); if (options.ckrecon) if (ui.GetBoolean("CKRECON")) allowedCK |= Kernel::typeEnum("RECONSTRUCTED"); allowedCK |= Kernel::typeEnum("RECONSTRUCTED"); if (options.cksmithed) if (ui.GetBoolean("CKSMITHED")) allowedCK |= Kernel::typeEnum("SMITHED"); allowedCK |= Kernel::typeEnum("SMITHED"); if (options.cknadir) if (ui.GetBoolean("CKNADIR")) allowedCK |= Kernel::typeEnum("NADIR"); allowedCK |= Kernel::typeEnum("NADIR"); if (options.spkpredicted) if (ui.GetBoolean("SPKPREDICTED")) allowedSPK |= Kernel::typeEnum("PREDICTED"); allowedSPK |= Kernel::typeEnum("PREDICTED"); if (options.spkrecon) if (ui.GetBoolean("SPKRECON")) allowedSPK |= Kernel::typeEnum("RECONSTRUCTED"); allowedSPK |= Kernel::typeEnum("RECONSTRUCTED"); if (options.spksmithed) if (ui.GetBoolean("SPKSMITHED")) allowedSPK |= Kernel::typeEnum("SMITHED"); allowedSPK |= Kernel::typeEnum("SMITHED"); KernelDb baseKernels(allowed); KernelDb baseKernels(allowed); Loading @@ -165,7 +154,7 @@ namespace Isis { ck = ckKernels.spacecraftPointing(lab); ck = ckKernels.spacecraftPointing(lab); spk = spkKernels.spacecraftPosition(lab); spk = spkKernels.spacecraftPosition(lab); if (options.cknadir) { if (ui.GetBoolean("CKNADIR")) { // Only add nadir if no spacecraft pointing found, so we will set (priority) type to 0. // Only add nadir if no spacecraft pointing found, so we will set (priority) type to 0. QStringList nadirCk; QStringList nadirCk; nadirCk.push_back("Nadir"); nadirCk.push_back("Nadir"); Loading @@ -182,34 +171,34 @@ namespace Isis { } } // Get user defined kernels and override ones already found // Get user defined kernels and override ones already found getUserEnteredKernel(lk, options.lsk); getUserEnteredKernel(ui, "LS", lk); getUserEnteredKernel(pck, options.pck); getUserEnteredKernel(ui, "PCK", pck); getUserEnteredKernel(targetSpk, options.tspk); getUserEnteredKernel(ui, "TSPK", targetSpk); getUserEnteredKernel(fk, options.fk); getUserEnteredKernel(ui, "FK", fk); getUserEnteredKernel(ik, options.ik); getUserEnteredKernel(ui, "IK", ik); getUserEnteredKernel(sclk, options.sclk); getUserEnteredKernel(ui, "SCLK", sclk); getUserEnteredKernel(spk, options.spk); getUserEnteredKernel(ui, "SPK", spk); getUserEnteredKernel(iak, options.iak); getUserEnteredKernel(ui, "IAK", iak); getUserEnteredKernel(exk, options.extra); getUserEnteredKernel(ui, "EXTRA", exk); // Get shape kernel // Get shape kernel if (options.shape == spiceinitOptions::USER) { if (ui.GetString("SHAPE") == "USER") { getUserEnteredKernel(dem, options.model); getUserEnteredKernel(ui, "MODEL", dem); } } else if (options.shape == spiceinitOptions::SYSTEM) { else if (ui.GetString("SHAPE") == "SYSTEM") { dem = baseKernels.dem(lab); dem = baseKernels.dem(lab); } } bool kernelSuccess = false; bool kernelSuccess = false; if ((ck.size() == 0 || ck.at(0).size() == 0) && options.ck.empty()) { if ((ck.size() == 0 || ck.at(0).size() == 0) && !ui.WasEntered("CK")) { // no ck was found in system and user did not enter ck, throw error // no ck was found in system and user did not enter ck, throw error throw IException(IException::Unknown, throw IException(IException::Unknown, "No Camera Kernels found for the image [" + icube->fileName() "No Camera Kernels found for the image [" + ui.GetFileName("FROM") + "]", + "]", _FILEINFO_); _FILEINFO_); } } else if (!options.ck.empty()) { else if (ui.WasEntered("CK")) { // if user entered ck // if user entered ck // empty ck queue list found in system // empty ck queue list found in system while (ck.size()) { while (ck.size()) { Loading @@ -230,9 +219,11 @@ namespace Isis { // if the user entered ck kernels, populate the ck kernel list with the // if the user entered ck kernels, populate the ck kernel list with the // user entered files // user entered files if (!options.ck.empty()) { if (ui.WasEntered("CK")) { vector<QString> userEnteredCks; ui.GetAsString("CK", userEnteredCks); // convert user entered std vector to QStringList and add to ckKernelList // convert user entered std vector to QStringList and add to ckKernelList ckKernelList = QVector<QString>::fromStdVector(options.ck).toList(); ckKernelList = QVector<QString>::fromStdVector(userEnteredCks).toList(); } } else {// loop through cks found in the system else {// loop through cks found in the system Loading Loading @@ -264,7 +255,7 @@ namespace Isis { realCkKernel.setKernels(ckKernelList); realCkKernel.setKernels(ckKernelList); kernelSuccess = tryKernels(icube, p, options, log, lk, pck, targetSpk, kernelSuccess = tryKernels(icube, p, ui, log, lk, pck, targetSpk, realCkKernel, fk, ik, sclk, spk, iak, dem, exk); realCkKernel, fk, ik, sclk, spk, iak, dem, exk); } } Loading @@ -276,99 +267,26 @@ namespace Isis { p.EndProcess(); p.EndProcess(); } } /** /** * Parse the User Interface into an options struct. * If the user entered the parameter param, then kernel is replaced by the * user's values and quality is reset to 0. Otherwise, the kernels loaded by the * KernelDb class will be kept. * * * @param ui The UI from an application * @param param Name of the kernel input parameter * * * @return An options object with the parameters from the UI. * @param kernel Kernel object to be overwritten if the specified user parameter * was entered. */ */ spiceinitOptions getSpiceinitOptions(UserInterface &ui) { void getUserEnteredKernel(UserInterface &ui, const QString ¶m, Kernel &kernel) { spiceinitOptions options; if (ui.WasEntered(param)) { kernel = Kernel(); options.web = ui.GetBoolean("WEB"); // NOTE: This is using GetAsString so that vars like $mgs can be used. options.attach = ui.GetBoolean("ATTACH"); vector<QString> kernels; options.cksmithed = ui.GetBoolean("CKSMITHED"); ui.GetAsString(param, kernels); options.ckrecon = ui.GetBoolean("CKRECON"); kernel.setKernels(QVector<QString>::fromStdVector(kernels).toList()); options.ckpredicted = ui.GetBoolean("CKPREDICTED"); options.cknadir = ui.GetBoolean("CKNADIR"); options.spksmithed = ui.GetBoolean("SPKSMITHED"); options.spkrecon = ui.GetBoolean("SPKRECON"); options.spkpredicted = ui.GetBoolean("SPKPREDICTED"); if (ui.WasEntered("LS")) { ui.GetAsString("LS", options.lsk); } if (ui.WasEntered("PCK")) { ui.GetAsString("PCK", options.pck); } if (ui.WasEntered("TSPK")) { ui.GetAsString("TSPK", options.tspk); } if (ui.WasEntered("IK")) { ui.GetAsString("IK", options.ik); } if (ui.WasEntered("SCLK")) { ui.GetAsString("SCLK", options.sclk); } if (ui.WasEntered("CK")) { ui.GetAsString("CK", options.ck); } if (ui.WasEntered("FK")) { ui.GetAsString("FK", options.fk); } if (ui.WasEntered("SPK")) { ui.GetAsString("SPK", options.spk); } if (ui.WasEntered("IAK")) { ui.GetAsString("IAK", options.iak); } if (ui.WasEntered("EXTRA")) { ui.GetAsString("EXTRA", options.extra); } if (ui.WasEntered("MODEL")) { ui.GetAsString("MODEL", options.model); } if (ui.GetString("SHAPE") == "ELLIPSOID") { options.shape = spiceinitOptions::ELLIPSOID; } else if (ui.GetString("SHAPE") == "RINGPLANE") { options.shape = spiceinitOptions::RINGPLANE; } else if (ui.GetString("SHAPE") == "SYSTEM") { options.shape = spiceinitOptions::SYSTEM; } else if (ui.GetString("SHAPE") == "USER") { options.shape = spiceinitOptions::USER; } else { throw IException(IException::Unknown, "Unknown SHAPE option [" + ui.GetString("SHAPE") + "].", _FILEINFO_); } options.startpad = ui.GetDouble("STARTPAD"); options.endpad = ui.GetDouble("ENDPAD"); options.url = ui.GetString("URL"); options.port = ui.GetInteger("PORT"); return options; } /** * Helper function to overwrite the system kernels with specified kernels. * * @param(in/out) kernel The Kernel object to overwrite * @param userKernels The vector of specified kernels */ void getUserEnteredKernel(Kernel &kernel, const std::vector<QString> &userKernels) { if (!userKernels.empty()) { kernel.setKernels(QVector<QString>::fromStdVector(userKernels).toList()); } } } } /** /** * Attempt to create a camera model from a set of kernels. * Attempt to create a camera model from a set of kernels. * * Loading @@ -392,9 +310,7 @@ namespace Isis { * * * @return If a camera model was successfully created * @return If a camera model was successfully created */ */ bool tryKernels(Cube *icube, Process &p, bool tryKernels(Cube *icube, Process &p, UserInterface &ui, Pvl *log, const spiceinitOptions &options, Pvl *log, Kernel lk, Kernel pck, Kernel lk, Kernel pck, Kernel targetSpk, Kernel ck, Kernel targetSpk, Kernel ck, Kernel fk, Kernel ik, Kernel sclk, Kernel fk, Kernel ik, Kernel sclk, Loading Loading @@ -437,7 +353,7 @@ namespace Isis { iakKeyword.addValue(iak[i]); iakKeyword.addValue(iak[i]); } } if (options.shape == spiceinitOptions::RINGPLANE) { if (ui.GetString("SHAPE") == "RINGPLANE") { demKeyword.addValue("RingPlane"); demKeyword.addValue("RingPlane"); } } else { else { Loading Loading @@ -512,14 +428,14 @@ namespace Isis { } } // Add any time padding the user specified to the spice group // Add any time padding the user specified to the spice group if (options.startpad > DBL_EPSILON) { if (ui.GetDouble("STARTPAD") > DBL_EPSILON) { currentKernels.addKeyword(PvlKeyword("StartPadding", currentKernels.addKeyword(PvlKeyword("StartPadding", toString(options.startpad), "seconds")); toString(ui.GetDouble("STARTPAD")), "seconds")); } } if (options.endpad > DBL_EPSILON) { if (ui.GetDouble("ENDPAD") > DBL_EPSILON) { currentKernels.addKeyword(PvlKeyword("EndPadding", currentKernels.addKeyword(PvlKeyword("EndPadding", toString(options.endpad), "seconds")); toString(ui.GetDouble("ENDPAD")), "seconds")); } } currentKernels.addKeyword( currentKernels.addKeyword( Loading Loading @@ -550,6 +466,7 @@ namespace Isis { if (log){ if (log){ log->addGroup(currentKernels); log->addGroup(currentKernels); } } } } catch(IException &e) { catch(IException &e) { Pvl errPvl = e.toPvl(); Pvl errPvl = e.toPvl(); Loading @@ -557,7 +474,6 @@ namespace Isis { if (errPvl.groups() > 0) { if (errPvl.groups() > 0) { currentKernels += PvlKeyword("Error", errPvl.group(errPvl.groups() - 1)["Message"][0]); currentKernels += PvlKeyword("Error", errPvl.group(errPvl.groups() - 1)["Message"][0]); } } if (log) { if (log) { log->addGroup(currentKernels); log->addGroup(currentKernels); } } Loading @@ -565,7 +481,7 @@ namespace Isis { throw IException(e); throw IException(e); } } if (options.attach) { if (ui.GetBoolean("ATTACH")) { Table ckTable = cam->instrumentRotation()->Cache("InstrumentPointing"); Table ckTable = cam->instrumentRotation()->Cache("InstrumentPointing"); ckTable.Label() += PvlKeyword("Description", "Created by spiceinit"); ckTable.Label() += PvlKeyword("Description", "Created by spiceinit"); ckTable.Label() += PvlKeyword("Kernels"); ckTable.Label() += PvlKeyword("Kernels"); Loading Loading @@ -683,57 +599,37 @@ namespace Isis { * @param options The spiceinit options * @param options The spiceinit options * @param log The Application log * @param log The Application log */ */ void requestSpice(Cube *icube, void requestSpice(Cube *icube, UserInterface &ui, Pvl *log, Pvl &labels, QString missionName) { Pvl &labels, QString missionName, const spiceinitOptions &options, Pvl *log) { QString instrumentId = QString instrumentId = labels.findGroup("Instrument", Pvl::Traverse)["InstrumentId"][0]; labels.findGroup("Instrument", Pvl::Traverse)["InstrumentId"][0]; QString url = options.url + "?mission=" + missionName + "&instrument=" + instrumentId; QString url = ui.GetString("URL") + "?mission=" + missionName + QString shape; "&instrument=" + instrumentId; switch (options.shape) { int port = ui.GetInteger("PORT"); case spiceinitOptions::ELLIPSOID: bool ckSmithed = ui.GetBoolean("CKSMITHED"); shape = "ELLIPSOID"; bool ckRecon = ui.GetBoolean("CKRECON"); break; bool ckPredicted = ui.GetBoolean("CKPREDICTED"); case spiceinitOptions::RINGPLANE: bool ckNadir = ui.GetBoolean("CKNADIR"); shape = "RINGPLANE"; bool spkSmithed = ui.GetBoolean("SPKSMITHED"); break; bool spkRecon = ui.GetBoolean("SPKRECON"); case spiceinitOptions::SYSTEM: bool spkPredicted = ui.GetBoolean("SPKPREDICTED"); shape = "SYSTEM"; QString shape = QString(ui.GetString("SHAPE")).toLower(); break; case spiceinitOptions::USER: shape = "USER"; break; default: throw IException(IException::User, "Invalid shape option for spice server[" + toString(static_cast<int>(options.shape)) + "].", _FILEINFO_); break; } if (shape == "user") { if (shape == "user") { if (options.model.size() != 1) { shape = QString(ui.GetAsString("MODEL")); throw IException(IException::User, "Exactly one shape model must be entered when shape is set to USER; [" + toString(static_cast<int>(options.model.size())) + "] shape models were entered.", _FILEINFO_); } shape = options.model.front(); // Test for valid labels with mapping group at least // Test for valid labels with mapping group at least Pvl shapeTest(shape); Pvl shapeTest(shape); shapeTest.findGroup("Mapping", Pvl::Traverse); shapeTest.findGroup("Mapping", Pvl::Traverse); } } SpiceClient client(url, options.port, labels, double startPad = ui.GetDouble("STARTPAD"); options.cksmithed, options.ckrecon, double endPad = ui.GetDouble("ENDPAD"); options.ckpredicted, options.cknadir, options.spksmithed, options.spkrecon, options.spkpredicted, SpiceClient client(url, port, labels, shape, options.startpad, options.endpad); ckSmithed, ckRecon, ckPredicted, ckNadir, spkSmithed, spkRecon, spkPredicted, shape, startPad, endPad); Progress connectionProgress; Progress connectionProgress; connectionProgress.SetText("Requesting Spice Data"); connectionProgress.SetText("Requesting Spice Data"); Loading Loading @@ -804,5 +700,4 @@ namespace Isis { delete sunPosTable; delete sunPosTable; sunPosTable = NULL; sunPosTable = NULL; } } } } isis/src/base/apps/spiceinit/spiceinit.h +1 −44 Original line number Original line Diff line number Diff line Loading @@ -10,52 +10,9 @@ #include "UserInterface.h" #include "UserInterface.h" namespace Isis { namespace Isis { extern void spiceinit(Cube *cube, UserInterface &ui, Pvl *log=nullptr); /** * Struct specifying how to spiceinit a Cube. */ struct spiceinitOptions { // Enumeration describing where to get the target shape model enum shapeSource { ELLIPSOID, //!< The shapemodel is a triaxial ellipsoid RINGPLANE, //!< The shapemodel is the targets ring plane SYSTEM, //!< The shapemodel is the system default USER //!< The shapemodel is entered by the user }; bool web = false; //!< If the spice web service should be used bool attach = true; // If the spice data should be attached to the Cube file bool cksmithed = false; // If system controlled CKs should be used bool ckrecon = true; // If system reconstructed CKs should be used bool ckpredicted = false; // If system predicted CKs should be used bool cknadir = false; // If pointing should be computed from the spacecraft state bool spksmithed = false; // If system controlled CKs should be used bool spkrecon = true; // If system reconstructed CKs should be used bool spkpredicted = false; // If system predicted CKs should be used std::vector<QString> lsk = std::vector<QString>(); //!< override leap second kernels std::vector<QString> pck = std::vector<QString>(); //!< override planetary constant kernels std::vector<QString> tspk = std::vector<QString>(); //!< override target state kernels std::vector<QString> ik = std::vector<QString>(); //!< override instrument kernels std::vector<QString> sclk = std::vector<QString>(); //!< override spacecraft clock kernels std::vector<QString> ck = std::vector<QString>(); //!< override camera kernels std::vector<QString> fk = std::vector<QString>(); //!< override frame kernels std::vector<QString> spk = std::vector<QString>(); //!< override spacecraft state kernels std::vector<QString> iak = std::vector<QString>(); //!< override instrument addendum kernels std::vector<QString> extra = std::vector<QString>(); //!< override extra kernels std::vector<QString> model = std::vector<QString>(); //!< override DEMs shapeSource shape = SYSTEM; //!< Where to get the target shape model from double startpad = 0.0; //!< Image start time padding in seconds double endpad = 0.0; //!< Image stop time padding in seconds // URL for the spice web service QString url = "https://services.isis.astrogeology.usgs.gov/cgi-bin/spiceinit.cgi"; int port = 443; //!< port for the spice web service }; extern void spiceinit(UserInterface &ui, extern void spiceinit(UserInterface &ui, Pvl *log = nullptr); Pvl *log = nullptr); extern void spiceinit(Cube *icube, const spiceinitOptions &options = spiceinitOptions(), Pvl *log = nullptr); } } #endif #endif Loading
isis/src/base/apps/crop/crop.cpp +209 −186 Original line number Original line Diff line number Diff line Loading @@ -3,15 +3,37 @@ #include "crop.h" #include "crop.h" using namespace std; using namespace std; using namespace Isis; namespace Isis { /** * Crop a cube along a line, sample range. This is the programmatic interface to * the ISIS3 stats application. * * @param ui The User Interface to parse the parameters from */ PvlGroup crop(UserInterface &ui) { PvlGroup crop(UserInterface &ui) { Cube *icube = new Cube(); icube->open(ui.GetFileName("FROM")); return crop(icube, ui); } /** * Compute the stats for an ISIS cube. This is the programmatic interface to * the ISIS3 stats application. * * @param cube input cube to be cropped * @param ui The User Interface to parse the parameters from */ PvlGroup crop(Cube *cube, UserInterface &ui) { // Globals and prototypes // Globals and prototypes int ss, sl, sb; int ss, sl, sb; int ns, nl, nb; int ns, nl, nb; int sinc, linc; int sinc, linc; Cube *cube = NULL; LineManager *in = NULL; LineManager *in = NULL; // Line processing routine // Line processing routine Loading Loading @@ -208,3 +230,4 @@ PvlGroup crop(UserInterface &ui) { // Write the results to the log // Write the results to the log return results; return results; } } }
isis/src/base/apps/crop/crop.h +4 −1 Original line number Original line Diff line number Diff line Loading @@ -13,6 +13,9 @@ #include "SubArea.h" #include "SubArea.h" #include "UserInterface.h" #include "UserInterface.h" extern Isis::PvlGroup crop(Isis::UserInterface &ui); namespace Isis { extern PvlGroup crop(Cube* cube, UserInterface &ui); extern PvlGroup crop(UserInterface &ui); } #endif #endif
isis/src/base/apps/spiceinit/main.cpp +1 −0 Original line number Original line Diff line number Diff line Loading @@ -21,6 +21,7 @@ void IsisMain() { } } throw; throw; } } for (auto grpIt = appLog.beginGroup(); grpIt!= appLog.endGroup(); grpIt++) { for (auto grpIt = appLog.beginGroup(); grpIt!= appLog.endGroup(); grpIt++) { Application::Log(*grpIt); Application::Log(*grpIt); } } Loading
isis/src/base/apps/spiceinit/spiceinit.cpp +124 −229 Original line number Original line Diff line number Diff line #include "spiceinit.h" #include <iomanip> #include <iomanip> #include <queue> #include <queue> Loading @@ -20,19 +18,15 @@ #include "SpiceClient.h" #include "SpiceClient.h" #include "SpiceClientStarter.h" #include "SpiceClientStarter.h" #include "Table.h" #include "Table.h" #include "UserInterface.h" #include "spiceinit.h" using namespace std; using namespace std; using namespace Isis; namespace Isis { namespace Isis { spiceinitOptions getSpiceinitOptions(UserInterface &ui); void getUserEnteredKernel(UserInterface &ui, const QString ¶m, Kernel &kernel); bool tryKernels(Cube *icube, Process &p, UserInterface &ui, Pvl *log, void getUserEnteredKernel(Kernel &kernel, const std::vector<QString> &userKernels); bool tryKernels(Cube *icube, Process &p, const spiceinitOptions &options, Pvl *log, Kernel lk, Kernel pck, Kernel lk, Kernel pck, Kernel targetSpk, Kernel ck, Kernel targetSpk, Kernel ck, Kernel fk, Kernel ik, Kernel fk, Kernel ik, Loading @@ -40,11 +34,7 @@ namespace Isis { Kernel iak, Kernel dem, Kernel iak, Kernel dem, Kernel exk); Kernel exk); void requestSpice(Cube *icube, void requestSpice(Cube *icube, UserInterface &ui, Pvl *log, Pvl &labels, QString missionName); Pvl &labels, QString missionName, const spiceinitOptions &options, Pvl *log); /** /** Loading @@ -56,13 +46,10 @@ namespace Isis { void spiceinit(UserInterface &ui, Pvl *log) { void spiceinit(UserInterface &ui, Pvl *log) { // Open the input cube // Open the input cube Process p; Process p; CubeAttributeInput cai; CubeAttributeInput cai; Cube *icube = p.SetInputCube(ui.GetFileName("FROM"), cai, ReadWrite); Cube *icube = p.SetInputCube(ui.GetFileName("FROM"), cai, ReadWrite); spiceinit(icube, ui, log); spiceinitOptions options = getSpiceinitOptions(ui); spiceinit(icube, options, log); p.EndProcess(); p.EndProcess(); } } Loading @@ -74,17 +61,19 @@ namespace Isis { * @param options The options for how the cube should be spiceinit'd * @param options The options for how the cube should be spiceinit'd * @param(out) log The Pvl that attempted kernel sets will be logged to * @param(out) log The Pvl that attempted kernel sets will be logged to */ */ void spiceinit(Cube *icube, const spiceinitOptions &options, Pvl *log) { void spiceinit(Cube *icube, UserInterface &ui, Pvl *log) { // Open the input cube // Open the input cube Process p; Process p; p.SetInputCube(icube); p.SetInputCube(icube); // Make sure at least one CK & SPK quality was selected // Make sure at least one CK & SPK quality was selected if (!(options.cksmithed || options.ckrecon || options.ckpredicted || options.cknadir)) { if (!ui.GetBoolean("CKPREDICTED") && !ui.GetBoolean("CKRECON") && !ui.GetBoolean("CKSMITHED") && !ui.GetBoolean("CKNADIR")) { QString msg = "At least one CK quality must be selected"; QString msg = "At least one CK quality must be selected"; throw IException(IException::User, msg, _FILEINFO_); throw IException(IException::User, msg, _FILEINFO_); } } if (!(options.spksmithed || options.spkrecon || options.spkpredicted)) { if (!ui.GetBoolean("SPKPREDICTED") && !ui.GetBoolean("SPKRECON") && !ui.GetBoolean("SPKSMITHED")) { QString msg = "At least one SPK quality must be selected"; QString msg = "At least one SPK quality must be selected"; throw IException(IException::User, msg, _FILEINFO_); throw IException(IException::User, msg, _FILEINFO_); } } Loading Loading @@ -121,8 +110,8 @@ namespace Isis { // Get the mission name so we can search the correct DB's for kernels // Get the mission name so we can search the correct DB's for kernels QString mission = missionXlater.Translate("MissionName"); QString mission = missionXlater.Translate("MissionName"); if (options.web) { if (ui.GetBoolean("WEB")) { requestSpice(icube, *icube->label(), mission, options, log); requestSpice(icube, ui, log, *icube->label(), mission); } } else { else { // Get system base kernels // Get system base kernels Loading @@ -130,19 +119,19 @@ namespace Isis { unsigned int allowedCK = 0; unsigned int allowedCK = 0; unsigned int allowedSPK = 0; unsigned int allowedSPK = 0; if (options.ckpredicted) if (ui.GetBoolean("CKPREDICTED")) allowedCK |= Kernel::typeEnum("PREDICTED"); allowedCK |= Kernel::typeEnum("PREDICTED"); if (options.ckrecon) if (ui.GetBoolean("CKRECON")) allowedCK |= Kernel::typeEnum("RECONSTRUCTED"); allowedCK |= Kernel::typeEnum("RECONSTRUCTED"); if (options.cksmithed) if (ui.GetBoolean("CKSMITHED")) allowedCK |= Kernel::typeEnum("SMITHED"); allowedCK |= Kernel::typeEnum("SMITHED"); if (options.cknadir) if (ui.GetBoolean("CKNADIR")) allowedCK |= Kernel::typeEnum("NADIR"); allowedCK |= Kernel::typeEnum("NADIR"); if (options.spkpredicted) if (ui.GetBoolean("SPKPREDICTED")) allowedSPK |= Kernel::typeEnum("PREDICTED"); allowedSPK |= Kernel::typeEnum("PREDICTED"); if (options.spkrecon) if (ui.GetBoolean("SPKRECON")) allowedSPK |= Kernel::typeEnum("RECONSTRUCTED"); allowedSPK |= Kernel::typeEnum("RECONSTRUCTED"); if (options.spksmithed) if (ui.GetBoolean("SPKSMITHED")) allowedSPK |= Kernel::typeEnum("SMITHED"); allowedSPK |= Kernel::typeEnum("SMITHED"); KernelDb baseKernels(allowed); KernelDb baseKernels(allowed); Loading @@ -165,7 +154,7 @@ namespace Isis { ck = ckKernels.spacecraftPointing(lab); ck = ckKernels.spacecraftPointing(lab); spk = spkKernels.spacecraftPosition(lab); spk = spkKernels.spacecraftPosition(lab); if (options.cknadir) { if (ui.GetBoolean("CKNADIR")) { // Only add nadir if no spacecraft pointing found, so we will set (priority) type to 0. // Only add nadir if no spacecraft pointing found, so we will set (priority) type to 0. QStringList nadirCk; QStringList nadirCk; nadirCk.push_back("Nadir"); nadirCk.push_back("Nadir"); Loading @@ -182,34 +171,34 @@ namespace Isis { } } // Get user defined kernels and override ones already found // Get user defined kernels and override ones already found getUserEnteredKernel(lk, options.lsk); getUserEnteredKernel(ui, "LS", lk); getUserEnteredKernel(pck, options.pck); getUserEnteredKernel(ui, "PCK", pck); getUserEnteredKernel(targetSpk, options.tspk); getUserEnteredKernel(ui, "TSPK", targetSpk); getUserEnteredKernel(fk, options.fk); getUserEnteredKernel(ui, "FK", fk); getUserEnteredKernel(ik, options.ik); getUserEnteredKernel(ui, "IK", ik); getUserEnteredKernel(sclk, options.sclk); getUserEnteredKernel(ui, "SCLK", sclk); getUserEnteredKernel(spk, options.spk); getUserEnteredKernel(ui, "SPK", spk); getUserEnteredKernel(iak, options.iak); getUserEnteredKernel(ui, "IAK", iak); getUserEnteredKernel(exk, options.extra); getUserEnteredKernel(ui, "EXTRA", exk); // Get shape kernel // Get shape kernel if (options.shape == spiceinitOptions::USER) { if (ui.GetString("SHAPE") == "USER") { getUserEnteredKernel(dem, options.model); getUserEnteredKernel(ui, "MODEL", dem); } } else if (options.shape == spiceinitOptions::SYSTEM) { else if (ui.GetString("SHAPE") == "SYSTEM") { dem = baseKernels.dem(lab); dem = baseKernels.dem(lab); } } bool kernelSuccess = false; bool kernelSuccess = false; if ((ck.size() == 0 || ck.at(0).size() == 0) && options.ck.empty()) { if ((ck.size() == 0 || ck.at(0).size() == 0) && !ui.WasEntered("CK")) { // no ck was found in system and user did not enter ck, throw error // no ck was found in system and user did not enter ck, throw error throw IException(IException::Unknown, throw IException(IException::Unknown, "No Camera Kernels found for the image [" + icube->fileName() "No Camera Kernels found for the image [" + ui.GetFileName("FROM") + "]", + "]", _FILEINFO_); _FILEINFO_); } } else if (!options.ck.empty()) { else if (ui.WasEntered("CK")) { // if user entered ck // if user entered ck // empty ck queue list found in system // empty ck queue list found in system while (ck.size()) { while (ck.size()) { Loading @@ -230,9 +219,11 @@ namespace Isis { // if the user entered ck kernels, populate the ck kernel list with the // if the user entered ck kernels, populate the ck kernel list with the // user entered files // user entered files if (!options.ck.empty()) { if (ui.WasEntered("CK")) { vector<QString> userEnteredCks; ui.GetAsString("CK", userEnteredCks); // convert user entered std vector to QStringList and add to ckKernelList // convert user entered std vector to QStringList and add to ckKernelList ckKernelList = QVector<QString>::fromStdVector(options.ck).toList(); ckKernelList = QVector<QString>::fromStdVector(userEnteredCks).toList(); } } else {// loop through cks found in the system else {// loop through cks found in the system Loading Loading @@ -264,7 +255,7 @@ namespace Isis { realCkKernel.setKernels(ckKernelList); realCkKernel.setKernels(ckKernelList); kernelSuccess = tryKernels(icube, p, options, log, lk, pck, targetSpk, kernelSuccess = tryKernels(icube, p, ui, log, lk, pck, targetSpk, realCkKernel, fk, ik, sclk, spk, iak, dem, exk); realCkKernel, fk, ik, sclk, spk, iak, dem, exk); } } Loading @@ -276,99 +267,26 @@ namespace Isis { p.EndProcess(); p.EndProcess(); } } /** /** * Parse the User Interface into an options struct. * If the user entered the parameter param, then kernel is replaced by the * user's values and quality is reset to 0. Otherwise, the kernels loaded by the * KernelDb class will be kept. * * * @param ui The UI from an application * @param param Name of the kernel input parameter * * * @return An options object with the parameters from the UI. * @param kernel Kernel object to be overwritten if the specified user parameter * was entered. */ */ spiceinitOptions getSpiceinitOptions(UserInterface &ui) { void getUserEnteredKernel(UserInterface &ui, const QString ¶m, Kernel &kernel) { spiceinitOptions options; if (ui.WasEntered(param)) { kernel = Kernel(); options.web = ui.GetBoolean("WEB"); // NOTE: This is using GetAsString so that vars like $mgs can be used. options.attach = ui.GetBoolean("ATTACH"); vector<QString> kernels; options.cksmithed = ui.GetBoolean("CKSMITHED"); ui.GetAsString(param, kernels); options.ckrecon = ui.GetBoolean("CKRECON"); kernel.setKernels(QVector<QString>::fromStdVector(kernels).toList()); options.ckpredicted = ui.GetBoolean("CKPREDICTED"); options.cknadir = ui.GetBoolean("CKNADIR"); options.spksmithed = ui.GetBoolean("SPKSMITHED"); options.spkrecon = ui.GetBoolean("SPKRECON"); options.spkpredicted = ui.GetBoolean("SPKPREDICTED"); if (ui.WasEntered("LS")) { ui.GetAsString("LS", options.lsk); } if (ui.WasEntered("PCK")) { ui.GetAsString("PCK", options.pck); } if (ui.WasEntered("TSPK")) { ui.GetAsString("TSPK", options.tspk); } if (ui.WasEntered("IK")) { ui.GetAsString("IK", options.ik); } if (ui.WasEntered("SCLK")) { ui.GetAsString("SCLK", options.sclk); } if (ui.WasEntered("CK")) { ui.GetAsString("CK", options.ck); } if (ui.WasEntered("FK")) { ui.GetAsString("FK", options.fk); } if (ui.WasEntered("SPK")) { ui.GetAsString("SPK", options.spk); } if (ui.WasEntered("IAK")) { ui.GetAsString("IAK", options.iak); } if (ui.WasEntered("EXTRA")) { ui.GetAsString("EXTRA", options.extra); } if (ui.WasEntered("MODEL")) { ui.GetAsString("MODEL", options.model); } if (ui.GetString("SHAPE") == "ELLIPSOID") { options.shape = spiceinitOptions::ELLIPSOID; } else if (ui.GetString("SHAPE") == "RINGPLANE") { options.shape = spiceinitOptions::RINGPLANE; } else if (ui.GetString("SHAPE") == "SYSTEM") { options.shape = spiceinitOptions::SYSTEM; } else if (ui.GetString("SHAPE") == "USER") { options.shape = spiceinitOptions::USER; } else { throw IException(IException::Unknown, "Unknown SHAPE option [" + ui.GetString("SHAPE") + "].", _FILEINFO_); } options.startpad = ui.GetDouble("STARTPAD"); options.endpad = ui.GetDouble("ENDPAD"); options.url = ui.GetString("URL"); options.port = ui.GetInteger("PORT"); return options; } /** * Helper function to overwrite the system kernels with specified kernels. * * @param(in/out) kernel The Kernel object to overwrite * @param userKernels The vector of specified kernels */ void getUserEnteredKernel(Kernel &kernel, const std::vector<QString> &userKernels) { if (!userKernels.empty()) { kernel.setKernels(QVector<QString>::fromStdVector(userKernels).toList()); } } } } /** /** * Attempt to create a camera model from a set of kernels. * Attempt to create a camera model from a set of kernels. * * Loading @@ -392,9 +310,7 @@ namespace Isis { * * * @return If a camera model was successfully created * @return If a camera model was successfully created */ */ bool tryKernels(Cube *icube, Process &p, bool tryKernels(Cube *icube, Process &p, UserInterface &ui, Pvl *log, const spiceinitOptions &options, Pvl *log, Kernel lk, Kernel pck, Kernel lk, Kernel pck, Kernel targetSpk, Kernel ck, Kernel targetSpk, Kernel ck, Kernel fk, Kernel ik, Kernel sclk, Kernel fk, Kernel ik, Kernel sclk, Loading Loading @@ -437,7 +353,7 @@ namespace Isis { iakKeyword.addValue(iak[i]); iakKeyword.addValue(iak[i]); } } if (options.shape == spiceinitOptions::RINGPLANE) { if (ui.GetString("SHAPE") == "RINGPLANE") { demKeyword.addValue("RingPlane"); demKeyword.addValue("RingPlane"); } } else { else { Loading Loading @@ -512,14 +428,14 @@ namespace Isis { } } // Add any time padding the user specified to the spice group // Add any time padding the user specified to the spice group if (options.startpad > DBL_EPSILON) { if (ui.GetDouble("STARTPAD") > DBL_EPSILON) { currentKernels.addKeyword(PvlKeyword("StartPadding", currentKernels.addKeyword(PvlKeyword("StartPadding", toString(options.startpad), "seconds")); toString(ui.GetDouble("STARTPAD")), "seconds")); } } if (options.endpad > DBL_EPSILON) { if (ui.GetDouble("ENDPAD") > DBL_EPSILON) { currentKernels.addKeyword(PvlKeyword("EndPadding", currentKernels.addKeyword(PvlKeyword("EndPadding", toString(options.endpad), "seconds")); toString(ui.GetDouble("ENDPAD")), "seconds")); } } currentKernels.addKeyword( currentKernels.addKeyword( Loading Loading @@ -550,6 +466,7 @@ namespace Isis { if (log){ if (log){ log->addGroup(currentKernels); log->addGroup(currentKernels); } } } } catch(IException &e) { catch(IException &e) { Pvl errPvl = e.toPvl(); Pvl errPvl = e.toPvl(); Loading @@ -557,7 +474,6 @@ namespace Isis { if (errPvl.groups() > 0) { if (errPvl.groups() > 0) { currentKernels += PvlKeyword("Error", errPvl.group(errPvl.groups() - 1)["Message"][0]); currentKernels += PvlKeyword("Error", errPvl.group(errPvl.groups() - 1)["Message"][0]); } } if (log) { if (log) { log->addGroup(currentKernels); log->addGroup(currentKernels); } } Loading @@ -565,7 +481,7 @@ namespace Isis { throw IException(e); throw IException(e); } } if (options.attach) { if (ui.GetBoolean("ATTACH")) { Table ckTable = cam->instrumentRotation()->Cache("InstrumentPointing"); Table ckTable = cam->instrumentRotation()->Cache("InstrumentPointing"); ckTable.Label() += PvlKeyword("Description", "Created by spiceinit"); ckTable.Label() += PvlKeyword("Description", "Created by spiceinit"); ckTable.Label() += PvlKeyword("Kernels"); ckTable.Label() += PvlKeyword("Kernels"); Loading Loading @@ -683,57 +599,37 @@ namespace Isis { * @param options The spiceinit options * @param options The spiceinit options * @param log The Application log * @param log The Application log */ */ void requestSpice(Cube *icube, void requestSpice(Cube *icube, UserInterface &ui, Pvl *log, Pvl &labels, QString missionName) { Pvl &labels, QString missionName, const spiceinitOptions &options, Pvl *log) { QString instrumentId = QString instrumentId = labels.findGroup("Instrument", Pvl::Traverse)["InstrumentId"][0]; labels.findGroup("Instrument", Pvl::Traverse)["InstrumentId"][0]; QString url = options.url + "?mission=" + missionName + "&instrument=" + instrumentId; QString url = ui.GetString("URL") + "?mission=" + missionName + QString shape; "&instrument=" + instrumentId; switch (options.shape) { int port = ui.GetInteger("PORT"); case spiceinitOptions::ELLIPSOID: bool ckSmithed = ui.GetBoolean("CKSMITHED"); shape = "ELLIPSOID"; bool ckRecon = ui.GetBoolean("CKRECON"); break; bool ckPredicted = ui.GetBoolean("CKPREDICTED"); case spiceinitOptions::RINGPLANE: bool ckNadir = ui.GetBoolean("CKNADIR"); shape = "RINGPLANE"; bool spkSmithed = ui.GetBoolean("SPKSMITHED"); break; bool spkRecon = ui.GetBoolean("SPKRECON"); case spiceinitOptions::SYSTEM: bool spkPredicted = ui.GetBoolean("SPKPREDICTED"); shape = "SYSTEM"; QString shape = QString(ui.GetString("SHAPE")).toLower(); break; case spiceinitOptions::USER: shape = "USER"; break; default: throw IException(IException::User, "Invalid shape option for spice server[" + toString(static_cast<int>(options.shape)) + "].", _FILEINFO_); break; } if (shape == "user") { if (shape == "user") { if (options.model.size() != 1) { shape = QString(ui.GetAsString("MODEL")); throw IException(IException::User, "Exactly one shape model must be entered when shape is set to USER; [" + toString(static_cast<int>(options.model.size())) + "] shape models were entered.", _FILEINFO_); } shape = options.model.front(); // Test for valid labels with mapping group at least // Test for valid labels with mapping group at least Pvl shapeTest(shape); Pvl shapeTest(shape); shapeTest.findGroup("Mapping", Pvl::Traverse); shapeTest.findGroup("Mapping", Pvl::Traverse); } } SpiceClient client(url, options.port, labels, double startPad = ui.GetDouble("STARTPAD"); options.cksmithed, options.ckrecon, double endPad = ui.GetDouble("ENDPAD"); options.ckpredicted, options.cknadir, options.spksmithed, options.spkrecon, options.spkpredicted, SpiceClient client(url, port, labels, shape, options.startpad, options.endpad); ckSmithed, ckRecon, ckPredicted, ckNadir, spkSmithed, spkRecon, spkPredicted, shape, startPad, endPad); Progress connectionProgress; Progress connectionProgress; connectionProgress.SetText("Requesting Spice Data"); connectionProgress.SetText("Requesting Spice Data"); Loading Loading @@ -804,5 +700,4 @@ namespace Isis { delete sunPosTable; delete sunPosTable; sunPosTable = NULL; sunPosTable = NULL; } } } }
isis/src/base/apps/spiceinit/spiceinit.h +1 −44 Original line number Original line Diff line number Diff line Loading @@ -10,52 +10,9 @@ #include "UserInterface.h" #include "UserInterface.h" namespace Isis { namespace Isis { extern void spiceinit(Cube *cube, UserInterface &ui, Pvl *log=nullptr); /** * Struct specifying how to spiceinit a Cube. */ struct spiceinitOptions { // Enumeration describing where to get the target shape model enum shapeSource { ELLIPSOID, //!< The shapemodel is a triaxial ellipsoid RINGPLANE, //!< The shapemodel is the targets ring plane SYSTEM, //!< The shapemodel is the system default USER //!< The shapemodel is entered by the user }; bool web = false; //!< If the spice web service should be used bool attach = true; // If the spice data should be attached to the Cube file bool cksmithed = false; // If system controlled CKs should be used bool ckrecon = true; // If system reconstructed CKs should be used bool ckpredicted = false; // If system predicted CKs should be used bool cknadir = false; // If pointing should be computed from the spacecraft state bool spksmithed = false; // If system controlled CKs should be used bool spkrecon = true; // If system reconstructed CKs should be used bool spkpredicted = false; // If system predicted CKs should be used std::vector<QString> lsk = std::vector<QString>(); //!< override leap second kernels std::vector<QString> pck = std::vector<QString>(); //!< override planetary constant kernels std::vector<QString> tspk = std::vector<QString>(); //!< override target state kernels std::vector<QString> ik = std::vector<QString>(); //!< override instrument kernels std::vector<QString> sclk = std::vector<QString>(); //!< override spacecraft clock kernels std::vector<QString> ck = std::vector<QString>(); //!< override camera kernels std::vector<QString> fk = std::vector<QString>(); //!< override frame kernels std::vector<QString> spk = std::vector<QString>(); //!< override spacecraft state kernels std::vector<QString> iak = std::vector<QString>(); //!< override instrument addendum kernels std::vector<QString> extra = std::vector<QString>(); //!< override extra kernels std::vector<QString> model = std::vector<QString>(); //!< override DEMs shapeSource shape = SYSTEM; //!< Where to get the target shape model from double startpad = 0.0; //!< Image start time padding in seconds double endpad = 0.0; //!< Image stop time padding in seconds // URL for the spice web service QString url = "https://services.isis.astrogeology.usgs.gov/cgi-bin/spiceinit.cgi"; int port = 443; //!< port for the spice web service }; extern void spiceinit(UserInterface &ui, extern void spiceinit(UserInterface &ui, Pvl *log = nullptr); Pvl *log = nullptr); extern void spiceinit(Cube *icube, const spiceinitOptions &options = spiceinitOptions(), Pvl *log = nullptr); } } #endif #endif