Commit be7a0492 authored by Tracie Sucharski's avatar Tracie Sucharski
Browse files

Merge branch 'dev' of github.com:USGS-Astrogeology/ISIS3 into dev

parents 599133dd 3272598d
Loading
Loading
Loading
Loading
+65 −73
Original line number Diff line number Diff line
@@ -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.
@@ -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>
@@ -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>
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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>

@@ -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>
@@ -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>
@@ -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.
@@ -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>
@@ -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>
+9 −13
Original line number Diff line number Diff line
@@ -229,17 +229,12 @@ void CreateStretchPairs() {
  return;
}

/**
* The input buffer has a raw 16 bit buffer but the values are still 0 to 255.
* We know that 255 (stretched to 4095 if Table converted) is saturated.
* Sky pixels could have valid DN of 0, but missing pixels are also saved as 0,
* so it is impossible to distinguish between them.
* This method is used by ConvertLinePrefixPixels() and IsisMain() for ProcessByLine p2.
* author Jeannie Walldren 2008-08-21
*
* @history 2017-11-22 Summer Stapleton - Changed returned max value from HRS to HIS.
*                        Fixes #5106.
*/
// The input buffer has a raw 16 bit buffer but the values are still 0 to 255.
// We know that 255 (stretched to 4095 if Table converted) is saturated.
// Sky pixels could have valid DN of 0, but missing pixels are also saved as 0,
// so it is impossible to distinguish between them.
// This method is used by ConvertLinePrefixPixels() and IsisMain() for ProcessByLine p2.
// author Jeannie Walldren 2008-08-21
void FixDns(Buffer &buf) {
  for(int i = 0; i < buf.size(); i++) {
    // zeros and negatives are valid DN values, according to scientists,
@@ -251,9 +246,9 @@ void FixDns(Buffer &buf) {
    else if(dataConversionType == "Table") {
      buf[i] = stretch.Map((int)buf[i]);
    }
    // save max values (4095 for table-converted images and 255 for others) as HIS
    // save max values (4095 for table-converted images and 255 for others) as HRS
    if(buf[i] == validMax) {
      buf[i] = His;
      buf[i] = Hrs;
    }
  }
}
@@ -457,3 +452,4 @@ double ComputeOverclockAvg(vector <double> pixel) {
//        IDL cisscal application files: cassimg_subtractdark.pro and linetime.pro
// -Jeannie Walldren 08/06/2008
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+24 −27
Original line number Diff line number Diff line
@@ -64,9 +64,6 @@
    <change name="Tracie Sucharski" date="2012-05-04">
      Added error message when input image does not contain Pds labels.
    </change>
    <change name="Summer Stapleton" date="2017-11-22">
      Changed returned max value from HRS to HIS in FixDns method.
    </change>
    <change name="Christopher Combs" date="2018-01-30">
      Changed documentation to reflect newly added and unsupported target names
      in translation files. Fixes #4970.
+19 −21
Original line number Diff line number Diff line
@@ -117,6 +117,10 @@ QMap<QString, FileName> sortFramelets(FileName frameletListFile) {
 *
 * @param frameletList A list of the framelet cubes to stitch together
 * @param frameFileName The file name of the output frame cube
 *
 * @internal
 *   @history 2018-02-15 Adam Goins - Modified stitchFrame to store the Archive
 *                           group for ingested framelets. Fixes #5333.
 */
void stitchFrame(QList<FileName> frameletList, FileName frameFileName) {
  // Create the frame cube based on the first framelet cube
@@ -130,22 +134,13 @@ void stitchFrame(QList<FileName> frameletList, FileName frameFileName) {
  frameCube.create( frameFileName.expanded() );

  // Setup the label for the new cube
  PvlGroup archGroup = firstFrameletCube.group("Archive");
  PvlGroup kernGroup = firstFrameletCube.group("Kernels");
  PvlGroup instGroup = firstFrameletCube.group("Instrument");
  PvlGroup bandBinGroup("BandBin");
  if ( instGroup.hasKeyword("Filter") ) {
    instGroup["Filter"].setValue("FULLCCD");
  }
  if ( archGroup.hasKeyword("ProductId") ) {
    archGroup.deleteKeyword("ProductId");
  }
  if ( archGroup.hasKeyword("FileName") ) {
    archGroup.deleteKeyword("FileName");
  }
  if ( archGroup.hasKeyword("Window_Count") ) {
    archGroup.deleteKeyword("Window_Count");
  }

  bandBinGroup += PvlKeyword("FilterName", "FULLCCD");

  // Setup Stitch group keywords
@@ -203,6 +198,10 @@ void stitchFrame(QList<FileName> frameletList, FileName frameFileName) {
    stitchGroup["FilterWidths"]    += frameletBandBin["Width"];
    stitchGroup["FilterIkCodes"]   += frameletBandBin["NaifIkCode"];

    PvlGroup archiveGroup = frameletCube->group("Archive");
    archiveGroup.setName("Archive" + QString(frameletBandBin["FilterName"]));
    frameCube.putGroup(archiveGroup);

    AlphaCube frameletAlphaCube(*frameletCube);
    stitchGroup["FilterStartSamples"] += toString(frameletAlphaCube.AlphaSample(0.0));
    stitchGroup["FilterSamples"]      += toString(frameletAlphaCube.BetaSamples());
@@ -226,7 +225,6 @@ void stitchFrame(QList<FileName> frameletList, FileName frameFileName) {
  // Finalize the frame cube label
  frameCube.putGroup(instGroup);
  frameCube.putGroup(kernGroup);
  frameCube.putGroup(archGroup);
  frameCube.putGroup(bandBinGroup);
  frameCube.putGroup(stitchGroup);
}
+3 −0
Original line number Diff line number Diff line
@@ -26,6 +26,9 @@
      Backward Compatibility Issue: Changed name from stitch to tgocassisstitch and
      changed output parameter name "TO" to "OUTPUTPREFIX."
    </change>
    <change name="Adam Goins" date="2018-02-15">
      Modified stitchFrame to store the Archive group for ingested framelets. Fixes #5333.
    </change>
  </history>

  <category>
Loading