# cmaps=cmap, clims=clim, # # x_pos=32, y_pos=25, z_pos=93) # x_pos=[370, 170, 570, 770], y_pos=810, z_pos=120) # xyz_axis = XYZAxis() # colorbar = Colorbar(cmap=cmap, clim=clim, label_str='Seismic Amplitude', # label_size=8, tick_size=6) # Test 2: brain CT data. from vispy import io volume = np.load(io.load_data_file('brain/mri.npz'))['data'] volume = volume.transpose(2, 0, 1)[:, :, ::-1] axis_scales = (1, 1, 1) # isotropoic axes visual_nodes = volume_slices(volume, x_pos=100, y_pos=128, z_pos=30, seismic_coord_system=False) xyz_axis = XYZAxis(seismic_coord_system=False) colorbar = Colorbar(cmap='grays', clim=(volume.min(), volume.max()), label_str='Amplitude', label_size=8, tick_size=6) # Run the canvas. canvas = SeismicCanvas(title='Simple Demo', visual_nodes=visual_nodes, xyz_axis=xyz_axis, colorbar=colorbar, # Set the option below=0 will hide the colorbar region # colorbar_region_ratio=0, axis_scales=axis_scales, # Manual camera setting below.
# Image 1: seismic overlaid by planarity attribute. seismic_vol = np.memmap('./F3_seismic.dat', dtype='>f4', mode='r', shape=volume_shape) planarity_vol = np.memmap('./F3_planarity.dat', dtype='>f4', mode='r', shape=volume_shape) seismic_cmap = 'grays' seismic_range = (-2.0, 2.0) # Get a colormap with alpha decreasing when value decreases. planarity_cmap = Colormap([[1,1,1, 0], [1,1,0, 0.5], [1,0,0, 1]]) planarity_range = (0.25, 1.0) visual_nodes = volume_slices([seismic_vol, planarity_vol], cmaps=[seismic_cmap, planarity_cmap], clims=[seismic_range, planarity_range], # The preprocessing functions can perform some simple gaining ops. preproc_funcs=[None, lambda x: 1-np.power(x, 8)], interpolation='bilinear', **slicing) xyz_axis = XYZAxis() colorbar = Colorbar(cmap=planarity_cmap, clim=planarity_range, label_str='1 - Planarity', size=colorbar_size) canvas1 = SeismicCanvas(title='Planarity', visual_nodes=visual_nodes, xyz_axis=xyz_axis, colorbar=colorbar, **canvas_params) # Image 2: seismic overlaid by fault semblance. semblance_vol = np.memmap('./F3_semblance.dat', dtype='>f4',