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

A way to properly change the strenght of X-ray radiation #200

Open
MarkoLeskovar opened this issue Mar 7, 2024 · 3 comments
Open

A way to properly change the strenght of X-ray radiation #200

MarkoLeskovar opened this issue Mar 7, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@MarkoLeskovar
Copy link

Hello,

I was wondering how could I change the X-ray radiation dose when generating the virtual X-ray images. I see there is a "bone_attenuation_multiplier" variable, but this seem kind of specific to the input data and does not seem to work with the attached chest dataset if I want to increase the dose, such the only the bones would be visible.

I think the proper way to set the X-ray power would be, instead of changing the CT intensity values, to add scaling to the natural exponential in Beer-Lambert law of attenuation. This worked in my case when I was projecting virtual X-ray from volumetric tetrahedral meshes. Take a look at ehlke2013 By doing so, we are also not bound to the intensity values of the CT [-2000 ... 4000+?].

Furthermore, by looking at your code, it seems to me that the DRR is only dependent on the ray length and its weight? From what I understand, there should be a final post-processing step that takes the contribution of each pixel and takes the exp(-a*x) of the contributions, similar as in ehlke2013 .

Let me know what you think and if this would be possible to implement.

Best regards,
Marko Leskovar

@eigenvivek
Copy link
Owner

eigenvivek commented Mar 8, 2024

Hi @MarkoLeskovar, this is a good idea and something easy to implement.

In DiffDRR, for each ray cast, we model the amount of energy absorbed by the volume, not the attenuated intensity of the ray as you're suggesting. That is, the integral we compute is

image

where

  • r is the X-ray beam from the source s to the pixel p
  • I_0 is the initial intensity of the ray (I think this is equivalent the dose?), which is implicitly set to 1 in DiffDRR since we don't model it

Alternatively, you can exponentiate the image returned by DiffDRR to model the attenuated intensity of rays
image

  • Does subtracting log I_0 produce the image you expect for your desired dose?
  • Does exponentiating and multiplying by I_0 produce the desired image?

@eigenvivek
Copy link
Owner

HI @MarkoLeskovar, been digging more into the literature based on your question. It appears the CT Hounsfield units -> LAC density conversion depends on the radiation dose (this paper was particularly illustrative).

Going to try and implement a dose-dependent conversion for DiffDRR v0.4.0.

@eigenvivek eigenvivek added enhancement New feature or request v0.4.0 labels Apr 19, 2024
@eigenvivek
Copy link
Owner

This proved to be a really interesting direction. Taking inspiration from DeepDRR, I found a few ways to implement dose-dependent rendering. However, I don't think the results look very accurate (the lumbar spine is way to prominent) and I need more time to figure out the best way to implement this. Going to remove this as a goal for v0.4.0, but something to pursue for the future.

60kVp
90kVp
120kVp

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

No branches or pull requests

2 participants