Loading isis/src/tgo/apps/tgocassisrdrgen/tgocassisrdrgen.cpp +7 −5 Original line number Diff line number Diff line Loading @@ -53,26 +53,28 @@ void IsisMain() { throw IException(IException::User, msg, _FILEINFO_); } // If isMosaic is true, targetGroup will reference the Mosaic group. // Else, targetGroup will reference the Instrument group. PvlGroup &targetGroup = isMosaic ? label->findObject("IsisCube").findGroup("Mosaic") : label->findObject("IsisCube").findGroup("Instrument"); // Add the ProductId keyword for translation. If a product id is not specified // by the user, set it to the Observation Id. // This is added before the translation instead of adding it to the exported xml // because of the ease of editing pvl vs xml. PvlGroup &instrumentGroup = label->findObject("IsisCube").findGroup("Instrument"); PvlKeyword productId = PvlKeyword("ProductId"); if ( ui.WasEntered("PRODUCTID") ) { productId.setValue( ui.GetString("PRODUCTID") ); instrumentGroup.addKeyword(productId); } else { QString observationId = instrumentGroup.findKeyword("ObservationId")[0]; QString observationId = targetGroup.findKeyword("ObservationId")[0]; productId.setValue(observationId); } instrumentGroup.addKeyword(productId); targetGroup.addKeyword(productId); /* * Add additional pds label data here */ QDomDocument &pdsLabel = process.GetLabel(); PvlToXmlTranslationManager cubeLab(*(icube->label()), "$tgo/translations/tgoCassisExport.trn"); Loading isis/src/tgo/apps/tgocassisrdrgen/tgocassisrdrgen.xml +5 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,11 @@ Added parameter PRODUCTID to set the ProductId keyword. If the product id is not specified by the user, set the ProductId keyword to the observation id. </change> <change name="Kaitlyn Lee" date="2018-05-21"> Added the check to see if the input cube is a mosaic. If it is, instead of the Instrument group, the cube will have a Mosaic group. So, the ProductId will now be written to the Mosaic group. </change> </history> <category> Loading isis/src/tgo/apps/tgocassisrdrgen/tsts/default/Makefile→isis/src/tgo/apps/tgocassisrdrgen/tsts/raw/Makefile +2 −2 Original line number Diff line number Diff line # Verify that we can export a non-projected and non-mosaiked cube as a TGO CaSSIS image. # Test that we can override the product id with the PRODUCTID parameter. # # history 2018-05-18 Kaitlyn Lee - Changed input cube with an one that has the # history 2018-05-18 Kaitlyn Lee - Changed input cube with one that has the # ObservationId. Added the removal of the modification_date and ISIS version. # Added testing for PRODUCTID parameter. Loading Loading
isis/src/tgo/apps/tgocassisrdrgen/tgocassisrdrgen.cpp +7 −5 Original line number Diff line number Diff line Loading @@ -53,26 +53,28 @@ void IsisMain() { throw IException(IException::User, msg, _FILEINFO_); } // If isMosaic is true, targetGroup will reference the Mosaic group. // Else, targetGroup will reference the Instrument group. PvlGroup &targetGroup = isMosaic ? label->findObject("IsisCube").findGroup("Mosaic") : label->findObject("IsisCube").findGroup("Instrument"); // Add the ProductId keyword for translation. If a product id is not specified // by the user, set it to the Observation Id. // This is added before the translation instead of adding it to the exported xml // because of the ease of editing pvl vs xml. PvlGroup &instrumentGroup = label->findObject("IsisCube").findGroup("Instrument"); PvlKeyword productId = PvlKeyword("ProductId"); if ( ui.WasEntered("PRODUCTID") ) { productId.setValue( ui.GetString("PRODUCTID") ); instrumentGroup.addKeyword(productId); } else { QString observationId = instrumentGroup.findKeyword("ObservationId")[0]; QString observationId = targetGroup.findKeyword("ObservationId")[0]; productId.setValue(observationId); } instrumentGroup.addKeyword(productId); targetGroup.addKeyword(productId); /* * Add additional pds label data here */ QDomDocument &pdsLabel = process.GetLabel(); PvlToXmlTranslationManager cubeLab(*(icube->label()), "$tgo/translations/tgoCassisExport.trn"); Loading
isis/src/tgo/apps/tgocassisrdrgen/tgocassisrdrgen.xml +5 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,11 @@ Added parameter PRODUCTID to set the ProductId keyword. If the product id is not specified by the user, set the ProductId keyword to the observation id. </change> <change name="Kaitlyn Lee" date="2018-05-21"> Added the check to see if the input cube is a mosaic. If it is, instead of the Instrument group, the cube will have a Mosaic group. So, the ProductId will now be written to the Mosaic group. </change> </history> <category> Loading
isis/src/tgo/apps/tgocassisrdrgen/tsts/default/Makefile→isis/src/tgo/apps/tgocassisrdrgen/tsts/raw/Makefile +2 −2 Original line number Diff line number Diff line # Verify that we can export a non-projected and non-mosaiked cube as a TGO CaSSIS image. # Test that we can override the product id with the PRODUCTID parameter. # # history 2018-05-18 Kaitlyn Lee - Changed input cube with an one that has the # history 2018-05-18 Kaitlyn Lee - Changed input cube with one that has the # ObservationId. Added the removal of the modification_date and ISIS version. # Added testing for PRODUCTID parameter. Loading