Alternaria
fit cylinders and ellipsoids to fungus
Imaging_model Class Reference

Model of the imaging system. More...

#include <imaging_model.h>

Inheritance diagram for Imaging_model:
Collaboration diagram for Imaging_model:

List of all members.

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_modelclone ()
 Clones this Imaging_model.
const Imaging_windowget_window () const
 Returns the window of this Imaging_model.
const Imaging_scaleget_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_densityget_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_windowwindow
 Window of captured images to analyze.
const Imaging_scalescale
 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_densitydensity
 Parameters for density functions over this Imaging_model.

Detailed Description

Model of the imaging system.

Definition at line 286 of file imaging_model.h.


Constructor & Destructor Documentation

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.

Parameters:
bgBackground value, see Imaging_model::bg.
c_2Constant value, see Imaging_model::c_2.
windowImaging_window to use.
scaleImaging_scale to use.
densityImaging_model_density parameters for probabilities.
Exceptions:
jwscxx::base::Arg_errorImaging_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.

Parameters:
modelModel 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.

Parameters:
fnameName of the file to read the Imaging_model from.
windowImaging_window to use.
scaleImaging_scale to use.
densityImaging_model_density parameters for probabilities.
Exceptions:
jwscxx::base::IO_errorCould not open fname or read from it.
jwscxx::base::Arg_errorImproper 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.


Member Function Documentation

Imaging_model * Imaging_model::clone ( )

Clones this Imaging_model.

Returns:
A pointer to a cloned 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.

Parameters:
bgNew Imaging_model::bg.
Exceptions:
jwscxx::base::Arg_errorThe 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.

Parameters:
c_2New Imaging_model::c_2.
Exceptions:
jwscxx::base::Arg_errorThe 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

           Bg: bg
          C_2: c_2
     Log Prob: log prob
Parameters:
outOutput 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

       Window: col row img num_cols num_rows num_imgs
        Scale: x y z
           Bg: bg
          C_2: c_2
     Log Prob: log prob
Parameters:
fnameName of the file to print to.
Exceptions:
jwscxx::base::IO_errorCould 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.

Exceptions:
jwscxx::base::Arg_errorImaging_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.

Exceptions:
jwscxx::base::Arg_errorImaging_model::c_2 is not in its density range.

Definition at line 692 of file imaging_model.cpp.


Member Data Documentation

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.

Parameters for density functions over this Imaging_model.

Definition at line 416 of file imaging_model.h.


The documentation for this class was generated from the following files: