]> Creatis software - clitk.git/commitdiff
Remove warning with VTK7.1
authortbaudier <thomas.baudier@creatis.insa-lyon.fr>
Fri, 9 Jun 2017 14:57:50 +0000 (16:57 +0200)
committertbaudier <thomas.baudier@creatis.insa-lyon.fr>
Fri, 9 Jun 2017 14:57:50 +0000 (16:57 +0200)
vv/vtkVOXImageWriter.cxx
vv/vvAnimatedGIFWriter.cxx
vv/vvGlyph2D.cxx
vv/vvSlicer.cxx
vv/vvToolProfile.cxx

index 7ffecb5edbe6e4b3671005864ce82b435c31788d..911091e0a7958abdb7cd3c9b7b04192bb07c8fcc 100644 (file)
@@ -144,6 +144,9 @@ void vtkVOXImageWriter::Write( )
                                     ext[2], ext[3],
                                     ext[4], ext[5]);
   this->GetInput()->UpdateData();
+#elif VTK_MAJOR_VERSION >= 7 && VTK_MINOR_VERSION >= 1
+  this->UpdateExtent(ext);
+  this->Update();
 #else
   this->SetUpdateExtent(ext);
   this->Update();
index 0ab7cb806d5c7aa7100ea1e620b73169f3763c2a..026ebe091dd877b5f3547d6c1f6f6df85e2153f9 100644 (file)
@@ -47,6 +47,11 @@ void vvAnimatedGIFWriter::Write()
   int *wExtent = this->GetInput()->GetWholeExtent();
   this->GetInput()->SetUpdateExtent(wExtent);
   this->GetInput()->Update();
+#elif VTK_MAJOR_VERSION >= 7 && VTK_MINOR_VERSION >= 1
+  this->UpdateInformation();
+  int *wExtent = this->GetInput()->GetInformation()->Get(vtkDataObject::DATA_EXTENT());
+  this->UpdateExtent(wExtent);
+  this->Update();
 #else
   this->UpdateInformation();
   int *wExtent = this->GetInput()->GetInformation()->Get(vtkDataObject::DATA_EXTENT());
index 1856dd272602231ebce81c60c099174390e7c24b..9fde11d92ee34bc842d0f7986d9824e1bd703329 100644 (file)
@@ -175,6 +175,10 @@ int vvGlyph2D::RequestData(
 #if VTK_MAJOR_VERSION <= 5
     defaultSource->SetUpdateExtent(0, 1, 0);
     this->SetSource(defaultSource);
+#elif VTK_MAJOR_VERSION >= 7 && VTK_MINOR_VERSION >= 1
+    int extentTemp[3] = {0, 1, 0};
+    this->UpdateExtent(extentTemp);
+    this->SetSourceData(defaultSource);
 #else
     this->SetUpdateExtent(0, 1, 0);
     this->SetSourceData(defaultSource);
index ce6d335abdd69cac344c49c0305f596be7fb9ebf..847909568e94c2f1551edbd07e3c75be4777801f 100644 (file)
@@ -393,6 +393,9 @@ void vvSlicer::SetImage(vvImage::Pointer image)
 #if VTK_MAJOR_VERSION <= 5
     mImageReslice->GetOutput()->SetUpdateExtent(extent);
     mImageReslice->GetOutput()->Update();
+#elif VTK_MAJOR_VERSION >= 7 && VTK_MINOR_VERSION >= 1
+    mImageReslice->UpdateExtent(extent);
+    mImageReslice->Update();
 #else
     mImageReslice->SetUpdateExtent(extent);
     mImageReslice->Update();
@@ -1790,6 +1793,8 @@ void vvSlicer::Render()
     }
 #if VTK_MAJOR_VERSION <= 5
     mOverlayMapper->GetOutput()->SetUpdateExtent(mOverlayActor->GetDisplayExtent());
+#elif VTK_MAJOR_VERSION >= 7 && VTK_MINOR_VERSION >= 1
+    mOverlayMapper->UpdateExtent(mOverlayActor->GetDisplayExtent());
 #else
     mOverlayMapper->SetUpdateExtent(mOverlayActor->GetDisplayExtent());
 #endif
@@ -1798,6 +1803,8 @@ void vvSlicer::Render()
   if (mFusion && mFusionActor->GetVisibility()) {
 #if VTK_MAJOR_VERSION <= 5
     mFusionMapper->GetOutput()->SetUpdateExtent(mFusionActor->GetDisplayExtent());
+#elif VTK_MAJOR_VERSION >= 7 && VTK_MINOR_VERSION >= 1
+    mFusionMapper->UpdateExtent(mFusionActor->GetDisplayExtent());
 #else
     mFusionMapper->SetUpdateExtent(mFusionActor->GetDisplayExtent());
 #endif
index 7ef23101a2ab9d5d0263caad118f0c09a6120e73..c6b44b6f15792d861a13014759b8a9d0483a09ed 100644 (file)
@@ -615,7 +615,11 @@ void vvToolProfile::InitializeLine()
       unsigned char red[3] = { 255, 0, 0 };
       vtkSmartPointer<vtkUnsignedCharArray> colors = vtkSmartPointer<vtkUnsignedCharArray>::New();
       colors->SetNumberOfComponents(3);
+#if VTK_MAJOR_VERSION >= 7 && VTK_MINOR_VERSION >= 1
+      colors->InsertNextTypedTuple(red);
+#else
       colors->InsertNextTupleValue(red);
+#endif
       mLinesPolyData->GetCellData()->SetScalars(colors);
       
       for(int i=0;i<mCurrentSlicerManager->GetNumberOfSlicers(); i++) {