Quantcast

Problem with volume rendering

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Problem with volume rendering

Steffi Meyer
Hi everyone,
 
I have some difficulties with the volume rendering. I want to visualize a dicom file (3-D) which was build up of 2-D Series.
The window opens, but I only see the first slice and then the window gets white and the error appears: the program isn't responding.
Where is the error in the source? Thanks!
 
typedef unsigned char PixelType;
typedef itk::Image<PixelType, 3> ImageType;
typedef itk::ImageFileReader<ImageType> ReaderType;
typedef itk::ImageToVTKImageFilter<ImageType> ConnectorType;
 
ReaderType::Pointer reader = ReaderType::New();
reader->SetFileName("D:\\itk\\volume3.dcm");
 
ConnectorType::Pointer connector = ConnectorType::New();
connector->SetInput(reader->GetOutput());
 
vtkRenderer *ren1 = vtkRenderer::New();
vtkRenderWindow *renWin = vtkRenderWindow::New();
renWin->AddRenderer(ren1);
 
vtkVolumeTextureMapper2D *volumeMapper = vtkVolumeTextureMapper2D::New();
volumeMapper->SetInput(connector->GetOutput());
vtkVolume *volume = vtkVolume::New();
volume->SetMapper(volumeMapper);
 
ren1->AddVolume(volume);
renWin->SetSize(250,250);
renWin->Render();

______________________________________________________________________
XXL-Speicher, PC-Virenschutz, Spartarife & mehr: Nur im WEB.DE Club!
Jetzt gratis testen! http://freemail.web.de/home/landingpad/?mc=021130

_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Loading...