Loading isis/src/base/apps/isis2pds/isis2pds.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -126,7 +126,8 @@ void IsisMain() { throw IException(IException::User, msg, _FILEINFO_); } QString outFile = ui.GetFileName("TO"); FileName outFile(ui.GetFileName("TO", "img")); QString outFileName(outFile.expanded()); if(ui.GetString("STRETCH") == "LINEAR") { if(ui.GetString("BITTYPE") != "32BIT") Loading Loading @@ -183,7 +184,7 @@ void IsisMain() { Application::Log(results); process.StandardPds4Label(); process.WritePds4(outFile); process.WritePds4(outFileName); } return; Loading isis/src/base/apps/isis2pds/isis2pds.xml +3 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,9 @@ <change name="Jeannie Backer, Mayayla Shepard, and Kristin Berry" date="2017-10-27"> Added PDS4 output option. Previously, this application converted ISIS3 cubes to PDS3 format only. </change> <change name="Jeannie Backer" date="2017-11-13"> Updated to attach *.img extension to pds4 output data file. </change> </history> <groups> Loading isis/src/base/objs/ProcessExportPds/ProcessExportPds.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -149,7 +149,7 @@ namespace Isis { } } else { QString msg = "Invalid PDS export type"; QString msg = "Invalid PDS export type."; throw IException(IException::Programmer, msg, _FILEINFO_); } Loading Loading @@ -263,7 +263,7 @@ namespace Isis { } } else { QString msg = "Labels must be detached for JP2 files"; QString msg = "Labels must be detached for JP2 files."; throw IException(IException::Programmer, msg, _FILEINFO_); } FileName outFile(sImageFile); Loading @@ -277,7 +277,7 @@ namespace Isis { cmpObj += PvlKeyword("UNCOMPRESSED_FILE_NAME", infilename.name()); int storagebytes = InputCubes[0]->sampleCount() * InputCubes[0]->lineCount(); if(p_pixelType == Isis::Real) { QString msg = "JPEG2000 does not support floating point data"; QString msg = "JPEG2000 does not support floating point data."; throw IException(IException::Programmer, msg, _FILEINFO_); } if(p_pixelType == Isis::UnsignedWord || p_pixelType == Isis::SignedWord) { Loading Loading @@ -354,7 +354,7 @@ namespace Isis { } } else { QString msg = "Labels must be detached for JP2 files"; QString msg = "Labels must be detached for JP2 files."; throw IException(IException::Programmer, msg, _FILEINFO_); } FileName outFile(sImageFile); Loading @@ -368,7 +368,7 @@ namespace Isis { cmpObj += PvlKeyword("UNCOMPRESSED_FILE_NAME", infilename.name()); int storagebytes = InputCubes[0]->sampleCount() * InputCubes[0]->lineCount(); if(p_pixelType == Isis::Real) { QString msg = "JPEG2000 does not support floating point data"; QString msg = "JPEG2000 does not support floating point data."; throw IException(IException::Programmer, msg, _FILEINFO_); } if(p_pixelType == Isis::UnsignedWord || p_pixelType == Isis::SignedWord) { Loading isis/src/base/objs/ProcessExportPds4/ProcessExportPds4.cpp +502 −124 File changed.Preview size limit exceeded, changes collapsed. Show changes isis/src/base/objs/ProcessExportPds4/ProcessExportPds4.h +29 −5 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ #include "ProcessExport.h" #include <vector> #include <QString> #include <QDomDocument> namespace Isis { Loading Loading @@ -53,7 +53,21 @@ namespace Isis { * See #5202. * @history 2017-10-31 Jeannie Backer - Added standardInstrument() and displaySettings() * translations. * * @history 2017-11-06 Kristin Berry - Added standardBandBin() * @history 2017-11-07 Jeannie Backer - Added code to search for target in the Mapping group * if no instrument group is found. Added Identification Area * tranlations. Added sanity checks to getElement(). * @history 2017-11-07 Jeannie Backer - Added code to write data file info into label file. * Added code to translate time format and add nil tag if empty. * @history 2017-11-15 Jesse Mapel - Added translateUnits method to convert units to PDS4 * standard format. * @history 2017-11-16 Kristin Berry - Updated WritePds4 to put the File information first * in the output File_Area_Observational. * @history 2017-11-17 Jesse Mapel - Removed empty FixedImageRoot method. * @history 2017-11-20 Jeannie Backer - Updated StandardImageImage() to re-order the * Array_3D_Image values properly. * @history 2017-11-21 Kristin Berry - Updated the constructor to add the xml version and * encoding to the beginning of the XML file. */ class ProcessExportPds4: public Isis::ProcessExport { Loading @@ -66,7 +80,6 @@ namespace Isis { void StandardAllMapping(); void CreateImageLabel(); void FixedImageRoot(); void StandardImageImage(); void OutputLabel(std::ofstream &os); Loading @@ -78,13 +91,24 @@ namespace Isis { void StartProcess(std::ofstream &fout); QDomDocument &GetLabel(); void WritePds4(QString outFile); QDomElement getElement(QStringList xmlPath, QDomElement parent); QDomElement getElement(QStringList xmlPath, QDomElement parent=QDomElement()); void addHistory(QString description, QString date = "tbd", QString version = "1.0"); protected: static void translateUnits(QDomDocument &label, QString transMapFile = "$base/translations/pds4ExportUnits.pvl"); protected: void addSchema(QString sch, QString xsd, QString xmlns, QString xmlnsURI) ; void identificationArea(); void standardInstrument(); void standardBandBin(); void displaySettings(); QString PDS4PixelType(PixelType pixelType, ByteOrder endianType); static QMap<QString, QString> createUnitMap(Pvl configPvl); static void translateChildUnits(QDomElement parent, QMap<QString, QString> transMap); QDomDocument *m_domDoc; //!< XML label QString m_schemaLocation; //!< QString with all schema locations required }; } Loading Loading
isis/src/base/apps/isis2pds/isis2pds.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -126,7 +126,8 @@ void IsisMain() { throw IException(IException::User, msg, _FILEINFO_); } QString outFile = ui.GetFileName("TO"); FileName outFile(ui.GetFileName("TO", "img")); QString outFileName(outFile.expanded()); if(ui.GetString("STRETCH") == "LINEAR") { if(ui.GetString("BITTYPE") != "32BIT") Loading Loading @@ -183,7 +184,7 @@ void IsisMain() { Application::Log(results); process.StandardPds4Label(); process.WritePds4(outFile); process.WritePds4(outFileName); } return; Loading
isis/src/base/apps/isis2pds/isis2pds.xml +3 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,9 @@ <change name="Jeannie Backer, Mayayla Shepard, and Kristin Berry" date="2017-10-27"> Added PDS4 output option. Previously, this application converted ISIS3 cubes to PDS3 format only. </change> <change name="Jeannie Backer" date="2017-11-13"> Updated to attach *.img extension to pds4 output data file. </change> </history> <groups> Loading
isis/src/base/objs/ProcessExportPds/ProcessExportPds.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -149,7 +149,7 @@ namespace Isis { } } else { QString msg = "Invalid PDS export type"; QString msg = "Invalid PDS export type."; throw IException(IException::Programmer, msg, _FILEINFO_); } Loading Loading @@ -263,7 +263,7 @@ namespace Isis { } } else { QString msg = "Labels must be detached for JP2 files"; QString msg = "Labels must be detached for JP2 files."; throw IException(IException::Programmer, msg, _FILEINFO_); } FileName outFile(sImageFile); Loading @@ -277,7 +277,7 @@ namespace Isis { cmpObj += PvlKeyword("UNCOMPRESSED_FILE_NAME", infilename.name()); int storagebytes = InputCubes[0]->sampleCount() * InputCubes[0]->lineCount(); if(p_pixelType == Isis::Real) { QString msg = "JPEG2000 does not support floating point data"; QString msg = "JPEG2000 does not support floating point data."; throw IException(IException::Programmer, msg, _FILEINFO_); } if(p_pixelType == Isis::UnsignedWord || p_pixelType == Isis::SignedWord) { Loading Loading @@ -354,7 +354,7 @@ namespace Isis { } } else { QString msg = "Labels must be detached for JP2 files"; QString msg = "Labels must be detached for JP2 files."; throw IException(IException::Programmer, msg, _FILEINFO_); } FileName outFile(sImageFile); Loading @@ -368,7 +368,7 @@ namespace Isis { cmpObj += PvlKeyword("UNCOMPRESSED_FILE_NAME", infilename.name()); int storagebytes = InputCubes[0]->sampleCount() * InputCubes[0]->lineCount(); if(p_pixelType == Isis::Real) { QString msg = "JPEG2000 does not support floating point data"; QString msg = "JPEG2000 does not support floating point data."; throw IException(IException::Programmer, msg, _FILEINFO_); } if(p_pixelType == Isis::UnsignedWord || p_pixelType == Isis::SignedWord) { Loading
isis/src/base/objs/ProcessExportPds4/ProcessExportPds4.cpp +502 −124 File changed.Preview size limit exceeded, changes collapsed. Show changes
isis/src/base/objs/ProcessExportPds4/ProcessExportPds4.h +29 −5 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ #include "ProcessExport.h" #include <vector> #include <QString> #include <QDomDocument> namespace Isis { Loading Loading @@ -53,7 +53,21 @@ namespace Isis { * See #5202. * @history 2017-10-31 Jeannie Backer - Added standardInstrument() and displaySettings() * translations. * * @history 2017-11-06 Kristin Berry - Added standardBandBin() * @history 2017-11-07 Jeannie Backer - Added code to search for target in the Mapping group * if no instrument group is found. Added Identification Area * tranlations. Added sanity checks to getElement(). * @history 2017-11-07 Jeannie Backer - Added code to write data file info into label file. * Added code to translate time format and add nil tag if empty. * @history 2017-11-15 Jesse Mapel - Added translateUnits method to convert units to PDS4 * standard format. * @history 2017-11-16 Kristin Berry - Updated WritePds4 to put the File information first * in the output File_Area_Observational. * @history 2017-11-17 Jesse Mapel - Removed empty FixedImageRoot method. * @history 2017-11-20 Jeannie Backer - Updated StandardImageImage() to re-order the * Array_3D_Image values properly. * @history 2017-11-21 Kristin Berry - Updated the constructor to add the xml version and * encoding to the beginning of the XML file. */ class ProcessExportPds4: public Isis::ProcessExport { Loading @@ -66,7 +80,6 @@ namespace Isis { void StandardAllMapping(); void CreateImageLabel(); void FixedImageRoot(); void StandardImageImage(); void OutputLabel(std::ofstream &os); Loading @@ -78,13 +91,24 @@ namespace Isis { void StartProcess(std::ofstream &fout); QDomDocument &GetLabel(); void WritePds4(QString outFile); QDomElement getElement(QStringList xmlPath, QDomElement parent); QDomElement getElement(QStringList xmlPath, QDomElement parent=QDomElement()); void addHistory(QString description, QString date = "tbd", QString version = "1.0"); protected: static void translateUnits(QDomDocument &label, QString transMapFile = "$base/translations/pds4ExportUnits.pvl"); protected: void addSchema(QString sch, QString xsd, QString xmlns, QString xmlnsURI) ; void identificationArea(); void standardInstrument(); void standardBandBin(); void displaySettings(); QString PDS4PixelType(PixelType pixelType, ByteOrder endianType); static QMap<QString, QString> createUnitMap(Pvl configPvl); static void translateChildUnits(QDomElement parent, QMap<QString, QString> transMap); QDomDocument *m_domDoc; //!< XML label QString m_schemaLocation; //!< QString with all schema locations required }; } Loading