STIR
STIR copied to clipboard
`ML_estimate_component_based_normalisation` and `apply_norm_factors3D` cannot be used without saving to disk
These are executable files for computing normalization and a brief description of how they are implmented:
-
find_ML_normfactors3D
: callsML_estimate_component_based_normalisation
and the single function there. Additionally, the documentation inML_estimate_component_based_normalisation.h
is lacking. -
find_ML_normfactors
: implements much of the functionality in the main function. -
apply_normfactors3D
: implements things in the main function, at least is very short. -
apply_normfactors
: does the same asapply_normfactors3D
(code duplication?)
Most of the following pertains to find_ML_normfactors3D
and find_ML_normfactors
. The above functionality saves the computed data to be saved to disk, rather than returning/utilizing a shared_ptr.
The core functionality of these executables should be split into various components.
- The main function should handle only the arguments handling and saving data.
- Mostly, functions/classes that take the core arguments and compute/process the data.
- Can handle saving of the data, if specified by the arguments.
- Function/ object returns a pointer to the computed data, that can be saved by the main exe.
To implement this:
- The exe's need to maintain backwards compatibility.
- Replace the
ML_estimate_component_based_normalisation
function with a class/function.. - Allow member variables/argument to determine if data is saved to disk.
- Store/return computed data as members that can be saved/handled by the exe main functions.