mayavi

Displaying true-colour 2D RGB textures in a 3D plot?

亡梦爱人 提交于 2019-12-28 13:36:08
问题 I'm trying to make a 3D plot that consists of a series of 2D planes through an RGB stack, like this: I know that it's possible to do this using mpl_toolkits.mplot3d by passing the x, y, z coordinates and the RGB(A) colours of each pixel to plot_surface : import numpy as np from matplotlib import pyplot as pp from mpl_toolkits.mplot3d.axes3d import Axes3D def plot_stack_slices(rgbstack, scale=(1., 1., 1.), z_interval=10.): fig, ax = pp.subplots(1,1,subplot_kw={'projection':'3d'}) ax.invert

listen for ctf otf changes with traits in mayavi volume rendering

回眸只為那壹抹淺笑 提交于 2019-12-24 16:15:09
问题 I would like to listen to changes in the transfer function in how the color and opacity (ctf/otf) of my data is represented. Listening to sensible-sounding traits such as mayavi.modules.volume.Volume._ctf does not trigger my callback. I would expect this to be changed by the user either through the "standard" mayavi pipeline display (as part of EngineRichView) or through including the Volume object's view directly. No such luck either way. It is maybe telling that when you press the big red

Spyder together with Mayavi

北慕城南 提交于 2019-12-24 06:47:51
问题 Is it possible to use a different IDE as a front end while using the Canopy EPD engine in the back end? In particular, I'd like to use mayavi.mlab scripting from Spyder's ipython interpreter. I'm working on a macbook pro running OSX 10.8. Is there a way to set this up? I have tried to set up mayavi and spyder using macports, but that does not seem to work. The only working version of mayavi that I have managed to set up runs from the commercial Canopy platform. So if I can't get the macports

Plotting multivalued surface in mayavi

点点圈 提交于 2019-12-24 04:23:41
问题 mayavi I have some data which is on a structured grid in the X and Y directions and is unstructured in the Z direction. This is in the form of a list of data points, e.g [[x,y,z], [x2,y2,z2], ...] . There are 2 points corresponding to most x,y coordinates, and the data is double valued in the z dimension. I would like to plot this shape as an enclosed surface, and if possible remove one of the walls. I have tried the advice here: http://docs.enthought.com/mayavi/mayavi/auto/example_surface

Installing Mayavi into Anaconda

和自甴很熟 提交于 2019-12-24 01:10:54
问题 I want to install Mayavi into my anaconda installation for that I ran the following commands, but got an error message I am not sure how to deal with: user@Kubuntu:~$ source activate myenv (myenv)user@Kubuntu:~$ conda install mayavi Using Anaconda Cloud api site https://api.anaconda.org Fetching package metadata: .... Solving package specifications: .... The following specifications were found to be in conflict: - anaconda-client (target=anaconda-client-1.6.0-py35_0.tar.bz2) -> python 2.7*|3

Setting parallel prospective in mlab/mayavi/python

非 Y 不嫁゛ 提交于 2019-12-23 10:37:20
问题 I have a code in python to render a few spheres in python that looks like this: %matplotlib inline import numpy as np import matplotlib.pyplot as plt import random import mayavi from mayavi import mlab N = 4; diams = .4*np.ones([N]); xvals = np.arange(N); yvals = np.zeros(N); zvals = np.zeros(N); pts = mlab.points3d(xvals, yvals, zvals, diams, scale_factor=1,transparent=True) mlab.show() The default view of the figure adds distortion based on the camera position (farther spheres smaller). I'd

`How to install and run `mayavi` by `pip3` with `vtk`?

落花浮王杯 提交于 2019-12-23 04:32:31
问题 My system is Ubuntu 16.04 and my Python version is 3.5. I have installed vtk 7.1.0 into /home/why/software/vtk/7.1.0/ with Python wrapper. Furthermore, I add the following line into .bashrc export PYTHONPATH=$PYTHONPATH:/home/why/software/vtk/7.1.0/lib/python3.5/site-packages And I can import vtk in ipython3 and use it normally. But when I install mayavi by sudo -H pip3 install mayavi I get the following error: Running setup.py bdist_wheel for mayavi ... error Complete output from command

MayAVI install on Python 3.6 [duplicate]

倖福魔咒の 提交于 2019-12-23 02:42:39
问题 This question already has answers here : Get mayavi working with Python 3 (4 answers) Closed last year . I have a very straightforward question: How can I install Mayavi on Python3.6? I have already tried EVERYTHING, like this, this, and many many others, but nothing works. I can import the module, but I always get the same error message (that I don't have either PyQT or wxPython installed, but they are installed!). Now, whenever I try to install Mayavi or the "missing" packages, I get the

PyInstaller and Enthought Suite

只谈情不闲聊 提交于 2019-12-22 10:26:53
问题 I was wondering if anyone has any success in creating a stand alone executable using pyinstaller with a script that has enthought imports. I have been trying to do this for a couple of days now, however I keep getting an import error. Through some digging around I believe that I might need to add some hidden import and create my own hooks. However I have not heard of anyone having any success with this, so I thought I would ask here and see if anyone might have some experience with this

TVTK Error in Mayavi (Python)

南楼画角 提交于 2019-12-22 03:48:08
问题 I'm running a Fedora 17 (x64) machine, and I tried installing Mayavi for python via yum install mayavi which worked fine, except every time I write a code where I call a mayavi module (like mlab) : from enthought.mayavi import mlab it yells with the error ******************************************************************************** WARNING: Imported VTK version (5.8) does not match the one used to build the TVTK classes (5.6). This may cause problems. Please rebuild TVTK. *****************