Commit 4e41d63e authored by Kurt Sansom's avatar Kurt Sansom

updated VtkToPng to account for deprecation of OpenGL in VTK

parent fb35903d
...@@ -103,7 +103,11 @@ int main(int argc, char * argv[]) ...@@ -103,7 +103,11 @@ int main(int argc, char * argv[])
#else #else
mapper->SetInputData(data); mapper->SetInputData(data);
#endif #endif
#if (VTK_MAJOR_VERSION <= 8 && VTK_MINOR_VERSION <= 1) //deprecated as of vtk 8.1
mapper->ImmediateModeRenderingOn(); mapper->ImmediateModeRenderingOn();
#endif
mapper->ScalarVisibilityOn(); mapper->ScalarVisibilityOn();
mapper->SetScalarModeToUsePointData(); mapper->SetScalarModeToUsePointData();
mapper->UseLookupTableScalarRangeOn(); mapper->UseLookupTableScalarRangeOn();
...@@ -140,7 +144,7 @@ int main(int argc, char * argv[]) ...@@ -140,7 +144,7 @@ int main(int argc, char * argv[])
vtkSmartPointer<vtkWindowToImageFilter> windowToImageFilter = vtkSmartPointer<vtkWindowToImageFilter> windowToImageFilter =
vtkSmartPointer<vtkWindowToImageFilter>::New(); vtkSmartPointer<vtkWindowToImageFilter>::New();
windowToImageFilter->SetInput(renderWindow); windowToImageFilter->SetInput(renderWindow);
windowToImageFilter->SetMagnification(4); windowToImageFilter->SetScale(4, 4);
windowToImageFilter->Update(); windowToImageFilter->Update();
// Write image to PNG // 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