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

truncatedScan correction algorithm for laminography(45 degree) #134

Closed
hws203 opened this issue Nov 6, 2024 · 14 comments
Closed

truncatedScan correction algorithm for laminography(45 degree) #134

hws203 opened this issue Nov 6, 2024 · 14 comments

Comments

@hws203
Copy link

hws203 commented Nov 6, 2024

@kylechampley I tested leapct with 45 degree laminography geometry with truncated off and on option.
As you can see below, your truncated correction algorithm may not work correctly at the case of laminography.
How about your thought(tested by leapct's version 1.24) ?

  1. truncated on:

truncated_on

  1. truncated off:
    truncated_off

  2. other vendor truncated on:
    cera_tuncated_on

@hws203 hws203 changed the title truncatedScan algorithm for laminography(45 degree) truncatedScan correction algorithm for laminography(45 degree) Nov 6, 2024
@kylechampley
Copy link
Collaborator

It looks to me like there is something wrong with the geometry specification in LEAP. Are you sure it is correct? You can also expand the reconstruction field of view in LEAP to match the CERA reconstruction.

@hws203
Copy link
Author

hws203 commented Nov 7, 2024

@kylechampley Yes, the geometry is correct to my machine design spec. And it is focused on the FoV of slice, then there is no such strains. The strains only exists on the outside boundary of FOV with truncated on option. I set a large FoV diameter in leapct.

@hws203
Copy link
Author

hws203 commented Nov 7, 2024

@kylechampley I made this issue at your standard d32_laminography.py file with below modifcations.

  1. sod = 1100/2 # source-to-object distance (mm)
  2. leapct.set_diameterFOV(1.0e7)
  3. leapct.set_truncatedScan(True)
    just three changes will show this issue at your lastest v1.24's laminography demo script file with disabling 5 degree limit at FBP recon on parameters.cpp.

strains_oct

@kylechampley
Copy link
Collaborator

I don't know. The truncated scan option seems to be doing what is it supposed to when I run the code. Note that all this parameter does is this: If truncatedScan is False, then zero-padding is done with the ramp filter. If truncatedScan is True, then the edge 100 values are padded with zero-th order extrapolation and the rest are zeros.

@hws203
Copy link
Author

hws203 commented Nov 7, 2024

d32_laminography_hws203.zip

@kylechampley Above is my test script zipped file. Please check this one. I used a manual volume setting which is a missed param by me.

@hws203
Copy link
Author

hws203 commented Nov 7, 2024

truncated_paper.pdf
how about checking this paper?
I attached the zip file of 1/10/20/30/40/50 degree lami-slice which looks different depending on angle.
lami_angle.zip

@hws203
Copy link
Author

hws203 commented Nov 10, 2024

@kylechampley I changed the z-axis laminography position calculation method from your original demo script at 50 degree.

  1. original method :
    1-1. sourcePositions[:,2] = np.tan(laminographyAnglenp.pi/180.0)sod
    1-2. moduleCenters[:,2] = -np.tan(laminographyAngle
    np.pi/180.0)
    (sdd-sod)

  2. changed method :
    2-1. sourcePositions[:,2] = np.sin(laminographyAnglenp.pi/180.0)sod
    2-2. moduleCenters[:,2] = -np.sin(laminographyAngle
    np.pi/180.0)
    (sdd-sod)

  3. original lami-slice:

lami_50_degree

  1. changed lami-slice:
    lami_sin_50_degree

  2. If you use tangent function, then the original SDD(source to detector distance) and SOD will be changed too. How about your thought?

@kylechampley
Copy link
Collaborator

I looked at the script you sent, but I didn't see anything obviously wrong.

The truncated scan setting seems to be doing what it was intended to do from my perspective. Yes, there are better ways to handle truncation aritfacts; these are usually two-pass methods which could easily be done with the LEAP toolbox, but I don't have the time to implement these at this time.

Also note that laminography is an incomplete problem. By scanning at an angle there are certain frequencies in the reconstruction that cannot be recovered and you will always get artifact- which are similar in appearance and reason as the so-called cone-beam artifact.

@hws203
Copy link
Author

hws203 commented Nov 12, 2024

@kylechampley Thanks for your comments. current issue has two kind of issues, one is truncated artifact and the other is angle adaptation method in laminography of leapct. I will close this issue which is related to the first one. Please consider the second one more if you have time.

@hws203 hws203 closed this as completed Nov 12, 2024
@hws203
Copy link
Author

hws203 commented Nov 21, 2024

  1. 60 degree laminography with Leapct's FDK:
    strains_leapct

  2. 60 degree laminography with Xrecon4.0's FDK:
    strains_no

  3. it looks like valid FOV area also includes some strains, could you remove such strains in valid FOV area ?

@hws203 hws203 reopened this Nov 21, 2024
@hws203
Copy link
Author

hws203 commented Nov 22, 2024

@kylechampley I guess that this issue is related to leapct's geometry bug in the case of laminography. As you may know, in the case of standard cone beam, the zero degree and 180 degree angle have same SDD change from detector's center to detector's out boundary, but in the case of laminography the zero degree and 180 degree angle have not same SDD change from detector's center to detector's out boundary. It should be considered by the laminograhy angle factor too. For example, from the center of detector to zero angle direction, SDD will be increased, but from the center of detector to 180 angle direction, SDD will be decreased depending on laminography angle.

@hws203
Copy link
Author

hws203 commented Nov 23, 2024

https://github.com/tomography/tomocupy/blob/main/src/include/kernels_linerec.cuh
Tomocupy could be useful reference for laminograph, there are two kind backprojection kernels, one is normal and the other is for laminography.

@kylechampley
Copy link
Collaborator

I have not done laminography in a long time and don't plan to look into it in the near future, so I don't know why you are having issues.

My best guess is that you have something incorrectly specified in the geometry. You are also violating the LEAP assumptions by bypassing the 5 degree detector rotation limitation in the FDK reconstruction.

Have you tried the VD backprojector here?

@hws203
Copy link
Author

hws203 commented Nov 30, 2024

@kylechampley I will check vd back-project tomorrow. And I am adding laminography cone beam kernel into my c++ leapct class. I will post my result soon.

@LLNL LLNL deleted a comment from hws203 Dec 1, 2024
@hws203 hws203 closed this as completed Dec 1, 2024
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