[vtkusers] Writing VTK filters in Python and C

David Gobbi dgobbi at irus.rri.ca
Fri Feb 15 00:30:42 EST 2002


To add some additional clarification,

1) It isn't possible to write a VTK filter in Python.  Maybe sometime
   in the future it will be.

   Well, that's not quite true... if you look into all places where you
   can hook callbacks into VTK it probably is possible in some limited
   cases.  But it wouldn't be easy, and I wouldn't advise it.

2) Writing & wrapping your own VTK classes is a topic that is covered
   fairly substantially in both the User's Guide and in the archives.
   In VTK 3.x it basically amounts to adding your class to the appropriate
   VTK subdirectory (usually 'local') and adding the class name to
   the Makefile.in in that directory, then running 'configure'
   (or pcmaker), then make (or nmake).  For VTK 4.x this topic was
   recently discussed to death, and I can't tell you my method because
   the VTK gods have declared it to be heresy ;)

 - David

--
  David Gobbi, MSc                       dgobbi at irus.rri.ca
  Advanced Imaging Research Group
  Robarts Research Institute, University of Western Ontario

On Fri, 15 Feb 2002, Prabhu Ramachandran wrote:

> >>>>> "RB" == Robert Brown <robb at sophitia.tera-byte.com> writes:
>
>     RB> I want to write a filter to modify a dataset.  I'd like to
>     RB> implement it in Python to see how it works, then in C if I
>     RB> like it.  Is it possible to write a class in Python that can
>     RB> be used in the VTK pipeline as a filter?  What's involved?
>
> With the latest CVS tree you can subclass another VTK class.  However,
> you need to be a little careful.  This post from David should help.
>
> http://public.kitware.com/pipermail/vtkusers/2002-January/009142.html
>
> prabhu
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>




More information about the vtkusers mailing list