-
Notifications
You must be signed in to change notification settings - Fork 95
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
View offset #181
View offset #181
Conversation
@pw351 When you are finished pls let me know. :) |
I think I am done with the commits. :) |
This is wrong. |
@NikEfth Can you please specify which changes you are referring to which you made? |
I should not be able to see this, from this branch :
|
@NikEfth, I don't see that commit. In this PR, I see only 4 commits from @pwadhwa351. It restores the PR to what I remember. Possibly you have some links to the old PR? (not sure why thought. this is PR 181, the old one was #130) |
I can see that from |
not sure what you did then. you'd have to add a remote, fetch this new branch, and do a git log on that. I guess you might have merged onto an existing branch. |
Alright, I see now. so @pwadhwa351 and @pw351 are different accounts with the same brach ... ok |
OK, so let me explain the situation. I made two commits and a PR to Palak. Commit: ed71b4e and 0af0256. I am sorry I will not be able to finish it this week. |
I had a look at ed71b4e and added some comments there (not ideal but best I could do). There's a few small things I doubt that can be correct, but the main change here is that the code now takes the offset into account in the translation between views and detectors. I'm not sure if this is the best way though, see also my comment in the code. I believe that changing the relation between views and detectors is dangerous though. It would have to be taken into account in any code for normalisation etc (detector efficiencies for the first and middle detector would now no longer correspond to the first view). I think that spreads things too far. Instead, I believe it is better to use the following convention:
As long as these 2 offsets are consistent, we should be fine. Sadly, because of the interleaving, the relation between these 2 is maybe not trivial, but at least initially I'd vote for In summary, I think we need a new function |
I've tried this and can confirm that for the arccorr case, there are round-trip problems, giving for instance
showing that the view_num is negative, which shouldn't be the case. so we indeed need some of @NikEfth's fixes. |
Previously, when calling the constructors, phi was required to be between 0 and pi, and psi between 0 and 2pi. This is no longer the case.
- make sure angles are first converted to a 0..2pi range - introduce get_psi_offset for detector angles along the ring to be consistent with view_offset (view_num=0 still corresponds to det_a==0)
revert to original version but using get_scanner_ptr() in derived classes
I've now added a few "modulo" operations ( thanks @NikEfth for the discussion on this! |
shifted to 5.0 as output will be incompatible for some scanners (with non-zero view-offset) |
Also moved lines from ocumentation/release_3.1.htm to 5.0.htm
If intrinsic tilt would be very large or somehow bring the phi outside the range, the previous code presumably could go wrong
The interpolating backprojector doesn't support view-offset yet, so FBP tests failed. We now run them on data with view-offset = 0.
I've "fixed" the tests by running FBP on data with view-offset = 0. I expect this to work now. Things to do:
|
circumvent limitation of the interpolating backprojector
d6ee4d3
to
60d6af8
Compare
now called get_intrinsic_azimuthal_tilt()
60d6af8
to
b9c6e7f
Compare
start-angle was supported for SPECT already long time ago.
When adding views, the view-offset should be adjusted to the average of the mashed views, otherwise the image will be rotated.
As we now take view-mashing into account in view-offset, run_tests.sh was failing as it compares with old reconstructions. So we change the header to compensate.
The old code doesn't handle it, so we check upfront. Also removed it from the recon_test_pack.
With the merge of UCL/STIR#181 and the checks performed in #59, an offset of -8 will no longer work in STIR.
No description provided.