Display a 3D volume of data in web browser using viserplot#

image
# sphinx_gallery_thumbnail_path = '_static/cigvis/viser/01.png'


import numpy as np
from cigvis import colormap, viserplot

ni, nx, nt = 400, 600, 360
shape = (ni, nx, nt)
data = np.fromfile('data/seis_h360x600x400.dat', dtype=np.float32).reshape(shape)
label = np.fromfile('data/label_h360x600x400.dat', dtype=np.float32).reshape(shape)
nodes = viserplot.create_slices(data, pos=[20, 30, 320], cmap='gray')

cmaps = colormap.set_alpha_except_min('jet', 0.5)

nodes = viserplot.add_mask(nodes, label, cmaps=cmaps)

viserplot.plot3D(nodes)

Total running time of the script: (0 minutes 0.000 seconds)

Gallery generated by Sphinx-Gallery