[Insight-users] Can't create PoinSet type - WrapITK Python

Carlos Moro cfmoro at gmail.com
Tue Jul 7 18:16:47 EDT 2009


Thank you so much, Gaëtan. It works perfectly :)

pointType = itk.Point[itk.D,3]
pp = pointType()
pointExists =  pointsSet.GetPoint(1, pp)

if( pointExists is True ):
   print "Point is = " + str(pp.GetElement(0)) + ", " +
str(pp.GetElement(1)) + ", " + str(pp.GetElement(2))

Kind regards,
Carlos

2009/7/7 Gaëtan Lehmann <gaetan.lehmann at jouy.inra.fr>

>
>  _p_itk__PointTdouble_3u_t is the type itk::Point< double, 3 >. You can
>> create an object of that type with
>>
>
>  itk.Point[itk.D, 3]()
>
> or
>
>  itk.Point.D3()
>
> I never tried to get the values by passing a itk::Point pointer to a method
> - please let me know how it works.
>
> Gaëtan
>
>
>
>
>> Best regards,
>> Carlos
>>
>> On Tue, Jul 7, 2009 at 8:03 PM, Carlos Moro <cfmoro at gmail.com> wrote:
>> Hi all,
>>
>> Thank you so much Gaëtan. What type should pp be, that has method
>> GetPointer()? Can you please post how to instantiate pp so it can be passed
>> to that function?
>>
>> Best regards,
>> Carlos
>>
>> 2009/7/6 Gaëtan Lehmann <gaetan.lehmann at jouy.inra.fr>
>>
>>
>> You can use GetPointer():
>>
>>  pointExists =  pointsSet.GetPoint(1, pp.GetPointer())
>>
>> Or you can use WrapITK from googlecode - GetPointer() is not required
>> anymore in such situation with that version.
>>
>>  http://code.google.com/p/wrapitk/
>>
>> Regards,
>>
>> Gaëtan
>>
>> --
>> Gaëtan Lehmann
>> Biologie du Développement et de la Reproduction
>> INRA de Jouy-en-Josas (France)
>> tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
>> http://voxel.jouy.inra.fr  http://www.itk.org
>> http://www.mandriva.org  http://www.bepo.fr
>>
>>
>>
>> _____________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-users
>>
>
> --
> Gaëtan Lehmann
> Biologie du Développement et de la Reproduction
> INRA de Jouy-en-Josas (France)
> tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
> http://voxel.jouy.inra.fr  http://www.itk.org
> http://www.mandriva.org  http://www.bepo.fr
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090708/6cc45cd4/attachment.htm>


More information about the Insight-users mailing list