[Insight-users] ITK, VTK and Python
Gaëtan Lehmann
gaetan.lehmann at jouy.inra.fr
Mon Mar 5 13:54:09 EST 2007
Hi Erik,
Le Mon, 05 Mar 2007 18:28:34 +0100, Erik Anderson <eranders at sci.utah.edu>
a écrit:
> 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?
maybe the index or the size are not properly set ? Can you send a full
example to reproduce the problem ?
>
> 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?
I'm not usign dicom, but here is what Carl P Botha said about that a few
month ago:
The last time I tried, you could read single DICOM files. However,
reading lists of files (with our without the gdcm filename helper) was
not really possible due to the version of Swig in CableSwig getting
confused with basic_string and string, thus resulting in the inability
to read or pass any strings from WrapITK / Python.
Gaetan
--
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66 fax: 01 34 65 29 09
http://voxel.jouy.inra.fr
More information about the Insight-users
mailing list