예제 #1
0
 def test_download_knee_full():
     data = examples.download_knee_full()
     assert data.n_cells
예제 #2
0
Volume Rendering
~~~~~~~~~~~~~~~~

Volume render uniform mesh types like :class:`pyvista.UniformGrid` or 3D
NumPy arrays
"""

# sphinx_gallery_thumbnail_number = 3
import pyvista as pv
from pyvista import examples

# Volume rendering is not supported with Panel yet
pv.rcParams["use_panel"] = False

# Download a volumetric dataset
vol = examples.download_knee_full()
print(vol)

###############################################################################
# Simple Volume Render
# ++++++++++++++++++++
#

# A nice camera position
cpos = [(-381.74, -46.02, 216.54), (74.8305, 89.2905, 100.0),
        (0.23, 0.072, 0.97)]

vol.plot(volume=True, cmap="bone", cpos=cpos)

###############################################################################
# Opacity Mappings