[vtkusers] Display dicom image in qvtkwidget
Nirav Karani
niravkarani001 at gmail.com
Mon Jan 14 12:11:14 EST 2013
The image that I was trying to view seems to be a compressed one. I tried
the same code with an uncompressed image and it worked. Sorry for the
trouble.
On Sun, Jan 13, 2013 at 9:28 PM, Nirav Karani <niravkarani001 at gmail.com>wrote:
> 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/20130114/0d441cc3/attachment.htm>
More information about the vtkusers
mailing list