[vtk-developers] Activiz and DICOM files
Peter Schmitz
mosquitooth at gmx.net
Sat Aug 6 14:14:15 EDT 2011
Hello everyone,
I'm new to VTK / Activiz programming so please excuse trivial questions :)!
My current project is a small application that is able to read DICOM files (CT images) that are located in a specific directory (not a DICOMDIR) and lets the user scroll through all images (I am using C# and Activiz .net).
This is the code I of my loading routine:
vtkDICOMImageReader reader = vtkDICOMImageReader.New();
vtkImageActor iactor = vtkImageActor.New();
vtkRenderer renderer = renderWindowControl1.RenderWindow.GetRenderers().GetFirstRenderer();
reader.SetDirectoryName("C:\\DICOM\\");
iactor.SetInput(reader.GetOutput());
renderer.AddActor(iactor);
reader.Update();
renderer.Render();
Running this code results in the following error messages and only shows the CT as a blue wireframe:
ERROR: In ..\..\VTK-5-6\VTK\Rendering\vtkImageActor.cxx, line 266
vtkOpenGLImageActor (08B3FD98): This filter requires unsigned char scalars as input
Can anyone help me out? How do I load dicom files correctly? By the way, is there a good book on ActiViz out there (esp. for medical purposes)?
Best wishes,
Peter
--
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
Jetzt informieren: http://www.gmx.net/de/go/freephone
More information about the vtk-developers
mailing list