Commit 9984f6db authored by Janet Barrett's avatar Janet Barrett
Browse files

Fixed the HistogramTool used by qview and other GUI apps so that it creates...

Fixed the HistogramTool used by qview and other GUI apps so that it creates the correct histogram when selection of rectangle is from right to left. Fixes #1760.

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@5641 41f8697f-d340-4b68-9986-7bafba869bb8
parent a73a0e38
Loading
Loading
Loading
Loading
+2 −1
Changes for isis/src/qisis/objs/HistogramTool/HistogramTool.cpp: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -304,7 +304,8 @@ namespace Isis {

        //For each line read nsamps and add it to the histogram
        for(int line = (int)std::min(sline, eline); line <= (int)std::max(sline, eline); line++) {
          brick->SetBasePosition((int)ssamp, line, band);
          int isamp = std::min(ssamp,esamp);
          brick->SetBasePosition(isamp, line, band);
          cube->read(*brick);
          hist.AddData(brick->DoubleBuffer(), nsamps);
        }
+4 −0
Changes for isis/src/qisis/objs/HistogramTool/HistogramTool.h: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -27,6 +27,10 @@ namespace Isis {
  *                          histograms were not created correctly for any bands
  *                          but band 1. Added check for RGB mode. Fixes #668.
  *  @history 2012-01-20 Steven Lambright - Completed documentation.
  *  @history 2013-12-11 Janet Barrett - Fixed refreshPlot method so that it 
  *                          checks the start sample and end sample for the
  *                          plot and starts the plot at the minimum of the 
  *                          2 samples. Fixes #1760.
  */
  class HistogramTool : public AbstractPlotTool {
      Q_OBJECT