21 #ifndef __stir_NonseparableSpatiallyVaryingFilters3D_H__ 22 #define __stir_NonseparableSpatiallyVaryingFilters3D_H__ 30 #include "stir_experimental/ArrayFilter2DUsingConvolution.h" 31 #include "stir_experimental/ArrayFilter3DUsingConvolution.h" 39 #define num_dimensions 3 41 template <
typename elemT>
42 class NonseparableSpatiallyVaryingFilters3D
43 :
public RegisteredParsingObject<NonseparableSpatiallyVaryingFilters3D<elemT>,
44 DataProcessor<DiscretisedDensity<num_dimensions, elemT>>,
45 DataProcessor<DiscretisedDensity<num_dimensions, elemT>>>
48 typedef RegisteredParsingObject<NonseparableSpatiallyVaryingFilters3D<elemT>,
49 DataProcessor<DiscretisedDensity<num_dimensions, elemT>>,
50 DataProcessor<DiscretisedDensity<num_dimensions, elemT>>>
54 static const char*
const registered_name;
57 NonseparableSpatiallyVaryingFilters3D();
59 NonseparableSpatiallyVaryingFilters3D(
string proj_data_filename,
60 string attenuation_proj_data_filename,
61 const Array<3, float>& filter_coefficients,
62 shared_ptr<ProjData> proj_data_ptr,
63 shared_ptr<ProjData> attenuation_proj_data_ptr,
64 DiscretisedDensity<3, float>* initial_image,
65 DiscretisedDensity<3, float>* sensitivity_image,
66 DiscretisedDensity<3, float>* precomputed_coefficients_image,
67 DiscretisedDensity<3, float>* normalised_bck_image,
69 float rescaling_coefficient);
73 Array<3, float> filter_coefficients_for_parsing;
74 mutable Array<3, float> filter_coefficients;
76 shared_ptr<ProjData> proj_data_ptr;
77 string proj_data_filename;
79 shared_ptr<ProjData> attenuation_proj_data_ptr;
80 string attenuation_proj_data_filename;
82 DiscretisedDensity<3, float>* initial_image;
83 string initial_image_filename;
85 DiscretisedDensity<3, float>* sensitivity_image;
86 string sensitivity_image_filename;
88 mutable DiscretisedDensity<3, float>* precomputed_coefficients_image;
89 string precomputed_coefficients_filename;
91 DiscretisedDensity<3, float>* normalised_bck_image;
92 string normalised_bck_filename;
93 float rescaling_coefficient;
94 mutable float k_interval;
95 int recompute_every_num_subiterations;
96 int recompute_from_subiteration_num;
98 Succeeded virtual_set_up(
const DiscretisedDensity<num_dimensions, elemT>& density);
100 void virtual_apply(DiscretisedDensity<num_dimensions, elemT>& out_density,
101 const DiscretisedDensity<num_dimensions, elemT>& in_density)
const;
102 void virtual_apply(DiscretisedDensity<num_dimensions, elemT>& density)
const;
103 void precalculate_filter_coefficients_3D(
104 VectorWithOffset<VectorWithOffset<VectorWithOffset<shared_ptr<ArrayFilter3DUsingConvolution<float>>>>>&
105 all_filter_coefficients,
106 DiscretisedDensity<3, elemT>* in_density)
const;
108 virtual void set_defaults();
109 virtual void initialise_keymap();
111 virtual bool post_processing();
114 #undef num_dimensions Declaration of class stir::DataProcessor.
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast (or corresponding b...
defines the stir::DiscretisedDensity class
Declaration of class stir::ProjData.
This is a messy first attempt to design spatially varying filter Given the kernel which in this case ...
defines the stir::VectorWithOffset class
Declaration of class stir::RegisteredParsingObject.