-
Notifications
You must be signed in to change notification settings - Fork 98
add projectors calling parallelproj #817
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
Conversation
These are based on the NiftyPET work and currently follow a similar strategy of doing the whole projection upfront The code runs, but actually doesn't do any projections yet
|
@gschramm, @AnderBiguri, @gfardell, @paskino I've created the PR now as it is now set-up (once gschramm/parallelproj#3 is set-up). Of course, Travis doesn't really test this, as it won't have |
|
The next step is to get required geometric info. This more or less corresponds to
|
Most of the code to build the geometric info is now there, but not all!
|
the edge effect is a bug that i hope to fix soon. it is because the start and end points lie within the image volume and I step through all planes of the volume instead of only considering planes between the start and end points. |
|
Good to hear this is progressing!
This is about 2 orders of magnitude slower than the cuda code (the real part). Is the STIR overhead for LORs that large?
Should be just having an if conditions to crop the "start" and "end" of the ray in these chuncks of code, right? |
Timings above are for the non-CUDA OpenMP code! STIR-LOR overhead is probably ~4s (and most of that would be a once-only operation). It would be easy to OpenMP that bit. It can be further optimised, but that'll be more work. |
|
I suggest to create an issue at |
|
new issue is parallelproj created: |
This seems to work now. Actual code for geometry will need to be moved to separate file for re-use by the forward projector.
|
seems that I had forgotten to push my last commit that I used to obtain the above results. I've done it now. |
forward_project and back_project utilities will now check if the parsing failed and exit with an error message (as opposed to seg-faulting).
- change test framework to allow passing a projector-pair file - add sample projector-pair files - run test_OSMAPOSL with parallelproj projectors
|
@gschramm @AnderBiguri @paskino I have now a version that works fine on CPU with a minimal test (some manual tests are fine as well). I have also pushed a short commit to use the GPU code if I'd very much appreciate it if someone with a GPU and CUDA could try this. Essentially, cmake -Dparallelproj_DIR=/where/ever/install/lib/cmake whateverotherSTIRoptions /where/ever/source/STIR
make -j8
ctestyou could save yourself some time if you'd say as that's currently the only one with the projector. If that works, it'll be easy to test on other data as well (just change the projector pair) |
Also made _proj_data_info_sptr member in Forward/BackProjectorByBin protected as opposed to private.
|
This is ready now, as soon as somebody tests the CUDA projector. |
|
We should now remove the |
without it, anyone finding STIR will get linking errors to target parallelproj::parallelproj_c (or cuda)
parallelproj now no longer accumulates, so disabling the fill.
|
Example result of forward projection of a very crude mu-map of the NEMA phantom (54x54x127) with the Siemens mMR span=11 template (data is at https://github.com/SyneRBI/SIRF_data/blob/0e5ac5978e76017d741d2cc4ae8d188e09f9f7c2/examples/PET/mMR/) This is as expected as the Joseph projector interpolates, while ray-tracing (Siddon) is more sensitive to discretisation (which why we have the (This phantom is centered, so I cannot see the difference between segment +5 and -5, but the underlying code to determine geometry is the same) |
Adds supports for https://github.com/gschramm/parallelproj
Current status is that CMake is set-up, and the skeleton for the projectors exist. Now we have to call them...