I git cloned the mayavi, and run python setup.py install. It works.
wxpython,enthought,mayavi,traitsui
I'm not sure I understand what the problem is. To get your code working it seems like a simple matter of calling the scene in the wx notifiers (which you have a reference to) and making the necessary adjustments. Like so: def on_number_of_balls_selected(): n = self.get_selected_ball_number() clear_figure() #mlab.clf(scene = self.mayavi_view.scene.mayavi_scene...
python,matplotlib,data-visualization,mayavi
As @HYRY and @nicoguaro suggested in the comments above, Mayavi is much better suited for this type of work. There is a good set of examples here that I used for reference. Here is what I came up with import numpy as np from mayavi import mlab x = np.linspace(0,10,50)...
python-2.7,logging,vtk,enthought,mayavi
I guess this partially answer your question, but you could implement an error observer in python as explained here http://public.kitware.com/pipermail/vtkusers/2012-June/074703.html and add it to the vtk class you are interested. In c++ I find much simpler to redirect the output to stderr (this example is for windows): vtkSmartPointer<vtkWin32OutputWindow> myOutputWindow =...
Well, today I find out an alternative way to solve the problem. Except using plot_surface, I choose to use scatter3D, the core code is some what like this aa=np.shape(X)[0] bb=np.shape(X)[1] x=X.reshape(aa*bb) y=Y.reshape(aa*bb) z=Z.reshape(aa*bb) data=data.reshape(aa*bb) x1=[] y1=[] z1=[] da1=[] for i in range(aa*bb): if data[i]>0: x1.append(x[i]) y1.append(y[i]) z1.append(z[i]) da1.append(data[i]) my_cmap=cm.jet my_cmap.set_over('c')...
The best workaround that I could find to this problem was to use scipy interpolation to enlarge the volume without interpolation. from scipy.ndimage.interpolation import zoom img3d2 = zoom(img3d, 4, order=0) The voxel size is now visible...
It is possible to set up a dialogue with a input box in which you can set t. You have to use the traits.api, it could look like this: from traits.api import HasTraits, Int, Instance, on_trait_change from traitsui.api import View, Item, Group from mayavi.core.ui.api import SceneEditor, MlabSceneModel, MayaviScene class Data_plot(HasTraits):...
python,data-visualization,mayavi
Ok I found the solution for my problem, the trick is to change the data directly through the pipeline. So in my code I just have to set the following command into the else segment: self.plot.parent.parent.scalar_data = self.p[self.n] ...