From: Simon Rit Date: Fri, 1 Feb 2013 07:45:30 +0000 (+0100) Subject: Rolled back to previous rounding to reslice overlay/fusion. X-Git-Tag: v1.4.0~248^2~1^2 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;ds=sidebyside;h=a9f653bdbc1189f5ea64ded70c32b011186338a3;hp=--cc;p=clitk.git Rolled back to previous rounding to reslice overlay/fusion. --- a9f653bdbc1189f5ea64ded70c32b011186338a3 diff --git a/vv/vvSlicer.cxx b/vv/vvSlicer.cxx index 51ff1bc..7513160 100644 --- a/vv/vvSlicer.cxx +++ b/vv/vvSlicer.cxx @@ -901,9 +901,8 @@ void vvSlicer::AdjustResliceToSliceOrientation(vtkImageReslice *reslice) // Step 1: from world coordinates to image coordinates origin[this->SliceOrientation] -= mImageReslice->GetOutput()->GetOrigin()[this->SliceOrientation]; origin[this->SliceOrientation] /= mImageReslice->GetOutput()->GetSpacing()[this->SliceOrientation]; - // Step 2: round to inferior grid positionInc. This makes sense because a border is used to interpolate - // the original image (SR). - origin[this->SliceOrientation] = itk::Math::Floor(origin[this->SliceOrientation]); + // Step 2: round to superior grid positionInc. + origin[this->SliceOrientation] = itk::Math::Ceil(origin[this->SliceOrientation]); // Step 3: back to world coordinates origin[this->SliceOrientation] *= mImageReslice->GetOutput()->GetSpacing()[this->SliceOrientation]; origin[this->SliceOrientation] += mImageReslice->GetOutput()->GetOrigin()[this->SliceOrientation];