[Insight-users] accessing vector value from python

Gaetan Lehmann gaetan.lehmann at jouy.inra.fr
Thu Apr 6 03:09:41 EDT 2006


The license is the ITK one - I will add it in the archive and in the 
repository - and the copyright will be transferred to the insight software 
consortium.

About the status of WrapITK:
WrapITK is based on the current ITK wrappers. As such, it provides most of the 
features of the current ITK wrappers and add lots of new features and higher 
consistency (look at the article for more details :-)). It is well tested on 
linux (I use it daily, as well as one of my colleague), also well tested on 
mac os (it have been also developed on mac os (by Zach)), and now builds on 
windows. On this last plateform, we need more feedbacks from users to be sure 
everything work as it should - any help is welcome.
Tcl and Java wrappers also work now, even if they don't have as musch features 
than the python ones.

Gaetan

On Wednesday 05 April 2006 17:13, Zachary Pincus wrote:
> One quick note, to clarify what's going on:
>
> When SWIG doesn't know what to do with a pointer or reference, it
> turns it into a name-mangled string containing the pointer's type and
> address. So '_0441d308_p_itk__VectorTfloat_2_t' is a pointer to an
> itk::Vector<float, 2> at memory address 0x0441d308. Unfortunately, as
> Gaetan pointed out, the ITK wrappers don't know what to do with such
> a pointer. (Or actually, even with pointers to simpler things like
> ints and floats, I think.)
>
> WrapITK solves many of these issues, but be aware that it is a work
> in progress so there still may be some similar rough edges. We're
> working on them as fast as we can, and the more people that use it,
> the faster we can find and fix any problems.
>
> As to the licensing, I'm not sure what the current status is.
> Eventually the copyright will be transferred over to the Insight
> Software Consortium, I assume, and it will be licensed under the ITK
> license. Gaetan might have a more useful comment.
>
> Zach
>
> On Apr 5, 2006, at 7:45 AM, Eduardo Suarez wrote:
> > When i run this code, i finally get a string. What am i doing wrong?
> >
> > Thanks,
> > -Eduardo
> >
> > import InsightToolkit as itk
> > reader = itk.itkImageFileReaderVF2_New()
> > reader.SetFileName('output.mhd')
> > reader.Update()
> > image = reader.GetOutput()
> > image
> >    <C itk::Image<(itk::Vector<(float,2)>,2)> instance at
> >    _d005d208_p_itk__ImageTitk__VectorTfloat_2_t_2_t>
> > ind=itk.itkIndex2()
> > ind.SetElement(0, 0)
> > ind.SetElement(1, 0)
> > pix=image.GetPixel(ind)
> > pix
> >    '_0441d308_p_itk__VectorTfloat_2_t'
> > pix.__class__
> >    <type 'str'>
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users at itk.org
> > http://www.itk.org/mailman/listinfo/insight-users
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/insight-users/attachments/20060406/b3598779/attachment.pgp


More information about the Insight-users mailing list