int n = input->GetLargestPossibleRegion().GetNumberOfPixels();
std::vector<int> should_keep(values.size());;
std::fill(should_keep.begin(), should_keep.end(), 0);
- while (current<max and i<n) { // loop by decreasing pixel values
+ while (current<max && i<n) { // loop by decreasing pixel values
current += values[indices[i]];
should_keep[indices[i]] = 1.0;
++i;
//--------------------------------------------------------------------
template <typename T>
bool comparator ( const std::pair<T, size_t>& l, const std::pair<T, size_t>& r)
- { return l.first < r.first; }
+ { return l.first > r.first; }
//--------------------------------------------------------------------
}//end clitk