STIR icon indicating copy to clipboard operation
STIR copied to clipboard

Generate SWIG prior factory

Open robbietuk opened this issue 4 years ago • 2 comments

Adds downcasting via a swig factory for priors.

This should address #662 and #707

robbietuk avatar Oct 09 '20 15:10 robbietuk

Sorry force pushed to stop travis.

I took a look at your changes and it doesnt seem to have resolved the issue.

>> QP = self.recon.get_objective_function().get_prior()
Exception ignored in: '_wrap_delete_QuadraticPrior3DFloat'
TypeError: in method 'delete_QuadraticPrior3DFloat', argument 1 of type 'stir::QuadraticPrior< float > *'

robbietuk avatar Oct 27 '20 22:10 robbietuk

ah. it generates the code, but then something goes wrong later with the SWIG type mechanisms. Of course, it's quite weird it's calling a delete as well... sigh

KrisThielemans avatar Oct 28 '20 07:10 KrisThielemans