STIR 6.5.0
stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT > Class Template Reference

a base class for LogLikelihood of independent Poisson variables where the mean values are linear combinations of the gated images. More...

#include "stir/recon_buildblock/PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion.h"

Inheritance diagram for stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >:

Public Member Functions

TargetT * construct_target_ptr () const override
 Returns a pointer to a newly allocated target object (with 0 data).
void actual_compute_subset_gradient_without_penalty (TargetT &gradient, const TargetT &current_estimate, const int subset_num, const bool add_sensitivity) override
 computes the subset gradient of the objective function without the penalty (optional: add subset sensitivity)
double actual_compute_objective_function_without_penalty (const TargetT &current_estimate, const int subset_num) override
 Implementation of function that computes the objective function for the current subset.
Succeeded set_up_before_sensitivity (shared_ptr< const TargetT > const &target_sptr) override
 set-up specifics for the derived class
void add_subset_sensitivity (TargetT &sensitivity, const int subset_num) const override
 Add subset sensitivity to existing data.
Succeeded actual_add_multiplication_with_approximate_sub_Hessian_without_penalty (TargetT &output, const TargetT &input, const int subset_num) const override
 Implementation of the function that multiplies the approximate sub-Hessian with a vector.
Succeeded actual_accumulate_sub_Hessian_times_input_without_penalty (TargetT &output, const TargetT &current_image_estimate, const TargetT &input, const int subset_num) const override
 Implementation of the function computes the sub-Hessian and multiplies by a vector.
void set_time_gate_definitions (const TimeGateDefinitions &time_gate_definitions)
 PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion ()
 Default constructor calls set_defaults().
Functions to get parameters
Warning
Be careful with changing shared pointers. If you modify the objects in one place, all objects that use the shared pointer will be affected.
const GatedProjData & get_gated_proj_data () const
const shared_ptr< GatedProjData > & get_gated_proj_data_sptr () const
const int get_max_segment_num_to_process () const
const bool get_zero_seg0_end_planes () const
const GatedProjData & get_additive_gated_proj_data () const
const shared_ptr< GatedProjData > & get_additive_gated_proj_data_sptr () const
const GatedProjData & get_normalisation_gated_proj_data () const
const shared_ptr< GatedProjData > & get_normalisation_gated_proj_data_sptr () const
const ProjectorByBinPair & get_projector_pair () const
const shared_ptr< ProjectorByBinPair > & get_projector_pair_sptr () const
Public Member Functions inherited from stir::RegisteredParsingObject< PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >, GeneralisedObjectiveFunction< TargetT >, PoissonLogLikelihoodWithLinearModelForMean< TargetT > >
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::PoissonLogLikelihoodWithLinearModelForMean< TargetT >
void compute_sub_gradient_without_penalty (TargetT &gradient, const TargetT &current_estimate, const int subset_num) override
 Compute the subset gradient of the (unregularised) objective function.
Succeeded set_up (shared_ptr< TargetT > const &target_sptr) override
 set-up sensitivity etc if possible
const TargetT & get_sensitivity () const
 Get a const reference to the total sensitivity.
const TargetT & get_subset_sensitivity (const int subset_num) const
 Get a const reference to the sensitivity for a subset.
bool get_use_subset_sensitivities () const
 find out if subset_sensitivities are used
bool get_recompute_sensitivity () const
 find current value of recompute_sensitivity
std::string get_sensitivity_filename () const
 get filename to read (or write) the total sensitivity
std::string get_subsensitivity_filenames () const
 get filename pattern to read (or write) the subset sensitivities
std::string get_subsensitivity_filename (const int subset_num) const
 Return the filename for a particular subset.
void set_recompute_sensitivity (const bool)
void set_subset_sensitivity_sptr (const shared_ptr< TargetT > &, const int subset_num)
void set_use_subset_sensitivities (const bool)
 See get_use_subset_sensitivities().
void set_sensitivity_filename (const std::string &)
 set filename to read (or write) the total sensitivity
void set_subsensitivity_filenames (const std::string &)
 set filename pattern to read (or write) the subset sensitivities
