LLNL / LEAP

comprehensive library of 3D transmission Computed Tomography (CT) algorithms with Python and C++ APIs, a PyQt GUI, and fully integrated with PyTorch
https://leapct.readthedocs.io
MIT License
119 stars 12 forks source link

Angular range problem #28

Closed Stefenfri closed 7 months ago

Stefenfri commented 7 months ago

Thanks for your contribution! In the following code does 360 means 2pi? leapct.set_conebeam(numAngles, numRows, numCols, pixelSize, pixelSize, 0.5*(numRows-1), 0.5*(numCols-1), leapct.setAngleArray(numAngles, 360.0), 1100, 1400) I'm wondering what if I want to use the sparse-view or limited-angle setting how do I change the code. And how to adjust the start_angle, cause in TIGRE it's easy to do that as following. start_angle = np.deg2rad(140) end_angle = start_angle + 2 * np.pi angles = np.linspace(start_angle, end_angle, 984, dtype=np.float32) And for the iterative algorithm, I saw you have SART reconstruction and TV denoising, is it easy to combine them together to do the sparse-view reconstruction? Like usually when we use SART we will add one regularization term.

kylechampley commented 7 months ago

Hello. Yes, the 360 is in degrees. You definitely don't have to use the function "leapct.setAngleArray(numAngles, 360.0)"; it is just provided for convenience. All it does is set a numpy array of the projection angles in degrees. It can be specified just as you have shown in your post, except LEAP expects this array to be in degrees instead of radians. This array can have any starting angle and the angles do not have to be equi-spaced. The only requirement is that the array must be a float32 lumpy array and the angles must be in increasing order and the number of angles number match the number of angles you told LEAP to expect.

For your second question, yes, SART with TV is an effective method for sparse view CT reconstruction. In LEAP, we provide an implementation of the ASD-POCS algorithm which is a very effective method in combining SART and TV. Here is the description of ASDPOCS:

https://leapct.readthedocs.io/en/latest/iterative_reconstruction.html#leapctype.tomographicModels.ASDPOCS

Let me know if you have any further questions.

Stefenfri commented 7 months ago

Thanks, it worked!