[Insight-users] ITK Python Wrapping Examples

Brad King brad . king at kitware . com
Thu, 31 Jul 2003 10:15:16 -0400 (EDT)


> At a second glance, if the two GetElement() declarations in itkArray.h
> are simply swapped around, the wrapped GetElement() that is chosen by
> the overloaded method resolver in SWIG should be the const one (because
> its first and there are no other parameter differences to resolve with)
> and its result will be a Python float and not a _double_p.
> GetElement()  in Python will then just return a number.
>
> Are there any opinions with regards to this?  Should these two
> declarations be swapped if this would be the end result?  It looks like
> a win-win to me.

Go ahead and swap them.

-Brad