Go to the documentation of this file.00001 #ifndef mcal_component_analyzer_h
00002 #define mcal_component_analyzer_h
00003
00004
00005
00006
00007
00008 #include <vsl/vsl_fwd.h>
00009 #include <vcl_string.h>
00010 #include <vcl_memory.h>
00011 #include <vnl/vnl_vector.h>
00012 #include <vnl/vnl_matrix.h>
00013 #include <mbl/mbl_data_wrapper.h>
00014 #include <vcl_iosfwd.h>
00015
00016
00017
00018
00019 class mcal_component_analyzer
00020 {
00021 public:
00022
00023
00024 mcal_component_analyzer();
00025
00026
00027 virtual ~mcal_component_analyzer();
00028
00029
00030 void compute_mean(mbl_data_wrapper<vnl_vector<double> >& data,
00031 vnl_vector<double>& mean);
00032
00033
00034
00035
00036
00037 virtual void build(mbl_data_wrapper<vnl_vector<double> >& data,
00038 vnl_vector<double>& mean,
00039 vnl_matrix<double>& modes,
00040 vnl_vector<double>& mode_var);
00041
00042
00043
00044
00045 virtual void build_about_mean(mbl_data_wrapper<vnl_vector<double> >& data,
00046 const vnl_vector<double>& mean,
00047 vnl_matrix<double>& modes,
00048 vnl_vector<double>& mode_var) =0;
00049
00050
00051
00052 virtual void build_from_array(const vnl_vector<double>* data, int n,
00053 vnl_vector<double>& mean,
00054 vnl_matrix<double>& modes,
00055 vnl_vector<double>& mode_var);
00056
00057
00058 short version_no() const;
00059
00060
00061 virtual vcl_string is_a() const = 0;
00062
00063
00064 virtual mcal_component_analyzer* clone() const = 0;
00065
00066
00067 virtual void print_summary(vcl_ostream& os) const =0;
00068
00069
00070 virtual void b_write(vsl_b_ostream& bfs) const=0;
00071
00072
00073 virtual void b_read(vsl_b_istream& bfs)=0;
00074
00075
00076
00077
00078 virtual void config_from_stream(vcl_istream &);
00079
00080
00081 static vcl_auto_ptr<mcal_component_analyzer> create_from_stream(vcl_istream &is);
00082 };
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093 void vsl_add_to_binary_loader(const mcal_component_analyzer& b);
00094
00095
00096 void vsl_b_write(vsl_b_ostream& bfs, const mcal_component_analyzer& b);
00097
00098
00099 void vsl_b_read(vsl_b_istream& bfs, mcal_component_analyzer& b);
00100
00101
00102 vcl_ostream& operator<<(vcl_ostream& os,const mcal_component_analyzer& b);
00103
00104
00105 vcl_ostream& operator<<(vcl_ostream& os,const mcal_component_analyzer* b);
00106
00107 #endif // mcal_component_analyzer_h