void fill_nonidentifiable_target_parameters (TargetT &target, const float value) const override
Public Member Functions inherited from stir::GeneralisedObjectiveFunction< TargetT >
virtual void compute_sub_gradient (TargetT &gradient, const TargetT &current_estimate, const int subset_num)
 Compute the subset-gradient of the objective function at current_estimate.
virtual void compute_gradient (TargetT &gradient, const TargetT &current_estimate)
 Compute the gradient of the objective function at the current_estimate.
virtual void compute_gradient_without_penalty (TargetT &gradient, const TargetT &current_estimate)
 Compute the gradient of the unregularised objective function at the current_estimate.
virtual double compute_objective_function_without_penalty (const TargetT &current_estimate, const int subset_num)
 Compute the value of the unregularised sub-objective function at the current_estimate.
virtual double compute_objective_function_without_penalty (const TargetT &current_estimate)
 Compute the value of the unregularised objective function at the current_estimate.
double compute_penalty (const TargetT &current_estimate, const int subset_num)
 Compute the value of the sub-penalty at the current_estimate.
double compute_penalty (const TargetT &current_estimate)
 Compute the value of the penalty at the current_estimate.
double compute_objective_function (const TargetT &current_estimate, const int subset_num)
 Compute the value of the sub-objective function at the current_estimate.
double compute_objective_function (const TargetT &current_estimate)
 Compute the value of the objective function at the current_estimate.
double compute_value (const TargetT &current_estimate)
 Alias for compute_objective_function(const TargetT&).
Succeeded add_multiplication_with_approximate_sub_Hessian_without_penalty (TargetT &output, const TargetT &input, const int subset_num) const
 Functions that multiply the approximate (sub)Hessian with a \'vector\'.
Succeeded add_multiplication_with_approximate_sub_Hessian (TargetT &output, const TargetT &input, const int subset_num) const
Succeeded add_multiplication_with_approximate_Hessian_without_penalty (TargetT &output, const TargetT &input) const
Succeeded add_multiplication_with_approximate_Hessian (TargetT &output, const TargetT &input) const
Succeeded accumulate_Hessian_times_input (TargetT &output, const TargetT &current_image_estimate, const TargetT &input) const
 Functions that multiply the True (sub)Hessian with a \'vector\'.
Succeeded accumulate_Hessian_times_input_without_penalty (TargetT &output, const TargetT &current_image_estimate, const TargetT &input) const
Succeeded accumulate_sub_Hessian_times_input (TargetT &output, const TargetT &current_image_estimate, const TargetT &input, const int subset_num) const
Succeeded accumulate_sub_Hessian_times_input_without_penalty (TargetT &output, const TargetT &current_image_estimate, const TargetT &input, const int subset_num) const
std::string get_objective_function_values_report (const TargetT &current_estimate)
 Construct a string with info on the value of objective function with and without penalty.
int get_num_subsets () const
 Return the number of subsets in-use.
virtual std::unique_ptr< ExamInfo > get_exam_info_uptr_for_target () const
bool subsets_are_approximately_balanced () const
 Checks of the current subset scheme is approximately balanced.
bool subsets_are_approximately_balanced (std::string &warning_message) const
 Checks of the current subset scheme is approximately balanced and constructs a warning message.
bool prior_is_zero () const
 check if the prior is set (or the penalisation factor is 0)
GeneralisedPrior< TargetT > *const get_prior_ptr () const
 Read-only access to the prior.
shared_ptr< GeneralisedPrior< TargetT > > get_prior_sptr ()
void set_prior_sptr (const shared_ptr< GeneralisedPrior< TargetT > > &)
 Change the prior.
Public Member Functions inherited from stir::ParsingObject
 ParsingObject (const ParsingObject &)
ParsingObject & operator= (const ParsingObject &)
bool parse (std::istream &f)
bool parse (const char *const filename)
void ask_parameters ()
Public Member Functions inherited from stir::RegisteredParsingObject< PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >, GeneralisedObjectiveFunction< TargetT >, SumOfGeneralisedObjectiveFunctions< PoissonLogLikelihoodWithLinearModelForMeanAndProjData< TargetT >, TargetT, PoissonLogLikelihoodWithLinearModelForMean< TargetT > > >
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::SumOfGeneralisedObjectiveFunctions< ObjFuncT, TargetT, ParentT >
template<typename IterT>
 SumOfGeneralisedObjectiveFunctions (IterT begin, IterT end)
