[vtkusers] Display dicom image in qvtkwidget
Nirav Karani
niravkarani001 at gmail.com
Mon Jan 14 00:28:35 EST 2013
Hi,
I want to display a dicom image in a qvtkwidget in my GUI. I tried the
following code:
vtkSmartPointer<vtkDICOMImageReader> reader =
vtkSmartPointer<vtkDICOMImageReader>::New();
reader->SetFileName("H:/test.dcm");
reader->Update();
vtkSmartPointer<vtkImageViewer2> imageViewer =
vtkSmartPointer<vtkImageViewer2>::New();
imageViewer->SetInputConnection(reader->GetOutputPort());
ui.USImageViewer->SetRenderWindow(imageViewer->GetRenderWindow());
I got the following error:
'ERROR: In E:\Source\vtk-5.8.0 source\IO\vtkDICOMImageReader.cxx, line 283
vtkDICOMImageReader (0373BD00): There was a problem retrieving data from:
H:/test.dcm'
Can someone please help me with this?
Thanks,
Nirav
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130113/9cc906d9/attachment.htm>
More information about the vtkusers
mailing list