From 6737ce63544c20aba27b1cdecbca1b4e53606691 Mon Sep 17 00:00:00 2001 From: tbaudier Date: Wed, 17 Feb 2016 10:08:50 +0100 Subject: [PATCH] Debug wrong extent with local windowing (w) outside of the image --- vv/vvSlicer.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vv/vvSlicer.cxx b/vv/vvSlicer.cxx index f74bdb8..0e3b3bf 100644 --- a/vv/vvSlicer.cxx +++ b/vv/vvSlicer.cxx @@ -1548,6 +1548,12 @@ 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]; + + 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]; } vtkSmartPointer voiFilter = vtkSmartPointer::New(); -- 2.47.1