我在我的应用程序中加载了一个 .nii 文件。
def show(self):
image = SimpleITK.ReadImage(file_name)
t1 = SimpleITK.GetArrayFromImage(image)
t2 = color.rgb2gray(t1[w.get()])
print(w.get())
print(t2.shape)
plt.ion()
fig = plt.figure()
ax = fig.add_subplot(111)
line1 = ax.imshow(t2, cmap='gray')
当我移动滑块并在新图中向我展示大脑切片时调用此函数。(应用程序的屏幕截图附在此处:[1]:https ://i.stack.imgur.com/vzDJt.png )
我需要更新相同的图形/情节,有可能吗?