Skip to content
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

SRT2D repository: SRT 2D PET and SPECT algorithms #1420

Merged
merged 231 commits into from
Nov 20, 2024

Conversation

Dimitra-Kyriakopoulou
Copy link
Contributor

Changes in this pull request

2 new analytic reconstruction algorithms SRT 2D PET in the src→ analytic → SRT2D folder and SRT 2D SPECT in the src→ analytic → SRT2DSPECT folder of my SRT2D repository.
[In 2016 in SRT2D folder had been uploaded the prior versions of both these two codes: these old versions do not work with the current STIR version (as there had been pointer etc changes in STIR in between). Also the new versions of the 2 algorithms are improved, e.g. the old SRT2DSPECT run only for uniform data, whereas the new one doesn’t have such restriction.]

Testing performed

  • I installed STIR's last version of 7 February 2024 on my pc, and run the codes: they compiled, and they gave correct results. SRT2D run with the Hoffmann phantom, and SRT2DSPECT with XCAT phantom. As SRT mathematically works for the open disc, the slices of XCAT that touched the scanner were slightly squeezed at the edge (by interpolation).
  • The codes had no problem with the arc-correction functionality in terms of successful compilation; however, I did not run them with non-arccorrected data.

Related issues

Checklist before requesting a review

  • [] I have performed a self-review of my code
  • [] I have added docstrings/doxygen in line with the guidance in the developer guide
  • [] I have implemented unit tests that cover any new or modified functionality (if applicable)
  • [] The code builds and runs on my machine
  • [] documentation/release_XXX.md has been updated with any functionality change (if applicable)

@Dimitra-Kyriakopoulou Dimitra-Kyriakopoulou marked this pull request as draft May 10, 2024 22:11
Corrected the 2 mistakes in the Codacy report
Correction of the 8 (potentially minor) mistakes of the Codacy report
@Dimitra-Kyriakopoulou
Copy link
Contributor Author

Dear Professor @KrisThielemans ,
THANK YOU WHOLEHEARTEDLY FOR YOUR PATIENT AND INVALUBLE HELP!!!

-Thank you so much for Build and ctest!!! Unfortunately it won't run now, because I just realized I did not change the name simulate_PET_data_for_tests.sh to simulate_data_for_tests.sh also in run_scatter.sh file... I will now do the change. I am really sorry.

-The current comment in SPECT parallelization is:
// At the moment, the parallelization produces artifacts that the non-parallelized version does not have. That's why it's commented out.
If it is not OK, please tell me to change it.

-I renamed .sh manually because this option exists on the web interface, and it should be equivalent to the git option. I think the problem I recall with the name change, was that it was expected that simulate_PET_data_for_tests.sh should exist in SRT2D repository since it existed in master. In such a case could the solution be to rename the file in master first?

-To run STIR, i had been cloning locally on my pc the current STIR version, and I then created the SRT etc files. These files I then uploaded to SRT2D Github.
Each time I removed my local STIR version to clone a new master version, somehow I faced problems, as despite cleaning, and also stating paths clearly, some things were not removed, and I tried hard to make it compile the new version -i.e. it was supposadly running the new version, but it had kept parts of the prior...
Pre-commit.yml handling means I need to clone SRT2D repository on my pc and then do the required process.
I am afraid whether in case I do this, I again have serious issues with the compilation -once I worked 2 days to resolve.
Hence, may I please asked if you think it might be possible you please did this, in case it would cause no particular trouble; however, please feel free to tell me if this would be of trouble, so that I will do it (with the delay).

I am looking forward to your reply. I am really sorry for all the trouble.

THANK YOU WHOLEHEARTEDLY FOR YOUR PATIENCE AND YOUR INVALUABLE HELP!!!

simulate_PET_data_for_tests.sh is now simulate_data_for_tests.sh
@KrisThielemans
Copy link
Collaborator

-The current comment in SPECT parallelization is: // At the moment, the parallelization produces artifacts that the non-parallelized version does not have. That's why it's commented out. If it is not OK, please tell me to change it.

no, let's leave it

-I renamed .sh manually because this option exists on the web interface, and it should be equivalent to the git option. I think the problem I recall with the name change, was that it was expected that simulate_PET_data_for_tests.sh should exist in SRT2D repository since it existed in master. In such a case could the solution be to rename the file in master first?

All worked ok. (whatever happens on master is irrelevant, except for merging)

-To run STIR, i had been cloning locally on my pc the current STIR version,... Hence, may I please asked if you think it might be possible you please did this,

You should clone your repo (not UCL/STIR) and checkout the SRT2D branch before making any changes. But anyway, I'm happy to do this at the very end.

@Dimitra-Kyriakopoulou
Copy link
Contributor Author

Dear Professsor @KrisThielemans,
-All tests are successful now (I run Build and ctest locally), except for pre-commit.yml. Thank you wholeheartedly for wishing to help with this; it is huge help for me right now!!!

-Thank you wholeheartedly for your help with the SPECT data! I will wait for the Build and ctest you have set running (thank you!) to finish, and then I can make the changes for SRT2DSPECT code, i.e. 'attenuation filename' to 'attenuation projection filename' and add the comments. Or should I wait to get your reply on my questions for the SPECT conversation, so that the tests will run again after all changes are finalized? I am looking forward to your reply. I am really sorry for all the trouble.

THANK YOU WHOLEHEARTEDLY FOR ALL YOUR INVALUABLE HELP!!!

@Dimitra-Kyriakopoulou
Copy link
Contributor Author

Dimitra-Kyriakopoulou commented Nov 20, 2024

Dear Professor @KrisThielemans,
I did the change from 'attenuation filename' to 'attenuation projection filename', and added comment in SRT2DSPECT.h and SRT2DSPECT.par.

ALL tests are succesful (I run locally Build and ctest), except for pre-commit.yml.

I am looking forward to your comments.

THANK YOU WHOLEHEARTEDLY FOR ALL YOU INVALUABLE HELP!!!

Copy link
Collaborator

@KrisThielemans KrisThielemans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

excellent. I will run the pre-commit now. Please don't push to the branch anymore, unless I ask you to.

danieldeidda and others added 3 commits November 20, 2024 08:48
… used (UCL#1519)

use the time frame information (where available) for the listmode data
to set the frame definition for the output of LmToProjData if all events
are used, issuing a warning otherwise

---------

Co-authored-by: Kris Thielemans <[email protected]>
@KrisThielemans KrisThielemans added this to the v6.3 milestone Nov 20, 2024
@KrisThielemans KrisThielemans merged commit 8752e80 into UCL:master Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants