-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdeform_prototypes.h
267 lines (226 loc) · 8.53 KB
/
deform_prototypes.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
#ifndef DEF_deform_prototypes
#define DEF_deform_prototypes
public void deform_lines(
lines_struct *lines,
deform_struct *deform_parms );
public void deform_lines_one_iteration(
lines_struct *lines,
deform_struct *deform_parms,
int iteration );
public void get_line_equilibrium_point(
lines_struct *lines,
int axis,
int point_index,
int neighbours[],
Real curvature_factors[],
Real max_search_distance,
int degrees_continuity,
Volume volume,
Volume label_volume,
boundary_definition_struct *boundary_def,
deformation_model_struct *deformation_model,
Point *equilibrium_point,
Point *boundary_point );
public int find_axial_plane(
lines_struct *lines );
public void deform_polygons(
polygons_struct *polygons,
deform_struct *deform_parms );
public void deform_polygons_one_iteration(
polygons_struct *polygons,
deform_struct *deform_parms,
int iteration );
public BOOLEAN find_boundary_in_direction(
Volume volume,
Volume label_volume,
voxel_coef_struct *lookup,
bitlist_3d_struct *done_bits,
bitlist_3d_struct *surface_bits,
Real model_dist,
Point *ray_origin,
Vector *unit_pos_dir,
Vector *unit_neg_dir,
Real max_outwards_search_distance,
Real max_inwards_search_distance,
int degrees_continuity,
boundary_definition_struct *boundary_def,
Real *boundary_distance );
public int find_voxel_line_polynomial(
Real coefs[],
int degrees_continuity,
int x,
int y,
int z,
Real line_origin[],
Real line_direction[],
Real line_poly[] );
public int find_voxel_line_value_intersection(
Real coefs[],
int degrees_continuity,
int x,
int y,
int z,
Real line_origin[],
Real line_direction[],
Real t_min,
Real t_max,
Real isovalue,
Real distances[3] );
public void initialize_deformation_model(
deformation_model_struct *model );
public void print_deformation_model(
deformation_model_struct *deformation_model );
public Status add_deformation_model(
deformation_model_struct *deformation_model,
int up_to_n_points,
Real model_weight,
char model_filename[],
Real min_curvature_offset,
Real max_curvature_offset );
public void delete_deformation_model(
deformation_model_struct *model );
public Status input_original_positions(
deformation_model_struct *deform_model,
char position_filename[],
Real max_position_offset,
int n_deforming_points );
public BOOLEAN check_correct_deformation_polygons(
polygons_struct *polygons,
deformation_model_struct *model );
public BOOLEAN check_correct_deformation_lines(
lines_struct *lines,
deformation_model_struct *model );
public deform_model_struct *find_relevent_model(
deformation_model_struct *model,
int point_index );
public void get_model_shape_point(
Point *origin,
Vector *pos_model_dir,
Vector *neg_model_dir,
Real dist,
Point *point );
public void compute_equilibrium_point(
int point_index,
BOOLEAN boundary_exists,
Real boundary_dist,
Real base_length,
Real model_dist,
Vector *pos_model_dir,
Vector *neg_model_dir,
Point *centroid,
deformation_model_struct *deformation_model,
Point *equilibrium_point );
public void compute_model_dirs(
Point *centroid,
Vector *normal,
Real base_length,
Point *model_point,
Real *model_dist,
Point *search_origin,
Vector *pos_model_dir,
Vector *neg_model_dir );
public void get_model_point(
deformation_model_struct *deformation_model,
Point points[],
int point_index,
int n_neighbours,
int neighbours[],
Real curvatures[],
Point *centroid,
Vector *normal,
Real base_length,
Point *model_point );
public void get_neighbours_of_line_vertex(
lines_struct *lines,
int vertex_index,
int neighbours[2] );
public BOOLEAN deformation_model_includes_average(
deformation_model_struct *model );
public Real compute_line_curvature(
lines_struct *lines,
int axis,
int point_index,
int prev_point_index,
int next_point_index );
public Real deform_point(
int point_index,
Point points[],
Point *equilibrium_point,
Real fractional_step,
Real max_step,
BOOLEAN position_constrained,
Real max_position_offset,
Point original_positions[],
Point *new_point );
public void compute_line_centroid_and_normal(
lines_struct *lines,
int axis,
int prev_point_index,
int next_point_index,
Point *centroid,
Vector *normal,
Real *base_length );
public int get_subsampled_neighbours_of_point(
deformation_model_struct *deformation_model,
polygons_struct *polygons,
int poly,
int vertex_index,
int neighbours[],
int max_neighbours,
BOOLEAN *interior_flag );
public BOOLEAN is_point_inside_surface(
Volume volume,
Volume label_volume,
int continuity,
Real voxel[],
Vector *direction,
boundary_definition_struct *boundary_def );
public void get_centre_of_cube(
Point *cube,
int sizes[3],
Point *centre );
public BOOLEAN contains_value(
Real values[2][2][2],
int sizes[3] );
public BOOLEAN cube_is_small_enough(
Point cube[2],
int sizes[3],
Real min_cube_size );
public void initialize_deform_stats(
deform_stats *stats );
public void record_error_in_deform_stats(
deform_stats *stats,
Real error );
public void print_deform_stats(
deform_stats *stats,
int n_points );
public BOOLEAN get_max_point_cube_distance(
Point cube[2],
int sizes[3],
Point *point,
Real *distance );
public void initialize_deformation_parameters(
deform_struct *deform );
public void delete_deformation_parameters(
deform_struct *deform );
public void set_boundary_definition(
boundary_definition_struct *boundary_def,
Real min_value,
Real max_value,
Real grad_threshold,
Real angle,
char direction,
Real tolerance );
public void initialize_lookup_volume_coeficients(
voxel_coef_struct *lookup );
public void lookup_volume_coeficients(
voxel_coef_struct *lookup,
Volume volume,
int degrees_continuity,
int x,
int y,
int z,
Real c[] );
public void delete_lookup_volume_coeficients(
voxel_coef_struct *lookup );
#endif