[vtkusers] Questions About Python Wrapping

Kyle Sunderland 1krs1 at queensu.ca
Thu May 17 17:43:41 EDT 2018


Hi David,


Yes, many of the functions in OpenIGTLinkIO return smart pointers, and are not wrapped.


Two of the testing functions take/return raw igtlioConnector pointers (igtlioConnector being a vtkObject), so I'm confused as to why they aren't wrapped.

igtlioConnector* TestReturnWrap();
void TestArgumentWrap(igtlioConnector* a);


Thanks again,

Kyle

________________________________
From: David Gobbi <david.gobbi at gmail.com>
Sent: May 17, 2018 4:54:52 PM
To: Kyle Sunderland
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] Questions About Python Wrapping

Hi Kyle,

Thanks for sending the files.  I see that the parameters for those methods are actually smart pointers, and as you have already noted, smart pointers aren't wrapped.

This has never been an issue in VTK proper or for most VTK projects, since VTK methods generally use raw pointers.  The header file you sent is closer to ITK style than to VTK style.

I definitely think that it would be worthwhile to add better smart pointer handling to the wrappers.

 - David


On Thu, May 17, 2018 at 12:13 PM, David Gobbi <david.gobbi at gmail.com<mailto:david.gobbi at gmail.com>> wrote:
On Thu, May 17, 2018 at 10:10 AM, Kyle Sunderland <1krs1 at queensu.ca<mailto:1krs1 at queensu.ca>> wrote:
> It (mostly) works, however I noticed that no functions are wrapped which have a definition that contains any of the wrapped classes. Does anyone have insight into what I might have missed?

Is a vtk..Hierarchy.txt file generated for the wrapped module when you build it?  If so, send it to me along with the header files you're wrapping, and I can take a look.

> Also, as an additional question, is it still not possible to wrap functions that return a smart pointer?

If this is a feature that you need, then add it to the bug tracker.

Cheers,
 - David

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180517/80690549/attachment.html>


More information about the vtkusers mailing list