Thank you very much for you sharing with your package on TLS.
I tested it, and found some mistakes on function [Err, P] = orm(X, Y, order).
They were listed the following:
line 21 kx=length(X); instead of kx=length(Xdata);
line 22 ky=length(Y); instead of ky=length(Ydata);
line 28 P = R/(Q'.*X.^order); When matlab run it, matlab always sent an Error message"
Matrix dimensions must agree".
And the followed line 29 30 may meet the same Error. But I can not get your mean and have not any advise.
I think I have found a bug in code.
the left down corner of the object should have coordinates:
bx = - (hp - 1)*dx/ 2.0;
by= - (vp - 1)*dy/ 2.0;
bx = - (hp/2.0 - dx/ 2.0);
b = - (vp/2.0 - dy/ 2.0);
Could you please clarify what all parameters do mean?
In case if it is needed to re scale system matrix, what should be changed: i.e. physical volume of image should be constant. Therefore we can change, h(v)pixels -number of pixels in image dimensions, or physical pixel sizes.
Please note that this function can be used in iterative reconstruction methods, such as maximum likelihood (ML EM) to evaluate system matrix elements.
Please contact me in case you have any questions at firstname.lastname@example.org
I would like to detial the use of this function a bit. This function is of a first hand implementation of the method to calculate system amtrix elements in a PET system. It make certain assumptions at this time evalute the matrix elements. It assumes that the detector does not extend out of the reconstruction circle as it cannot deal with the zero matri value (an error of division by zero may occur), though it is not difficult to modify the .CPP file to add this functionality. I will add this functionality in the next version. Also, another method is to calculate intersected area of the projection ray and the pixel, that function will also follow this one later. It is faster if you assume detector width equal to that of the reonstruction pixel width. It works in 2D only at the moment.