[vtkusers] VTK Python Wrapper - Exporting Surface Plot
Alberti, Anthony Lewis
albertia at oregonstate.edu
Mon Sep 11 13:59:13 EDT 2017
Hello all,
I'm using VTK 8.0.1 and python 3.5 and am brand new to VTK. I am trying to
export a surface plot using vtkPlotSurface.
By referencing VTK-8.0.1/Charts/Core/Testing/Cxx/TestSurfacePlot.cxx
<https://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Charts/Core/Testing/Cxx/TestSurfacePlot.cxx>
I have successfully created a surface plot and have been able to render it
in python (even though it doesn't really look like a surface plot) - see
attached script.
In order to better visualize what I've made, I wanted to try and export it
and then visualize using Paraview/Visit. However, I'm struggling to find
any concrete examples where this type of vtk object is exported...
I have tried running the following:
out = vtk.vtkOBJExporter()
out.SetFilePrefix("test")
out.SetInput(chart)
out.Write()
But end up with the following type error:
TypeError: SetInput argument 1: method requires a vtkRenderWindow, a
vtkContextView was provided.
Can anyone provide assistance? Thanks in advance.
-- Tony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170911/264a85e2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PyVTK_Test.py
Type: text/x-python-script
Size: 898 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170911/264a85e2/attachment.bin>
More information about the vtkusers
mailing list