From 2f1de8286806b0674abf370d559244ca5740956e Mon Sep 17 00:00:00 2001 From: Simon Rit Date: Wed, 17 Feb 2016 17:32:10 +0100 Subject: [PATCH] Both the lower and the upper extent of the roi for the w feature should be in the maximum extent --- vv/vvSlicer.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/vv/vvSlicer.cxx b/vv/vvSlicer.cxx index 0e3b3bf..48422cb 100644 --- a/vv/vvSlicer.cxx +++ b/vv/vvSlicer.cxx @@ -1549,11 +1549,13 @@ void vvSlicer::GetExtremasAroundMousePointer(double & min, double & max, vtkImag if(iLocalExtents[i*2 ]>iLocalExtents[i*2+1]) std::swap(iLocalExtents[i*2], iLocalExtents[i*2+1]); - if(iLocalExtents[i*2]< mImageReslice->GetInputInformation()->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT())[2*i]) - iLocalExtents[i*2] = mImageReslice->GetInputInformation()->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT())[2*i]; + for(int j=0;j<2; j++) { + if(iLocalExtents[i*2+j]< mImageReslice->GetInputInformation()->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT())[2*i]) + iLocalExtents[i*2+j] = mImageReslice->GetInputInformation()->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT())[2*i]; - if(iLocalExtents[i*2+1]> mImageReslice->GetInputInformation()->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT())[2*i+1]) - iLocalExtents[i*2+1] = mImageReslice->GetInputInformation()->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT())[2*i+1]; + if(iLocalExtents[i*2+j]> mImageReslice->GetInputInformation()->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT())[2*i+1]) + iLocalExtents[i*2+j] = mImageReslice->GetInputInformation()->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT())[2*i+1]; + } } vtkSmartPointer voiFilter = vtkSmartPointer::New(); -- 2.47.1