template<typename IterT>
void set_functions (IterT begin, IterT end)
virtual Succeeded set_up (shared_ptr< TargetT > const &target_sptr)
 Has to be called before using this object.
virtual void compute_sub_gradient_without_penalty (TargetT &gradient, const TargetT &current_estimate, const int subset_num)
 This computes the gradient of the unregularised objective function at the current_estimate.

Static Public Attributes

static const char *const registered_name
 Name which will be used when parsing a GeneralisedObjectiveFunction object.

Functions to set parameters

This can be used as alternative to the parsing mechanism.

Warning
After using any of these, you have to call set_up().
Be careful with setting shared pointers. If you modify the objects in one place, all objects that use the shared pointer will be affected.
std::string _input_filename
 Filename with input projection data.
std::string _motion_vectors_filename_prefix
std::string _reverse_motion_vectors_filename_prefix
std::string _gate_definitions_filename
shared_ptr< GatedProjData > _gated_proj_data_sptr
 points to the object for the total input projection data
int _max_segment_num_to_process
 the maximum absolute ring difference number to use in the reconstruction
ParseAndCreateFrom< TargetT, GatedProjData > target_parameter_parser
std::string _additive_gated_proj_data_filename
 name of file in which additive projection data are stored
std::string _normalisation_gated_proj_data_filename
 name of file in which normalisation projection data are stored
shared_ptr< GatedProjData > _additive_gated_proj_data_sptr
 points to the additive projection data
shared_ptr< GatedProjData > _normalisation_gated_proj_data_sptr
std::string _normalisation_filename_prefix
shared_ptr< ProjectorByBinPair > _projector_pair_ptr
 Stores the projectors that are used for the computations.
bool _zero_seg0_end_planes
 signals whether to zero the data in the end planes of the projection data
int _motion_correction_type
GatedSpatialTransformation _motion_vectors
GatedSpatialTransformation _reverse_motion_vectors
GatedDiscretisedDensity _gated_image_template
 gated image template
int max_segment_num_to_process
 the maximum absolute ring difference number to use in the reconstruction
int output_image_size_xy
 the output image size in x and y direction
int output_image_size_z
 the output image size in z direction
double zoom
 the zoom factor
double Xoffset
 offset in the x-direction
double Yoffset
 offset in the y-direction
double Zoffset
 offset in the z-direction
shared_ptr< ProjectorByBinPair > projector_pair_ptr
 Stores the projectors that are used for the computations.
bool zero_seg0_end_planes
 signals whether to zero the data in the end planes of the projection data
std::string _additive_projection_data_filename
 name of file in which loglikelihood measurements are stored
int frame_num
std::string frame_definition_filename
TimeFrameDefinitions frame_defs
VectorWithOffset< shared_ptr< BinNormalisation > > _normalisation_sptrs
void set_recompute_sensitivity (const bool)
void set_sensitivity_sptr (const shared_ptr< TargetT > &)
int set_num_subsets (const int num_subsets) override
 Attempts to change the number of subsets.
void set_normalisation_sptr (const shared_ptr< BinNormalisation > &) override
 set_normalisation_sptr
void set_additive_proj_data_sptr (const shared_ptr< ExamData > &) override
 set_additive_proj_data_sptr
void set_input_data (const shared_ptr< ExamData > &) override
 set_input_data
const GatedProjData & get_input_data () const override
 get input data
void set_proj_data_sptr (const shared_ptr< GatedProjData > &)
void set_max_segment_num_to_process (const int)
void set_zero_seg0_end_planes (const bool)
void set_additive_proj_data_sptr (const shared_ptr< GatedProjData > &)
void set_projector_pair_sptr (const shared_ptr< ProjectorByBinPair > &)
void set_frame_num (const int)
void set_frame_definitions (const TimeFrameDefinitions &)
virtual TargetT * construct_target_ptr () const
 Creates a suitable target as determined by the parameters.
