Commit 4514a678 authored by Dave Moxey's avatar Dave Moxey

Merge branch 'fix/vtkExtras' into 'master'

Fix/vtk extras

See merge request !925

(cherry picked from commit 158ebf21)

4e41d63e updated VtkToPng to account for deprecation of OpenGL in VTK
1ee2b968 accounting for legacy behavior in
2ae87c1f update changelog
eeccccb0 modify vtkExtras to account for multiple versions
f76e1e45 moved from 4.4.1 to 4.4.2 in changelog
parent e98aac48
......@@ -29,6 +29,9 @@ v4.4.2
**FieldConvert**
- Allow passing input name with trailing separator (!879)
**Utilities**
- Fix VtkToPng to account for deprecated VTK API for VTK version > 8.1 (!925)
v4.4.1
------
**Library**
......
......@@ -102,7 +102,12 @@ int main(int argc, char * argv[])
#else
mapper->SetInputData(data);
#endif
#if VTK_MAJOR_VERSION < 8 || (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION <= 1)
//deprecated as of vtk 8.1
mapper->ImmediateModeRenderingOn();
#endif
mapper->ScalarVisibilityOn();
mapper->SetScalarModeToUsePointData();
mapper->UseLookupTableScalarRangeOn();
......@@ -139,7 +144,13 @@ int main(int argc, char * argv[])
vtkSmartPointer<vtkWindowToImageFilter> windowToImageFilter =
vtkSmartPointer<vtkWindowToImageFilter>::New();
windowToImageFilter->SetInput(renderWindow);
#if VTK_MAJOR_VERSION < 8 || (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION <= 1)
//deprecated as of vtk 8.1
windowToImageFilter->SetMagnification(4);
#else
windowToImageFilter->SetScale(4, 4);
#endif
windowToImageFilter->Update();
// Write image to PNG
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment