[Insight-developers] help with wrapping wrap_itkWatershedImageFilter

Charl P. Botha c.p.botha at ewi.tudelft.nl
Sat, 06 Mar 2004 12:43:25 +0100


Brad King wrote:
> select1st and select2nd are not actually part of the C++ standard, these 
> symbols were not included when I made a sweep through the standard to 
> list all symbols.  I've committed a fix to the header wrapper for 
> functional that includes these symbols.  The fix is on the main tree and 
> in the ITK 1.6 branch of CableSwig.

Thankyou very much Brad...

I have (at least) one more question: the wrapping now actually builds 
successfully.  However, the wrapped itkWaterShedImageFilter has no 
GetOutput() method:

In [4]: a = itk.itkWatershedImageFilterF3_New()
In [5]: GetOutStar = [m for m in dir(a) if m.startswith('GetOut')]
In [6]: print GetOutStar
['GetOutputs']

I checked the generated XML, it includes a representation of GetOutput. 
  Here is an example:

<Method id="_1292" name="GetOutput" returns="_509" context="_480" 
mangled="_ZN3itk11ImageSourceINS_5ImageImLj3EEEE9GetOutputEv" 
location="f34:62" file="f34" line="62" extern="1"/>

The "returns" tag has the same value as GetBasicSegmentation(), which 
does work.  "context" has the same value as for GetNameOfClass() (for 
example) which is also wrapped successfully.

The generated itkWatershedImageFilterPython.cxx has no declaration or 
invocation of GetOutput() anywhere.

Do you have any idea why the wrapper is not wrapping that?  At first I 
thought it was the use of GetImageDimension in the class declaration, 
but when I hardcoded that, GetOutput() was still not wrapped.

I've just started with this... I've added wrappings for 
itkImage<unsigned long,*> as well (for the labeled image output) and I 
expect that at least the segmenttree will have to be wrapped.

Thanks for any advice/information,
Charl

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