jerichooconnell / fastcat

GNU General Public License v3.0
30 stars 13 forks source link

Some nice words and questions #1

Closed AnderBiguri closed 2 years ago

AnderBiguri commented 4 years ago

Hi!

I just read your pre-print, great work!

If I understand this correctly you have made a toolbox to simulate real physics without the need of MC stuff, right? Can then this be used to do "proper" CT simulations? Say, when people research algorithms they often just add some Poisson and Gaussian noise to the simulated projections to avoid "the inverse crime", i.e. just to break a bit their data. Instead, they can use this software to just create realistic noise, is that right?

I've seen that you use the CATPHAN for your simulations and such, have you tested your simulations with some other data? Do you expect it to work equally as good?

In any case, good work! FYI: python TIGRE is about to get updated, finally supporting multi-GPU code and adding quite a bunch of improvements in memory handling, making it a bit faster, if you are interested ;)

jerichooconnell commented 4 years ago

Hi Ander,

Thank you very much for the kind words. Big fan of TIGRE so that means a lot to me.

Your questions:

If I understand this correctly you have made a toolbox to simulate real physics without the need of MC stuff, right?

Yes, no MC inclued. FastCAT has precalculated MC data and with this data, a little rummaging, and a lot of interpolation will (hopefully) give you a very good approximation of MC.

Where MC is involved would be if you wanted to simulate a geometry or phantom very different from a CATPHAN on a linac: MicroCT phantom on a SAARP? You're dreaming, go recalculate the MC data. Dental cone beam with dental phantom? You're dreaming, go recalculate the scatter. If you got this scatter data and spent more time than any reasonable trying to understand where to put it in my code you could do these.

As of now the code works for a CATPHAN. Unpublished, it also works for the head of the XCAT phantom. I would like it to work with the abdomen of the XCAT phantom as well but this involves a detector translation on most linacs which complicates things and is something I am working towards.

Say, when people research algorithms they often just add some Poisson and Gaussian noise to the simulated projections to avoid "the inverse crime", i.e. just to break a bit their data. Instead, they can use this software to just create realistic noise, is that right?

Yes. Although I do, admittedly, add Poisson noise. FastCAT adds scatter and convolves detector input with unique point spread functions, I believe these actions would avoid the inverse crime and maintain noise consistent with experimental data. MC scatter is curve fit to not contain any noise to allow for ideal simulations; poisson noise is then added to a specified level by the user.

This is different from simulations in VOXSI, Imasim, and the simulation functionality in tomopy. FastCAT is more similar to DukeSIM, relying on MC data for detector response and scatter, although they calculate the scatter using GPU MC (very impressive) and don't support CBCT.

I've seen that you use the CATPHAN for your simulations and such, have you tested your simulations with some other data? Do you expect it to work equally as good?

It works with an XCAT head phantom (image below), and custom phantoms that are roughly the same as a CATPHAN. The big limitation is that I assume rotational symmetry for the scatter. I expect to move away from this but haven't quite yet. My priorities right now seem to be; experimental validation > actually releasing the code (apologies for the undressed state of this repo) > more general scatter kernel.

Do you have a use case in mind? I would be curious to hear about it. Some things may be easy to implement on my end as I already have a large framework of MC code to work with.

movie_gray

AnderBiguri commented 4 years ago

Thanks a lot for the answers! This is indeed very interesting.

While I don't have any case in mind, I always frown a bit when people doing research in algorithms prove their algorithm is super good by just adding some Poisson noise to a simulated XCAT. "Yeah, works well with some Poisson in your XCAT, but what about all the other stuff that you are ignoring!" (I also have sinned of this in the past hehe).

Its understandable that people don't simulate MC stuff for an paper on mathematical methods, but still just adding some Poisson noise seems understating the complications that real data have. But this tool can change that then, if you can "quickly" simulate some more realistic noise without the need of setting up a complex MC simulation, then one can study mathematical algorithms properly (by comparing to the real image) with realistic noise, easily. I think that is a really good thing! It will make algorithmic research more robust to the application process, as sometimes algorithms break a bit once you add scatter and source spectrum etc to them.

We should definitely keep in touch, as maybe we can work out some demo using TIGRE, fastCat and an XCAT phantom at some point, as I really like the idea of being able to easily simulate realistic noise.

jerichooconnell commented 4 years ago

No problem. Thank you for the interest!

It would seem then that publishing a validation with the XCAT in terms of noise power spectrum with respect to MC might be a good sanity check then. I don't mind putting in a bit of extra work to facilitate algorithmic research as the dependencies (GPU + CUDA + TIGRE) are a barrier of entry for a lot of other research.

I like the idea of the demo! I'll be sure to let you know when the application is ready for testing.

AnderBiguri commented 4 years ago

Great! Definetly keep me informed! Feel free to drop me an email if that helps (you can find it in the Tigre repo)