From 41796e945c3027937cedda97d1762bc0a5193c3c Mon Sep 17 00:00:00 2001 From: tbaudier Date: Fri, 9 Jun 2017 16:57:50 +0200 Subject: [PATCH] Remove warning with VTK7.1 --- vv/vtkVOXImageWriter.cxx | 3 +++ vv/vvAnimatedGIFWriter.cxx | 5 +++++ vv/vvGlyph2D.cxx | 4 ++++ vv/vvSlicer.cxx | 7 +++++++ vv/vvToolProfile.cxx | 4 ++++ 5 files changed, 23 insertions(+) diff --git a/vv/vtkVOXImageWriter.cxx b/vv/vtkVOXImageWriter.cxx index 7ffecb5..911091e 100644 --- a/vv/vtkVOXImageWriter.cxx +++ b/vv/vtkVOXImageWriter.cxx @@ -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(); diff --git a/vv/vvAnimatedGIFWriter.cxx b/vv/vvAnimatedGIFWriter.cxx index 0ab7cb8..026ebe0 100644 --- a/vv/vvAnimatedGIFWriter.cxx +++ b/vv/vvAnimatedGIFWriter.cxx @@ -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()); diff --git a/vv/vvGlyph2D.cxx b/vv/vvGlyph2D.cxx index 1856dd2..9fde11d 100644 --- a/vv/vvGlyph2D.cxx +++ b/vv/vvGlyph2D.cxx @@ -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); diff --git a/vv/vvSlicer.cxx b/vv/vvSlicer.cxx index ce6d335..8479095 100644 --- a/vv/vvSlicer.cxx +++ b/vv/vvSlicer.cxx @@ -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 diff --git a/vv/vvToolProfile.cxx b/vv/vvToolProfile.cxx index 7ef2310..c6b44b6 100644 --- a/vv/vvToolProfile.cxx +++ b/vv/vvToolProfile.cxx @@ -615,7 +615,11 @@ void vvToolProfile::InitializeLine() unsigned char red[3] = { 255, 0, 0 }; vtkSmartPointer colors = vtkSmartPointer::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;iGetNumberOfSlicers(); i++) { -- 2.47.1