[Insight-users] ITK, VTK and Python

Erik Anderson eranders at sci.utah.edu
Mon Mar 5 12:28:34 EST 2007


Hi all,
    Sorry for posing several questions in a single email, but it appears 
I'm stuck on multiple fronts.  Firstly, I have gotten DICOM series read 
into my Python-based ITK build (using WrapITK).  I would like to extract 
a slice (any principle axis would be fine) but I cannot seem to figure 
out the proper way to do this.  Currently, I have the following 
high-level flow set up:

f = itk.RegionOfInterestImageFilter[itkImage[itk.US,3]].New()
f.SetInput(dicomReader.GetOutput())

roi = itk.Region[3]()
roi.SetIndex(startIndex)
roi.SetSize(regionSize)

f.SetRegionOfInterest(roi)
f.Update()

where startIndex and regionSize are itkIndex3 and itkImageRegion 
respectively.  I get output, but it is generally a pattern of lines on a 
black background.  Am I doing something wrong here?

Also, I would like to take the entire DICOM volume and view it using 
vtk.  Is this possible given the current state of WrapITK and VTKs 
Python bindings?

Thanks a lot,
Erik Anderson


More information about the Insight-users mailing list