Closed KrisThielemans closed 3 years ago
@KrisThielemans: will something like this:
The gradient of the prior at voxel r is computed as the sum of
delta(r, s) = w(s - r)*kappa(r)*kappa(s)*(lambda(r) - lambda(s))
over all voxels s where the weight w(s - r) is non-zero, kappa being an image
used to have spatially-varying penalties such as in Jeff Fessler's papers.
phi(f) = sqrt(alpha^2 + |grad f|^2 - <grad f, xi>^2)
xi = 1/sqrt(|grad v|^2 + eta^2) grad v
do ?
Not sure where you got the first put from? It doesn't seem correct. The formula for the prior is actually phi (although there should a sum over voxel values really, I would have to check if it's inside or outside the sqrt).
the first one is for QuadraticPrior
fixed by 933630ece93ded99dffbdc60e4eef993051621b1
it's currently a straight copy of the STIR doxygen, but Python help doesn't format it, see e.g. https://github.com/SyneRBI/SIRF/blob/e43d86c685ac884594af389addb1cbd5f4931f2f/src/xSTIR/pSTIR/STIR.py#L1846-L1848
I'm not aware of any easy way to get math into "normal" Python doc (unless going via sphynx etc). I think best thing to do for now is just to replace latex-style with "hand-written" math