[Insight-users] Read DICOM series with Python wrap

Seth Gilchrist seth at mech.ubc.ca
Tue Jun 29 20:35:44 EDT 2010


Hello all,
I am having a hard time reading a series of files using the python wrappings.

Currently, I get this far:

    import itk

    PixelType = ikt.US
    ImageDimesion = 3
    directory = '/home/user/Documents/DICOM/WholeScanUndeformed-NDRI529L'

    ImageType = itk.Image[PixelType,ImageDimesion]

    reader = itk.ImageSeriesReader[ ImageType ].New()
    ImageIOType = itk.GDCMImageIO.New()
    reader.SetImageIO( ImageIOType.GetPointer() )

    namesGenerator = itk.GDCMSeriesFileNames.New()
    namesGenerator.SetUseSeriesDetails( 1 )
    namesGenerator.SetDirectory( directory )

    SeriesUIDs = namesGenerator.GetSeriesUIDs()



More information about the Insight-users mailing list