Computational Article

Unveiling Interfaces and Structures: Cryogenic Laser Ablation and Plasma Focused Ion Beam Techniques for Complex and Beam-Sensitive Systems

import numpy as np
from tifffile import imread
import k3d
from k3d.colormaps import matplotlib_color_maps
# Load the TIFF file into a NumPy array
tiff_array = imread(
    'data/Li_and_Cu_segmented_SaveImage11-19.align.view.labels_3dtiff.tif'
).transpose(1,2,0).astype(np.float16)

# nx, ny, nz = tiff_array.shape
vol = k3d.volume(
    tiff_array, 
    color_range=[0,3],
    color_map=matplotlib_color_maps.tab20c_r
    # bounds=[0, nz, 0, ny, 0, nx],
)
plot = k3d.plot(
    grid_visible=False, # hide grid
    axes_helper=0, # hide axes
    menu_visibility=False, # hide menu
    colorbar_object_id=0,
)
plot += vol

plot.display()