[vtkusers] how to read dicom files with vtkGDCMImageReader
Mathieu Malaterre
mathieu.malaterre at gmail.com
Sat Oct 31 16:05:34 EDT 2009
On Sat, Oct 31, 2009 at 7:17 PM, Orlinn
<MeinDatenLaufwerk at googlemail.com> wrote:
>
> hi,
>
> i would like to read dicom files with vtkGDCMImageReader but did not found
> any examples.
> With vtkDICOMImageReader i can read with
>
> vtkDICOMImageReader= new vtKDICOMImageReader();
> reader.setDirectory("c/dicomfiles/dicomDirectory")
> reader.update();
I considered this q bqd design. Instead you have to use to vtk
objects: vtkDirectory -> GetFilenames -> vtkGDCMImageReader.
In this case you are free to remove/add/manipulate the order of the
the Filenames before passing to vtkGDCMImageReader.
> vtkGDCMIamgeReader has not such method to set a directory which containts
> DICOM files.
Make sure to read at least twice the FAQ:
http://sourceforge.net/apps/mediawiki/gdcm/index.php?title=Using_GDCM_API#Automatic_ordering_of_slices_for_vtkGDCMImageReader.SetFileNames
Cheers
--
Mathieu
More information about the vtkusers
mailing list