13 #ifndef __stir_recon_buildblock_DISTRIBUTABLE_H__ 14 #define __stir_recon_buildblock_DISTRIBUTABLE_H__ 35 template <
typename elemT>
36 class RelatedViewgrams;
37 template <
int num_dimensions,
typename elemT>
38 class DiscretisedDensity;
39 class BinNormalisation;
43 class DataSymmetriesForViewSegmentNumbers;
44 class ForwardProjectorByBin;
45 class BackProjectorByBin;
46 class ProjectorByBinPair;
47 class DistributedCachingInformation;
48 class ProjMatrixByBin;
54 const int task_setup_distributable_computation = 200;
55 const int task_do_distributable_gradient_computation = 42;
56 const int task_do_distributable_loglikelihood_computation = 43;
57 const int task_do_distributable_sensitivity_computation = 44;
70 const shared_ptr<const ExamInfo>& exam_info_sptr,
71 const shared_ptr<const ProjDataInfo> proj_data_info_sptr,
72 const shared_ptr<
const DiscretisedDensity<3, float>>& target_sptr,
73 const bool zero_seg0_end_planes,
74 const bool distributed_cache_enabled);
94 const shared_ptr<BackProjectorByBin>& back_projector_sptr,
98 double* log_likelihood_ptr,
164 const shared_ptr<BackProjectorByBin>& back_projector_sptr,
165 const shared_ptr<DataSymmetriesForViewSegmentNumbers>& symmetries_sptr,
168 const shared_ptr<ProjData>& proj_data_ptr,
169 const bool read_from_proj_data,
174 bool zero_seg0_end_planes,
175 double* double_out_ptr,
176 const shared_ptr<ProjData>& additive_binwise_correction,
177 const shared_ptr<BinNormalisation> normalise_sptr,
178 const double start_time_of_frame,
179 const double end_time_of_frame,
182 int min_timing_pos_num,
183 int max_timing_pos_num);
194 template <
typename CallBackT>
196 const shared_ptr<ProjDataInfo>& proj_data_info_sptr,
199 const std::vector<BinAndCorr>& record_cache,
200 const int subset_num,
201 const int num_subsets,
203 const bool accumulate,
204 double* double_out_ptr,
205 CallBackT&& call_back);
210 const int AVAILABLE_NOTIFICATION_TAG = 2;
212 const int END_ITERATION_TAG = 3;
213 const int END_RECONSTRUCTION_TAG = 4;
214 const int END_NOTIFICATION_TAG = 5;
215 const int BINWISE_CORRECTION_TAG = 6;
216 const int BINWISE_MULT_TAG = 66;
217 const int REUSE_VIEWGRAM_TAG = 10;
218 const int NEW_VIEWGRAM_TAG = 11;
219 const int USE_DOUBLE_ARG_TAG = 70;
220 const int USE_OUTPUT_IMAGE_ARG_TAG = 71;
226 #endif // __stir_recon_buildblock_DISTRIBUTABLE_H__
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
void LM_distributable_computation(const shared_ptr< ProjMatrixByBin > PM_sptr, const shared_ptr< ProjDataInfo > &proj_data_info_sptr, DiscretisedDensity< 3, float > *output_image_ptr, const DiscretisedDensity< 3, float > *input_image_ptr, const std::vector< BinAndCorr > &record_cache, const int subset_num, const int num_subsets, const bool has_add, const bool accumulate, double *double_out_ptr, CallBackT &&call_back)
This function essentially implements a loop over a cached listmode file.
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast (or corresponding b...
void end_distributable_computation()
clean-up after a sequence of computations
Definition: distributable.cxx:132
Declaration of class stir::Bin.
void distributable_computation(const shared_ptr< ForwardProjectorByBin > &forward_projector_sptr, const shared_ptr< BackProjectorByBin > &back_projector_sptr, const shared_ptr< DataSymmetriesForViewSegmentNumbers > &symmetries_sptr, DiscretisedDensity< 3, float > *output_image_ptr, const DiscretisedDensity< 3, float > *input_image_ptr, const shared_ptr< ProjData > &proj_data_ptr, const bool read_from_proj_data, int subset_num, int num_subsets, int min_segment_num, int max_segment_num, bool zero_seg0_end_planes, double *double_out_ptr, const shared_ptr< ProjData > &additive_binwise_correction, const shared_ptr< BinNormalisation > normalise_sptr, const double start_time_of_frame, const double end_time_of_frame, RPC_process_related_viewgrams_type *RPC_process_related_viewgrams, DistributedCachingInformation *caching_info_ptr, int min_timing_pos_num, int max_timing_pos_num)
This function essentially implements a loop over segments and all views in the current subset...
Definition: distributable.cxx:273
void setup_distributable_computation(const shared_ptr< ProjectorByBinPair > &proj_pair_sptr, const shared_ptr< const ExamInfo > &exam_info_sptr, const shared_ptr< const ProjDataInfo > proj_data_info_sptr, const shared_ptr< const DiscretisedDensity< 3, float >> &target_sptr, const bool zero_seg0_end_planes, const bool distributed_cache_enabled)
set-up parameters before calling distributable_computation()
Definition: distributable.cxx:80
const int task_stop_processing
Definition: distributable.h:53