~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Tina4/src/tools/smartROI/sroi_tool.h

Version: ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #define POINT_MASK      1
  2 #define LINE_MASK       2
  3 #define CON_MASK        4
  4 
  5 #define PROFILE_MASK    1
  6 #define NORMALISE_MASK  2
  7 #define MSE_MASK        4
  8 #define GLOBAL_MASK     8
  9 
 10 #define SEARCH_MASK             1
 11 #define INIT_SEARCH_MASK        2
 12 #define COARSE_FINE_MASK        4
 13 #define COARSE_MSE_MASK         8
 14 #define FINE_MSE_MASK           16
 15 #define SEARCH_SAVE_MASK        32
 16 
 17 #define MONO    0
 18 #define IMCALC  1
 19 #define TEMP    2
 20  
 21 #define PLEN 40
 22  
 23 typedef struct pdm{
 24         int     vsize;
 25         int     pcavsize;
 26         int     m_modes;
 27         int     p_modes;
 28         int     p_length;
 29         double  s_min;
 30         double  s_max;
 31         double  theta_max;
 32         double  m_max;
 33         double  p_max;
 34         double  g_max;
 35         int     r;
 36         int     c;
 37         int     o;
 38         double  tx;                 /* origin x */
 39         double  ty;                 /* origin y */
 40         double  s;                  /* length */
 41         double  theta;              /* orientation */
 42         Vector  *alpha;             /* or of each sample */
 43         Vector  *maxgrad; 
 44         Matrix  *m;                 /* double of locations */
 45         Matrix  *profile;           /* int of grey levels */
 46         Matrix  *g_profile;
 47         Matrix  *M_Evec;
 48         Vector  *M_Eval;
 49         Matrix  *G_Evec;
 50         Vector  *G_Eval;
 51         Matrix  **P_Evec;
 52         Vector  **P_Eval;
 53         Vector  *m_weight;
 54         Matrix  *p_weight;
 55 }Model;
 56 
 57  
 58 
 59 typedef struct _sroi_dparams
 60 {
 61   double sparams[PLEN];
 62   double lambda[PLEN]; 
 63 
 64   double s_min;
 65   double s_max;
 66   double theta;
 67   double m_max;
 68   double p_max;
 69   double g_max;
 70   double ftol;
 71 
 72   int points;
 73   int outer;
 74   int rows;
 75   int vsize;
 76   int pcavsize;
 77   int m_modes;
 78   int p_modes;
 79   int p_length;
 80 } Sroi_dparams;
 81 
 82 Model *get_model();
 83 void set_model(Model * m);
 84 Model *model_alloc(int nRows, int nPoints, int nOuter, int nProf);
 85 void model_free(Model * mdl);
 86 Model *model_alloc_inner(Model *mdl, int nInner);
 87 int get_int(FILE * f);
 88 float get_float(FILE * f);
 89 double get_ledouble(FILE * f);
 90 double get_lfdouble(FILE * f);
 91 void dvector_printf(FILE * f, Vector * vec);
 92 void dvector_scanf(FILE * f, Vector * vec);
 93 void dmatrix_scanf(FILE * f, Matrix * mat);
 94 void sroi_sample_profile(Imrect *im);
 95 void position();
 96 void i_position();
 97 void angle_points();
 98 void output_model(char *fname);
 99 void input_model(char *fname);
100 int   sroi_open_buildlist(char *fname);
101 int  sroi_getnext_build(char *fname);
102 void  sroi_close_buildlist(void);
103 List *sroi_get_markup();
104 static void  tv_pframe_draw(Tv *tv);
105 static void  tv_rframe_draw(Tv *tv);
106 static void update_startframe(Vec2 a, Vec2 b);
107 static void  paxis_set_start(Tv *tv, Ipos pos);
108 static void  paxis_frame_drag(Tv *tv, Ipos pos);
109 static void  paxis_set_end(Tv *tv, Ipos pos);
110 static void  pmove_frame_get(Tv *tv, Ipos pos);
111 static void  pmove_frame_drag(Tv *tv, Ipos pos);
112 static void paxis_show(Tv *tv, Ipos pos);
113 static void  pmove_frame_put(Tv *tv, Ipos pos);
114 Tv_mouse  sroi_parall_axis();
115 static void raxis_show(Tv *tv, Ipos pos);
116 static void  raxis_set_start(Tv *tv, Ipos pos);
117 static void  raxis_frame_drag(Tv *tv, Ipos pos);
118 static void  raxis_set_end(Tv *tv, Ipos pos);
119 static void  rmove_frame_get(Tv *tv, Ipos pos);
120 static void  rmove_frame_drag(Tv *tv, Ipos pos);
121 static void  rmove_frame_put(Tv *tv, Ipos pos);
122 Tv_mouse   sroi_radial_axis();
123 static  void pnt_list_add(Vec2 cp);
124 static  void pnt_list_show(Tv *tv);
125 static  void pnt_place_down(Tv *tv, Ipos pos);
126 static  void pnt_place_drag(Tv *tv, Ipos pos);
127 static  void pnt_place_up(Tv *tv, Ipos pos);
128 static  void restart_markup(Tv *tv, Ipos pos);
129 Tv_mouse sroi_markup_mouse();
130 void prof_profile_on(Bool on);
131 void prof_gradient_on(Bool on);
132 void prof_normalise_on(Bool on);
133 void prof_mse_on(Bool on);
134 void prof_global_on(Bool on);
135 Bool prof_profile_get();
136 Bool prof_gradient_get();
137 Bool prof_normalise_get();
138 Bool prof_mse_get();
139 Bool prof_global_get();
140 Matrix *matrix_swap_all_cols(Matrix * mat);
141 Vector *vector_swap(Vector * vec);
142 void dvector_sqrt(Vector * vec);
143 void input_pca(char *pcafn);
144 void pca_model(char *modelfn, char *pcafn, char *meanfn);
145 static char getfromfile(FILE * fp);
146 static int read_poly_points(FILE * fp, double **el, int m, int n);
147 static int sroi_roi_readpnts(FILE * fp, double **pos, int m, int n);
148 void sroi_polygon(double **pos, int m, int n, char *config_file);
149 void sroi_polygon_label(double **pos, int m, int n, Tv * tv);
150 int  new_model_needed(Model *m);
151 void sample_markup(List *poly);
152 void sample_outer(List *poly);
153 void export_outer();
154 void sample_inner(List *poly);
155 void export_inner();
156 static void init_cfparams();
157 int model_limits();
158 static double cost_func(int n, double *t);
159 int update_search_params(double *t, int size);
160 void find_simplex(Imrect *im);
161 Sroi_dparams  *sroi_get_dparams();
162 static void reset_weights();
163 static void sroitool_tv_update(void);
164 static void prof_check_proc(int val);
165 static void input_model_proc();
166 static void output_model_proc();
167 static void sroi_sample_proc();
168 static void show_model_proc();
169 static  void sroi_mouse_proc(Tv_mouse(*func) (   ));
170 static void export_outer_proc();
171 static void export_inner_proc();
172 static void make_model_proc();
173 static void build_pca_proc();
174 static void input_pca_proc();
175 static void search_proc();
176 static void input_poly_proc();
177 void init_dparams();
178 static void update_model();
179 static void update_dparams();
180 static void flush_dialog();
181 static void param_dialog();
182 void sroi_tool(int x, int y);
183 Imrect *tv_get_imrect(Tv *tv);
184 void draw_sample_outer(Tv *tv);
185 void  draw_sample_inner(Tv *tv);
186 void  draw_parall_markup(Tv *tv);
187 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.