Recent Releases of stir
stir - v6.2.0
Summary of changes in STIR release 6.2
Overall summary
This version is 100% backwards compatible with STIR 6.1, aside from a bug fix for the blocks-on-cylindrical set-up which caused the wrong geometry, and a changed default of the tail-fitting of the scatter estimator (see below). However, C++-17 is now required.
Main new features are the capability to mash TOF bins (via SSRB utility/code) and a CUDA version of the Relative Difference Prior. There are also some import bug fixes, as well as some speed-up (hopefully) in the use of arrays.
Of course, there is also the usual code-cleanup and improvements to the documentation.
This release contains mainly code written by @NicoleJurjew (UCL) (SSRB for TOF), @Imraj-Singh (UCL) (CUDA version of the Relative Difference Prior), @markus-jehl (Positrigo) (fixes for blocks on cylindrical) and @KrisThielemans (UCL).
Patch release info
- 6.2.0 released 23/07/2024
GitHub Milestone 6.2
Summary for end users (also to be read by developers)
New functionality
-
ProjDatanow has most of the methods for numerical operations asArray, i.e. +=,-=,*=,/=,find_max(),find_min(),sum().ProjDataInMemoryadds =,-,*,/ (as well as overloads that are faster than the implementations inProjData).
PR #1439 and PR #1448 - New prior
CudaRelativeDifferencePrior(useCuda Relative Difference Priorin.parfiles), only available if the CUDA toolkit is found during building. Results are identical toRelativeDifferencePriorup to numerical rounding issues. However, the code is currently limited to 3x3x3 weights.
Added timings for the RDP (both non-CUDA and CUDA) to thestir_timingsutility.
PR #1408
Changed functionality
- The default minimum scale factor for tail-fitting in the scatter estimation is now 0.05 (was 0.4). This (temporarily) resolves a
problem that for the Siemens mMR, the default factor was too large (see issue #1280).
WARNING:This potentially changes your scatter estimates. (You can check log files of the scatter estimation to see what the scaling factors are.) However, the Siemens mMR example files already lowered the default scale factor to .1, so if you use(d) those, you will get identical results. -
Array::sum()(and hence images etc) now accumulates in a variable at higher precision to avoid loss of precision.
PR #1439 -
PoissonLogLikelihoodWithLinearModelForMeanAndProjDatanow attempts to auto-detect if it should compute sensitivity using TOF back-projection or not. It does this by checking if its normalisation object can only handle TOF data or not. This should mean that theuse time-of-flight sensitivitieskeyword should now rarely (if ever) be necessary.
PR #1458 - SSRB now allows to mash TOF bins.
PR #1464 -
SPECT_dicom_to_interfileimprovements:- remove requirement for the
is_planarparameters. As STIR can only read SPECT sinograms, we now read/set all fields from a planar scan as well. There is therefore no need anymore for the boolean, and it is just ignored. Output of a conversion of planar data is now directly readable into STIR. - do checks if sequences are present to avoid seg-faults See PR #1473
- remove requirement for the
Bug fixes
- There was a bug in the computation of the detector coordinates for
BlocksOnCylindricalscanners that caused the buckets to not be symmetric.
PR #1462 -
BlocksOnCylindricalscanners were not axially symmetric due to a bug in how gaps were handled. Also, downsampling ofBlocksOnCylindricalscanners in scatter simulation was inaccurate.
PR #1466 - The "Hessian times input" calculations of the Poisson log-likelihood for projection data were incorrect when the forward projection of the "input" contains negatives. We now detect this and throw an error if it occurs. A proper fix will have to be for later.
See Issue #1461
Build system
- C++-17 is now required.
- Force C++ version according to CERN ROOT versions: ROOT 6.28.10 needs C++17 and 6.30.2 needs C++20. Also some fixes when relying on
root-config. - Optionally enable CUDA as a CMake language (for the CUDA RDP). You should use CMake 3.23 or later if you use CUDA. If you have the CUDA Toolkit but an old version of CMake that you cannot update, you will have to set
DISABLE_STIR_CUDAtoON.
Known problems
See our issue tracker.
What is new for developers (aside from what should be obvious from the above):
Changed functionality
-
Arrayclasses by default use contiguous memory allocation (as opposed to a sequence of 1D vectors). This could speed up memory allocation and destruction of arrays with a high number of underlying 1D vectors. It also allows reading/writing data in one call to the C++ library, as opposed to many small calls. Also added move constructors to theArray,VectorWithOffsetclasses.
PR #1236 and PR #1438.
Bug fixes
-
PoissonLogLikelihoodWithLinearModelForMeanAndProjDatahad a (minor?) problem with TOF data that when computing the gradient, the normalisation object was not set-up with the TOF data, but non-TOF instead. This did not happen in our normal reconstruction code, and would have thrown an error if it occured.
Fixed in PR #1427.
Other code changes
- Fixed an incompatibility with C++20.
- Enabled OpenMP for
Arraymembersfind_max(), find_min(), sum(), sum_positive().
PR #1449. - Changes to allow reading Siemens Biograph Vision data: iSSRB and SSRB are now included in the SWIG interface; minor changes to a shell script altering e7tools headers.
Test changes
C++ tests
- Objective functions (both projection-data and list-mode) and priors now have a numerical test for
accumulate_Hessian_times_input
PR #1418
recontestpack
- The output of
simulate_PET_data_for_tests.shcan now be varied by setting environment variables, e.g.max_rd. (Do not forget to unset those variables afterwards!) - New test
run_test_SSRB.sh
New Contributors
- @Imraj-Singh made their first contribution in https://github.com/UCL/STIR/pull/1408
Full Changelog: https://github.com/UCL/STIR/compare/rel6.1.0...rel6.2.0
- C++
Published by KrisThielemans over 1 year ago
stir - v6.1.0
Summary of changes in STIR release 6.1
This version is 100% backwards compatible with STIR 6.0 for the user, except for the bug-fix in the RDP (see below).
Overall summary
This version adds capability of using Parallelproj (CPU and GPU versions) for TOF data. In addition, the list-mode objective function has several improvements, including speed-up by using multi-threading if caching was not enabled.
Of course, there is also the usual code-cleanup and improvements to the documentation.
This release contains mainly code written by Nicole Jurjew (UCL) and Kris Thielemans (UCL).
Summary for end users (also to be read by developers)
New functionality
- Add TOF capability of the parallelproj projector (see PR #1356)
- It is now possible to read TOF bin order from the interfile header (see PR #1389)
PoissonLogLikelihoodWithLinearModelForMeanAndListModeDataWithProjMatrixByBincan now compute the value as well asaccumulate_Hessian_times_input. PR #1418GeneralisedObjectiveFunctionhas 2 new members to compute the full gradient (compute_gradientand computegradientwithout_penalty`). Previously, only subset gradients were available. PR #1418
Changed functionality
PoissonLogLikelihoodWithLinearModelForMeanAndListModeDataWithProjMatrixByBinnow computes the gradient multi-threaded (if OpenMP is enabled), even if caching to file of the list-mode file is not enabled. PR #1418- Accumulation in computation of priors now uses doubles, which could result in slightly better precision. Part of PR #1410.
Bug fixes
- The Relative Difference Prior gave incorrect results, probably since switching to C++-14 in version 6.0, although we are not sure. See PR #1410 and associated issue #1409.
- Our checks for determining system byte-order were out-of-date and in particular did not work on MacOS 14 on ARM. We now use CMake's
CMAKE_CXX_BYTE_ORDER(available since CMake 3.20). This could potentially affect reading of list-mode data (which would otherwise be garbled). Fixed in PR #1412. - The listmode objective function did not loop over TOF bins when computing the Hessian. This would give different results in OSSPS for computing the "denominator". Fixed in issue #1427.
Known problems
See our issue tracker.
What's new for developers (aside from what should be obvious from the above):
Backward incompatibities
- Additional checks on
GeometryBlocksOnCylindricalscanner configuration, which may lead to an error being raised, while previously the code silently proceeded.
Bug fixes
PoissonLogLikelihoodWithLinearModelForMeanAndProjDatahad a (minor?) problem with TOF data that when computing the gradient, the normalisation object was not set-up with the TOF data, but non-TOF instead. This did not happen in our normal reconstruction code, and would have thrown an error if it occured. Fixed in issue #1427.
Other code changes
- Fixes an incompatibility with C++20.
Build system
- Force C++ version according to CERN ROOT versions: ROOT 6.28.10 needs C++17 and 6.30.2 needs C++20. Also some fixes when relying on
root-config.
Test changes
C++ tests
- Objective functions (both projection-data and list-mode) and priors now have a numerical test for
accumulate_Hessian_times_input
PR #1418
Full Changelog: https://github.com/UCL/STIR/compare/rel6.0.0...rel6.1.0
- C++
Published by KrisThielemans almost 2 years ago
stir - v6.0.0
Summary of changes in STIR release 6.0
This version is 99% backwards compatible with STIR 5.x for the user (see below). Developers might need to make code changes as detailed below. Note though that the locations of installed files have changed. Developers of other software that uses STIR via CMake will therefore need to adapt (see below).
Overall summary
This release is a major upgrade adding Time of Flight (TOF) capabilities to STIR.
This version has a major code-cleanup related to removing old compiler work-arounds, consistent use of override and white-space enforcement.
Overall code management and assistance was Kris Thielemans (UCL and ASC). Other main contributors include: Nikos Efthimiou (UCL, University of Hull, UPenn, MGH) for the TOF framework and list-mode reconstruction, Elise Emond (UCL) for adapting TOF framework for projection-data, Palak Wadhwa (University of Leeds) for adaptations and testing on GE Signa PET/MR data, Robert Twyman for extending projector symmetries to TOF and formalising ROOT-based testing, Nicole Jurjew (UCL) for adaptations and testing on Siemens Vision 600 data. Non-TOF contributors include Daniel Deidda (NPL) and Markus Jehl (Positrigo).
Patch release info
- 6.0.0 released 07/02/2024 GitHub Milestone 6.0
Summary for end users (also to be read by developers)
Changes breaking backwards compatibility from a user-perspective
General
- When parsing Interfile headers for projection data and the
originating systemis not recognised, the previous version of STIR tried to guess the scanner based on the number of views or rings. This was using very old scanners though, and could lead to confusion. These guesses have now been removed. - (deprecated) support for the GE VOLPET format (an old format used by the GE Advance and Discover LS sinograms when using "break-pointing") has been removed.
- (deprecated) support for the AVW format via the (very old) AnalyzeAVW commercial library has been removed.
Most installed files are now in versioned directories. The following shows the new and old locations relative to
CMAKE_INSTALL_PREFIX, whereV.vindicates the major.minor version number, e.g.6.0:- documentation (including
examplesas subfolder):share/doc/STIR-V.v(wasshare/doc/stir-V.v) JSON files with radionuclide database:
share/STIR-V.v/config(wasshare/stir/config)Developers also need to check the new location to use for
STIR_DIRdocumented below.
- documentation (including
ProjDataInfo::ask_parameters()and thereforecreate_projdata_templatehas changed:- If the scanner definition in STIR has TOF capabilities, it will ask for the TOF mashing factor.
- The default for arc-correction has changed to N, i.e.
false. - Default value for span is now 11 for Siemens and 2 for GE scanners.
- The span=0 case (i.e. span-3 for segment 0, span=1 for oblique ones, erroneously by STIR used for the GE Advance) is no deprecated. GE uses span=2. (Reading a "span=0" case is still supported)
Projection-data related classes have accessors with an optional
make_num_tangential_poss_oddargument (defaulting tofalse), which made the returned argument a different size. This has been deprecated since version 5.0. Setting this argument totruewill now raise an error.
Python (and MATLAB)
- renamed
FloatLORtoLOR, and same for derived classes.
New functionality
TOF related
The new TOF support is mostly transparent, i.e. normally no changes are required to the reconstruction code etc. When using Interfile or ROOT files, certain new keywords are required, see examples/samples/PETTOFInterfileheaderSigna_PETMR.hs and examples/samples/root_header.hroot. See also the updated STIR_glossary. Please cite the following papers:
- Efthimiou, N., Emond, E., Wadhwa, P., Cawthorne, C., Tsoumpas, C., Thielemans, K., 2019. Implementation and validation of time-of-flight PET image reconstruction module for listmode and sinogram projection data in the STIR library. Phys Med Biol 64, 035004. DOI: 10.1088/1361-6560/aaf9b9.
- Wadhwa, P., Thielemans, K., Efthimiou, N., Wangerin, K., Keat, N., Emond, E., Deller, T., Bertolli, O., Deidda, D., Delso, G., Tohme, M., Jansen, F., Gunn, R.N., Hallett, W., Tsoumpas, C., 2021. PET image reconstruction using physical and mathematical modelling for time of flight PET-MR scanners in the STIR library. Methods, Methods on simulation in biomedicine 185, 110–119. DOI: 10.1016/j.ymeth.2020.01.005
See also the (enormous) PR #304.
Limitations
- Currently on the
matrixbased projectors support TOF. Note that the implementation is generic but slow: a non-TOF row is computed and then multiplied with the TOF kernel. This is somewhat alleviated by the use of caching. However, as not all symmetries are supported yet, caching of the projection matrix needs substantially more memory than in the non-TOF situation. - We do not have TOF scatter simulation/estimation yet.
Non-TOF updates
- Radionuclide information is read from Interfile and GE HDF5 headers. If the radionuclide name is recognised to the STIR database, its values for half-life etc are used, as opposed to what was recorded in the file (if anything).
-
list_lm_eventsnow has an additional option--event-binwhich lists the bin assigned for the event (according to the "native" projection data, i.e. without any mashing). In addition, the--event-LORoption now also works for SPECT (it was disabled by accident). -
stir_list_registriesis a new utility that list possible values of various registries, which can be useful to know what to use in a.parfile. - Radionuclide database now has a datasource entry with the radionuclide decay table (lnHB ). This makes it traceable to standardised measures of branching ratios, half lives etc. The change is backward compatible and old format is still supported. However we encourage to use the new one, see src/config/radionuclide_info.json.
Python (and MATLAB)
- exposed
ProjMatrixByBinPinholeSPECTUBPR #1366 - PR #1288
- exposed
ListRecordetc, such that loops over list-mode data can now be performed in Python (although this will be somewhat slow). See examples/python/listmode_loop_demo.py. - added
LORAs2Points,LORInCylinderCoordinates,LORInAxialAndSinogramCoordinatesandPointOnCylinder. Warning: renamedFloatLORtoLOR, and same for derived classes.
- exposed
- add
DetectionPositionPair.__repr__for printing and change order of text inDetectionPosition.__repr__to fit with constructor to avoid confusion. PR #1316
Changed functionality
- We now always check (in
ProjDataInfo*NoArcCorr) if number of tangential positions in the projection data exceeds the maximum number of non arc-corrected bins set for the scanner. If it is, an error is raised. You might therefore have to adapt your interfile header. - Interfile header changes:
- Write
STIR6.0as Interfile keyversionto denote TOF changes. This is currently ignored for parsing though. - (PET) The
effective central bin size (cm)keyword for projection data is now only used for arc-corrected data. It is no longer written to the header for non-arccorrected data.
- Write
Build system
- CMake version 3.14 is now required.
- C++-14 is now required.
In fact, it is possible that C++-11 still works. If you really need it, you can try to modify the main
CMakeLists.txtaccordingly. -
STIR_CONFIG_DIRis no longer a CMake cached variable, such that it automatically moves along withCMAKE_INSTALL_PREFIX. However, if you are upgrading an existing STIR build, you might have to delete the cached variable, or it will point to the old location.
Bug fixes
- Interfile parsing no longer gets confused by the use of
:in a keyword (e.g., used by Siemens for dates). PR #1267
Known problems
See our issue tracker.
Documentation changes
- Added (some) documentation on TOF features
- Added
examples/C++/using_installed_STIRto illustrate how to use STIR as a "library". - Renamed
examples/C++/srctoexamples/C++/using_STIR_LOCAL.
New deprecations for future versions
- CMake option
STIR_USE_BOOST_SHARED_PTRwill be removed. It probably no longer works anyway. Thereforestir::shared_ptrwill always bestd::shared_ptr. - Direct X-windows display (corresponding to the CMake option `GRAPHICS=X`) will be removed. It is very outdated and sometimes doesn't work.
- remaining files for ECAT6 support will be removed.
What's new for developers (aside from what should be obvious from the above):
White-space and style enforcement
- We now use
clang-formatto enforce C++-style, including white-space settings, line-breaks etc. This uses the.clang-formatfile in the root directory of STIR. Developers should configure their editor encordingly, and ideally usepre-commit. It also has consequences for existing branches as you might experience more conflicts than usual during a merge. More detail is in documentation/devel/README.md. PR #1368.
Backward incompatibities
ListModeDatanow has ashared_ptr<const ProjDataInfo> proj_data_info_sptrprotectedmember, and thescanner_sptrmember has been removed. Warning: If your derived class had its ownproj_data_info_sptr, it should be removed.virtual ListModeData::get_scanner_ptr()is replaced byListModeData::get_scanner().ProjDataInfo*NoArcCorr::get_bin_for_det_pairis now private. Useget_bin_for_det_pos_pairinstead.The
GeneralisedObjectiveFunctionhierarchy now has aalready_set_upmember variable that needs to be set tofalsebyset_*functions and checked by callers.(deprecated) members/functions have been removed
-
BinNormalisation::undoandapplymembers that take explicit time arguments -
extend_sinogram_in_views,extend_segment_in_viewsandinterpolate_axial_position
-
As mentioned above, installation locations are now versioned. New locations that could affect developers that use STIR as an external project:
- include files:
include/STIR-V.v(wasinclude). This should be transparant if you usefind_package(STIR). - CMake exported
STIRConfig.cmakeetc:lib/cmake/STIR-V.v(wasshare/lib). The CMake variableSTIR_DIRshould now be set to<STIR_CMAKE_INSTALL_PREFIX>/lib/cmake/STIR-V.v. However, this new location increases chances thatfind_packagefinds STIR as it follows conventions better. For instance, STIR can now by found byfind_packagewhen settingCMAKE_PREFIX_PATHto what was used forCMAKE_INSTALL_PREFIXwhen installing STIR (indicated asSTIR_CMAKE_INSTALL_PREFIXabove). Moreover, if you use the sameCMAKE_INSTALL_PREFIXfor your project as for STIR, you shouldn't need to setSTIR_DIRnorCMAKE_PREFIX_PATH.
- include files:
New functionality
TOF related
-
Scannernow allows storing TOF information. This is currently not yet done for all TOF-capable scanners though. Contributions welcome! All projection-data related classes and their members now have a TOF bin index and related information. At present, old-style accessors are in an awkward format such as
auto sino = proj_data.get_sinogram(ax_pos_num, segment_num, false, timing_pos_num);These are deprecated since version 5.2 and should be replaced by
const SinogramIndices sinogram_idxs{ax_pos_num, segment_num, timing_pos_num}; auto sino = proj_data.get_sinogram(sinogram_idxs);List-mode data for TOF-capable scanners need to pass the relevant information through appropriately of course.
Non-TOF related
- Projectors now have a
clone()member, currently returning a bare pointer (like other STIR classes). -
Bincan now be output to stream as text. - Added
RunTests::check_if_equalforBin. -
KeyParserhas a new facility to add an alias to a keyword. This can be used to rename a keyword for instance while remaining backwards compatible. By default, a warning will be written, but this can be disabled.
Changed functionality
TOF related
-
ProjDataInfoCylindricalNoArcCorr::get_all_det_pos_pairs_for_binis in most places intended to return the physical locations. However, a `DetectionPositionPair` also contains (unmashed) TOF bin information. This will be further complicated once energy windows are supported. The method therefore has an extra boolean argumentignore_non_spatial_dimensions, which defaults totrue. -
multiply_crystal_factorsis essentially a non-TOF calculation. When given TOF projection data, it will "spread" the non-TOF result equally over all TOF bins. This is also appropriate forrandoms_from_singles.
Code clean-up
- Clean-up of various work-arounds such as
STIR_NO_NAMESPACES,STIR_NO_MUTABLE,BOOST_NO_TEMPLATE_SPECIALIZATION,BOOST_NO_STRINGSTREAMand various items specifically for VC 6.0. - Consistently use
overridein derived classes, viaclang-tidy --modernize-use-override.
Test changes
recon_test_pack changes
- additional tests for TOF, expansion of some existing tests for TOF
- updated version number and added some clarification to the README.txt
C++ tests
- additional tests for TOF, expansion of some existing tests for TOF
- C++
Published by KrisThielemans about 2 years ago
stir - v5.2.0
Summary of changes in STIR release 5.2.0
This version is 100% backwards compatible with STIR 5.0 as far as usage goes. However, there are changes in the output of scatter estimation and ECAT8 normalisation, see below for more information.
Overall summary
Of course, there is also the usual code-cleanup and improvements to the documentation. See also the 5.2 milestone on GitHub.
Overall code management and assistance by Kris Thielemans (UCL and ASC). Other main contributors were Daniel Deidda (NPL) and Markus Jehl (Positrigo).
Patch release info
- 5.2.0 released 30/10/2023
Summary for end users (also to be read by developers)
Bug fixes
- Scatter estimation was setting initial activity image to 1 at set-up, effectively ignoring the initial image, aside from geometric info.
- Setting SPECTUB resolution model with STIR python or SIRF divided slope by 10 in error. The problem did not occur when set using parameter file
Changed functionality
- The ECAT8 normalisation (used for the Siemens mMR) code now takes the 4th component axial effects into account. These normalisation factors are therefore different (even up to ~10%). This gives improved axial uniformity in the images. The use of the axial effects can be switched off by adding setting
use_axial_effects_factors:=0to the parameter file (see an example inexamples/Siemens-mMR/correct_projdata_no_axial_effects.par), or the class member of the same name. In addition, the Siemens normalisation header is now read (using a new classInterfileNormHeaderSiemens) such that hard-coded variables for the Siemens mMR have been removed. Further testing of this functionality is still required however. PR #1182. - Interfile header parsing now correctly identifies keywords that contain a colon by checking for
:=. - The
set_up()method of the ray-tracing projection matrix now skips further processing if it was already called with data of the same characteristics. This will means that any cached data will be re-used, potentially leading to a speed-up when re-using it from Python. PR #1281.
New functionality
- The
Discretised Shape3Dshape/ROI has now an extra valuelabel index. For ROIs, this allows using a single volume with multiple ROIs encoded as labels, such as output by ITKSnap and many others. When used as a shape ingenerate_image, it could be used to extract a single ROI from such a label image. PR #1196. - Global variables in SPECTUB have been substituted by class members, such that multiple SPECTUB projectors can be used. PR #1169.
- Global variables in PinholeSPECTUB have been substituted by class members, such that multiple PinholeSPECTUB projectors can be used. PR #1212.
- Scatter estimation is now smoothed in axial direction for BlocksOnCylindrical scanners. PR #1172.
-
InverseSSRBnow works for BlocksOnCylindrical after a rewrite. PR #1172. / - Parallelised function
set_fan_data_add_gaps_helpacross segments to reduce computation time. PR #1168. - New utility
SPECT_dicom_to_interfilewhich reads a DICOM file with SPECT projection data and extracts the data and writes one or more Interfile 3.3 headers (still somewhat preliminary). PR #1182. - The new
stir_timingsutility is mostly useful for developers, but you could use it to optimise the number of OpenMP threads to use for your data. PR #1237. New classes
SegmentIndices,ViewgramIndicesandSinogramIndices, used byProjDatarelated classes, as opposed to having to specify all the elements directly, e.g. in C++auto sinogram = proj_data.get_sinogram(sinogram_indices);This makes these functions more future proof, in particular for TOF. The older functions are now deprecated. Note that as
Binis now derived fromViewgramIndices, instantations ofBincan now be used to specify the indices as well in most places. There is still more work to do here, mostly related to the symmetries. PR #1273.
Python (and MATLAB)
- Examples use
stir.ProjData.read_from_fileas opposed tostir.ProjData_read_from_file. The former is supported since SWIG 3.0, and the default from SWIG 4.1. - Addition of
DetectionPositionandDetectionPositionPair. -
bin.time_frame_numis now no longer a function in Python, but acts like a variable (as the otherBinmembers). - Addition of
RadionuclideDB
New examples
-
examples/python/construct_projdata_demo.pyillustrates constructing aProjDataInMemory
Changed functionality
- Scatter estimation was resetting the activity image to 1 before each iteration. This led to cases where the reconstructed image (and therefore the scatter estimation) did not converge, especially when using a small number of sub-iterations. Now, the reconstructed image is continuouslu updated between scatter iterations by default. This should also allow users to use less sub-iterations, therefore saving some time for the scatter estimation. The old behaviour can be re-enabled by setting
restart_reconstruction_every_scatter_iterationto true either via a parameter file or via theset_restart_reconstruction_every_scatter_iteration()function. PR #1160. - energy resolution functions and keywords have now more documentation.
Scanner::check_consistencyalso checks if the energy resolution is less than 20 (as it is FWHM/reference_energy). PR #1149. - Errors now throw
std::runtime_errorinstead ofstd::string. PR #1131. - The parameter
use_view_offsetwas removed from theinterpolate_projdatafunctions. View-offset is now always taken into account. PR #1172. - The info, warning and error calls are thread safe now (which makes them slower), and the logging output in
distributable.cxxwas changed from verbosity 2 (which is the STIR default) to verbosity 3. This is to reduce the default output during iterative reconstructions. PR #1243. - The
Succeededclass has a new methodbool succeeded()enabling more concise code (avoiding the need for comparing withSucceeded::yeswhich is especially verbose in Python). - The example files for the Siemens mMR now use lower min/max thresholds for the (single) scatter scale. This gives better results, see Issue #1163. PR #1279.
Deprecated functionality and upcoming changes to required tool versions
- The following functions (previously used for upsampling the scatter estimate) have been made obsolete or replaced, and will be removed in STIR version 6.0.0:
interpolate_axial_position,extend_sinogram_in_viewsandextend_segment_in_views - Constructors/functions in
ProjDatarelated classes that explicitly useaxial_pos_num,view_numetc in their arguments are now deprecated, and should be replaced by their respective versions that useSegmentIndices,ViewgramIndicesorSinogramIndices. The former will not be compatible with TOF information that will be introduced in version 6.0.0. - Use of the AVW library to read Analyze files will be removed in 6.0, as this has not been checked in more than 15 years. Use ITK instead.
- GE VOLPET and IE support will be removed in 6.0, as we have no files to test this, and it's obsolete anyway.
- STIR version 6.0.0 will require C++ 14 (currently we require C++ 11, but already support C++ 20) and CMake 3.14.
Build system and dependencies
- CMake 3.12 is now required on Windows.
- We now use CMake's OBJECT library feature for the registries. This avoids re-compilation of the registries for every executable and therefore speeds-up building time. Use of STIR in an external project is not affected as long as the recommended practice was followed. This is now documented in the User's Guide. PR #1141.
- The
errorandwarningfunctions are now no longer included fromcommon.hand need to be included manually when used (as was already the case for#include "stir/info.h"). PR #1192. - add .h and .i as dependencies for SWIG generated wrappers to make sure they get rebuild. (Currently adding all .h files, which is too much, but CMake needs a fix before we can do this properly). PR #1218.
Changes for developers
- moved all functionality in
CListEventCylindricalScannerWithDiscreteDetectorsto template classCListEventScannerWithDiscreteDetectors(templated inProjDataInfoT). This enables re-use for generic/blocksoncylindrical scanners. PR #1222. - rewritten
ProjDataInMemoryto avoid streams, causing a speed-up of some operations, and removing a limit of total size of 2GB. PR #1260.
Known problems
- See our issue tracker.
Minor (?) bug fixes
- Small change in scatter simulation to how non-arccorrected bins are computed. Added a check in the construction of non-arccorrected projdata that the number of tangential bins is not larger than the maximum non-arccorrected bins. PR #1152.
-
extend_segment_in_viewsdoes not handle view offsets correctly and does not work for BlocksOnCylindrical scanners issue #1177. A new functionextend_segmentwas added that works for Cylindrical and BlocksOnCylindrical and allows extension in tangential and axial direction as well. PR #1172. -
sample_function_on_regular_griddid not handle offset correctly in all places issue #1178. PR #1172. - Ray tracing projection for BlocksOnCylindrical scanner geometries contained a bug where some bins were swapped across oblique segments issue #1223. This sometimes lead to large artifacts in reconstructions. PR #1231.
Documentation changes
- Updated the STIR developers guide, which was quite out-of-date w.r.t. C++ features etc.
recon_test_pack changes
- Updated headers of most images and projection data to avoid warnings.
Other changes to tests
-
test_Scanner.cxxtests for energy resolution, PR #1149. - New file
test_interpolate_projdata, PR #1141.
- C++
Published by KrisThielemans over 2 years ago
stir - v5.1.0
Summary of changes in STIR release 5.1
This version is 100% backwards compatible with STIR 5.0.
Overall summary
- This release includes the first open-source code available for reconstructing pinhole-SPECT datasets (see PR #1100). It contains code by Carlés Falcón (Neuroimaging Group, Barcelonaβeta Brain Research Center) to create the pinhole-SPECT system matrix. Integration into STIR was completed by Matthew Strugari (Dalhousie University) and Kris Thielemans (UCL). This work is reported in
- Matthew Strugari, Carles Falcon, Kjell Erlandsson, Brian Hutton, G. Andrew Reid, Ian Pottie, Sultan Darvesh, Steven Beyea, Kimberly Brewer, Kris Thielemans, Integration of advanced 3D SPECT modelling for pinhole collimators into the open-source STIR framework, Proc. IEEE MIC 2022, Milan, Italy
- Improvements to listmode reconstruction by Nikos Efthimiou, see PR #1030.
- Support for PENNPET Explorer listmode data (if proprietary libraries are found) by Nikos Efthimiou, see PR #1028.
- Scatter simulation, estimation and down/up-sampling, randoms handling and ML normalisation estimation adapted for scanner with Block geometry by Daniel Deidda (NPL) and Kris Thielemans (UCL).
- Various small changes to add functionality to Python interface, mainly by Markus Jehl (Positrigo).
- Python projection data visualiser (in
examples/python) by Robert Twyman (UCL).
Of course, there is also the usual code-cleanup and improvements to the documentation. See also the 5.1 milestone on GitHub and the full release notes
Overall code management and assistance by Kris Thielemans (UCL and ASC).
- C++
Published by KrisThielemans about 3 years ago
stir - v5.0.1
bug-fix release - PR 1019: fixes for SWIG and hence Python interface. - PR #1012 and PR #1016: rotational changes to STIR's interface to ROOT files, breaking compatibility with 4.x (and 5.0.0 but this was broken). See below for more information. - PR #1026: various fixes to the radionuclide database code. WARNING: This PR changed the file format for radionuclide_info.json file to be more future proof.
- C++
Published by KrisThielemans over 3 years ago
stir - v5.0.0
This version is 95% backwards compatible with STIR 4.0 for the user (see below). Developers might need to make code changes as detailed below.
Overall summary
- At least C++-11 is now required. We are not aware of any problems with more recent versions of C++.
- Initial support for PET scanners with block detectors or even generic location of detectors (less tested feature), taking into account appropriate geometry. This is currently kept independent of the cylindrical scanner modelling used normally, but this will be changed in a future version. See PR #577. This work is described in P. Khateri, J. Fischer, W. Lustermann, C. Tsoumpas, and G. Dissertori, Implementation of cylindrical PET scanners with block detector geometry in STIR, EJNMMI Physics, vol. 6, no. 1, p. 15, Jul. 2019, doi: 10.1186/s40658-019-0248-9. V. Dao, E. Mikhaylova, M. L. Ahnen, J. Fischer , K. Thielemans, C. Tsoumpas, Image Reconstruction for PET Scanners With Polygonal Prism Geometry Using STIR, proc. IEEE MIC 2021 This code was initially developed by Parisa Khateri and Michael Roethlisberger (ETH), and further improved and tested by Viet Dao (Leeds), Daniel Deidda (NPL) and Kris Thielemans (UCL and ASC) with funding by the University of Leeds and Positrigo AG.
- View Offset Support enabled for the PET scanners, contributed by Palak Wadhwa (Leeds Univ), allowing fixing rotation of reconstructed images, see PR 181.
- Maximum Likelihood estimation of normalisation factors now includes estimation of geometric factors in 3D, see PR 619. This code was mostly contributed by Tahereh Niknejad (work completed at University of Lisbao, Portugal and PETsys Electronics, together with Kris Thielemans, UCL), as well as capabilities to work with virtual crystals, see PR 833 and PR 949. See the following proceedings for the initial work Tahereh Niknejad, Stefaan Tavernier, Joao Varela, and Kris Thielemans, Validation of 3D Model-Based Maximum-Likelihood Estimation of Normalisation Factors for Partial Ring Positron Emission Tomography In 2016 IEEE Nuclear Science Symposium, Medical Imaging Conference and Room-Temperature Semiconductor Detector Workshop (NSS/MIC/RTSD), 1–5. DOI: 10.1109/NSSMIC.2016.8069577.
- A new
ProjDataInfoSubsetByViewclass has been implemented which allows for subsets of projection data. Previously, subset projections could only be stored in fully sampled ProjData. This is still possible, the implementation is backward compatible, and subset reconstructions such as OSMAPSOL have not been changed. However, there is now an option to create subsets withProjData::get_subsetwhich only store a subset of views and so are more memory efficient when subsets might be handled separately.ProjDataInfoSubsetByViewcurrently does not support file I/O. -
ROOTfiles produced byGATEcan now be interpreted using "virtual crystals", see PR #617. - A calibration factor can be applied in the normalisation with a new
BinNormalisationderived classBinNormalisationWithCalibration; Interfile now reads/writes isotope name and calibration factor. See PR 672. This code was contributed by Daniel Deidda (NPL) and Kris Thielemans (UCL) - Radionuclide information is saved into a JSON configuration file for a number of popular radionuclide for PET and SPECT. This can make operations like decay correction easier and accurate. To be able to use the database we need to provide the isotope name used in the acquisition. For SPECT this is extracted from the Dicom header and saved in the interfile. For PET ways to read this information need to be implemented for each scanner/vendor. The new classes are new
RadionuclideandRadionuclideDB; This code was contributed by Daniel Deidda (NPL) and Kris Thielemans (UCL) - KOSMAPOSL (HKEM) allows now to freeze the iterative part of the kernel at a specific subiteration. Code contributed by Daniel Deidda (NPL), Kris Thielemans (UCL) and Ashley Gillman (CSIRO)
- It is now possibly to call the Georg's Schramm parallelproj projectors (using either OpenMP or CUDA), see PR 817, contributed by Kris Thielemans (UCL) with Georg Schramm (KUL).
- OpenMP loop scheduling changed to use
dynamicinstead ofruntime, resulting in faster performance.
Of course, there is also the usual code-cleanup and improvements to the documentation.
This release contains mainly code written by Kris Thielemans (UCL), Richard Brown (UCL), Parisa Khateri and Michael Roethlisberger (ETHZ), Robert Twyman (UCL), Daniel Deidda (NPL), Tahereh Nikjenad (PETsys), Palak Wadhwa (Univ of Leeds), Viet Ahn Dao (Univ of Leeds), Ashley Gillman (CSIRO), Georg Schramm (KUL), Markus Jehl (Positrigo), Gefei Chen (Univ of Macao)
Summary for end users (also to be read by developers)
Changes breaking backwards compatibility from a user-perspective
View Offset Support enabled for the PET scanners.
- For the scanners that have non-zero intrinsic azimuthal tilt angle, reconstructed images will now get rotated.
- If you use view mashing, in previous STIR versions images were rotated according to half the number of mashed views. This is now corrected.
WARNING This means that reconstructed PET images will not be identical when either the scanner has non-zero view-offset, or view-mashing is on. To reflect this change,
Scanner::get_default_intrinsic_tilt()has been renamed toget_intrinsic_azimuthal_tilt(). Note: start angle was already supported for SPECT Backward compatibility for reconstructed images can be achieved by setting theSTIR_LEGACY_IGNORE_VIEW_OFFSETCMake option toON. (However, copied sinogram data will then always have the offset set to 0, in contrast to earlier versions of STIR).PoissonLogLikelihood Hessian methods have been corrected to reflect the concavity of the function. Hessian vector products now return non-positive voxels, if the vector (input) is non-negative. STIR usages of these methods (OSSPS and SqrtHessianRowSum) have been updated to see no effective change in functionality. However, calling the Hessian vector product methods, via python etc., will result in a change in functionality as the sign of the output voxel values has changed.
Python/MATLAB wrappers no longer have
ProjDataInfo::ProjDataInfoCTI, useProjDataInfo::construct_proj_data_infoinstead. However, this now returns an object of the appropriate (derived) type as opposed to justProjDataInfo. This should be transparent, except apparently for testing equality of objects.
Bug fixes
- There was an inconsistency between log-likelihood function and its gradient when
use_subset_sensitivitieswas false andnum_subsetsgreater than 1. Fixing this isssue means that images reconstructed withOSSPSare different from previous versions of STIR when the above conditions are met. See Issue #873 and associated PR #893. - Parametric image reconstruction with
POSMAPOSLcould lead to zeroes being introduced gradually during reconstruction. See Issue #906 and associated PR #978.
New functionality
Capability to model block and generic PET detectors was added. This is currently limited to span=1, no view mashing and the ray-tracing matrix (single LOR). It is enabled by specifying appropriate keywords in the Interfile header of the projection data.
Scanner parameters:= normal parameters... Scanner geometry (BlocksOnCylindrical/Cylindrical/Generic) := BlocksOnCylindrical Distance between crystals in axial direction (cm) := 0.22 Distance between crystals in transaxial direction (cm) := 0.22 Distance between blocks in axial direction (cm) := 0.22 Distance between blocks in transaxial direction (cm) := 3.3 end scanner parameters:=Scatter and normalisation code are still pending changes.
Georg's Schramm parallelproj is an implementation of the Joseph algorithm for projection. If it has been installed in your system, and you tell CMake where to find it (`parallelproj_DIR=/wherever/lib/cmake`), the STIR user is now able to select an additional projector, called
Parallelproj. This will use the CUDA version if available, otherwise will fall-back to the OpenMP version. Check the new sample files inexamples/samplesand the section in the User's Guide.The (still preliminary) code for Maximum Likelihood estimation of normalisation factors now includes estimation of geometric factors in 3D as well
The (also preliminary)
ProjDataInfoSubsetByViewis backwards compatible and allows a new, memory efficient method for subset projections. Subset projections are created with withProjData::get_subset, which is the only addition to theProjDataclass (additions are mostly in the aforementioned new Info class).ProjDataInfoSubsetByViewcan be used to set up projectors, which will project only the subset.ProjDataInfoSubsetByViewcurrently does not support file I/O. Therefore, the interface is not yet accessible through parameter files, only through C++ interface. PR #969calculate_attenuation_coefficientsutility now accepts an optional forward projection parameter file in the same format as theforward_projectutility. Example usage has been added tosrc/recon_test_pack/simulate_data.sh.ROOTfiles produced byGATEcan now be interpreted using ``virtual crystals", i.e. by inserting ``dummy" crystals before converting to cylindrical geometry (as is done on many Siemens scanners).LmToProjDataand list mode reconstructions will then put the LORs more accurately (at least when the ``virtual crystals" roughly correspond to gaps between blocks). See the update.hrootfile inexamples/samples. Warning: if you use theoriginating systemto specify the scanner, this will be automatically enabled. (If you do not want this, set it toUser_defined_scannerand specify all values). PR #617Moved most code from the
ctac_to_mu_values.cxxutility to a newHUToMuImageProcessorclass (derived fromDataProcessor. This allows combining it with filtering etc, also from in Python. It means that thectac_to_mu_values.cxxutility itself is now obsolete, but it still exists in this version. (Note that this functionality depends on an external JSON library.)Addition of a new utility
create_multi_headerwhich can be used to create a single header pointing to several files (e.g. one image per time frame). The header uses the (STIR-specific)multiformat.Addition of a new utility
extract_single_images_from_parametric_imageto get each parametric image in a single file.generate_imageparameter files now support theoriginating systemkeyword.list_image_infonow works for dynamic images, with a new--per-volumeoption to list min/max/sum for every volume.SSRBnow has the option of taking a template sinogram.KOSMAPOSL(HKEM) allows now to freeze the iterative part of the kernel at a specific subiteration. This can be set in the parameter file through the keywordfreeze_iterative_kernel_at_subiter_numBinNormalisationWithCalibrationis a new class derived fromBinNormalisation. This class allows to apply calibration factor from the scanner and save the information into the interfile header. To use this, a specific BinNormalisation class should be derived from BinNormalisationWithCalibration, the information about the calibration factor read, and the function get_uncalibrated_bin_efficiencies() needs to be overwritten. Note that also the isotope name and branching ratio can be set here (the latter will need to be set according to the isotope by reading into a radionuclide database, see below). BinNormalisationSPECT already reads Calibration factor and isotope name and apply the calibration factor read from interfile. Since not all SPECT scanner do quantitative reconstruction an option of setting the calibration factor from the parameter file is added. Factors for BinNormalisationECA8/ECAT7 and GEHDF5 are set to one at the moment as we need to double check on the meaning of cross calibration factor for ECAT and find out how to read them for GEHDF5. Documentation for this is pending and will be added in the following PR.Radionuclideis a new class which contains radionuclide information such as halflife, branching ratio, energy etc. This class allows to propagate infrmation trough the reconstruction as it is now a member in theExamInfo. It is populated from the information extracted fromRadionuclideDBwhich allows to create a Radionuclide object from the information stored in theradionuclide_info.jsonin the STIR configuration directory. Different vendors, as we saw with SPECT, may have different standards for the isotope name. Three different ones were observed, therefore a lookup table has been added to allow the use of the data base for any different isotope name format. The lookup table is a JSON file stored inradionuclide_names.json.Logcosh Prior.
SAFIR input file format now supports a Gaussian LOR randomization, which is applied on the endpoints of each LOR when sorting the listmode events into virtual scanner projection data.
Scannerhas now a newstaticmemberget_names_of_predefined_scannersreturning a list of names.Exposed
compute_total_ROI_valuesandROIValuesto Python/MATLAB via swig. Added python exampleROI_demo.pyto demonstrate usage.Additional C++ demo demonstrating the use the objective function and gradient ascent optimisation, see
examples/src/demo4_obj_fun.cxx.A few functions related to TOF were added to
ProjDataInfoandScannerfor future compatibility. However, this release still does not support TOF. (Check the GitHub site for the relevant PR).Exposed
BinNormalisation,ListModeData,LmToProjData,ProjectorByBinPair,ScatterSimulation,ScatterEstimationand a couple of support classes and functions to Python/MATLAB via swig. Added python examplelistmode_demo.pyto demonstrate usage.More setter functions on ScatterEstimation.
Changed functionality
- OpenMP loop scheduling changed to use
dynamicinstead ofruntime. On some machines, this was causing slower projection operations due to astaticscheduler being selected by default. See Issue #935 for more details. - Many operations with
ProjDataInMemoryare now much faster (it now uses an underlying 1D array). -
ParametricDiscretisedDensityobjects can now have anExamInfoobject with multiple time frames (corresponding to the time frames of the data where the parametric image is derived from). In some cases, there could only be a single time frame (start to end of the study). -
find_ML_normfactors3Dandapply_ML_normfactors3Dcan be used for scanner with virtual crystal (Only verified on mCT). Contributed by Gefei Chen, see PR 833. - If there are multiple buckets specified in the interfile header, we increase the symmetry size to a bucket in the
find_ML_normfactors3D. Otherwise, we use a block. The use of an argument--for-symmetry-per-blockin thefind_ML_normfactors3Dutility will use the symmetry size of a block. -
apply_patlak_to_imagesno longer uses an existing file as a template for the dynamic image but will overwrite it. -
ROOTfile I/O improvements. An entire entry's tree is no longer loaded by default and instead individual branches are loaded as needed. ROOT file event processing is now up to 4x faster. In addition, there is now an option tocheck energy window information(defaulting to on). Futhermore, added functionality to exclude true and unscattered event types from list mode processing.
Build system
- We now require CMake at least version 3.1, although we highly recommended to use a very recent version of CMake to avoid problems with libraries or compilers which are more recent than your CMake version.
- At least C++-11 is now required. We are not aware of any problems with most recent versions of C++. When building, you can change the C++ version by setting
CMAKE_CXX_STANDARD, see the CMake documentation for supported values. When importing STIR'sSTIRConfig.cmakeviafind_package(STIR), your compiler will be set to use at least C++-11 (via CMake'starget_compile_features). Note that some external libraries that STIR depends on (such as ROOT) might increase the required C++ version, depending on how they were built. - CERN's
ROOTlibrary is now preferentially found by searching for its own exportedROOTConfig.cmake. Set the CMake variableROOT_DIRaccordingly. Older behaviour relying onROOTSYSandroot-configwill be deprecated in a future version. - If you have CMake 3.14 or more recent, Python is found using the FindPython module, as opposed to the deprecated FindPythonLibs. FindPythonInterp modules. You can set the
Python_EXECUTABLEvariable to a particular version (see the CMake doc for other hints you can provide).( If the oldPYTHON_EXECUTABLEis set, we use it to initialisePython_EXECUTABLE).
Known problems
Minor bug fixes
- Removed boolean state from SAFIR ListMode factory, to enable reading more than one listmode file in the same runtime environment.
Documentation changes
- Added documentation on new features
- Also check the wiki in addition to the provided PDFs.
recon_test_pack changes
- updated version number and added some clarification to the README.txt
- moved the
src/recon_test/test_modelling.shand associated input files to therecon_test_pack. It is also modified to be independent of ECAT7 and now runs again.
Other changes to tests
- expanded
test_proj_data_in_memoryto also testProjDataInterfileso renamed the test totest_proj_data.
What's new for developers (aside from what should be obvious from the above):
Major bugs fixed
- see above
Backward incompatibities
- Classes that use
InterfilePDFSHeadernow contain ashared_ptr<ProjDataInfo>instead of a raw pointer, removing a memory leak. - Changes improving safety of use of
shared_ptr: In the previous version of STIR, the use ofshared_ptrallowed unsafe access to the objects (although this never happened in distributed STIR code). We now prevent this with changes to the class interface (although there is still work to do):- Where possible, classes that internally contained a
shared_ptr<ProjDataInfo>now contain ashared_ptr<const ProjDataInfo>, and similar forDiscretisedDensity -
get_proj_data_info_sptrused to returnshared_ptr<ProjDataInfo>, but now returnsshared_ptr<const ProjDataInfo>, similar forExamInfo. - Corresponding constructors and some functions, including
set_up, that acceptshared_ptrnow take ashared_ptrto aconstobject.
- Where possible, classes that internally contained a
-
ProjData*::copy_toandfill_fromnow return the updated iterator (as opposed to the size). This is likestd::copy, and more convenient for reusing it. -
ModelMatrix::set_if_uncalibratedandModelMatrix::get_if_uncalibratedrenamed toModelMatrix::set_is_uncalibratedandModelMatrix::get_is_uncalibrated -
PlasmaData::set_if_decay_correctedandPlasmaData::get_if_decay_correctedrenamed toPlasmaData::set_is_decay_correctedandPlasmaData::get_is_decay_corrected - Remove overloaded
PatlakPlot::get_model_matrix, now it can only be called using class members -
BinNormalisation::set_up()now need exam_info_sptr as input. -
BinNormalisation::apply()andundonow no longer accept start_time and end_time as they are taken from exam_info. To allow this to happen, classBinhas now an extra membertime_frame(). Note that it defaults to 1. If this is incorrect, it has to be initialised explicitly (not via a constructor). - Poisson log-likelihood hierarchy has changed for gradient methods to now use
actual_compute_subset_gradient_without_penaltyin the derived classes (which has an extra argumentadd_sensitivity). Therefore developers that created their own derived class will need to adjust their class accordingly. Thepublicclass interface is identical though. -
DetectorCoordinateMapFromfile(used by SAFIR listmode files) has been renamed toDetectorCoordinateMapand moved fromlistmodetobuildblock. -
Scannernow has aset_up()function. This needs to be called after using any of theset_*()functions (exceptset_params). For the blocks/generic scanners, this will fill in the detector maps etc. You will get a run-time exception if you forgot to do this.
New functionality
- New templated functions
stir::copy_toandstir::fill_frominstir/copy_fill.hwhich can be used to fill most STIR objects from an iterator range (or copy to). The functions normally usestir_object.begin_all()but resort tostir_object::fill_fromorcopy_tofor a few cases where no iterators exist. We use some specialisations to try and find the fastest version. - Introduced
ProjData::standard_segment_sequencefunction returning0,+1,-1,..., as used bycopy_toandfill_from stir::read_from_filecan now be called with a "node", e.g.auto uptr = read_from_file<VoxelsOnCartesianGrid<float> >(filename);
; To do this, we now need a typedef hierarchy_base_type at the top level, as otherwise we would need multiple registries. However, this was already required by write_to_file anyway.
-
GeneralisedPriorandQuadraticPriorhave a new methodaccumulate_Hessian_times_input(output, current_estimate, input). This computes the hessian of the prior at thecurrent_image_estimateand multiplies this byinput. Before this, theadd_multiplication_with_approximate_Hessian(output, input)method was used that assumed a quadratic function and thereforehessian = 1. -
Exam_info,TimeFrameDefinitionandPatientPositionhave now a==operator - Overloaded
compute_total_ROI_valuesandcompute_ROI_values_per_planefunctions to allow the passing of aVoxelsOnCartesianGridobject instead of aShape3Das the ROI shape. This allows the ROI volume to be constructed during preprocessing for multiple image analysis. -
KeyParser::parameter_info()now outputs vectorised keys as well -
DetectionPositionnow has all comparison operators. -
LORclasses now no longer require phi at input to be between 0 and pi, nor psi to be between 0 and 2 pi. They will standardise the input automatically.
Other code changes
- store data in
ProjDataInMemoryin the same order as what is used bycopy_toandfill_from. This enabled using straight-forward copy. (This change should not affect anyone, except if you relied on a specific order in the buffer before.)
- C++
Published by KrisThielemans almost 4 years ago
stir - v4.1.0
These notes only describe a summary of the changes. Please check documentation/release_4.1.htm
New functionality
- Almost all modifications and additions since version 0.92 in 2001 are now licensed under the Apache 2.0 license as opposed to the (L)GPL.
- Reading of GE HDF5 data (GE fileformat RDF 9) for the GE Signa PET/MR and recent GE PET/CT scanners (but depending on their software version). We currently read listmode, sinograms and calibration files (except for the WCC (well-counter calibration) files). This code is TOF-ready, but TOF is not enabled pending merge of the TOF Pull Request. Therefore, all reconstructions will be non-TOF.
- Addition of the Relative Difference Prior [J. Nuyts, et al., 2002].
- Interfile and ITK image IO now understand some date/time fields. This required a change to our Interfile version specification to be able to handle time-zones. These can now be added via the same suffix as used by DICOM, e.g. 10:01:01.00+0130.
- NiftyPET's GPU projectors have been wrapped.
stir_mathnow supports the--output-formatoption for dynamic and parametric images as well. (An example file using the Multi format is given in the examples/samples folder).- Added a utility
list_lm_info- A new scriptcreate_fdef_from_listmode.shthat can be used to create a single-time frame definition file for a given listmode file. - Implementation of ax+by methods
xapybandsapybwhere a and b can be scalar or vector types. - The
LmToProjDatahierarchy has a new member functionset_up(), and moreset_*functions, such that it can be used without parsing.
Changed functionality
- Modification of log-likelihood computation to use more doubles, improving numerical stability, see PR 528.
- Reconstruction algorithms perform now more checks during setup() etc. However, this means that you have to call setup() also for analytic reconstruction algorithms. (This was already documented, but not yet enforced).
- copy energy information from the template in the forward_project utility.
- PET scatter improvements:
- the scatter estimation parsing now prefers specifying normalisation and attenuation via two separate keywords (as opposed to via a chained bin normalisation), (keyword normalisation type) and the attenuation factors. Check the updated sample file. The old parsing keyword Bin normalisation type will still work but is deprecated and will be removed in a future version.
- scatter estimation uses now more defaults such that you need to have less files.
ScatterEstimationhas now many moreset*functions such that most (all?) parameters can be set from C++/Python (i.e. without parsing).
- The
SinglesRateshierarchy has been revised. TheSinglesRatesclasses assumed that stored singles were rates but in practice were totals-per-time-interval (for both ECAT7 and RDF9). It is convenient to be able to access totals and rates, soSinglesRateshas nowget_singles(returning the singles in the time interval) andget_singles_rates(returning the rate per second). Due to the previous confusion, "client"-code will need to be adapted to use eitherget_singlesorget_singles_rate, depending on what is needed
- C++
Published by KrisThielemans almost 5 years ago