diff --git a/src/visualisers/ColourTechnique.cc b/src/visualisers/ColourTechnique.cc index 33a88be7..a6d9807e 100644 --- a/src/visualisers/ColourTechnique.cc +++ b/src/visualisers/ColourTechnique.cc @@ -29,9 +29,7 @@ using namespace magics; -ColourTechnique::ColourTechnique() : policy_(ListPolicy::LASTONE), - minOutOfBound_(false), maxOutOfBound_(false) - {} +ColourTechnique::ColourTechnique() : policy_(ListPolicy::LASTONE) {} ColourTechnique::~ColourTechnique() {} diff --git a/src/visualisers/ColourTechnique.h b/src/visualisers/ColourTechnique.h index 75c3778b..4e79bc9a 100644 --- a/src/visualisers/ColourTechnique.h +++ b/src/visualisers/ColourTechnique.h @@ -87,8 +87,6 @@ class ColourTechnique : public map, void visit(LegendVisitor&); ListPolicy getPolicy() const { return policy_; } - bool minOutOfBound() const { return minOutOfBound_; } - bool maxOutOfBound() const { return maxOutOfBound_; } protected: //! Method to print string about this class on to a stream of type ostream (virtual). @@ -98,9 +96,7 @@ class ColourTechnique : public map, map > ranges_; double maxLevel_; - bool minOutOfBound_; - bool maxOutOfBound_; - + ListPolicy policy_; diff --git a/src/visualisers/LevelListSelectionType.cc b/src/visualisers/LevelListSelectionType.cc index 1f400d8d..ae5338cb 100644 --- a/src/visualisers/LevelListSelectionType.cc +++ b/src/visualisers/LevelListSelectionType.cc @@ -45,47 +45,12 @@ void LevelListSelectionType::print(ostream& out) const { void LevelListSelectionType::calculate(double min, double max, bool shading) { clear(); - double min_level=list_.front(); - double max_level=list_.back(); - - - if ( MINSET(min_) ) - min_level = min_; - - if ( MAXSET(max_) ) - max_level = max_; - - if ( shading && MINSET(shade_min_) ) - min_level = shade_min_; - - if ( shading && MAXSET(shade_max_) ) - max_level = shade_max_; - - - - minOutOfBond_ = oob_min_ > min_level; - maxOutOfBond_ = oob_max_ < max_level; - - - - - if (minOutOfBond_) { - push_back(min); - push_back(oob_min_); - min_level = oob_min_; - } - - if (maxOutOfBond_) { - max_level = oob_max_; - } - - doublearray::const_iterator last = list_.begin(); double prevVal = min_; for (doublearray::const_iterator val = list_.begin(); val != list_.end(); ++val) { MagLog::dev() << "LevelListSelectionType::calculate(double min, double max)--->" << *val << "\n"; - if (min_level <= *val && *val <= max_level) { + if (min_ <= *val && *val <= max_) { if (*val < prevVal) { MagLog::error() << " level list values should increase, but " << *val << " follows " << prevVal << endl; break; @@ -95,24 +60,19 @@ void LevelListSelectionType::calculate(double min, double max, bool shading) { } ++last; } - if (maxOutOfBond_) { - push_back(oob_max_); - push_back(max); - } - // Just in case add another level to close the last interval ! if (last != list_.end()) push_back(*last); - // ostringstream print; - // print << "LevelListSelectionType::calculate-->"; - // string sep = "["; - // for (vector::const_iterator val = begin(); val != end(); ++val) { - // print << sep << *val; - // sep = ", "; - // } - // print << "]"; - // cout << print.str() << endl; + ostringstream print; + print << "LevelListSelectionType::calculate-->"; + string sep = "["; + for (vector::const_iterator val = begin(); val != end(); ++val) { + print << sep << *val; + sep = ", "; + } + print << "]"; + MagLog::dev() << print.str() << endl; } diff --git a/src/visualisers/PolyShadingTechnique.h b/src/visualisers/PolyShadingTechnique.h index 5724699c..07d24508 100644 --- a/src/visualisers/PolyShadingTechnique.h +++ b/src/visualisers/PolyShadingTechnique.h @@ -141,7 +141,6 @@ struct LegendEntryBuilder { box->setColour(colours_.right(min)); LegendEntry* entry = new BoxEntry(min, max, box); - entry->oob(colours_.minOutOfBound(), colours_.maxOutOfBound()); if (first_) { first_ = false; entry->first();