vtk-python and serialization

Vetle Roeim vetler at ifi.uio.no
Fri May 5 10:11:51 EDT 2000


I have som questions about the python bindings for vtk.. Before I ask the
questions, I'd just like to say that I'm no Python expert ;-)

- Would it be possible to serialize the vtk objects somehow? I gave it a
shot with the pickle module, but it dumped core.

- I've noticed that the vtk objects are a little strange. For an example:

  >>> camera = vtkCamera()
  >>> print camera
  vtkOpenGLCamera (0x2ff3f8)
    Debug: Off
    No Delete Method
    Modified Time: 2
    Reference Count: 1
    Clipping Range: (0.01, 1000.01)
    Distance: 1
    Eye Angle: 2
    Focal Disk: 1
    Focal Point: (0, 0, 0)
    Left Eye: 1
    Orientation: (0, -0, 0)
    Position: (0, 0, 1)
    ParallelProjection: Off
    Parallel Scale: 1
    Stereo: Off
    Thickness: 1000
    View Angle: 30
    View Plane Normal: (0, 0, 1)
    View Up: (0, 1, 0)
    Window Center: (0, 0)

instead of writing something like <somethinginstance at someaddress> it
prints (all?) its attributes and values.
would it be possible to _easily_ construct a new vtkCamera object based on
this information? without manually writing functions to read it?

.. and why does the object write all this?


Thanks,
vr
--
Vetle Roeim 
Graduate Student 
Departement of Informatics, University of Oslo, Norway

--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------



More information about the vtkusers mailing list