JuliaImageRecon / Sinograms.jl

Julia library for working with sinograms / tomography / Radon transform
MIT License
15 stars 6 forks source link

Computed Tomography (3D FBP) #33

Closed Dale-Black closed 1 year ago

Dale-Black commented 1 year ago

Are there any examples of 3D computed tomography phantoms using this package? Currently, my lab is utilizing an in-house MATLAB library for image phantoms with various simulated materials, but if this package is ready, I would love to switch. We are using MATLAB for the simulations and Julia for the rest of the analysis on these phantoms, so moving it into one umbrella would be ideal.

Dale-Black commented 1 year ago

Not sure if this what I am looking for or not (https://juliaimagerecon.github.io/Sinograms.jl/dev/generated/examples/07-fdk/). Looks like there are some errors in the plots

JeffFessler commented 1 year ago

Yes! The docs for the dev branch show several examples: https://juliaimagerecon.github.io/Sinograms.jl/dev/ (You found it yourself while I was typing this!) If you use/clone the "main" branch you will have access to FDK etc. I should soon tag the 0.2.0 version so that you can just type ]using Sinograms directly. But maybe let's first see if what I have is close to what you want?

The errors in the figures are inherited from this recently fixed issue: https://github.com/JuliaImageRecon/ImagePhantoms.jl/issues/70 I have just now restarted the CI run and let's see if that fixes it.

JeffFessler commented 1 year ago

FYI, I currently have only circular geometry (for flat or arc detectors), no helix yet: https://github.com/JuliaImageRecon/Sinograms.jl/blob/main/src/fbp3/fdk.jl Helix is a WIP PR by an undergraduate student and it needs a lot of work still...

Dale-Black commented 1 year ago

This is still fantastic. Thanks. I might be able to make the switch soon!

Dale-Black commented 1 year ago

And amazing, the docs are now showing properly!!

JeffFessler commented 1 year ago

Julia won't let me tag the previous commit, I guess because I moved the repo here recently: https://github.com/JuliaImageRecon/Sinograms.jl/commit/410a1b314fab2bbd911938756e49c0276ff1c520 I just pushed a new commit (accidentally without making a PR, oops) and I'll try to register that one after CI passes.

Dale-Black commented 1 year ago

Any chance you have the ability to use photon counting detectors in this package?

Dale-Black commented 1 year ago

Also, I just talked with my PI, Dr Sabee Molloi, and walked him through this package briefly. He's eager to make the shift to Sinograms.jl so I'll definitely be working on that soon!

JeffFessler commented 1 year ago

That might be a complicated question. You can put any sinogram data into the FBP methods that are here currently - the code doesn't care what detector was used. But maybe what you are really asking is if there are special algorithms designed for the Poisson statistics (plus complications like crosstalk?) for PCD, and there are not, at least not yet. I suspect the best algorithms for PCD are iterative and we are working on forward/back-projectors, but still a WIP. We have SPECT recon for Poisson data here: https://juliaimagerecon.github.io/SPECTrecon.jl/stable/generated/examples/4-mlem/ but the transmission tomography case is trickier because of the nonlinearity of Beer's law and polyenergetic spectra. Lot's of code for that in MATLAB version of MIRT, but not here in Julia yet. I'm curious to know what kind of algorithm you had in mind.

Dale-Black commented 1 year ago

Not sure exactly. I will need to research that area more. It's more complicated than I expected. Thanks!

JeffFessler commented 1 year ago

I'll close this issue since the FDK demos work now. Feel free to email me as well for questions.

JeffFessler commented 1 year ago

Oh wait, I cannot close it until I tag a new release, and for that I have to wait for a manual PR in the registry: https://github.com/JuliaRegistries/General/pull/74372

JeffFessler commented 1 year ago

v0.2 is tagged now and now the stable docs show the FDK images properly so I will close this issue https://juliaimagerecon.github.io/Sinograms.jl/stable/generated/examples/07-fdk/ Thanks for bringing to my attention the issues with the docs!