]> Creatis software - clitk.git/commitdiff
Ensure compatibility between VTK5 & VTK6
authortbaudier <thomas.baudier@creatis.insa-lyon.fr>
Thu, 18 Feb 2016 16:07:29 +0000 (17:07 +0100)
committertbaudier <thomas.baudier@creatis.insa-lyon.fr>
Thu, 18 Feb 2016 16:07:29 +0000 (17:07 +0100)
vv/vvSlicer.cxx

index 48422cbcac9f0ed33998157702e773b1a6921ba9..22a2c732c2aa1b7e2d9d5e954431e4ae8a969e05 100644 (file)
@@ -1549,6 +1549,7 @@ 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 VTK_MAJOR_VERSION > 5
     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];
@@ -1556,6 +1557,7 @@ void vvSlicer::GetExtremasAroundMousePointer(double & min, double & max, vtkImag
       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];
     }
+#endif
   }
 
   vtkSmartPointer<vtkExtractVOI> voiFilter = vtkSmartPointer<vtkExtractVOI>::New();