28 template <
class TargetT>
37 const std::string& proj_data_filename =
"",
38 const std::string& density_filename =
"")
39 : base_type(proj_data_filename, density_filename)
41 this->construct_projector_pair(projector_pair_filename);
46 void construct_projector_pair(
const std::string& filename =
"");
51 virtual inline void construct_log_likelihood();
54 shared_ptr<PoissonLogLikelihoodWithLinearModelForMeanAndProjData<TargetT>> _objective_function_sptr;
55 shared_ptr<ProjectorByBinPair> _projector_pair_sptr;
58 template <
class TargetT>
71 parser.
add_parsing_key(
"projector pair type", &this->_projector_pair_sptr);
73 parser.
parse(filename.c_str());
74 if (!this->_projector_pair_sptr)
75 error(
"Error parsing projector pair file");
77 template <
class TargetT>
84 objective_function.set_proj_data_sptr(this->_proj_data_sptr);
85 if (!this->_projector_pair_sptr)
86 error(
"Internal error: need to set the projector pair first");
87 objective_function.set_projector_pair_sptr(this->_projector_pair_sptr);
void add_parsing_key(const std::string &keyword, ParsingClass **parsed_object_ptr_ptr)
add keyword corresponding to an object that will parse the next keys itself
Definition: KeyParser.h:303
A class to parse Interfile headers.
Definition: KeyParser.h:161
Declaration of class stir::KeyParser.
void add_stop_key(const std::string &keyword)
add a keyword that when encountered, will stop the parsing
Definition: KeyParser.cxx:501
A projector pair based on a single matrix.
Definition: ProjectorByBinPairUsingProjMatrixByBin.h:34
PoissonLLReconstructionTests(const std::string &projector_pair_filename="", const std::string &proj_data_filename="", const std::string &density_filename="")
Constructor that can take some input data to run the test with.
Definition: PoissonLLReconstructionTests.h:36
Declaration of stir::error()
Base class for simple test on reconstruction.
Definition: ReconstructionTests.h:34
Computes projection matrix elements for VoxelsOnCartesianGrid images by using a Length of Intersectio...
Definition: ProjMatrixByBinUsingRayTracing.h:112
Test class for reconstructions.
bool parse(std::istream &f, const bool write_warnings=true)
parse() returns false if there is some error, true otherwise
Definition: KeyParser.cxx:263
void add_start_key(const std::string &keyword)
add keyword that has to occur before all others
Definition: KeyParser.cxx:496
stir::ProjMatrixByBinUsingRayTracing's definition
Declares class stir::ProjectorByBinPairUsingProjMatrixByBin.
void error(const char *const s,...)
Print error with format string a la printf and throw exception.
Definition: error.cxx:42
Base class for tests for iterative reconstruction that use PoissonLogLikelihoodWithLinearModelForMean...
Definition: PoissonLLReconstructionTests.h:29