我在加载.dcm时遇到了问题。我需要3D可视化,我想使用vtkplotter。这个问题.
我试过了
from vtkplotter import *
volume = load(mydicomdir) #returns a vtkVolume object
show(volume, bg='white')
但没有用 当我运行程序时,我得到的错误来自 vtkOutputWindow
:
ERROR: In C:\VPP\standalone-build\VTK-source\IO\Image\vtkDICOMImageReader.cxx, line 307
vtkDICOMImageReader (000002866DCBE730): No memory allocated for image data!
ERROR: In C:\VPP\standalone-build\VTK-source\Rendering\VolumeOpenGL2\vtkVolumeTexture.cxx, line 756
vtkVolumeTexture (000002866DDCEC50): Capabilities check via proxy texture 3D allocation failed!
结束后 vtkOutputWindow
在终端我得到的信息。
ERROR: OpenGL MAX_3D_TEXTURE_SIZE is -1
我发现还在 文件,并有写。
# Return a list of meshes by reading all files in a directory # (if directory contains DICOM files then a Volume is returned) g = load(datadir+'timecourse1d/') show(g)
这段代码导致我只能从 vtkOutputWindow
终端没有出错。