]> 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 ec225e2..af609a7 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;