Dear list,

I'm using Mayavi and the visual API from enthough.tvtk.tools.visual

What I'm interest especially is to use the scalarbar or the vectorbar:

http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/auto/mlab_decorations.html?highlight=scalarbar#enthought.mayavi.mlab.scalarbar

However if I try to use it complains that no object is loaded

I've integrate a Mayavi scene (I use qt4 backend for better
integration with my main program, neuronvisio) follow this example

http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/building_applications.html#integrating-in-a-pyqt-application

When I open the Mayavi browser however I cannot see any datastructure loaded.

Consider this code:

    from enthought.txtk.tools import visual
    cyl = visual.Cylinder()
    cyl.traits()

the output of the traits function is:

    In [6]: cyl.traits()
    Out[6]:
    {'actor': <enthought.traits.traits.CTrait object at 0x5af9940>,
     'axis': <enthought.traits.traits.CTrait object at 0x5af97e0>,
     'color': <enthought.traits.traits.CTrait object at 0x5af9050>,
     'length': <enthought.traits.traits.CTrait object at 0x5af9cb0>,
     'points': <enthought.traits.traits.CTrait object at 0x5af9d60>,
     'polydata': <enthought.traits.traits.CTrait object at 0x5af9b50>,
     'pos': <enthought.traits.traits.CTrait object at 0x5af9680>,
     'property': <enthought.traits.traits.CTrait object at 0x5af9f70>,
     'radius': <enthought.traits.traits.CTrait object at 0x5af9730>,
     'representation': <enthought.traits.traits.CTrait object at 0x5af9ec0>,
     'trait_added': <enthought.traits.traits.CTrait object at 0x3d3ab50>,
     'trait_modified': <enthought.traits.traits.CTrait object at 0x3d3aaa0>,
     'viewer': <enthought.traits.traits.CTrait object at 0x5af99f0>,
     'visibility': <enthought.traits.traits.CTrait object at 0x5af9aa0>,
     'x': <enthought.traits.traits.CTrait object at 0x5af9890>,
     'y': <enthought.traits.traits.CTrait object at 0x5af9e10>,
     'z': <enthought.traits.traits.CTrait object at 0x5af9c00>}

So this is what I'm thinking:

either I can wire the cylinders from visual to the Mayavi pipeline and
use the scalarbar functions to decorate the image (but I don't know
how), or I can add directly the scalar bar to the figure, 'cause I
know the initial and the end colour I would like to represent and
which is the value associated.

Do you have any ideas how to do that, or there is a third way (and
better one, not known to me?)

Thanks,
Michele.

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
MayaVi-users mailing list
MayaVi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mayavi-users

Reply via email to