-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STIR-python OSMAPOSL priors are GeneralisedPrior objects rather than child class priors #707
Comments
feel like trying what's in #284 (comment)? |
I think I will. Unfortunately I don't think it can be put off for much longer. |
could be very easy, but we'll only find out by trying. The SWIG list is quite helpful though. Let me know |
I shall do. Let me learn SWIG first 😄 |
That could easily take up the rest if you PhD! (edit src/swig/stir.i, add a single |
Is there any way we could do something similar to Lines 1620 to 1626 in d1cd05c
The python call would be something like I am guessing this would require an individual stir method for each prior (e.g. |
this is easy enough. We probably only need it for |
Ill give it a go for |
for what we need, this should work. Regarding a PR, depends if we can get the SWIG people to help out first or not! |
See robbietuk#10 |
OSMAPOSL reconstruction object is defined and setup in python as
self.recon
. This setup process has a penalty defined (e.g. QP). The callself.recon.get_objective_function().get_prior()
returns<Swig Object of type 'stir::shared_ptr< stir::GeneralisedPrior< stir::DiscretisedDensity< 3,float > > > *' at 0x125b172f0>
. This GeneralisedPrior object does not contain any methods specific to the QP/RDP and therefore evaluations of things likeparabolic_surrogate_curvature()
(QP), orget_gamma()
/set_gamma()
(RDP) cannot be performed.Can
get_prior()
return the child class prior?, e.g. QP or RDP.The text was updated successfully, but these errors were encountered: