]> Creatis software - clitk.git/commitdiff
Replace floor by rint to correct link error in vv
authorDavid Sarrut <david.sarrut@gmail.com>
Fri, 3 Feb 2012 06:57:12 +0000 (07:57 +0100)
committerDavid Sarrut <david.sarrut@gmail.com>
Mon, 17 Sep 2012 06:21:54 +0000 (08:21 +0200)
vv/vvSlicerManager.cxx

index 422220c63db9b9e8e1c8debeaba9b3223fc07306..a5d1eb92ab20392222181b409e4502a2e07a77d3 100644 (file)
@@ -605,18 +605,18 @@ void vvSlicerManager::UpdateViews(int current,int slicer)
 
     switch (mSlicers[slicer]->GetSliceOrientation()) {
     case vtkImageViewer2::SLICE_ORIENTATION_XY:
-      if (mSlicers[slicer]->GetSlice() != (int)floor(z))
-        mSlicers[slicer]->SetSlice((int)floor(z));
+      if (mSlicers[slicer]->GetSlice() != (int)lrint(z))  //FIXME
+        mSlicers[slicer]->SetSlice((int)lrint(z));
       break;
 
     case vtkImageViewer2::SLICE_ORIENTATION_XZ:
-      if (mSlicers[slicer]->GetSlice() != (int)floor(y))
-        mSlicers[slicer]->SetSlice((int)floor(y));
+      if (mSlicers[slicer]->GetSlice() != (int)lrint(y))
+        mSlicers[slicer]->SetSlice((int)lrint(y));
       break;
 
     case vtkImageViewer2::SLICE_ORIENTATION_YZ:
-      if (mSlicers[slicer]->GetSlice() != (int)floor(x))
-        mSlicers[slicer]->SetSlice((int)floor(x));
+      if (mSlicers[slicer]->GetSlice() != (int)lrint(x))
+        mSlicers[slicer]->SetSlice((int)lrint(x));
       break;
     }
     mSlicers[slicer]->Render();
@@ -640,18 +640,18 @@ void vvSlicerManager::UpdateViews(int current,int slicer)
         }
         switch (mSlicers[i]->GetSliceOrientation()) {
         case vtkImageViewer2::SLICE_ORIENTATION_XY:
-          if (mSlicers[i]->GetSlice() != (int)floor(z))
-            mSlicers[i]->SetSlice((int)floor(z));
+          if (mSlicers[i]->GetSlice() != (int)lrint(z))
+            mSlicers[i]->SetSlice((int)lrint(z));
           break;
 
         case vtkImageViewer2::SLICE_ORIENTATION_XZ:
-          if (mSlicers[i]->GetSlice() != (int)floor(y))
-            mSlicers[i]->SetSlice((int)floor(y));
+          if (mSlicers[i]->GetSlice() != (int)lrint(y))
+            mSlicers[i]->SetSlice((int)lrint(y));
           break;
 
         case vtkImageViewer2::SLICE_ORIENTATION_YZ:
-          if (mSlicers[i]->GetSlice() != (int)floor(x))
-            mSlicers[i]->SetSlice((int)floor(x));
+          if (mSlicers[i]->GetSlice() != (int)lrint(x))
+            mSlicers[i]->SetSlice((int)lrint(x));
           break;
         }