1

I have problem with loading .dcm. I need to have 3D visualisation and I would like to use vtkplotter. Someone has also this problem.

I try:

from vtkplotter import *

volume = load(mydicomdir) #returns a vtkVolume object
show(volume, bg='white')

but it doesn't work. When I run the program I get errors from 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!

And after closing vtkOutputWindow in terminal I get information:

ERROR: OpenGL MAX_3D_TEXTURE_SIZE is -1

I found also in the documentation, and there is written:

# 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) 

This code causes that I have only errors from vtkOutputWindow, without error from terminal.

Amit Joshi
  • 15,448
  • 21
  • 77
  • 141
  • How big is your DICOM data set? How many slices and how many pixels per slices? It looks like VTK cannot allocate memory for it, which suggests to me that it's too big for VTK to handle. – Dave Chen Jun 01 '20 at 19:05
  • Generally I have 160 dicom files, but I have also tried loading 20 and next 6 dicom files from my mydicomdir, but it dosen't fix. ds.pixel_array.shape = (320, 260) (7fe0, 0010) Pixel Data OW: Array of 166400 elements – mecha tronika Jun 02 '20 at 06:24

0 Answers0