From: Olivier V. <oli...@gm...> - 2013-07-23 15:56:52
|
I would be interested by the answer as well. Let me know if you find a way, Le 2013-07-18 à 09:06, Bradley Lowekamp <blo...@ma...> a écrit : > Hello, > > I am using swig to generate interfaces from my header files with some type map guidance. For our swig generation of python binding I am passing the "-keyword" argument. > > I have some overloaded procedural methods[1] like the following: > > Image Resample ( const Image& image1, Transform transform = itk::simple::Transform(), InterpolatorEnum interpolator = itk::simple::sitkLinear, double defaultPixelValue = 0.0 ); > Image Resample ( const Image& image1, const Image& referenceImage, Transform transform = itk::simple::Transform(), InterpolatorEnum interpolator = itk::simple::sitkLinear, double defaultPixelValue = 0.0 ); > .... > > I can't use keyword arguments with these methods. Here is what I get: > > In [1]: import SimpleITK as sitk > > In [2]: img = sitk.Image() > > In [3]: sitk.Resample(img, defaultPixelValue=1) > --------------------------------------------------------------------------- > TypeError Traceback (most recent call last) > <ipython-input-3-8a2b278d5bba> in <module>() > ----> 1 sitk.Resample(img, defaultPixelValue=1) > > TypeError: Resample() got an unexpected keyword argument 'defaultPixelValue' > > Is this a bug or a missing feature? I very much would like this ability. we have a number of procedural methods with a large number of parameters which are going to be overloaded. > > I am quite lazy when in python, so this is too many default parameters to have to specify. > > Thanks, > Brad > > > [1] https://github.com/SimpleITK/SimpleITK/blob/master/Code/BasicFilters/include/sitkAdditionalProcedures.h#L45 > ------------------------------------------------------------------------------ > See everything from the browser to the database with AppDynamics > Get end-to-end visibility with application monitoring from AppDynamics > Isolate bottlenecks and diagnose root cause in seconds. > Start your free trial of AppDynamics Pro today! > http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk > _______________________________________________ > Swig-user mailing list > Swi...@li... > https://lists.sourceforge.net/lists/listinfo/swig-user |