[Insight-developers] Re: [Wrapping] Print problems

Benoit Regrain benoit.regrain at creatis.insa-lyon.fr
Wed Aug 10 10:42:33 EDT 2005


>On Wednesday 10 August 2005 14:07, Benoit Regrain wrote:
>> Hi,
>>
>> I would print the content of an ITK object.
>> The python source code is following
>>
>> With the first print, all works. The object is a smart pointer to an 
>> image
>> With the second print, I obtain an exception. The object is an itkImage
>> The exception is :
>>        itkLightObject_Print() takes exactly 3 arguments (2 given)
>>
>> Is anyone reproduce that or am I only in this case ?

>The same for me. Swig have strange behaviors with smart pointer :-/
>But why do you need to call Print that way ?

With the following example, the image isn't a smart pointer :-(
Thus, the print doen't work.
I have solved it by the add of the Indent class wrap.

reader = itkImageFileReaderIUC2_New()
reader.SetFileName("C:/Creatis/homersbrain.bmp")
reader.Update()
image = reader.GetOutput() 



More information about the Insight-developers mailing list