目的:显示一个带有x,y,z分辨率的3D掩膜(mask)图像,注意数组大小的对应情况。
PYTHON: mayavi库
安装问题:Pycharm引入mayavi安装包后,下载pyqt5等配置包,出现问题:This application failed to start because no Qt platform plugin could beinitialized. Reinstalling the application may fix this problem.” 解决:【PyQt】PyQt5安装及PyCharm开发环境配置_哔哩哔哩_bilibili
即在用户变量添加新变量。
import scipy.io
import numpy as np
import tifffile as tiff
from mayavi import mlab
from scipy.ndimage import gaussian_filter
# 读取Tiff图像,获取其图像的形状
tiff_image = tiff.imread(r'.......')
depth, height, width = tiff_image.shape
# 读取.mat文件(mask图像来源于matlab处理的数据)
mat_data = scipy.io.