From 1e4c81a5ad6b3cf7e769835b40619090f558a62f Mon Sep 17 00:00:00 2001 From: srit Date: Fri, 23 Apr 2010 08:22:18 +0000 Subject: [PATCH] Fixed half pixel error in data value display --- vv/vvSlicer.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/vv/vvSlicer.cxx b/vv/vvSlicer.cxx index ec225e2..af609a7 100644 --- a/vv/vvSlicer.cxx +++ b/vv/vvSlicer.cxx @@ -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; -- 2.45.2