Loading isis/src/base/apps/noproj/noproj.cpp +17 −15 Original line number Diff line number Diff line Loading @@ -184,11 +184,13 @@ namespace Isis { // Can we do a regular label? Didn't work on 12-15-2006 cao.setLabelAttachment(Isis::DetachedLabel); FileName matchCubeFile = FileName::createTempFile("$Temporary/match.cub"); QString matchCubeFileNoExt = matchCubeFile.path() + "/" + matchCubeFile.baseName(); // Determine the output image size from // 1) the idealInstrument pvl if there or // 2) the input size expanded by user specified percentage Cube *ocube = p.SetOutputCube("match.cub", cao, 1, 1, 1); Cube *ocube = p.SetOutputCube(matchCubeFile.expanded(), cao, 1, 1, 1); // Extract the times and the target from the instrument group QString startTime = inst["StartTime"]; QString stopTime; Loading Loading @@ -350,32 +352,32 @@ namespace Isis { // 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"); label.read(matchCubeFileNoExt + ".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(matchCubeFileNoExt + ".lbl"); // And run cam2cam to apply the transformation QVector<QString> args = {"to=" + ui.GetFileName("TO"), "INTERP=" + ui.GetString("INTERP")}; UserInterface cam2camUI(FileName("$ISISROOT/bin/xml/cam2cam.xml").expanded(), args); Cube matchCube; matchCube.open("match.cub", "rw"); matchCube.open(matchCubeFile.expanded(), "rw"); cam2cam(icube, &matchCube, cam2camUI); // Cleanup by deleting the match files remove("match.History.IsisCube"); remove("match.lbl"); remove("match.cub"); remove("match.OriginalLabel.IsisCube"); remove("match.Table.BodyRotation"); remove("match.Table.HiRISE Ancillary"); remove("match.Table.HiRISE Calibration Ancillary"); remove("match.Table.HiRISE Calibration Image"); remove("match.Table.InstrumentPointing"); remove("match.Table.InstrumentPosition"); remove("match.Table.SunPosition"); remove((matchCubeFileNoExt + ".History.IsisCube").toStdString().c_str()); remove((matchCubeFileNoExt + ".lbl").toStdString().c_str()); remove(matchCubeFile.expanded().toStdString().c_str()); remove((matchCubeFileNoExt + ".OriginalLabel.IsisCube").toStdString().c_str()); remove((matchCubeFileNoExt + ".Table.BodyRotation").toStdString().c_str()); remove((matchCubeFileNoExt + ".Table.HiRISE Ancillary").toStdString().c_str()); remove((matchCubeFileNoExt + ".Table.HiRISE Calibration Ancillary").toStdString().c_str()); remove((matchCubeFileNoExt + ".Table.HiRISE Calibration Image").toStdString().c_str()); remove((matchCubeFileNoExt + ".Table.InstrumentPointing").toStdString().c_str()); remove((matchCubeFileNoExt + ".Table.InstrumentPosition").toStdString().c_str()); remove((matchCubeFileNoExt + ".Table.SunPosition").toStdString().c_str()); // Finally finish by adding the OriginalInstrument group to the TO cube Cube toCube; Loading Loading
isis/src/base/apps/noproj/noproj.cpp +17 −15 Original line number Diff line number Diff line Loading @@ -184,11 +184,13 @@ namespace Isis { // Can we do a regular label? Didn't work on 12-15-2006 cao.setLabelAttachment(Isis::DetachedLabel); FileName matchCubeFile = FileName::createTempFile("$Temporary/match.cub"); QString matchCubeFileNoExt = matchCubeFile.path() + "/" + matchCubeFile.baseName(); // Determine the output image size from // 1) the idealInstrument pvl if there or // 2) the input size expanded by user specified percentage Cube *ocube = p.SetOutputCube("match.cub", cao, 1, 1, 1); Cube *ocube = p.SetOutputCube(matchCubeFile.expanded(), cao, 1, 1, 1); // Extract the times and the target from the instrument group QString startTime = inst["StartTime"]; QString stopTime; Loading Loading @@ -350,32 +352,32 @@ namespace Isis { // 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"); label.read(matchCubeFileNoExt + ".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(matchCubeFileNoExt + ".lbl"); // And run cam2cam to apply the transformation QVector<QString> args = {"to=" + ui.GetFileName("TO"), "INTERP=" + ui.GetString("INTERP")}; UserInterface cam2camUI(FileName("$ISISROOT/bin/xml/cam2cam.xml").expanded(), args); Cube matchCube; matchCube.open("match.cub", "rw"); matchCube.open(matchCubeFile.expanded(), "rw"); cam2cam(icube, &matchCube, cam2camUI); // Cleanup by deleting the match files remove("match.History.IsisCube"); remove("match.lbl"); remove("match.cub"); remove("match.OriginalLabel.IsisCube"); remove("match.Table.BodyRotation"); remove("match.Table.HiRISE Ancillary"); remove("match.Table.HiRISE Calibration Ancillary"); remove("match.Table.HiRISE Calibration Image"); remove("match.Table.InstrumentPointing"); remove("match.Table.InstrumentPosition"); remove("match.Table.SunPosition"); remove((matchCubeFileNoExt + ".History.IsisCube").toStdString().c_str()); remove((matchCubeFileNoExt + ".lbl").toStdString().c_str()); remove(matchCubeFile.expanded().toStdString().c_str()); remove((matchCubeFileNoExt + ".OriginalLabel.IsisCube").toStdString().c_str()); remove((matchCubeFileNoExt + ".Table.BodyRotation").toStdString().c_str()); remove((matchCubeFileNoExt + ".Table.HiRISE Ancillary").toStdString().c_str()); remove((matchCubeFileNoExt + ".Table.HiRISE Calibration Ancillary").toStdString().c_str()); remove((matchCubeFileNoExt + ".Table.HiRISE Calibration Image").toStdString().c_str()); remove((matchCubeFileNoExt + ".Table.InstrumentPointing").toStdString().c_str()); remove((matchCubeFileNoExt + ".Table.InstrumentPosition").toStdString().c_str()); remove((matchCubeFileNoExt + ".Table.SunPosition").toStdString().c_str()); // Finally finish by adding the OriginalInstrument group to the TO cube Cube toCube; Loading