[vtkusers] how to read dicom file using python?
Mathieu Malaterre
mathieu.malaterre at gmail.com
Tue Feb 17 08:35:20 EST 2009
On Tue, Feb 17, 2009 at 12:23 PM, RimAY <rim.ayari at gmail.com> wrote:
>
> I'm sorry,
> Thanks for your reply,
>
> Here is my code:
>
> import vtk
>
> reader = vtk.vtkDICOMImageReader()
> reader.SetDirectoryName('the root of my dicom files')
Works for me.
>
> and I got the following error:: vtkDICOMImageReader[015579F0]: Couldn't get
> stored files.
http://en.wikipedia.org/wiki/Dyslexia :)
Did you mean 'sorted' ?
> Please could someone help me to resolve it
Implicitely vtkDICOMImageReader will only works with MR Image Storage
or CT Image Storage, as it requires Image Orientation (Patient) and
Image Position (Patient) attribute to order slices.
You could use vtkGDCMImageReader as it does not have such restriction.
http://gdcm.sourceforge.net/html/classvtkGDCMImageReader.html
2cts
--
Mathieu
More information about the vtkusers
mailing list