Loading .gitignore +1 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ object_script.*.Debug *_plugin_import.cpp *.moc ui_*.h *.html # ignore all files created by squish coco *csmes Loading isis/src/base/apps/isis2std/isis2std.xml +65 −73 Original line number Diff line number Diff line Loading @@ -3,22 +3,22 @@ <application name="isis2std" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://isis.astrogeology.usgs.gov/Schemas/Application/application.xsd"> <brief> Exports a cube to a PNG, BMP, GIF, TIFF, JPEG, or JPEG 2000 Exports a cube to PNG, BMP, TIFF, JPEG, or JPEG 2000 </brief> <description> <p> This program exports an ISIS cube to one of several popular standard image formats. The current supported formats are BMP, GIF, JPEG, JP2, PNG, and TIFF. formats. The current supported formats are BMP, JPEG, JP2, PNG, and TIFF. </p> <p> This program uses TrollTech's version of the Qt Library to export BMP, GIF and JPEG formatted output images. For these format types, due to limitations of Qt, the input file size must not exceed 2 gigabytes and the only valid output bit type is 8BIT. This program uses TrollTech's version of the Qt Library to export BMP and JPEG formatted output images. For these format types, due to limitations of Qt, the input file size must not exceed 2 gigabytes and the only valid output bit type is 8-bit. </p> <p> The JPEG2000 (JP2) and TIFF formats do not depend on the Qt library. These formats do not have the 2 GB limitation for input files and the output bit type may be 8BIT, U16BIT or S16BIT. have the 2 GB limitation for input files and the output bit type may be 8-bit, U16-bit or S16-bit. For these formats, the writing routines output are streamed lines from the cube, and little of the image is held in memory at any one time, therefore increasing the processing speed to convert the file. It is recommended that large images are exported to JP2 or TIFF format. Loading @@ -36,7 +36,7 @@ <p> In addition, if the cube has Mapping labels, the program will produce a world file for use in Arc and/or other GIS packages. The file will have an extension that uses the first and last letters for the image extention and a "w". For example, .tif produces a world file last letters for the image extension and a "w". For example, .tif produces a world file extension of .tfw. </p> <p> Loading Loading @@ -118,7 +118,10 @@ <change name="Jeffrey Covington" date="2015-02-12"> Changed default compression of TIFF format images to no compression. Added COMPRESSION parameter to choose the compression algorithm for TIFF format images. Fixes #1745 </change> <change name="Kaitlyn Lee" date="2018-02-08"> Removed the option to export as a GIF because Qt does not support GIF exports. Fixes #1667. </change> </history> <category> Loading Loading @@ -149,7 +152,7 @@ </brief> <description> Use this parameter to select the filename and band to export. For example, file.cub+5 will select band 5 example, file.cub+5 will select band 5. </description> <filter> *.cub Loading @@ -164,7 +167,7 @@ </brief> <description> Use this parameter to select the filename and band to export. For example, file.cub+5 will select band 5 example, file.cub+5 will select band 5. </description> <filter> *.cub Loading @@ -179,7 +182,7 @@ </brief> <description> Use this parameter to select the filename and band to export. For example, file.cub+5 will select band 5 example, file.cub+5 will select band 5. </description> <filter> *.cub Loading @@ -194,7 +197,7 @@ </brief> <description> Use this parameter to select the filename and band to export. For example, file.cub+5 will select band 5 example, file.cub+5 will select band 5. </description> <filter> *.cub Loading @@ -209,7 +212,7 @@ </brief> <description> Use this parameter to select the filename and band to export. For example, file.cub+5 will select band 5 example, file.cub+5 will select band 5. </description> <filter> *.cub Loading Loading @@ -303,13 +306,13 @@ <brief>Format of output image</brief> <description> This parameter is used to select the output format. It can be one of PNG, BMP, JPEG, TIF, GIF, or JP2. Note that not all formats may be PNG, BMP, JPEG, TIF, or JP2. Note that not all formats may be available. It will depend on your installation of the Qt libraries. <p> In addition, if the cube has Mapping labels, the program will produce a world file for use in Arc and/or other GIS packages. The file will have an extension that uses the first and last letters for the image extention and a "w". For example, .tif produces a world file extension of .tfw. extension and a "w". For example, .tif produces a world file extension of .tfw. </p> </description> Loading @@ -336,17 +339,6 @@ <item>COMPRESSION</item> </exclusions> </option> <option value="GIF"> <brief>Output image will be GIF</brief> <description> The output image is in GIF (Graphics Interchange Format) format. The default extension for this format is "gif." </description> <exclusions> <item>BITTYPE</item> <item>COMPRESSION</item> </exclusions> </option> <option value="TIFF"> <brief>Output image will be TIFF</brief> <description> Loading Loading @@ -400,7 +392,7 @@ <brief>Bit type of output file</brief> <description> This parameter allows the userPackBits is also known as Macintosh RLE. to set the bit type of the output image. Some FORMAT values will only allow 8BIT outputs. Some FORMAT values will only allow 8-bit outputs. 16 bit signed (-32767=black, 32768=white) </description> <list> Loading Loading @@ -693,7 +685,7 @@ </brief> <description> This example creates an output TIFF format file from 3 bands of an ISIS cube, designated red, green, and blue using a linear stretch and 8 bit output type. A histogram is created red, green, and blue using a linear stretch and 8-bit output type. A histogram is created from the input values. Using this histogram, we determine the minimum value to be any DN in the bottom 0.2% of the data. These DNs will be set to black in the output. Similarly, the maximum value is any DN in the top 99.8% of the data and these DNs will be set to white. Loading @@ -715,7 +707,7 @@ <description> This image show the graphical user interface for this program. </description> <thumbnail height="200" width="142" src="assets/thumbs/isis2stdGUI.jpg" caption="isis2std with RGB input and 8BIT output"/> <thumbnail height="200" width="142" src="assets/thumbs/isis2stdGUI.jpg" caption="isis2std with RGB input and 8-bit output"/> </image> </guiInterface> </guiInterfaces> Loading Loading @@ -768,7 +760,7 @@ Output image. </brief> <description> The 8 bit output image, in TIFF format, created using the input red, green, and blue channels. The 8-bit output image, in TIFF format, created using the input red, green, and blue channels. </description> <thumbnail height="150" width="200" src="assets/thumbs/rgbTIFFoutput.jpg" caption="The color output image."/> <parameterName>TO</parameterName> Loading isis/src/base/objs/Cube/Cube.cpp +16 −3 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ #include <unistd.h> #include <QDebug> #include <QDir> #include <QFile> #include <QFileInfo> #include <QMutex> Loading Loading @@ -552,6 +553,7 @@ namespace Isis { // Figure out the name of the data file try { PvlObject &core = m_label->findObject("IsisCube").findObject("Core"); // Detached labels if (core.hasKeyword("^Core")) { FileName temp(core["^Core"][0]); Loading @@ -567,6 +569,7 @@ namespace Isis { m_dataFile = new QFile(realDataFileName().expanded()); } // External cube files (ecub), ecub contains all labels and SPICE blobs, history else if (core.hasKeyword("^DnFile")) { FileName dataFileName(core["^DnFile"][0]); Loading @@ -579,9 +582,10 @@ namespace Isis { m_attached = true; m_storesDnData = false; *m_dataFileName = FileName(realDataFileName().expanded()); m_dataFile = new QFile(realDataFileName().expanded()); } // Typical cube containing labels, SPICE, history and dn data else { m_dataFileName = new FileName(*m_labelFileName); m_attached = true; Loading Loading @@ -1841,7 +1845,16 @@ namespace Isis { else if (!m_storesDnData) { ASSERT(m_dataFileName); FileName guess = *m_dataFileName; QDir dir(guess.toString()); // If path is relative and there is a labelFileName, start in directory of the ecub, then // cd to the directory containing the DnFile, since it is relative to the location of the ecub. // We need to turn the relative path into an absolute path. if (dir.isRelative() && m_labelFileName) { QDir dir2(m_labelFileName->originalPath()); dir2.cd(guess.path()); guess = dir2.absolutePath() + "/" + guess.name(); } do { Pvl guessLabel(guess.expanded()); Loading Loading @@ -2080,7 +2093,7 @@ namespace Isis { FileName temp((*core)["^DnFile"][0]); if (!temp.expanded().startsWith("/")) { temp = FileName(FileName(label.fileName()).path() + "/" + temp.original()); temp = realDataFileName(); } label = Pvl(temp.toString()); Loading isis/src/base/objs/Cube/Cube.h +5 −0 Original line number Diff line number Diff line Loading @@ -157,6 +157,11 @@ namespace Isis { * @history 2017-06-08 Chris Combs - Made "Failed to create" error messages more descriptive. * Fixes #833. * @history 2017-09-22 Cole Neubauer - Fixed documentation. References #4807 * @history 2018-01-04 Tracie Sucharski - Allow relative paths that are not "." in the DnFile * keyword for ecubs. Changes to ::open to set m_dataFileName for ecubs, * and changed ::realDataFileName() to return the absolute path if it is * relative. Changed ::realDataFileLabel to call realDataFileName to * make sure we get absolute path. Fixes #5276. * @history 2018-01-18 Summer Stapleton - Updated error message in ::create() to address when * an IsisPreference file cannot be found. Fixes #5145. */ Loading isis/src/base/objs/Cube/Cube.truth +0 −28 Original line number Diff line number Diff line Loading @@ -356,31 +356,3 @@ End_Object End 0 0 0 20 20 20 39 39 39 0 20 39 0 20 39 0 20 39 **PROGRAMMER ERROR** Cannot write to the cube [isisTruth_external2.ecub] because it is opened read-only. Test reading an ecub that points to detached lbl Object = IsisCube Object = Core ^DnFile = IsisCube_02.lbl End_Object End_Object Object = Label Bytes = 65536 End_Object End 0 0 0 1 1 1 2 2 2 N N N N N N N N N **ERROR** The cube [isisTruth_external3.ecub] does not support storing DN data because it is using an external file for DNs. Test copying an ecub that points to detached lbl Object = IsisCube Object = Core ^DnFile = isisTruth_external3.ecub End_Object End_Object Object = Label Bytes = 65536 End_Object End 0 0 0 1 1 1 2 2 2 N N N N N N N N N **ERROR** The cube [isisTruth_external3.copy.ecub] does not support storing DN data because it is using an external file for DNs. Loading Loading
.gitignore +1 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ object_script.*.Debug *_plugin_import.cpp *.moc ui_*.h *.html # ignore all files created by squish coco *csmes Loading
isis/src/base/apps/isis2std/isis2std.xml +65 −73 Original line number Diff line number Diff line Loading @@ -3,22 +3,22 @@ <application name="isis2std" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://isis.astrogeology.usgs.gov/Schemas/Application/application.xsd"> <brief> Exports a cube to a PNG, BMP, GIF, TIFF, JPEG, or JPEG 2000 Exports a cube to PNG, BMP, TIFF, JPEG, or JPEG 2000 </brief> <description> <p> This program exports an ISIS cube to one of several popular standard image formats. The current supported formats are BMP, GIF, JPEG, JP2, PNG, and TIFF. formats. The current supported formats are BMP, JPEG, JP2, PNG, and TIFF. </p> <p> This program uses TrollTech's version of the Qt Library to export BMP, GIF and JPEG formatted output images. For these format types, due to limitations of Qt, the input file size must not exceed 2 gigabytes and the only valid output bit type is 8BIT. This program uses TrollTech's version of the Qt Library to export BMP and JPEG formatted output images. For these format types, due to limitations of Qt, the input file size must not exceed 2 gigabytes and the only valid output bit type is 8-bit. </p> <p> The JPEG2000 (JP2) and TIFF formats do not depend on the Qt library. These formats do not have the 2 GB limitation for input files and the output bit type may be 8BIT, U16BIT or S16BIT. have the 2 GB limitation for input files and the output bit type may be 8-bit, U16-bit or S16-bit. For these formats, the writing routines output are streamed lines from the cube, and little of the image is held in memory at any one time, therefore increasing the processing speed to convert the file. It is recommended that large images are exported to JP2 or TIFF format. Loading @@ -36,7 +36,7 @@ <p> In addition, if the cube has Mapping labels, the program will produce a world file for use in Arc and/or other GIS packages. The file will have an extension that uses the first and last letters for the image extention and a "w". For example, .tif produces a world file last letters for the image extension and a "w". For example, .tif produces a world file extension of .tfw. </p> <p> Loading Loading @@ -118,7 +118,10 @@ <change name="Jeffrey Covington" date="2015-02-12"> Changed default compression of TIFF format images to no compression. Added COMPRESSION parameter to choose the compression algorithm for TIFF format images. Fixes #1745 </change> <change name="Kaitlyn Lee" date="2018-02-08"> Removed the option to export as a GIF because Qt does not support GIF exports. Fixes #1667. </change> </history> <category> Loading Loading @@ -149,7 +152,7 @@ </brief> <description> Use this parameter to select the filename and band to export. For example, file.cub+5 will select band 5 example, file.cub+5 will select band 5. </description> <filter> *.cub Loading @@ -164,7 +167,7 @@ </brief> <description> Use this parameter to select the filename and band to export. For example, file.cub+5 will select band 5 example, file.cub+5 will select band 5. </description> <filter> *.cub Loading @@ -179,7 +182,7 @@ </brief> <description> Use this parameter to select the filename and band to export. For example, file.cub+5 will select band 5 example, file.cub+5 will select band 5. </description> <filter> *.cub Loading @@ -194,7 +197,7 @@ </brief> <description> Use this parameter to select the filename and band to export. For example, file.cub+5 will select band 5 example, file.cub+5 will select band 5. </description> <filter> *.cub Loading @@ -209,7 +212,7 @@ </brief> <description> Use this parameter to select the filename and band to export. For example, file.cub+5 will select band 5 example, file.cub+5 will select band 5. </description> <filter> *.cub Loading Loading @@ -303,13 +306,13 @@ <brief>Format of output image</brief> <description> This parameter is used to select the output format. It can be one of PNG, BMP, JPEG, TIF, GIF, or JP2. Note that not all formats may be PNG, BMP, JPEG, TIF, or JP2. Note that not all formats may be available. It will depend on your installation of the Qt libraries. <p> In addition, if the cube has Mapping labels, the program will produce a world file for use in Arc and/or other GIS packages. The file will have an extension that uses the first and last letters for the image extention and a "w". For example, .tif produces a world file extension of .tfw. extension and a "w". For example, .tif produces a world file extension of .tfw. </p> </description> Loading @@ -336,17 +339,6 @@ <item>COMPRESSION</item> </exclusions> </option> <option value="GIF"> <brief>Output image will be GIF</brief> <description> The output image is in GIF (Graphics Interchange Format) format. The default extension for this format is "gif." </description> <exclusions> <item>BITTYPE</item> <item>COMPRESSION</item> </exclusions> </option> <option value="TIFF"> <brief>Output image will be TIFF</brief> <description> Loading Loading @@ -400,7 +392,7 @@ <brief>Bit type of output file</brief> <description> This parameter allows the userPackBits is also known as Macintosh RLE. to set the bit type of the output image. Some FORMAT values will only allow 8BIT outputs. Some FORMAT values will only allow 8-bit outputs. 16 bit signed (-32767=black, 32768=white) </description> <list> Loading Loading @@ -693,7 +685,7 @@ </brief> <description> This example creates an output TIFF format file from 3 bands of an ISIS cube, designated red, green, and blue using a linear stretch and 8 bit output type. A histogram is created red, green, and blue using a linear stretch and 8-bit output type. A histogram is created from the input values. Using this histogram, we determine the minimum value to be any DN in the bottom 0.2% of the data. These DNs will be set to black in the output. Similarly, the maximum value is any DN in the top 99.8% of the data and these DNs will be set to white. Loading @@ -715,7 +707,7 @@ <description> This image show the graphical user interface for this program. </description> <thumbnail height="200" width="142" src="assets/thumbs/isis2stdGUI.jpg" caption="isis2std with RGB input and 8BIT output"/> <thumbnail height="200" width="142" src="assets/thumbs/isis2stdGUI.jpg" caption="isis2std with RGB input and 8-bit output"/> </image> </guiInterface> </guiInterfaces> Loading Loading @@ -768,7 +760,7 @@ Output image. </brief> <description> The 8 bit output image, in TIFF format, created using the input red, green, and blue channels. The 8-bit output image, in TIFF format, created using the input red, green, and blue channels. </description> <thumbnail height="150" width="200" src="assets/thumbs/rgbTIFFoutput.jpg" caption="The color output image."/> <parameterName>TO</parameterName> Loading
isis/src/base/objs/Cube/Cube.cpp +16 −3 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ #include <unistd.h> #include <QDebug> #include <QDir> #include <QFile> #include <QFileInfo> #include <QMutex> Loading Loading @@ -552,6 +553,7 @@ namespace Isis { // Figure out the name of the data file try { PvlObject &core = m_label->findObject("IsisCube").findObject("Core"); // Detached labels if (core.hasKeyword("^Core")) { FileName temp(core["^Core"][0]); Loading @@ -567,6 +569,7 @@ namespace Isis { m_dataFile = new QFile(realDataFileName().expanded()); } // External cube files (ecub), ecub contains all labels and SPICE blobs, history else if (core.hasKeyword("^DnFile")) { FileName dataFileName(core["^DnFile"][0]); Loading @@ -579,9 +582,10 @@ namespace Isis { m_attached = true; m_storesDnData = false; *m_dataFileName = FileName(realDataFileName().expanded()); m_dataFile = new QFile(realDataFileName().expanded()); } // Typical cube containing labels, SPICE, history and dn data else { m_dataFileName = new FileName(*m_labelFileName); m_attached = true; Loading Loading @@ -1841,7 +1845,16 @@ namespace Isis { else if (!m_storesDnData) { ASSERT(m_dataFileName); FileName guess = *m_dataFileName; QDir dir(guess.toString()); // If path is relative and there is a labelFileName, start in directory of the ecub, then // cd to the directory containing the DnFile, since it is relative to the location of the ecub. // We need to turn the relative path into an absolute path. if (dir.isRelative() && m_labelFileName) { QDir dir2(m_labelFileName->originalPath()); dir2.cd(guess.path()); guess = dir2.absolutePath() + "/" + guess.name(); } do { Pvl guessLabel(guess.expanded()); Loading Loading @@ -2080,7 +2093,7 @@ namespace Isis { FileName temp((*core)["^DnFile"][0]); if (!temp.expanded().startsWith("/")) { temp = FileName(FileName(label.fileName()).path() + "/" + temp.original()); temp = realDataFileName(); } label = Pvl(temp.toString()); Loading
isis/src/base/objs/Cube/Cube.h +5 −0 Original line number Diff line number Diff line Loading @@ -157,6 +157,11 @@ namespace Isis { * @history 2017-06-08 Chris Combs - Made "Failed to create" error messages more descriptive. * Fixes #833. * @history 2017-09-22 Cole Neubauer - Fixed documentation. References #4807 * @history 2018-01-04 Tracie Sucharski - Allow relative paths that are not "." in the DnFile * keyword for ecubs. Changes to ::open to set m_dataFileName for ecubs, * and changed ::realDataFileName() to return the absolute path if it is * relative. Changed ::realDataFileLabel to call realDataFileName to * make sure we get absolute path. Fixes #5276. * @history 2018-01-18 Summer Stapleton - Updated error message in ::create() to address when * an IsisPreference file cannot be found. Fixes #5145. */ Loading
isis/src/base/objs/Cube/Cube.truth +0 −28 Original line number Diff line number Diff line Loading @@ -356,31 +356,3 @@ End_Object End 0 0 0 20 20 20 39 39 39 0 20 39 0 20 39 0 20 39 **PROGRAMMER ERROR** Cannot write to the cube [isisTruth_external2.ecub] because it is opened read-only. Test reading an ecub that points to detached lbl Object = IsisCube Object = Core ^DnFile = IsisCube_02.lbl End_Object End_Object Object = Label Bytes = 65536 End_Object End 0 0 0 1 1 1 2 2 2 N N N N N N N N N **ERROR** The cube [isisTruth_external3.ecub] does not support storing DN data because it is using an external file for DNs. Test copying an ecub that points to detached lbl Object = IsisCube Object = Core ^DnFile = isisTruth_external3.ecub End_Object End_Object Object = Label Bytes = 65536 End_Object End 0 0 0 1 1 1 2 2 2 N N N N N N N N N **ERROR** The cube [isisTruth_external3.copy.ecub] does not support storing DN data because it is using an external file for DNs. Loading