Commit 158ebf21 by David Moxey

Merge branch 'fix/vtkExtras' into 'master'

Fix/vtk extras See merge request !925
parents fb35903d f76e1e45
......@@ -141,6 +141,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**
......
......@@ -103,7 +103,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();
......@@ -140,7 +145,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