STIR
6.2.0
|
generates projection matrix for SPECT studies More...
#include "stir/recon_buildblock/ProjMatrixByBinSPECTUB.h"
Public Member Functions | |
ProjMatrixByBinSPECTUB () | |
Default constructor (calls set_defaults()) | |
ProjMatrixByBinSPECTUB (const ProjMatrixByBinSPECTUB &)=delete | |
~ProjMatrixByBinSPECTUB () override | |
Destructor (deallocates UB SPECT memory) | |
void | set_up (const shared_ptr< const ProjDataInfo > &proj_data_info_ptr, const shared_ptr< const DiscretisedDensity< 3, float >> &density_info_ptr) override |
Checks all necessary geometric info. | |
bool | get_keep_all_views_in_cache () const |
void | set_keep_all_views_in_cache (bool value=true) |
Enable keeping the matrix in memory. More... | |
std::string | get_attenuation_type () const |
void | set_attenuation_type (const std::string &value) |
Set type of attenuation modelling. More... | |
shared_ptr< const DiscretisedDensity< 3, float > > | get_attenuation_image_sptr () const |
void | set_attenuation_image_sptr (const shared_ptr< const DiscretisedDensity< 3, float >> value) |
Sets attenuation image. More... | |
void | set_attenuation_image_sptr (const std::string &value) |
void | set_resolution_model (const float collimator_sigma_0_in_mm, const float collimator_slope_in_mm, const bool full_3D=true) |
Set the parameters for the depth-dependent resolution model. More... | |
ProjMatrixByBinSPECTUB * | clone () const override |
Public Member Functions inherited from stir::RegisteredParsingObject< ProjMatrixByBinSPECTUB, ProjMatrixByBin, ProjMatrixByBin > | |
std::string | get_registered_name () const override |
Returns Derived::registered_name. | |
std::string | parameter_info () override |
Returns a string with all parameters and their values, in a form suitable for parsing again. | |
Public Member Functions inherited from stir::ProjMatrixByBin | |
const DataSymmetriesForBins * | get_symmetries_ptr () const |
get a pointer to an object encoding all symmetries that are used by this ProjMatrixByBin | |
const shared_ptr< DataSymmetriesForBins > | get_symmetries_sptr () const |
get a shared_ptr to an object encoding all symmetries that are used by this ProjMatrixByBin | |
void | get_proj_matrix_elems_for_one_bin (ProjMatrixElemsForOneBin &, const Bin &) const |
The main method for getting a row of the matrix. More... | |
void | enable_cache (const bool v=true) |
void | store_only_basic_bins_in_cache (const bool v=true) |
bool | is_cache_enabled () const |
bool | does_cache_store_only_basic_bins () const |
void | clear_cache () const |
Remove all elements from the cache. | |
Public Member Functions inherited from stir::ParsingObject | |
ParsingObject (const ParsingObject &) | |
ParsingObject & | operator= (const ParsingObject &) |
void | ask_parameters () |
bool | parse (std::istream &f) |
bool | parse (const char *const filename) |
Public Member Functions inherited from stir::TimedObject | |
void | reset_timers () |
reset all timers kept by this object | |
void | stop_timers () const |
stop all timers kept by this object More... | |
void | start_timers (bool do_reset=false) const |
start all timers kept by this object More... | |
double | get_CPU_timer_value () const |
get current value of the CPU timer (since first use or last reset) | |
double | get_wall_clock_timer_value () const |
get current value of the wall-clock timer (since first use or last reset) | |
Static Public Attributes | |
static const char *const | registered_name = "SPECT UB" |
Name which will be used when parsing a ProjMatrixByBin object. | |
Additional Inherited Members | |
Static Public Member Functions inherited from stir::RegisteredParsingObject< ProjMatrixByBinSPECTUB, ProjMatrixByBin, ProjMatrixByBin > | |
static ProjMatrixByBin * | read_from_stream (std::istream *) |
Construct a new object (of type Derived) by parsing the istream. More... | |
Static Public Member Functions inherited from stir::RegisteredObject< ProjMatrixByBin > | |
static ProjMatrixByBin * | read_registered_object (std::istream *in, const std::string ®istered_name) |
Construct a new object (of a type derived from Root, its actual type determined by the registered_name parameter) by parsing the istream. More... | |
static ProjMatrixByBin * | ask_type_and_parameters () |
ask the user for the type, and then calls read_registered_object(0, type) More... | |
static void | list_registered_names (std::ostream &stream) |
List all possible registered names to the stream. More... | |
Protected Types inherited from stir::RegisteredObject< ProjMatrixByBin > | |
typedef ProjMatrixByBin *(* | RootFactory) (std::istream *) |
The type of a root factory is a function, taking an istream* as argument, and returning a Root*. | |
typedef FactoryRegistry< std::string, RootFactory, interfile_less > | RegistryType |
The type of the registry. | |
Protected Member Functions inherited from stir::ProjMatrixByBin | |
ProjMatrixByBin () | |
default ctor (calls set_defaults()) More... | |
Succeeded | get_cached_proj_matrix_elems_for_one_bin (ProjMatrixElemsForOneBin &) const |
The method that tries to get data from the cache. More... | |
void | cache_proj_matrix_elems_for_one_bin (const ProjMatrixElemsForOneBin &) const |
The method to store data in the cache. | |
Protected Member Functions inherited from stir::ParsingObject | |
virtual void | set_key_values () |
This will be called before parsing or parameter_info is called. More... | |
Static Protected Member Functions inherited from stir::RegisteredObject< ProjMatrixByBin > | |
static RegistryType & | registry () |
Static function returning the registry. More... | |
Protected Attributes inherited from stir::ProjMatrixByBin | |
shared_ptr< DataSymmetriesForBins > | symmetries_sptr |
bool | cache_disabled |
bool | cache_stores_only_basic_bins |
bool | tof_enabled |
If activated TOF reconstruction will be performed. | |
shared_ptr< const VoxelsOnCartesianGrid< float > > | image_info_sptr |
We need a local copy of the discretised density in order to find the cartesian coordinates of each voxel. | |
shared_ptr< const ProjDataInfo > | proj_data_info_sptr |
We need a local copy of the proj_data_info to get the integration boundaries and RayTracing. | |
Protected Attributes inherited from stir::ParsingObject | |
KeyParser | parser |
generates projection matrix for SPECT studies
This functionality is described in Berta Marti Fuster, Carles Falcon, Charalampos Tsoumpas, Lefteris Livieratos, Pablo Aguiar, Albert Cot, Domenec Ros and Kris Thielemans, Integration of advanced 3D SPECT modeling into the open-source STIR framework, Med. Phys. 40, 092502 (2013); http://dx.doi.org/10.1118/1.4816676
Projection Matrix By Bin SPECT UB Parameters:= ; width of PSF maximum number of sigmas:= 2.0 ;PSF type of correction { 2D // 3D // Geometrical } psf type:= 2D ; next 2 parameters define the PSF. They are ignored if psf_type is "Geometrical" ; the PSF is modelled as a Gaussian with sigma dependent on the distance from the collimator ; sigma_at_depth = collimator_slope * depth_in_cm + collimator sigma 0(cm) collimator slope := 0.0163 collimator sigma 0(cm) := 0.1466 ;Attenuation correction { Simple // Full // No } attenuation type := Simple ;Values in attenuation map in cm-1 attenuation map := attMapRec.hv ;Mask properties { Cylinder // Attenuation Map // Explicit Mask // No} mask type := Explicit Mask mask file := mask.hv ; if next variable is set to 0, only a single view is kept in memory keep all views in cache:=1 End Projection Matrix By Bin SPECT UB Parameters:=
void stir::ProjMatrixByBinSPECTUB::set_keep_all_views_in_cache | ( | bool | value = true | ) |
Enable keeping the matrix in memory.
This speeds-up the calculations, but can use a lot of memory.
You have to call set_up() after this (unless the value didn't change).
void stir::ProjMatrixByBinSPECTUB::set_attenuation_type | ( | const std::string & | value | ) |
Set type of attenuation modelling.
Has to be "no", "simple" or "full"
You have to call set_up() after this (unless the value didn't change).
References stir::error().
void stir::ProjMatrixByBinSPECTUB::set_attenuation_image_sptr | ( | const shared_ptr< const DiscretisedDensity< 3, float >> | value | ) |
Sets attenuation image.
The image has to have same characteristics as the emission image currently.
Will call set_attenuation_type() to set to "simple" if it was set to "no".
You have to call set_up() after this.
References stir::info(), and stir::read_from_file().
void stir::ProjMatrixByBinSPECTUB::set_resolution_model | ( | const float | collimator_sigma_0_in_mm, |
const float | collimator_slope_in_mm, | ||
const bool | full_3D = true |
||
) |
Set the parameters for the depth-dependent resolution model.
The detector and collimator blurring is modelled as a Gaussian with sigma dependent on the distance from the collimator.
sigma_at_depth = collimator_slope * depth_in_mm + collimator sigma 0
Set slope and sigma_0 to zero for "geometrical" modelling.
You have to call set_up() after this.