[vtkusers] Problem with volume rendering

Steffi Meyer saufi25 at web.de
Tue Jan 17 10:14:36 EST 2006


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




More information about the vtkusers mailing list