]> Creatis software - clitk.git/commitdiff
Rolled back to previous rounding to reslice overlay/fusion.
authorSimon Rit <simon.rit@creatis.insa-lyon.fr>
Fri, 1 Feb 2013 07:45:30 +0000 (08:45 +0100)
committerSimon Rit <simon.rit@creatis.insa-lyon.fr>
Fri, 1 Feb 2013 07:45:30 +0000 (08:45 +0100)
vv/vvSlicer.cxx

index 51ff1bc46df62d675d1bd376f89fec61187c8a02..751316041310d604542a04f8dd22c40b7342e973 100644 (file)
@@ -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<double>(origin[this->SliceOrientation]);
+  // Step 2: round to superior grid positionInc.
+  origin[this->SliceOrientation] = itk::Math::Ceil<double>(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];