hi everybody, 
        Im trying out mayavi and related python modules for creating a little
gui for visualizing a vtkUnstructuredGrid object.
My code is similar (couse i started from from that...) to the one
presented into this example:
http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/auto/example_mlab_interactive_dialog.html#example-mlab-interactive-dialog

BUT i visualize a vtkobject loaded from a .vtk file in this way:

        vtksource = tvtk.UnstructuredGrid(vtkUnstructuredGrid)
        source = VTKDataSource(data = vtksource)

after loading the file i create all i need for visualizing, like in the
example cited above, in this way:

        HasTraits.scene.engine.add_source(source)
        from enthought.mayavi.modules.surface import Surface
        surface = Surface()
        HasTraits.scene.engine.add_filter(surface)

at the end i call configure_traits() for show the window


---> is this the best way to insert a vtkUnstructuredGrid into a scene?

---> code i have yet writed make some changes on the vtkUnstructuredGrid
object using the vtk functionalities (rotating, translating and other
similar stuff...) and i would like that everytime i make changes on my
vtk-object the visualization update itself in agree with my changes.
how can i get this?? Is not there something
like ...engine.update_source() or ...engine.set_source(UpdatedSource) or
change_source(UpdatedSource). Is there a way to force a re-read of the
source, leaving untouched the filters pipeline??


---> my ultimate goal is to create a little gui with some sliders for
changing proprieties of my vtkUnstructuredGrid calling some
vtk-functions and visualize the modified object... some suggestions??

thank you!


-- 
---------------------------
Luca Penasa
Student at Geosciences Dpt.
University of Padua (IT)
[email protected]
---------------------------

 
 
 --
 Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP 
autenticato? GRATIS solo con Email.it http://www.email.it/f
 
 Sponsor:
 Con Meetic trovi milioni di single, iscriviti adesso e inizia subito a fare 
nuove amicizie
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=8290&d=16-4

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
MayaVi-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mayavi-users

Reply via email to