20 #ifndef __stir_recon_buildblock_PoissonLogLikelihoodWithLinearModelForMeanAndProjData_H__ 21 #define __stir_recon_buildblock_PoissonLogLikelihoodWithLinearModelForMeanAndProjData_H__ 36 class DistributedCachingInformation;
120 template <
typename TargetT>
123 GeneralisedObjectiveFunction<TargetT>,
124 PoissonLogLikelihoodWithLinearModelForMean<TargetT>>
148 bool distributed_tests_enabled;
149 bool message_timings_enabled;
150 double message_timings_threshold;
151 bool rpc_timings_enabled;
167 TargetT* construct_target_ptr()
const override;
174 const ProjData& get_proj_data()
const;
175 const shared_ptr<ProjData>& get_proj_data_sptr()
const;
176 const int get_max_segment_num_to_process()
const;
177 const int get_max_timing_pos_num_to_process()
const;
178 const bool get_zero_seg0_end_planes()
const;
179 const ProjData& get_additive_proj_data()
const;
180 const shared_ptr<ProjData>& get_additive_proj_data_sptr()
const;
182 const shared_ptr<ProjectorByBinPair>& get_projector_pair_sptr()
const;
183 const int get_time_frame_num()
const;
186 const shared_ptr<BinNormalisation>& get_normalisation_sptr()
const;
196 int set_num_subsets(
const int num_subsets)
override;
197 void set_proj_data_sptr(
const shared_ptr<ProjData>&);
198 void set_max_segment_num_to_process(
const int);
199 void set_max_timing_pos_num_to_process(
const int);
200 void set_zero_seg0_end_planes(
const bool);
202 void set_additive_proj_data_sptr(
const shared_ptr<ExamData>&)
override;
203 void set_projector_pair_sptr(
const shared_ptr<ProjectorByBinPair>&);
204 void set_frame_num(
const int);
206 void set_normalisation_sptr(
const shared_ptr<BinNormalisation>&)
override;
208 void set_input_data(
const shared_ptr<ExamData>&)
override;
209 const ProjData& get_input_data()
const override;
212 void actual_compute_subset_gradient_without_penalty(TargetT& gradient,
213 const TargetT& current_estimate,
214 const int subset_num,
215 const bool add_sensitivity)
override;
217 std::unique_ptr<ExamInfo> get_exam_info_uptr_for_target()
const override;
220 float sum_projection_data()
const;
222 void add_subset_sensitivity(TargetT& sensitivity,
const int subset_num)
const override;
225 Succeeded set_up_before_sensitivity(shared_ptr<const TargetT>
const& target_sptr)
override;
227 double actual_compute_objective_function_without_penalty(
const TargetT& current_estimate,
const int subset_num)
override;
262 Succeeded actual_add_multiplication_with_approximate_sub_Hessian_without_penalty(TargetT& output,
263 const TargetT& input,
264 const int subset_num)
const override;
283 Succeeded actual_accumulate_sub_Hessian_times_input_without_penalty(TargetT& output,
284 const TargetT& current_image_estimate,
285 const TargetT& input,
286 const int subset_num)
const override;
319 shared_ptr<ProjData> additive_proj_data_sptr;
321 shared_ptr<BinNormalisation> normalisation_sptr;
325 std::string frame_definition_filename;
341 void set_defaults()
override;
344 void initialise_keymap()
override;
347 bool post_processing()
override;
355 bool actual_subsets_are_approximately_balanced(std::string& warning_message)
const override;
358 shared_ptr<DataSymmetriesForViewSegmentNumbers> symmetries_sptr;
367 shared_ptr<BackProjectorByBin> sens_backprojector_sptr;
371 shared_ptr<DataSymmetriesForViewSegmentNumbers> sens_symmetries_sptr;
373 mutable bool latest_setup_distributable_computation_was_with_orig_projectors;
375 mutable bool distributable_computation_already_setup;
378 bool sensitivity_uses_same_projector()
const;
381 shared_ptr<const ProjDataInfo> sens_proj_data_info_sptr;
383 mutable bool latest_setup_norm_was_with_orig_data;
385 mutable bool norm_already_setup =
false;
388 void ensure_norm_is_set_up(
bool for_original_data =
true)
const;
390 void ensure_norm_is_set_up_for_sensitivity()
const;
394 add_view_seg_to_sensitivity(TargetT& sensitivity,
const ViewSegmentNumbers& view_seg_nums)
const;
Class used for storing time frame durations.
Definition: TimeFrameDefinitions.h:38
Definition of the stir::ParseAndCreateFrom class.
Declaration of class stir::TimeFrameDefinitions.
void RPC_process_related_viewgrams_type(const shared_ptr< ForwardProjectorByBin > &forward_projector_sptr, const shared_ptr< BackProjectorByBin > &back_projector_sptr, RelatedViewgrams< float > *measured_viewgrams_ptr, int &count, int &count2, double *log_likelihood_ptr, const RelatedViewgrams< float > *additive_binwise_correction_ptr, const RelatedViewgrams< float > *mult_viewgrams_ptr)
typedef for callback functions for distributable_computation()
Definition: distributable.h:93
A base class for 'generalised' objective functions, i.e. objective functions for which at least a 'gr...
Definition: GeneralisedObjectiveFunction.h:83
Declaration of the main functions that perform parallel processing.
Abstract base class for all projector pairs.
Definition: ProjectorByBinPair.h:44
template for adding keywords to a parser and creating an object
Definition: ParseAndCreateFrom.h:52
Abstract base class for implementing bin-wise normalisation of data.
Definition: BinNormalisation.h:51
alias for ViewgramIndices
Definition: ViewSegmentNumbers.h:33
Parent class for all leaves in a RegisteredObject hierarchy that do parsing of parameter files...
Definition: RegisteredParsingObject.h:77
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition: Succeeded.h:43
Declaration of class stir::RegisteredParsingObject.
The (abstract) base class for the projection data.
Definition: ProjData.h:103
Declares class stir::ProjectorByBinPair.