[vtkusers] Display dicom image in qvtkwidget
José M. Rodriguez Bacallao
jmrbcu at gmail.com
Mon Jan 14 14:07:03 EST 2013
try to use vtkGDCMImageReader from gdcm project, this reader read almost
any available dicom image.
On Mon, Jan 14, 2013 at 12:11 PM, Nirav Karani <niravkarani001 at gmail.com>wrote:
> 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
>>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130114/25173063/attachment.htm>
More information about the vtkusers
mailing list