Skip to content
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

Oblique CT supporting #34

Closed
hws203 opened this issue May 9, 2024 · 8 comments
Closed

Oblique CT supporting #34

hws203 opened this issue May 9, 2024 · 8 comments

Comments

@hws203
Copy link

hws203 commented May 9, 2024

Is there any demo example of oblique CBCT(Laminography CT) at LEAP packet?

@kylechampley
Copy link
Collaborator

Hello.

There was not a demo script for laminography, but I just added one to my current development branch. You can find it on the champley_dev branch here. This will be merged into the main branch in about a week when I am done with my next round of changes.

Take a look at what I posted and let me know if you have any questions.

@hws203
Copy link
Author

hws203 commented May 11, 2024

I tested your "d32_laminography.py" which works well, but when I change the lami_angle from 10 to 40, then the reconstructed image is too bad. Could you explain why that happens?

lamino_angle_10
lamino_angle_40

@kylechampley
Copy link
Collaborator

Yep, I can explain. This is caused by two issues. The first issue is simple. I set the detector size to only fit that object if the laminography angle was less than 10 degrees. If you want to try bigger angles, you have to use a bigger detector. You should see a line in the script that says
numRows = numCols//3
Just change this to:
numRows = numCols
And that way the whole object will be captured on the detector.

Once you make this change things will look better, but you will still see artifacts. These artifacts are called "cone beam artifacts". Basically, for CT to work, one must collect projections that are tangent (or nearly tangent) to all the strong edges in the object. Since none the projections in laminography measure tangent to the top and bottom edges of the cylinder, you will see strong artifacts. This is a little bit related to the type of phantom I chose. I could have chosen a phantom without sharp edges, but I also wanted to showcase how bad laminography images can look. That said, 40 degrees is a large laminography angle. Do you really need such a large angle?

Now let's talk about methods to suppress these cone-beam artifacts. One easy method is to restrict your volume to cover exactly the support of your object. In this case, that's about 28 slices (use leapct.set_numZ(28)). Next you can try regularized reconstruction to mitigate these artifacts. In LEAP you could try TV or histogram sparsity- these tend to work well.

For a description of the cone-beam artifact, see Section 2.1 and Figure 1 of the following paper (one of my papers actually):
https://www.sciencedirect.com/science/article/am/pii/S0963869521001997

I also wrote a paper that describes a heuristic method to mitigate cone-beam artifacts. That paper is here:
https://link.springer.com/article/10.1007/s11220-023-00444-3

Hope this helps.

@hws203
Copy link
Author

hws203 commented May 12, 2024

Now I can see better a slice image after change the size of detector by 512.
As you can see the geometry figure, the detector is parallel to Z-axis, which may bring some degrading of gray value from top to bottom of detector at real case. Is there any method to tilt the detector position as like the attached image ? Thanks for your quick response. lamin_geo

@kylechampley
Copy link
Collaborator

Yes, you can rotate the detectors as well. The easiest way I know to do this is with quaternions. Add the following code just before the set_modularbeam command.

from scipy.spatial.transform import Rotation as R
sin_theta = np.sin(-0.5laminographyAnglenp.pi/180.0)
cos_theta = np.cos(-0.5laminographyAnglenp.pi/180.0)
for n in range(numAngles):
q = np.append(colVecs[n,:].copy()*sin_theta, cos_theta)
A = R.from_quat(q).as_matrix()
rowVecs[n,:] = np.matmul(A, rowVecs[n,:])

Note that if you rotate the detectors more than 5 degrees, the FBP reconstruction will no longer work, so you'll have to do iterative reconstruction.

@hws203
Copy link
Author

hws203 commented May 13, 2024

Thanks for your nice guidance. Now I can see the tilted geometry of CBCT and some slices too with SART algorithm.

@kylechampley
Copy link
Collaborator

Do you have any more questions related to this issue? If you do, I'd be happy to leave it open and answer more questions, but if not, can I close this issue?

@kylechampley
Copy link
Collaborator

I'm going to close this issue because of inactivity and because I think I answered all of your questions, but feel free to open a new issue if something comes up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants