[vtkusers] Problem to read the DICOM series using VTK
chenjianyyzz
chenjianyyzz at 163.com
Wed Jan 18 01:35:55 EST 2017
Hi,
I try to read the attached DICOM image series which comes from Siemens CT but failed, below is my code:
----------------------------------------------------
vtkSmartPointer<vtkDICOMImageReader> DICOMReader = vtkSmartPointer<vtkDICOMImageReader>::New();
DICOMReader->SetDirectoryName( "****"); // fill with the image folder
DICOMReader->Update();
// Visualize
vtkSmartPointer<vtkImageViewer2> imageViewer = vtkSmartPointer<vtkImageViewer2>::New();
imageViewer->SetInputConnection(DICOMReader->GetOutputPort());
vtkSmartPointer<vtkRenderWindowInteractor> renderWindowInteractor =vtkSmartPointer<vtkRenderWindowInteractor>::New();
imageViewer->SetupInteractor(renderWindowInteractor);
imageViewer->SetSlice(4);
imageViewer->Render();
imageViewer->GetRenderer()->ResetCamera();
renderWindowInteractor->Initialize();
imageViewer->Render();
renderWindowInteractor->Start();
----------------------------------------------------
the error message I got is:
ERROR: In ..\..\..\VTK7.1\IO\Image\vtkDICOMImageReader.cxx, line 333
vtkDICOMImageReader (000001ABE55D5CC0): There was a problem retrieving data from: C:\CJ\data\Caili_A/00156a00.dcm
ERROR: In ..\..\..\VTK7.1\Common\ExecutionModel\vtkExecutive.cxx, line 784
vtkCompositeDataPipeline (000001ABE55D7110): Algorithm vtkDICOMImageReader(000001ABE55D5CC0) returned failure for request: vtkInformation (000001ABE55DA160)
Debug: Off
Modified Time: 138
Reference Count: 1
Registered Events: (none)
Request: REQUEST_DATA
FORWARD_DIRECTION: 0
ALGORITHM_AFTER_FORWARD: 1
FROM_OUTPUT_PORT: 0
does any body know how to read the attached DICOM series from Siemens CT?
Thanks
James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170118/fdb776ba/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Caili_A.7z
Type: application/x-7z-compressed
Size: 1858217 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170118/fdb776ba/attachment-0001.7z>
More information about the vtkusers
mailing list