[Insight-users] ITK Python Wrapping Examples

Charl P. Botha c . p . botha at ewi . tudelft . nl
Thu, 31 Jul 2003 17:39:59 +0100


Hello Luis and Brad,

Luis Ibanez wrote:
>>  TValueType & GetElement( unsigned int i )
>>      { return this->operator[]( i ); }
>>
> 
> in line 70 of itkArray.h
> 
> 
> Would you like to give it a try to build with this
> method removed ?

It seems to be fine.  I just built with ITK_CSWIG_{PYTHON,TCL} set to ON:

In [4]: registration.GetLastTransformParameters()
Out[4]: <C itkArrayD instance at _70ae3a09_p_itk__ArrayTdouble_t>
In [5]: registration.GetLastTransformParameters().GetElement(0)
Out[5]: 0.0
In [6]: registration.GetLastTransformParameters().SetElement(0, 12.9)
In [7]: registration.GetLastTransformParameters().GetElement(0)
Out[7]: 12.9

The generated code in wrap_itkArrayPython.cxx is also fine.  Should I 
commit?

Thanks,
Charl

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