Conversation
Allows two options: installing with sudo (workstations) and without sudo (public clusters).
Typos correction
txusser
reviewed
Jul 28, 2026
Owner
There was a problem hiding this comment.
I think it would be better to do a separate Pull Request to update simset_simpet that incorporating the changes here
Owner
|
The automatic NEMA stuff is missing :( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The changes in this pull request mainly are needed for simulating in Total-Body (TB) with SimPET. Some of them may also optimise or add new functionalities to the old version of SimPET. Main upgrades include:
SimSET has been slightly updated. Some source files have been updated (most changes thanks to Robert Harrison) and do not imply changes in the functionality, but on the memory management (from 4-bytes to 8-bytes variables). No compatibility issues should appear.
STIR newest version is now installed (v6.4). This update is necessary as old version cannot reconstruct TB. Furthermore, it is faster and has few new functionalities.
SimPET's management of files had to be adapted to potentially extremely large matrixes generated by TB. To do so, all Analyze files involved in the process have been converted now to Nifti2, which can handle such big matrixes. To do so, functions in utils/tools (i.e., create_nifti_from_imgdata(), convert_hv_to_nii(), operate_single_image_nii(), operate_images_nii(), operate_sinograms_nii(), convert_simset_sino_to_stir_nii()) are new versions of their respective old versions changing the extensions of which their work. In some cases (e.g., convert_simset_sino_to_stir_nii()) or operate_images_nii()) other changes have been introduced to optimise and make the processing much faster and less memory consuming, which was not important for smaller sinograms. Unused processes in some situations (e.g., additive sinogram if no scatter correction is done) are also computed only if necessary, saving much time and space.
Attenuation correction by using an attenuation sinogram generated by STIR is now implemented. To do this, the following steps are added in simset_sim script: converting the values of the attenuation map to attenuation coefficients by reading the SimSET tables (mu_map), forward projecting this map and computing the ACF with STIR. Although SimSET's calcattenuation is still available, it is not feasible for TB due to large computation times, and even for short scanners STIR correction is preferred. The type of correction is controlled by scanner's parameter attenuation_mode.
Due to the use of STIR sinograms, we realized that SimSET and STIR sinograms are disaligned. Until now this wasn't important as both sinograms came from SimSET. We added a flip in Y in the SimSET to align both sinograms (NOTE: further tests need to be done). As a result of this, reconstructed images also appear flipped by default, so a function to flip the reconstructions to align the maps is also implemented in utils/tools.
Listmode is now fully implemented: listmode (phg at the moment) is computed in each division, merged and the unified listmode is then binned through the SimSET binning's module (potentially large times, needs to be optimized). This allows to make as much divisions as desired with TB (if ran in sinogram mode, RAM consumption is prohibitive) and then the RAM consuming moment is just reserved for the binning process. Once the sinogram is built, the rest of the process is the same.
Other minor, non-related with TB improvements include: fixes on FBP (the problem is identified, as this algorithm in STIR requires the cutted sinograms, and a function to fix this is already implemented, but needs to be implemented in the main body) and PSF (not used in TB).
Concerning installing process of SimPET, we realized that current version requires to have sudo available even if not used. This may be problematic when aiming to use SimPET in public clusters such as HCP, which is now more needed due to high requirements for TB. Thus, we add an alternative makefile (makefile-withoutsudo) which can substitute current makefile if needed for installation in HCPs, as explained in the README.