dkazanc / TomoPhantom

Software to generate 2D/3D/4D analytical phantoms and their Radon transforms (parallel beam) for image processing
https://dkazanc.github.io/TomoPhantom/
Apache License 2.0
116 stars 53 forks source link

add verbosity option #84

Closed dkazanc closed 3 years ago

AxelHenningsson commented 4 years ago

Nice package, well done!

Saw that you had commented away the prints which seems like good practice. However, when I do a conda reinstall I get the old c code. Is there a fix for this? Really would like to not have my external libs printing stuffs to stdout.

(If you are interested in input otherwise I think it would be quite nice if the rendering was not binary, i.e you could get partial volumes in the voxels when rendering, this is quite some work tough I realize, and it can be hacked by increasing resolution and down-sampling already.)

Best to you, and thanks for a nice contribution to the tomography community!

dkazanc commented 4 years ago

Thanks very much @AxelHenningsson for the feedback. Some recent changes go into the DEV labelled packages which you can install with: conda install -c ccpi/label/dev tomophantom We do, however, experience some problems with our CI server which builds packages automatically, so some delay can happen at the moment unfortunately.

re: rendering. It is a nice thought, but unfortunately for analytical projections we need an exact formulation of the geometrical object. So if the phantom is with the partial volume effect, the resulting projections will not account for that. You probably can introduce errors afterwards on both objects (phantom + projections) with some convolution pass for instance. I mean this could be an artefact for instance?

AxelHenningsson commented 4 years ago

Ok, nice, then I know, thanks! Yeah, is a lot of work, and perhaps hard to implement in a speedy fashion. Would be an integral in 2D or 3D over the pixel/voxel boundaries for the object. Since the object/radon is known analytically, so should these integrals be I imagine, so the formulation could be exact. But anyways, the package is nice as it is. :) Cheers

dkazanc commented 4 years ago

@AxelHenningsson would incorporating a some sort of PSF as a blurring operation for projections would help to achieve the similar effect? I'm thinking of doing that at some point...

AxelHenningsson commented 4 years ago

I don't know if it can be the equivalent somehow. It would seem to me that a post projection filter could not achive identical results to that of switching from line to strip integrals. But perhaps it is usefull for accounting for other effects.