virtual void compute_sub_gradient_without_penalty_plus_sensitivity (TargetT &gradient, const TargetT &target, const int subset_num)
 This should compute the subset gradient of the (unregularised) objective function plus the subset sensitivity.
const TimeGateDefinitions & get_time_gate_definitions () const
bool actual_subsets_are_approximately_balanced (std::string &warning_message) const override
 Implementation of function that checks subset balancing.
void set_defaults () override
 Sets defaults before parsing.
void initialise_keymap () override
 sets parsing keys
bool post_processing () override
 This will be called at the end of the parsing.
virtual Succeeded set_up_before_sensitivity (shared_ptr< TargetT > const &target_sptr)
virtual void add_subset_sensitivity (TargetT &sensitivity, const int subset_num) const
 Add subset sensitivity to existing data.

Additional Inherited Members

Static Public Member Functions inherited from stir::RegisteredParsingObject< PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >, GeneralisedObjectiveFunction< TargetT >, PoissonLogLikelihoodWithLinearModelForMean< TargetT > >
static GeneralisedObjectiveFunction< TargetT > * read_from_stream (std::istream *)
 Construct a new object (of type Derived) by parsing the istream.
Static Public Member Functions inherited from stir::RegisteredObject< GeneralisedObjectiveFunction< TargetT > >
static GeneralisedObjectiveFunction< TargetT > * read_registered_object (std::istream *in, const std::string &registered_name)
 Construct a new object (of a type derived from Root, its actual type determined by the registered_name parameter) by parsing the istream.
static GeneralisedObjectiveFunction< TargetT > * ask_type_and_parameters ()
 ask the user for the type, and then calls read_registered_object(0, type)
static void list_registered_names (std::ostream &stream)
 List all possible registered names to the stream.
Static Public Member Functions inherited from stir::RegisteredParsingObject< PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >, GeneralisedObjectiveFunction< TargetT >, SumOfGeneralisedObjectiveFunctions< PoissonLogLikelihoodWithLinearModelForMeanAndProjData< TargetT >, TargetT, PoissonLogLikelihoodWithLinearModelForMean< TargetT > > >
static GeneralisedObjectiveFunction< TargetT > * read_from_stream (std::istream *)
 Construct a new object (of type Derived) by parsing the istream.
Protected Types inherited from stir::RegisteredObject< GeneralisedObjectiveFunction< TargetT > >
typedef GeneralisedObjectiveFunction< TargetT > *(*) 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 Types inherited from stir::SumOfGeneralisedObjectiveFunctions< ObjFuncT, TargetT, ParentT >
typedef std::vector< ObjFuncT > _functions_type
typedef _functions_type::iterator _functions_iterator_type
typedef _functions_type::const_iterator _functions_const_iterator_type
void compute_sensitivities ()
 compute subset and total sensitivity
virtual void set_key_values ()
 This will be called before parsing or parameter_info is called.
Static Protected Member Functions inherited from stir::RegisteredObject< GeneralisedObjectiveFunction< TargetT > >
static RegistryType & registry ()
 Static function returning the registry.
int num_subsets
bool already_set_up
shared_ptr< GeneralisedPrior< TargetT > > prior_sptr
KeyParser parser
Protected Attributes inherited from stir::SumOfGeneralisedObjectiveFunctions< ObjFuncT, TargetT, ParentT >
_functions_type _functions

Detailed Description

template<typename TargetT>
class stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >

a base class for LogLikelihood of independent Poisson variables where the mean values are linear combinations of the gated images.

