00001
00020 #ifndef PIECES_H
00021 #define PIECES_H
00022
00023
00024
00025
00026 #include "matrix.h"
00027 #include "seam.h"
00028 #include "states.h"
00029
00030
00031
00032
00037 typedef struct
00038 {
00039 TPOINT topleft;
00040 TPOINT botright;
00041 } BOUNDS;
00042
00053 typedef BOUNDS *BOUNDS_LIST;
00054
00055
00056
00057
00058 void break_pieces(TBLOB *blobs, SEAMS seams, INT16 start, INT16 end);
00059
00060 void join_pieces(TBLOB *piece_blobs, SEAMS seams, INT16 start, INT16 end);
00061
00062 void hide_seam(SEAM *seam);
00063
00064 void hide_edge_pair(EDGEPT *pt1, EDGEPT *pt2);
00065
00066 void reveal_seam(SEAM *seam);
00067
00068 void reveal_edge_pair(EDGEPT *pt1, EDGEPT *pt2);
00069
00070 void bounds_of_piece(BOUNDS_LIST bounds,
00071 INT16 start,
00072 INT16 end,
00073 TPOINT *extreme_tl,
00074 TPOINT *extreme_br);
00075
00076 CHOICES classify_piece(TBLOB *pieces,
00077 SEAMS seams,
00078 INT16 start,
00079 INT16 end,
00080 INT32 fx,
00081 STATE *this_state,
00082 STATE *best_state,
00083 INT32 pass,
00084 INT32 blob_index);
00085
00086 CHOICES get_piece_rating(MATRIX ratings,
00087 TBLOB *blobs,
00088 SEAMS seams,
00089 INT16 start,
00090 INT16 end,
00091 INT32 fx,
00092 STATE *this_state,
00093 STATE *best_state,
00094 INT32 pass,
00095 INT32 blob_index);
00096
00097 BOUNDS_LIST record_blob_bounds(TBLOB *blobs);
00098
00099 MATRIX record_piece_ratings(TBLOB *blobs);
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163 #endif