[Insight-users] GetImageDimension and WrapITK
Charl Botha
c.p.botha at tudelft.nl
Tue Aug 11 05:50:45 EDT 2009
2009/8/11 Rick Giuly <rgiuly at gmail.com>:
> As far as I can tell, the wrapped Image class (in python) does not have the
> GetImageDimension method. I did a "dir" and couldn't find anything. Is there
> some way to ask an Image instance what the dimension is?
With WrapITK 0.3.0 on ITK 3.14.0 I get the following:
import itk
a = itk.Image[itk.F, 3].New()
print a.GetImageDimension()
3
With the built-in WrapITK in ITK 3.14.0 there is indeed no GetImageDimension.
You can either upgrade to the new WrapITK 0.3.0 :), or, what I used to
do, parse the "this" ivar of the image instance for the dimension.
Good luck,
Charl
More information about the Insight-users
mailing list