Lorenzo Isella | 15 Apr 09:51 2016
Picon

Convex Hull around Spheres

Dear All,
This is what I would like to visualize (scripting as much as
possible): I have a set of spheres in 3D, with diameter d=2, which I
can visualize with mayavi.
On top of that, using scipy.spatial, I can calculate a convex hull
based on the centers of the spheres.
The final touch would be to visualize this hull: I should obtain a
mesh composed by poligons. I'd like it to be partially transparent, so
that one can see also the spheres inside.
I paste below a script which visualizes the spheres and calculates the
convex hull.
Any suggestions about how to overlay the convex hull is welcome.
Cheers

Lorenzo

###########################################################################

import numpy as np

from scipy.spatial import ConvexHull

from mayavi import mlab

cluster_agglomerate=np.array([[ 0.14513811, -0.18930948, -1.44428171],
       [ 0.88042945,  1.67057596, -1.45742688],
              [-1.66682741, -0.99554261, -1.70267889],
	             [-0.95535694,  2.3159907 , -1.93637881],
		            [ 1.09396798,  1.7987614 , -3.44524095],
			           [-2.63620654,  0.16588691,
(Continue reading)

zhang simon | 20 Feb 23:21 2016
Picon

scalar concern

To those who may concern:
I am a new user of the MayaVi for visualizing of my research simulation, and if you can help me with a small concern which is about the change of "scalar variable"?
The attached figure is the scalar i want to see but the Mayavi only shows me the "stress(effective)", then how can i view different scalars?

Thank you so much for your help.

Sincerely,
Siyang.
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
MayaVi-users mailing list
MayaVi-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mayavi-users
jorge.conrado | 8 Dec 14:53 2015
Picon

save figure

Hi,

This is a small part of my script:

mlab.quiver3d(u, v, w)

mlab.outline()

mlab.show()

mlab.savefig('t.png')

I have my image on screen but my t.png figure have only a grey tone. How 
can I save my figure.

I run my script using: python ventogr.py How can resize my mayavi 
window.

Conrado

------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
Gael Varoquaux | 26 Nov 17:37 2015
Gravatar

Mayavi in latest ubuntu

Mayavi doesn't work in the latest Ubuntu. It's probably a misconfigured
VTK (nothing to do with Mayavi). I have submitted a bug report to Ubuntu.
If people click on the 'flame' icon to show that they are also affected
by this bug, it may make it move up the priority list:
https://bugs.launchpad.net/ubuntu/+source/vtk/+bug/1520306

Gaƫl

------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
jorge.conrado | 10 Nov 16:52 2015
Picon

contour plot


Hi,

I have the contorno.py plot that I get from the: 
http://docs.enthought.com/mayavi/mayavi/auto/example_contour.html

I did:

python contorno.py

and I had:

Warning: Unable to import the wx backend for pyface due to traceback: 
Traceback (most recent call last):
           File 
"/usr/lib/python2.7/site-packages/pyface-4.5.2-py2.7.egg/pyface/toolkit.py", 
line 49, in _init_toolkit
             be = import_toolkit(tk)
           File 
"/usr/lib/python2.7/site-packages/pyface-4.5.2-py2.7.egg/pyface/toolkit.py", 
line 31, in import_toolkit
             __import__(be + 'init')
           File 
"/usr/lib/python2.7/site-packages/pyface-4.5.2-py2.7.egg/pyface/ui/wx/init.py", 
line 14, in <module>
             import wx
         ImportError: No module named wx

What can I do to solve this.

Conrado
Attachment (contorno.py): text/x-java, 2954 bytes
------------------------------------------------------------------------------
_______________________________________________
MayaVi-users mailing list
MayaVi-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mayavi-users
jorge.conrado | 6 Nov 17:26 2015
Picon

enthought


Hi,

I'm a neuw users of Mayvai. I took an example contour.py from:

http://scipy-cookbook.readthedocs.org/items/MayaVi_examples.html

then I did :

python contour.py

and I had the message:

Traceback (most recent call last):
   File "contour.py", line 14, in <module>
     import enthought.mayavi
ImportError: No module named enthought.mayavi

Please what can I do to solve this error.

Conrado

------------------------------------------------------------------------------
jorge.conrado | 6 Nov 14:18 2015
Picon

3D data plot


Hi,

I'm starting to use Mayavi and I would like know how to plot the axis 
values for 3D vizualisation.

Tanks in advance,

Conrado

------------------------------------------------------------------------------
Christopher Snyder | 6 Sep 20:45 2015
Picon

volume rendering -- without bluring. (make it so you can see the actual voxel boundaries)

Hi,

Let's say I'm volume rendering a fairly small array 10x10x10. How can I make it so that it is clear that the produced image is the granular result of 10pixels in each dimension? I looked into setting anti-aliasing=0, but I don't think that was it.

Thanks,
Chris
------------------------------------------------------------------------------
_______________________________________________
MayaVi-users mailing list
MayaVi-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mayavi-users
Christopher Snyder | 23 Aug 13:18 2015
Picon

how to set ctf and otf for volume rendering-- not in scripting mode

Hi,

This problem is well covered in scripting mode here

In the case of a gui, Gael suggested somewhere using the record function. I find it does not reflect changes in the ctf widget.

Here is my code. I find that I can access the ctf fine, and that the ctf I access is sensitive to changes in the gui widget. I just can't find a way to set the ctf.

class Vis(HasTraits):
    scene     = Instance(MlabSceneModel,())    
    save=Button()
    load=Button()
    editor=SceneEditor(scene_class=MayaviScene)
    def __init__(self,G):
        self.G=G
        HasTraits.__init__(self)
        self.array_src=ArraySource()
        self.array_src.scalar_data=G
        self.scene.mayavi_scene.add_child(self.array_src)
        self.vol_module=Volume()
        self.volume=self.array_src.add_module(self.vol_module)

    def _save_fired(self):
        self.my_crf=self.vol_module.volume_property.rgb_transfer_function ##Works!!
    def _load_fired(self):
        self.vol_module.volume_property.set_color(self.init_crf) ##Fails and I need help
 
   traits_view = View( ..)

vis=Vis(G)
vis.configure_traits()



Obvious workarounds like settings _ctf directly don't seem to work.

Thanks,
Chris
------------------------------------------------------------------------------
_______________________________________________
MayaVi-users mailing list
MayaVi-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mayavi-users
Christopher Snyder | 13 Aug 10:42 2015
Picon

bug with volume colortransfer function mayavi

Dear all,

I think I have come across a genuine bug. It seems that something very strange and certainly unintuitive is happening with the colortransferfunction(CTF) interface.

I'll describe here what I've shown in the attached movie.

Action: mlab.pipeline.volume(whatever). It doesn't matter how the volume rendering is created.
Result: The volume source is displayed as red. Fine.

Action: The user just clicks on the volume transfer function without changing it much. You can even move it back to exactly where it was.
Result: The volume source totally changes colors from red to green: suggesting the CTF in the "Mayavi pipeline" window is not the same as the one originally used in "Mayavi Scene 1"

Action: The user,  having clicked on the opacity transfer function at least once, clicks away. Then the user clicks back.
Result: The CTF totally changes to this blue-red fade instead of this nice three-color style before. If the user messes with the OTF once more, update CTF will change the volume again! from this green color to this red-purple-ish.

Note: It's not just "clicking away" and clicking back that causes this weird change in CTF. I originally ran into this problem while changing data sources. I had say 5 difference volumes. Whenever I would say "array_src.scalar_values=my_volumes.next()" the CTF would change from a rgb to a blue-red fade if and only if I had tried to alter the ctf manually in the GUI.

I really hope we can get this resolved.

Thanks,
Chris Snyder

------------------------------------------------------------------------------
_______________________________________________
MayaVi-users mailing list
MayaVi-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mayavi-users
Christopher Snyder | 1 Aug 15:15 2015
Picon

ArraySource vs ScalarField produces different results

Specifically I can't get them to look the same by adjusting all the parameters I can find on the GUI.

Side question: I couldn't figure out how to synchronize the colormaps for each scene to get a rigorous comparison.

On the one hand I call mlab.pipeline.volume(scalar_field_object) and I get a very nice volume that is mostly translucent except for the main region of intensity.

On the other I have this ArraySource.add_module(mlab.modules.Volume()) #sudo code, don't actually try either of these things, and I get very opaque image volumes even from areas of low intensity.

Any thoughts ?

Chris
------------------------------------------------------------------------------
_______________________________________________
MayaVi-users mailing list
MayaVi-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mayavi-users

Gmane