[vtkusers] Error in opening dicom image using vtkDICOMImageReader
Liu_tj
tjlp at netease.com
Thu Jun 29 11:05:17 EDT 2017
You can post a request to David Gobbi for his vtkDicomReader.
在2017-06-29,"K O ranjith" <kor1581 at gmail.com> 写道: -----原始邮件-----
发件人:"K O ranjith" <kor1581 at gmail.com>
发送时间:2017年06月29日 星期四
收件人:"Liu_tj" <tjlp at netease.com>
主题:Re: [vtkusers] Error in opening dicom image using vtkDICOMImageReader
Thanks for the solution..
It's working. one difference noted between vtkDICOMImageReader vs vtkDICOMReader is, vtkDICOMImageReader set the window level & window width from the dicom metadata properly.
But in case of vtkDICOMImageReader, have to manually set....
On Tue, Jun 27, 2017 at 7:13 PM, Liu_tj <tjlp at netease.com> wrote:
Actually vtkDICOMImageReader might fail to parse some DICOM files. As we know, current vtkDICOMImageReader
version does not follow the complete DICOM standard. Maybe you can try vtkDICOMReader by David Gobbi.
在2017-06-27,"K O ranjith" <kor1581 at gmail.com> 写道: -----原始邮件-----
发件人:"K O ranjith" <kor1581 at gmail.com>
发送时间:2017年06月27日 星期二
收件人:"vtkusers" <vtkusers at vtk.org>
主题:[vtkusers] Error in opening dicom image using vtkDICOMImageReader
Hello,
While trying to open a mri dicom image using the ReadDICOM vtk example, it
showing error in vtkDICOMImageReader. The code properly working with
sample image file supplied with the example, but showing error while supplying
other dicom images as input. The dicom image file given as input is perfect one, I have tested it with other
dicom viewers like RadiAnt.
This is the error,
ERROR:
In C:\VTK8s\VTK-8.0.0.rc1\IO\Image\vtkDICOMImageReader.cxx, line 270
vtkDICOMImageReader(0000020DC5E9CF70): There was a problem retrieving data from:
E:/Projects/mri/evaluate/Qt/ImageViewer/VTK/VTKtest/ReadDICOM/DICOMData/image.dcm
ERROR:
In C:\VTK8s\VTK-8.0.0.rc1\Common\ExecutionModel\vtkExecutive.cxx, line 784
vtkCompositeDataPipeline
(0000020DC5E45040): Algorithm vtkDICOMImageReader(0000020DC5E9CF70) returned
failure for request: vtkInformation (0000020DC5EF8AA0)
Debug: Off
Modified Time: 2365
Reference Count: 1
Registered Events: (none)
Request: REQUEST_DATA
FROM_OUTPUT_PORT: 0
FORWARD_DIRECTION: 0
ALGORITHM_AFTER_FORWARD: 1
And the code used is :
std::string inputFilename = "E:/mri/image.dcm";
vtkSmartPointer<vtkDICOMImageReader> reader =
vtkSmartPointer<vtkDICOMImageReader>::New();
reader->SetFileName(inputFilename.c_str());
reader->Update();
vtkSmartPointer<vtkImageViewer2> imageViewer =
vtkSmartPointer<vtkImageViewer2>::New();
imageViewer->SetInputConnection(reader->GetOutputPort());
vtkSmartPointer<vtkRenderWindowInteractor>renderWindowInteractor =
vtkSmartPointer<vtkRenderWindowInteractor>::New();
imageViewer->SetupInteractor(renderWindowInteractor);
imageViewer->Render();
imageViewer->GetRenderer()->ResetCamera();
imageViewer->Render();
renderWindowInteractor->Start();
Vtk version 8.0 used
Please help to sort out the error
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170629/94eae88f/attachment.html>
More information about the vtkusers
mailing list