\‍[ \begin{array}{lcl}
 \Lambda_{\nu}^{(s+1)}&&=\Lambda_{\nu}^{(s)} \frac{1}{ \sum\limits_{b\in S_{l}, g} \sum\limits_{\nu'} \hat{W}^{-1}
_{\nu'g\rightarrow \nu}P_{\nu' b}A_{bg}+\beta \nabla_{\Lambda_{\nu}} E_{\nu}^{(s)}}\\
 &&\times \sum\limits_{b\in S_{l}, g} \sum\limits_{\nu'}\left(\hat{W}^{-1} _{\nu'g\rightarrow \nu}P_{\nu'
b}\frac{Y_{bg}}{\sum\limits_{\tilde{\nu}}P_{b\tilde{\nu}}\sum\limits_{\tilde{\nu}'}\hat{W} _{\tilde{\nu}'\rightarrow
\tilde{\nu}g}\Lambda_{\tilde{\nu}'}^{(s)}+\frac{B_{bg}}{A_{bg}}}\right) \end{array} \‍]

Parameters for parsing

For more information: Tsoumpas et al (2013) Physics in Medicine and Biology

Constructor & Destructor Documentation

◆ PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion()

template<typename TargetT>
stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion ( )

Default constructor calls set_defaults().

References set_additive_proj_data_sptr().

Member Function Documentation

◆ construct_target_ptr() [1/2]

template<typename TargetT>
TargetT * stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::construct_target_ptr ( ) const
overridevirtual

Returns a pointer to a newly allocated target object (with 0 data).

Dimensions etc are set from the gated_proj_data_sptr and other information set by parsing, such as zoom, output_image_size_z etc.

Implements stir::GeneralisedObjectiveFunction< TargetT >.

References _gated_proj_data_sptr, and construct_target_ptr().

Referenced by construct_target_ptr().

◆ actual_compute_subset_gradient_without_penalty()

template<typename TargetT>
void stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::actual_compute_subset_gradient_without_penalty ( TargetT & gradient,
const TargetT & current_estimate,
const int subset_num,
const bool add_sensitivity )
overridevirtual

computes the subset gradient of the objective function without the penalty (optional: add subset sensitivity)

If add_sensitivity is true, this computes

\‍[ {\partial L \over \partial \lambda_v} + P_v =
  \sum_b P_{bv} {y_b \over Y_b}
\‍]

(see the class general documentation). The sum will however be restricted to a subset.

However, if add_sensitivity is false, this function will instead compute only the gradient

\‍[    {\partial L \over \partial \lambda_v} =
        \sum_b P_{bv} ({y_b \over Y_b} - 1)
\‍]

Implements stir::PoissonLogLikelihoodWithLinearModelForMean< TargetT >.

◆ actual_compute_objective_function_without_penalty()

template<typename TargetT>
double stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::actual_compute_objective_function_without_penalty ( const TargetT & current_estimate,
const int subset_num )
overridevirtual

Implementation of function that computes the objective function for the current subset.

See also
compute_objective_function_without_penalty(const Target&,const int)
Developer\'s note

The reason we have this function is that overloading a function in a derived class, hides all functions of the same name.

Implements stir::GeneralisedObjectiveFunction< TargetT >.

◆ set_up_before_sensitivity()

template<typename TargetT>
Succeeded stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::set_up_before_sensitivity ( shared_ptr< const TargetT > const & target_sptr)
overridevirtual

set-up specifics for the derived class

Implements stir::PoissonLogLikelihoodWithLinearModelForMean< TargetT >.

References add_subset_sensitivity().

Referenced by construct_target_ptr().

◆ add_subset_sensitivity() [1/2]

template<typename TargetT>
void stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::add_subset_sensitivity ( TargetT & sensitivity,
const int subset_num ) const
overridevirtual

Add subset sensitivity to existing data.

Implements stir::PoissonLogLikelihoodWithLinearModelForMean< TargetT >.

References add_subset_sensitivity().

Referenced by add_subset_sensitivity(), and set_up_before_sensitivity().

◆ actual_add_multiplication_with_approximate_sub_Hessian_without_penalty()

template<typename TargetT>
Succeeded stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::actual_add_multiplication_with_approximate_sub_Hessian_without_penalty ( TargetT & output,
const TargetT & input,
const int subset_num ) const
overridevirtual

Implementation of the function that multiplies the approximate sub-Hessian with a vector.

See also
multiplication_with_approximate_sub_Hessian_without_penalty(TargetT&,const TargetT&, const int).
Warning
The default implementation just calls error(). This behaviour has to be overloaded by the derived classes.
Developer\'s note

The reason we have this function is that overloading a function in a derived class, hides all functions of the same name.

Reimplemented from stir::GeneralisedObjectiveFunction< TargetT >.

◆ actual_accumulate_sub_Hessian_times_input_without_penalty()

template<typename TargetT>
Succeeded stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::actual_accumulate_sub_Hessian_times_input_without_penalty ( TargetT & output,
const TargetT & current_image_estimate,
const TargetT & input,
const int subset_num ) const
overridevirtual

Implementation of the function computes the sub-Hessian and multiplies by a vector.

See also
accumulate_sub_Hessian_times_input_without_penalty(TargetT&,const TargetT&, TargetT&, const int).
Warning
The default implementation just calls error(). This behaviour has to be overloaded by the derived classes.
Developer\'s note

The reason we have this function is that overloading a function in a derived class, hides all functions of the same name.

Reimplemented from stir::GeneralisedObjectiveFunction< TargetT >.

◆ set_num_subsets()

template<typename TargetT>
int stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::set_num_subsets ( const int num_subsets)
overridevirtual

Attempts to change the number of subsets.

Returns
The number of subsets that will be used later, which is not guaranteed to be what you asked for.

Implements stir::GeneralisedObjectiveFunction< TargetT >.

◆ set_normalisation_sptr()

template<typename TargetT>
void stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::set_normalisation_sptr ( const shared_ptr< BinNormalisation > & )
overridevirtual

set_normalisation_sptr

Author
Nikos Efthimiou

In the case the reconstruction process is called from another piece of code, the user should be able to set any additive sinogram

Implements stir::GeneralisedObjectiveFunction< TargetT >.

◆ set_additive_proj_data_sptr()

template<typename TargetT>
void stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::set_additive_proj_data_sptr ( const shared_ptr< ExamData > & )
overridevirtual

set_additive_proj_data_sptr

Author
Nikos Efthimiou

In the case the reconstruction process is called from another piece of code, the user should be able to set any additive sinogram

Implements stir::GeneralisedObjectiveFunction< TargetT >.

Referenced by PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion().

◆ set_input_data()

template<typename TargetT>
void stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::set_input_data ( const shared_ptr< ExamData > & )
overridevirtual

set_input_data

Author
Nikos Efthimiou

It can be used to set the data to be reconstructed within some other code, as opposed to via parsing.

Implements stir::GeneralisedObjectiveFunction< TargetT >.

◆ get_input_data()

template<typename TargetT>
const GatedProjData & stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::get_input_data ( ) const
overridevirtual

get input data

Will throw an exception if it wasn't set first

Implements stir::GeneralisedObjectiveFunction< TargetT >.

◆ actual_subsets_are_approximately_balanced()

template<typename TargetT>
bool stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::actual_subsets_are_approximately_balanced ( std::string & warning_message) const
overrideprotectedvirtual

Implementation of function that checks subset balancing.

See also
subsets_are_approximately_balanced(std::string&)
Developer\'s note

The reason we have this function is that overloading subsets_are_approximately_balanced(std::string&) in a derived class would hide subsets_are_approximately_balanced().

Implements stir::GeneralisedObjectiveFunction< TargetT >.

References initialise_keymap(), post_processing(), and set_defaults().

◆ set_defaults()

◆ initialise_keymap()

◆ post_processing()

template<typename TargetT>
bool stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::post_processing ( )
overrideprotectedvirtual

◆ construct_target_ptr() [2/2]

template<typename TargetT>
virtual TargetT * stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::construct_target_ptr ( ) const
virtual

Creates a suitable target as determined by the parameters.

Warning
This should not check already_set_up (unfortunately), as it is currently called in Reconstruction::reconstruct() before calling set_up().

Implements stir::GeneralisedObjectiveFunction< TargetT >.

References compute_sub_gradient_without_penalty_plus_sensitivity(), and set_up_before_sensitivity().

◆ compute_sub_gradient_without_penalty_plus_sensitivity()

template<typename TargetT>
void stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::compute_sub_gradient_without_penalty_plus_sensitivity ( TargetT & gradient,
const TargetT & current_estimate,
const int subset_num )
virtual

This should compute the subset gradient of the (unregularised) objective function plus the subset sensitivity.

Implementation in terms of actual_compute_sub_gradient_without_penalty(). This function is used for instance by OSMAPOSL.

This computes

\‍[ {\partial L \over \partial \lambda_v} + P_v =
   \sum_b P_{bv} {y_b \over Y_b}
\‍]

(see the class general documentation). The sum will however be restricted to a subset.

Reimplemented from stir::PoissonLogLikelihoodWithLinearModelForMean< TargetT >.

References compute_sub_gradient_without_penalty_plus_sensitivity().

Referenced by compute_sub_gradient_without_penalty_plus_sensitivity(), and construct_target_ptr().

◆ add_subset_sensitivity() [2/2]

template<typename TargetT>
virtual void stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::add_subset_sensitivity ( TargetT & sensitivity,
const int subset_num ) const
protectedvirtual

Add subset sensitivity to existing data.

Implements stir::PoissonLogLikelihoodWithLinearModelForMean< TargetT >.

References _input_filename.

Member Data Documentation

◆ _input_filename

template<typename TargetT>
std::string stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::_input_filename
protected

Filename with input projection data.

Referenced by add_subset_sensitivity(), initialise_keymap(), post_processing(), and set_defaults().

◆ _gated_proj_data_sptr

template<typename TargetT>
shared_ptr< GatedProjData > stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::_gated_proj_data_sptr
protected

points to the object for the total input projection data

Referenced by construct_target_ptr(), post_processing(), and set_defaults().

◆ _max_segment_num_to_process

template<typename TargetT>
int stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::_max_segment_num_to_process
protected

the maximum absolute ring difference number to use in the reconstruction

convention: if -1, use get_max_segment_num()

◆ _additive_gated_proj_data_sptr

template<typename TargetT>
shared_ptr<GatedProjData> stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::_additive_gated_proj_data_sptr
protected

points to the additive projection data

the projection data in this file is bin-wise added to forward projection results

◆ _normalisation_filename_prefix

template<typename TargetT>
std::string stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::_normalisation_filename_prefix
protected

the normalisation or/and attenuation data

◆ _motion_correction_type

template<typename TargetT>
int stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::_motion_correction_type
protected

the motion vectors where all information is stored

◆ max_segment_num_to_process

template<typename TargetT>
int stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::max_segment_num_to_process
protected

the maximum absolute ring difference number to use in the reconstruction

convention: if -1, use get_max_segment_num()

Referenced by initialise_keymap(), and set_defaults().

◆ output_image_size_xy

template<typename TargetT>
int stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::output_image_size_xy
protected

the output image size in x and y direction

convention: if -1, use a size such that the whole FOV is covered

Referenced by initialise_keymap(), post_processing(), and set_defaults().

◆ output_image_size_z

template<typename TargetT>
int stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::output_image_size_z
protected

the output image size in z direction

convention: if -1, use default as provided by VoxelsOnCartesianGrid constructor

Referenced by initialise_keymap(), post_processing(), and set_defaults().

◆ zoom

template<typename TargetT>
double stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::zoom
protected

the zoom factor

Referenced by initialise_keymap(), post_processing(), and set_defaults().

◆ Xoffset

template<typename TargetT>
double stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::Xoffset
protected

offset in the x-direction

Referenced by set_defaults().

◆ Yoffset

template<typename TargetT>
double stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::Yoffset
protected

offset in the y-direction

Referenced by set_defaults().

◆ Zoffset

template<typename TargetT>
double stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::Zoffset
protected

offset in the z-direction

Referenced by initialise_keymap(), and set_defaults().

◆ projector_pair_ptr

template<typename TargetT>
shared_ptr<ProjectorByBinPair> stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::projector_pair_ptr
protected

Stores the projectors that are used for the computations.

Referenced by initialise_keymap(), and set_defaults().

◆ zero_seg0_end_planes

template<typename TargetT>
bool stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::zero_seg0_end_planes
protected

signals whether to zero the data in the end planes of the projection data

Referenced by initialise_keymap(), and set_defaults().

◆ _additive_projection_data_filename

template<typename TargetT>
std::string stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::_additive_projection_data_filename
protected

name of file in which loglikelihood measurements are stored

Referenced by initialise_keymap(), post_processing(), and set_defaults().


The documentation for this class was generated from the following files: