28template <
class TargetT>
37 const std::string& proj_data_filename =
"",
38 const std::string& density_filename =
"")
39 : base_type(proj_data_filename, density_filename)
54 shared_ptr<PoissonLogLikelihoodWithLinearModelForMeanAndProjData<TargetT>> _objective_function_sptr;
55 shared_ptr<ProjectorByBinPair> _projector_pair_sptr;
58template <
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");
77template <
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);
Declaration of class stir::KeyParser.
stir::ProjMatrixByBinUsingRayTracing's definition
Declares class stir::ProjectorByBinPairUsingProjMatrixByBin.
Test class for reconstructions.
A class to parse Interfile headers.
Definition KeyParser.h:162
bool parse(std::istream &f, const bool write_warnings=true)
parse() returns false if there is some error, true otherwise
Definition KeyParser.cxx:260
void add_start_key(const std::string &keyword)
add keyword that has to occur before all others
Definition KeyParser.cxx:493
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
void add_stop_key(const std::string &keyword)
add a keyword that when encountered, will stop the parsing
Definition KeyParser.cxx:498
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
virtual void construct_log_likelihood()
creates Poisson log likelihood
Definition PoissonLLReconstructionTests.h:79
void construct_projector_pair(const std::string &filename="")
Computes projection matrix elements for VoxelsOnCartesianGrid images by using a Length of Intersectio...
Definition ProjMatrixByBinUsingRayTracing.h:114
A projector pair based on a single matrix.
Definition ProjectorByBinPairUsingProjMatrixByBin.h:36
ReconstructionTests(const std::string &proj_data_filename="", const std::string &density_filename="")
Constructor that can take some input data to run the test with.
Definition ReconstructionTests.h:73
Declaration of stir::error()
void error(const char *const s,...)
Print error with format string a la printf and throw exception.
Definition error.cxx:42