“将vtkVolume保存为HTML”面板创建空HTML文件
关闭面板参考库: 使用其他vtkVolume进行测试时,html文件的大小可能会变得很大,因此看起来好像是在向其中添加数据。但是每次html都是空白的。还有别的办法吗“将vtkVolume保存为HTML”面板创建空HTML文件,html,panel,vtk,jupyter-lab,Html,Panel,Vtk,Jupyter Lab,关闭面板参考库: 使用其他vtkVolume进行测试时,html文件的大小可能会变得很大,因此看起来好像是在向其中添加数据。但是每次html都是空白的。还有别的办法吗 import numpy as np import panel as pn pn.extension('vtk') from bokeh.resources import INLINE data_matrix = np.zeros([75, 75, 75], dtype=np.uint8) data_matrix[0:35,
import numpy as np
import panel as pn
pn.extension('vtk')
from bokeh.resources import INLINE
data_matrix = np.zeros([75, 75, 75], dtype=np.uint8)
data_matrix[0:35, 0:35, 0:35] = 50
data_matrix[25:55, 25:55, 25:55] = 100
data_matrix[45:74, 45:74, 45:74] = 150
Blocks = pn.pane.VTKVolume(data_matrix, sizing_mode='stretch_width', height=400, spacing=(3,2,1), interpolation='nearest', edge_gradient=0, sampling=0)
Blocks.save('Test.html', resources=INLINE, embed=True)
Blocks
Python 3.8.6 JupyterLab 2.2.9,面板版本0.10.3,vtk 9.0.1,Bokeh 2.2.3出于某种原因,它在Jupyter笔记本中运行良好。