Loading isis/src/base/apps/isis2ascii/isis2ascii.xml +24 −9 Original line number Diff line number Diff line Loading @@ -71,6 +71,10 @@ <change name="Adam Paquette" date="2016-06-15"> Added the ability for a user to specify the special pixel values </change> <change name="Adam Paquette" date="2020-06-09"> Changed output formatting to use a delimiter that is placed after each entry, rather than depending on a set width. </change> </history> Loading Loading @@ -108,6 +112,17 @@ <item>YES</item> </default> </parameter> <parameter name="DELIMITER"> <type>string</type> <brief>Output Delimiter</brief> <description> Sets the value to place between entries in the output file. This will default to a space if nothing is entered. </description> <default> <item></item> </default> </parameter> </group> <group name="Special Pixels"> Loading isis/src/base/apps/isis2ascii/main.cpp +15 −6 Original line number Diff line number Diff line Loading @@ -33,12 +33,12 @@ public: QString hrs, QString his, QString lrs, QString lis) : null(null), hrs(hrs), his(his), lrs(lrs), lis(lis) {} QString lis, QString delimiter) : null(null), hrs(hrs), his(his), lrs(lrs), lis(lis), delimiter(delimiter) {} void operator() (Buffer &in) const { for(int i = 0; i < in.size(); i++) { fout.width(13); // Width must be set everytime if(IsSpecial(in[i])) { if(IsNullPixel(in[i])) fout << null; if(IsHrsPixel(in[i])) fout << hrs; Loading @@ -49,6 +49,9 @@ public: else { fout << in[i]; } if (i != in.size() - 1) { fout << delimiter; } } fout << endl; } Loading @@ -58,6 +61,7 @@ private: QString his; QString lrs; QString lis; QString delimiter; }; void IsisMain() { Loading @@ -78,6 +82,11 @@ void IsisMain() { QString to = ui.GetFileName("TO", "txt"); fout.open(to.toLatin1().data()); QString delimiter = ui.GetString("DELIMITER"); if (delimiter.isEmpty()) { delimiter = " "; } // Print header if needed if(ui.GetBoolean("HEADER")) { fout << "Input Cube: " << icube->fileName() << endl; Loading @@ -101,7 +110,7 @@ void IsisMain() { lis = "LIS"; } SpecialPixelFunctor isis2ascii(null, hrs, his, lrs, lis); SpecialPixelFunctor isis2ascii(null, hrs, his, lrs, lis, delimiter); fout << std::setprecision(7); Loading Loading
isis/src/base/apps/isis2ascii/isis2ascii.xml +24 −9 Original line number Diff line number Diff line Loading @@ -71,6 +71,10 @@ <change name="Adam Paquette" date="2016-06-15"> Added the ability for a user to specify the special pixel values </change> <change name="Adam Paquette" date="2020-06-09"> Changed output formatting to use a delimiter that is placed after each entry, rather than depending on a set width. </change> </history> Loading Loading @@ -108,6 +112,17 @@ <item>YES</item> </default> </parameter> <parameter name="DELIMITER"> <type>string</type> <brief>Output Delimiter</brief> <description> Sets the value to place between entries in the output file. This will default to a space if nothing is entered. </description> <default> <item></item> </default> </parameter> </group> <group name="Special Pixels"> Loading
isis/src/base/apps/isis2ascii/main.cpp +15 −6 Original line number Diff line number Diff line Loading @@ -33,12 +33,12 @@ public: QString hrs, QString his, QString lrs, QString lis) : null(null), hrs(hrs), his(his), lrs(lrs), lis(lis) {} QString lis, QString delimiter) : null(null), hrs(hrs), his(his), lrs(lrs), lis(lis), delimiter(delimiter) {} void operator() (Buffer &in) const { for(int i = 0; i < in.size(); i++) { fout.width(13); // Width must be set everytime if(IsSpecial(in[i])) { if(IsNullPixel(in[i])) fout << null; if(IsHrsPixel(in[i])) fout << hrs; Loading @@ -49,6 +49,9 @@ public: else { fout << in[i]; } if (i != in.size() - 1) { fout << delimiter; } } fout << endl; } Loading @@ -58,6 +61,7 @@ private: QString his; QString lrs; QString lis; QString delimiter; }; void IsisMain() { Loading @@ -78,6 +82,11 @@ void IsisMain() { QString to = ui.GetFileName("TO", "txt"); fout.open(to.toLatin1().data()); QString delimiter = ui.GetString("DELIMITER"); if (delimiter.isEmpty()) { delimiter = " "; } // Print header if needed if(ui.GetBoolean("HEADER")) { fout << "Input Cube: " << icube->fileName() << endl; Loading @@ -101,7 +110,7 @@ void IsisMain() { lis = "LIS"; } SpecialPixelFunctor isis2ascii(null, hrs, his, lrs, lis); SpecialPixelFunctor isis2ascii(null, hrs, his, lrs, lis, delimiter); fout << std::setprecision(7); Loading