Contains mean/modes etc of a shape model. More...
#include <msm_shape_model.h>
Public Member Functions | |
msm_shape_model () | |
~msm_shape_model () | |
void | set (const msm_points &mean, const vnl_matrix< double > &modes, const vnl_vector< double > &mode_var, const vnl_vector< double > &default_pose, const msm_aligner &aligner, const msm_param_limiter ¶m_limiter) |
Set up model. | |
const vnl_vector< double > | default_pose () const |
Pose to use as a default (for convenience). | |
const msm_aligner & | aligner () const |
Object used to deal with global transformations. | |
short | version_no () const |
Version number for I/O. | |
vcl_string | is_a () const |
Name of the class. | |
void | print_summary (vcl_ostream &os) const |
Print class to os. | |
void | b_write (vsl_b_ostream &bfs) const |
Save class to binary file stream. | |
void | b_read (vsl_b_istream &bfs) |
Load class from binary file stream. | |
bool | operator== (const msm_shape_model &points) |
Equality test. | |
void | set (const msm_points &mean, const vnl_matrix< double > &modes, const vnl_vector< double > &mode_var, const msm_param_limiter ¶m_limiter) |
Set up model. | |
const vnl_vector< double > & | mean () const |
Mean of shape model as vector. | |
double | ref_mean_points_scale () const |
Scale of mean points in ref. frame (=mean_.scale()). | |
const msm_points & | mean_points () const |
Mean of shape model as points. | |
const vnl_matrix< double > & | modes () const |
Modes of variation. | |
const vnl_vector< double > & | mode_var () const |
Variance for each mode. | |
const msm_param_limiter & | param_limiter () const |
Current object which limits parameters. | |
msm_param_limiter & | param_limiter () |
Current object which limits parameters (non-const). | |
unsigned | size () const |
Number of points. | |
unsigned | n_modes () const |
Number of modes. | |
bool | operator== (const msm_ref_shape_model &points) const |
Equality test. | |
Protected Attributes | |
msm_points | mean_ |
Mean of shape model. | |
double | mean_points_scale_ |
Scale of mean points (=mean_.scale()). | |
vnl_matrix< double > | modes_ |
Modes of variation. | |
vnl_vector< double > | mode_var_ |
Variance for each mode. | |
mbl_cloneable_ptr < msm_param_limiter > | param_limiter_ |
Default choice of parameter limiter. | |
Private Attributes | |
vnl_vector< double > | default_pose_ |
Pose to use as a default (for convenience). | |
mbl_cloneable_ptr< msm_aligner > | aligner_ |
Object used to deal with global transformations. |
Contains mean/modes etc of a shape model.
Container to hold the components of a statistical shape model. Uses a linear model the shape variation. Global pose form defined by the choice of msm_aligner class.
The associated msm_shape_instance class contains functions to synthesize and match to shapes using this model.
Definition at line 19 of file msm_shape_model.h.
msm_shape_model::msm_shape_model | ( | ) |
Definition at line 19 of file msm_shape_model.cxx.
msm_shape_model::~msm_shape_model | ( | ) |
Definition at line 27 of file msm_shape_model.cxx.
const msm_aligner& msm_shape_model::aligner | ( | ) | const [inline] |
Object used to deal with global transformations.
Definition at line 49 of file msm_shape_model.h.
void msm_shape_model::b_read | ( | vsl_b_istream & | bfs | ) |
Load class from binary file stream.
Reimplemented from msm_ref_shape_model.
Definition at line 122 of file msm_shape_model.cxx.
void msm_shape_model::b_write | ( | vsl_b_ostream & | bfs | ) | const |
Save class to binary file stream.
Reimplemented from msm_ref_shape_model.
Definition at line 109 of file msm_shape_model.cxx.
const vnl_vector<double> msm_shape_model::default_pose | ( | ) | const [inline] |
Pose to use as a default (for convenience).
Definition at line 45 of file msm_shape_model.h.
vcl_string msm_shape_model::is_a | ( | ) | const |
Name of the class.
Reimplemented from msm_ref_shape_model.
Definition at line 81 of file msm_shape_model.cxx.
const vnl_vector<double>& msm_ref_shape_model::mean | ( | ) | const [inline, inherited] |
Mean of shape model as vector.
Definition at line 61 of file msm_ref_shape_model.h.
const msm_points& msm_ref_shape_model::mean_points | ( | ) | const [inline, inherited] |
Mean of shape model as points.
Definition at line 68 of file msm_ref_shape_model.h.
const vnl_vector<double>& msm_ref_shape_model::mode_var | ( | ) | const [inline, inherited] |
Variance for each mode.
Definition at line 74 of file msm_ref_shape_model.h.
const vnl_matrix<double>& msm_ref_shape_model::modes | ( | ) | const [inline, inherited] |
Modes of variation.
Definition at line 71 of file msm_ref_shape_model.h.
unsigned msm_ref_shape_model::n_modes | ( | ) | const [inline, inherited] |
Number of modes.
Definition at line 88 of file msm_ref_shape_model.h.
bool msm_shape_model::operator== | ( | const msm_shape_model & | points | ) |
Equality test.
Definition at line 47 of file msm_shape_model.cxx.
bool msm_ref_shape_model::operator== | ( | const msm_ref_shape_model & | points | ) | const [inherited] |
Equality test.
Definition at line 54 of file msm_ref_shape_model.cxx.
const msm_param_limiter& msm_ref_shape_model::param_limiter | ( | ) | const [inline, inherited] |
Current object which limits parameters.
Definition at line 77 of file msm_ref_shape_model.h.
msm_param_limiter& msm_ref_shape_model::param_limiter | ( | ) | [inline, inherited] |
Current object which limits parameters (non-const).
Definition at line 81 of file msm_ref_shape_model.h.
void msm_shape_model::print_summary | ( | vcl_ostream & | os | ) | const |
Print class to os.
Reimplemented from msm_ref_shape_model.
Definition at line 91 of file msm_shape_model.cxx.
double msm_ref_shape_model::ref_mean_points_scale | ( | ) | const [inline, inherited] |
Scale of mean points in ref. frame (=mean_.scale()).
Definition at line 64 of file msm_ref_shape_model.h.
void msm_shape_model::set | ( | const msm_points & | mean, |
const vnl_matrix< double > & | modes, | ||
const vnl_vector< double > & | mode_var, | ||
const vnl_vector< double > & | default_pose, | ||
const msm_aligner & | aligner, | ||
const msm_param_limiter & | param_limiter | ||
) |
Set up model.
Definition at line 32 of file msm_shape_model.cxx.
void msm_ref_shape_model::set | ( | const msm_points & | mean, |
const vnl_matrix< double > & | modes, | ||
const vnl_vector< double > & | mode_var, | ||
const msm_param_limiter & | param_limiter | ||
) | [inherited] |
Set up model.
Definition at line 34 of file msm_ref_shape_model.cxx.
unsigned msm_ref_shape_model::size | ( | ) | const [inline, inherited] |
Number of points.
Definition at line 85 of file msm_ref_shape_model.h.
short msm_shape_model::version_no | ( | ) | const |
Version number for I/O.
Reimplemented from msm_ref_shape_model.
Definition at line 72 of file msm_shape_model.cxx.
mbl_cloneable_ptr<msm_aligner> msm_shape_model::aligner_ [private] |
Object used to deal with global transformations.
Definition at line 26 of file msm_shape_model.h.
vnl_vector<double> msm_shape_model::default_pose_ [private] |
Pose to use as a default (for convenience).
Definition at line 23 of file msm_shape_model.h.
msm_points msm_ref_shape_model::mean_ [protected, inherited] |
Mean of shape model.
Definition at line 32 of file msm_ref_shape_model.h.
double msm_ref_shape_model::mean_points_scale_ [protected, inherited] |
Scale of mean points (=mean_.scale()).
Definition at line 35 of file msm_ref_shape_model.h.
vnl_vector<double> msm_ref_shape_model::mode_var_ [protected, inherited] |
Variance for each mode.
Definition at line 41 of file msm_ref_shape_model.h.
vnl_matrix<double> msm_ref_shape_model::modes_ [protected, inherited] |
Modes of variation.
Definition at line 38 of file msm_ref_shape_model.h.
mbl_cloneable_ptr<msm_param_limiter> msm_ref_shape_model::param_limiter_ [protected, inherited] |
Default choice of parameter limiter.
Definition at line 44 of file msm_ref_shape_model.h.