]> Creatis software - clitk.git/commitdiff
Fixed half pixel error in data value display
authorsrit <srit>
Fri, 23 Apr 2010 08:22:18 +0000 (08:22 +0000)
committersrit <srit>
Fri, 23 Apr 2010 08:22:18 +0000 (08:22 +0000)
vv/vvSlicer.cxx

index ec225e2066be3558524d2ffc6c421b29e55c7dd5..af609a74842f95a3d61f943bd636fd21d0c60e73 100644 (file)
@@ -1286,10 +1286,9 @@ void vvSlicer::Render()
           pixel2 << (int)Y;
           pixel3 << (int)Z;
           temps << mCurrentTSlice;
-          double value = this->GetInput()->GetScalarComponentAsDouble(
-                                                                      (int)X,
-                                                                      (int)Y,
-                                                                      (int)Z,0);
+          double value = this->GetInput()->GetScalarComponentAsDouble(lrint(X),
+                                                                      lrint(Y),
+                                                                      lrint(Z),0);
 
           std::stringstream val;
           val << value;