]> Creatis software - clitk.git/blobdiff - tools/clitkMaskOfIntegratedIntensityGenericFilter.txx
QVTKOpenGLNativeWidget is available from VTK8.2
[clitk.git] / tools / clitkMaskOfIntegratedIntensityGenericFilter.txx
index 5f91cbd5939ce0a135c83eb74c0f32504f50c864..f80dc9910408a7378e18e2642837f2666a8cf27a 100644 (file)
@@ -137,7 +137,7 @@ namespace clitk
     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;
@@ -172,7 +172,7 @@ namespace clitk
 //--------------------------------------------------------------------
 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