Alternaria
fit cylinders and ellipsoids to fungus
|
Model of the imaging system. More...
#include <imaging_model.h>
Public Member Functions | |
Imaging_model (float bg, float c_2, const Imaging_window *window, const Imaging_scale *scale, const Imaging_model_density *density) throw (jwscxx::base::Arg_error) | |
Constructs a new Imaging_model. | |
Imaging_model (const Imaging_model &model) | |
Constructus an Imaging_model by copying another. | |
Imaging_model (const char *fname, const Imaging_window *window, const Imaging_scale *scale, const Imaging_model_density *density) throw (jwscxx::base::IO_error, jwscxx::base::Arg_error) | |
Constructs an Imaging_model by reading values from a file. | |
virtual | ~Imaging_model () |
Deletes this Imaging_model. | |
Imaging_model * | clone () |
Clones this Imaging_model. | |
const Imaging_window * | get_window () const |
Returns the window of this Imaging_model. | |
const Imaging_scale * | get_scale () const |
Returns the scale of this Imaging_model. | |
float | get_bg () const |
Returns the background of this Imaging_model. | |
float | get_c_2 () const |
Returns the constant C_2 of this Imaging_model. | |
double | get_log_prob () const |
Returns the log probability of this Imaging_model. | |
const Imaging_model_density * | get_density () const |
Returns the density used by this model. | |
void | set_bg (float bg) throw (jwscxx::base::Arg_error) |
Sets the background of this Imaging_model. | |
void | set_c_2 (float c_2) throw (jwscxx::base::Arg_error) |
Sets the constant C_2 of this Imaging_model. | |
void | print (std::ostream &out=std::cout) const |
Prints this Imaging_model to an output stream. | |
void | print (const char *fname) const throw (jwscxx::base::IO_error) |
Prints this Imaging_model to a file. | |
Protected Member Functions | |
void | update_log_prob () |
Updates Imaging_model::log_prob. | |
void | check_bg () const throw (jwscxx::base::Arg_error) |
Checks the background of this Imaging_model against its density range. | |
void | check_c_2 () const throw (jwscxx::base::Arg_error) |
Checks the constant C_2 of this Imaging_model against its density range. | |
Protected Attributes | |
const Imaging_window * | window |
Window of captured images to analyze. | |
const Imaging_scale * | scale |
Scale of each viewing world dimension in the imaging system. | |
float | bg |
Background intensity level of the imaging system. | |
float | c_2 |
Scale for the pixel intensity variance. | |
double | log_prob |
Log probability of this Imaging_model. | |
const Imaging_model_density * | density |
Parameters for density functions over this Imaging_model. |
Model of the imaging system.
Definition at line 286 of file imaging_model.h.
Imaging_model::Imaging_model | ( | float | bg, |
float | c_2, | ||
const Imaging_window * | window, | ||
const Imaging_scale * | scale, | ||
const Imaging_model_density * | density | ||
) | throw (jwscxx::base::Arg_error) |
Constructs a new Imaging_model.
bg | Background value, see Imaging_model::bg. |
c_2 | Constant value, see Imaging_model::c_2. |
window | Imaging_window to use. |
scale | Imaging_scale to use. |
density | Imaging_model_density parameters for probabilities. |
jwscxx::base::Arg_error | Imaging_model values are not in the density parameter ranges. |
Definition at line 400 of file imaging_model.cpp.
Imaging_model::Imaging_model | ( | const Imaging_model & | model | ) |
Constructus an Imaging_model by copying another.
model | Model to create this Imaging_model from. |
Definition at line 423 of file imaging_model.cpp.
Imaging_model::Imaging_model | ( | const char * | fname, |
const Imaging_window * | window, | ||
const Imaging_scale * | scale, | ||
const Imaging_model_density * | density | ||
) | throw (jwscxx::base::IO_error, jwscxx::base::Arg_error) |
Constructs an Imaging_model by reading values from a file.
fname | Name of the file to read the Imaging_model from. |
window | Imaging_window to use. |
scale | Imaging_scale to use. |
density | Imaging_model_density parameters for probabilities. |
jwscxx::base::IO_error | Could not open fname or read from it. |
jwscxx::base::Arg_error | Improper file format or member value is not in the specified density parameter range. |
Definition at line 446 of file imaging_model.cpp.
virtual Imaging_model::~Imaging_model | ( | ) | [inline, virtual] |
Deletes this Imaging_model.
Definition at line 318 of file imaging_model.h.
Imaging_model * Imaging_model::clone | ( | ) |
Clones this Imaging_model.
Definition at line 528 of file imaging_model.cpp.
const Imaging_window* Imaging_model::get_window | ( | ) | const [inline] |
Returns the window of this Imaging_model.
Definition at line 326 of file imaging_model.h.
const Imaging_scale* Imaging_model::get_scale | ( | ) | const [inline] |
Returns the scale of this Imaging_model.
Definition at line 330 of file imaging_model.h.
float Imaging_model::get_bg | ( | ) | const [inline] |
Returns the background of this Imaging_model.
Definition at line 334 of file imaging_model.h.
float Imaging_model::get_c_2 | ( | ) | const [inline] |
Returns the constant C_2 of this Imaging_model.
Definition at line 338 of file imaging_model.h.
double Imaging_model::get_log_prob | ( | ) | const [inline] |
Returns the log probability of this Imaging_model.
Definition at line 342 of file imaging_model.h.
const Imaging_model_density* Imaging_model::get_density | ( | ) | const [inline] |
Returns the density used by this model.
Definition at line 346 of file imaging_model.h.
void Imaging_model::set_bg | ( | float | bg | ) | throw (jwscxx::base::Arg_error) |
Sets the background of this Imaging_model.
bg | New Imaging_model::bg. |
jwscxx::base::Arg_error | The change would result in an Imaging_model parameter that is not consistent with the parameter density functions. |
Definition at line 541 of file imaging_model.cpp.
void Imaging_model::set_c_2 | ( | float | c_2 | ) | throw (jwscxx::base::Arg_error) |
Sets the constant C_2 of this Imaging_model.
c_2 | New Imaging_model::c_2. |
jwscxx::base::Arg_error | The change would result in an Imaging_model parameter that is not consistent with the parameter density functions. |
Definition at line 567 of file imaging_model.cpp.
void Imaging_model::print | ( | std::ostream & | out = std::cout | ) | const [virtual] |
Prints this Imaging_model to an output stream.
The format is as follows
out | Output stream to print to. |
Implements Printable.
Definition at line 636 of file imaging_model.cpp.
void Imaging_model::print | ( | const char * | fname | ) | const throw (jwscxx::base::IO_error) |
Prints this Imaging_model to a file.
The format is as follows
fname | Name of the file to print to. |
jwscxx::base::IO_error | Could not open fname to write to. |
Definition at line 601 of file imaging_model.cpp.
void Imaging_model::update_log_prob | ( | ) | [protected] |
Updates Imaging_model::log_prob.
Updated from the Imaging_model members' densities.
Definition at line 645 of file imaging_model.cpp.
void Imaging_model::check_bg | ( | ) | const throw (jwscxx::base::Arg_error) [protected] |
Checks the background of this Imaging_model against its density range.
jwscxx::base::Arg_error | Imaging_model::bg is not in its density range. |
Definition at line 674 of file imaging_model.cpp.
void Imaging_model::check_c_2 | ( | ) | const throw (jwscxx::base::Arg_error) [protected] |
Checks the constant C_2 of this Imaging_model against its density range.
jwscxx::base::Arg_error | Imaging_model::c_2 is not in its density range. |
Definition at line 692 of file imaging_model.cpp.
const Imaging_window* Imaging_model::window [protected] |
Window of captured images to analyze.
Definition at line 386 of file imaging_model.h.
const Imaging_scale* Imaging_model::scale [protected] |
Scale of each viewing world dimension in the imaging system.
Definition at line 392 of file imaging_model.h.
float Imaging_model::bg [protected] |
Background intensity level of the imaging system.
Must be in the range [0,1].
Definition at line 399 of file imaging_model.h.
float Imaging_model::c_2 [protected] |
Scale for the pixel intensity variance.
Must be >= 0.
Scales the Poisson noise added to the variance for each pixel in the model scene. It is used in conjunction with Alternaria_model::c_1 to calculate that variance.
Definition at line 410 of file imaging_model.h.
double Imaging_model::log_prob [protected] |
Log probability of this Imaging_model.
Definition at line 413 of file imaging_model.h.
const Imaging_model_density* Imaging_model::density [protected] |
Parameters for density functions over this Imaging_model.
Definition at line 416 of file imaging_model.h.