From: Simon Rit Date: Wed, 17 Feb 2016 16:32:10 +0000 (+0100) Subject: Both the lower and the upper extent of the roi for the w feature should be in the... X-Git-Tag: v1.4.0~61^2~1 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=2f1de8286806b0674abf370d559244ca5740956e;p=clitk.git Both the lower and the upper extent of the roi for the w feature should be in the maximum extent --- 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();