[Insight-users] Python wrapping broken?

Charl P. Botha c.p.botha at ewi.tudelft.nl
Tue, 02 Mar 2004 22:55:15 +0100


Charl P. Botha wrote:
> I'm now chasing the next Python wrapping problem.  After having applied
> above patch,  GeodesicActiveContourImageFilter.py now breaks with this:
> 
> Traceback (most recent call last):
>    File "GeodesicActiveContourImageFilter.py", line 185, in ?
>      main()
>    File "GeodesicActiveContourImageFilter.py", line 103, in main
>      seedPosition.SetElement(0, float(sys.argv[3]))
>    File "/home/cpbotha/build/Insight-gcc/bin/itkIndex.py", line 87, in
> SetElement
>      def SetElement(*args): return _itkIndex.itkIndex2_SetElement(*args)
> SystemError: ../Objects/longobject.c:188: bad argument to internal function

Okay, this one's my bad.  It's a weird error message, but it's simply
because GeodesicActiveContourImageFilter.py (my translation of the cxx)
was casting arguments 3 and 4 as floats, not as ints.  I've fixed and
committed.

Brad, could you still look over my patch to SWIC to fix the FLT_MIN vs.
-FLT_MAX problem?

Thanks,
Charl

-- 
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/