Commit 32086bda authored by Kim Oyama's avatar Kim Oyama
Browse files

In ProcessMosaic, added check for count band when priority=average. The mosaic...

In ProcessMosaic, added check for count band when priority=average. The mosaic apps should fail when priority=average and there is no count band. In handmos, added an app test for the error check when PRIORITY=AVERAGE and the mosaic does not have a count band. Fixes #746.

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@5746 41f8697f-d340-4b68-9986-7bafba869bb8
parent 02746c97
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -34,6 +34,8 @@
   bands of the input image, with a count band for each band. <b>Hence the file size of the mosaic is doubled due to the count band.</b>
   </p>

   <p>An error will be thrown if the mosaic cube has no count band. </p>
   
   <p>In case of special pixels and the special pixel flags being enabled, the details 
   for each priority is described below.
   </p>
+11 −3
Original line number Diff line number Diff line
@@ -39,6 +39,8 @@
   bands of the input image, with a count band for each band. <b>Hence the file size of the mosaic is doubled due to the count band.</b>
   </p>

   <p>An error will be thrown if the mosaic cube has no count band. </p>
   
   <p>In case of special pixels and the special pixel flags being enabled, the details 
   for each priority is described below.
   </p>
@@ -216,15 +218,17 @@
      comparison "CRITERIA" are "LESSER" or "GREATER" than.  Also there are 
      options "HIGHSATURATION", "LOWSATURATION" and "NULL", set to true will 
      cause HS, LS and NULL input pixels to be copied to the mosaic regardless 
      of the priorities and criteria. These options are not supported for  "BENEATH" priority.
      of the priorities and criteria. These options are not supported for
      "BENEATH" priority.
    </change>
    <change name="Sharmila Prasad" date="2009-12-16">
     Always place an input pixel over a NULL mosaic pixel. 
      Track the origin for  multiband ONTOP priority if all the Special Pixel  flags are set. 
      Store the Serial numbers of the input mosaic in the mosaic along with the  file name.
    </change>
    <change name="Sharmila Prasad" date="2010-10-27">Process Input Image's 
     Attributes</change> 
    <change name="Sharmila Prasad" date="2010-10-27">
      Process Input Image's Attributes
    </change>
    <change name="Sharmila Prasad" date="2011-01-19">
      Added "AVERAGE" priority where the mosaic will be average of valid input 
      and mosaic pixels.
@@ -250,6 +254,10 @@
      This has been fixed so that there is an entry in the log file for every image placement.
      References #976.
    </change>
    <change name="Kimberly Oyama" date="2014-03-28">
      Added an app test for the error check when PRIORITY=AVERAGE and the mosaic does not have
      a count band. References #746.
    </change>
  </history>

  <oldName>
+10 −1
Original line number Diff line number Diff line
@@ -13,4 +13,13 @@ commands:
	  propagate=false \
	  nsamples=10 \
	  nlines=20 \
	  nbands=1 > /dev/null;
	  nbands=1 > /dev/null; \
	$(CP) $(INPUT)/average.cub $(OUTPUT)/average.cub; \
	$(APPNAME) from=$(INPUT)/ten.cub \
	  mosaic=$(OUTPUT)/average.cub \
	  priority=average \
	  outsample=5 \
	  outline=5 \
	  outband=1 \
	  matchbandbin=false 2>> $(OUTPUT)/errors.txt > /dev/null;\
	$(RM) $(OUTPUT)/average.cub;
+2 −0
Original line number Diff line number Diff line
@@ -41,6 +41,8 @@
   count band for each band. <b>Hence the file size of the mosaic is doubled due to the count
   band.</b> </p>

   <p>An error will be thrown if the mosaic cube has no count band. </p>
   
   <p>In case of special pixels and the special pixel flags being enabled, the details 
   for each priority is described below.
   </p>
+5 −2
Original line number Diff line number Diff line
@@ -21,8 +21,6 @@
 */
#include "Preference.h"

#include <QDebug>

#include "Application.h"
#include "IException.h"
#include "IString.h"
@@ -290,8 +288,13 @@ namespace Isis {
    }
    else if (m_imageOverlay == AverageImageWithMosaic) {
      m_onb /= 2;
      if (m_onb < 1) {
        QString msg = "The mosaic cube needs a count band.";
        throw IException(IException::Unknown, msg, _FILEINFO_);
      }
    }

    
    // Process Band Priority with no tracking
    if (m_imageOverlay == UseBandPlacementCriteria && !m_trackingEnabled ) {
      BandPriorityWithNoTracking(iss, isl, isb, ins, inl, inb, bandPriorityInputBandNumber,
Loading