|
16 | 16 | "metadata": {}, |
17 | 17 | "outputs": [], |
18 | 18 | "source": [ |
19 | | - "from napari_stress import reconstruction, frame_by_frame, extract_vertex_points\n", |
20 | 19 | "import napari\n", |
21 | | - "import vedo\n", |
22 | 20 | "import numpy as np\n", |
23 | | - "from skimage import transform, filters, measure\n", |
24 | | - "from napari_timelapse_processor import frame_by_frame" |
| 21 | + "import vedo\n", |
| 22 | + "from napari_timelapse_processor import frame_by_frame\n", |
| 23 | + "from skimage import filters, measure, transform\n", |
| 24 | + "\n", |
| 25 | + "from napari_stress import extract_vertex_points, frame_by_frame, reconstruction" |
25 | 26 | ] |
26 | 27 | }, |
27 | 28 | { |
|
236 | 237 | "metadata": {}, |
237 | 238 | "outputs": [], |
238 | 239 | "source": [ |
239 | | - "from napari_stress._reconstruction.patches import (_estimate_patch_radii,\n", |
240 | | - " _find_neighbor_indices,\n", |
241 | | - " _orient_patch,\n", |
242 | | - " _fit_quadratic_surface, \n", |
243 | | - " _create_fitted_coordinates,\n", |
244 | | - " compute_orientation_matrix,\n", |
245 | | - " _calculate_mean_curvature_on_patch)" |
| 240 | + "from napari_stress._reconstruction.patches import (\n", |
| 241 | + " _calculate_mean_curvature_on_patch,\n", |
| 242 | + " _create_fitted_coordinates,\n", |
| 243 | + " _estimate_patch_radii,\n", |
| 244 | + " _find_neighbor_indices,\n", |
| 245 | + " _fit_quadratic_surface,\n", |
| 246 | + " _orient_patch,\n", |
| 247 | + ")" |
246 | 248 | ] |
247 | 249 | }, |
248 | 250 | { |
|
283 | 285 | "# Initialize fitted point cloud and find neighbors\n", |
284 | 286 | "fitted_point_cloud = np.copy(point_cloud)\n", |
285 | 287 | "search_radii = _estimate_patch_radii(point_cloud)\n", |
286 | | - " \n", |
| 288 | + "\n", |
287 | 289 | "neighbor_indices = _find_neighbor_indices(point_cloud, search_radii)\n", |
288 | 290 | "mean_curvatures = [np.nan] * len(point_cloud)\n", |
289 | 291 | "principal_curvatures = [np.nan] * len(point_cloud)\n", |
|
309 | 311 | " fitted_point_cloud[idx, :] = fitted_query_point[None, :] @ orient_matrix.T +\\\n", |
310 | 312 | " patch_center\n", |
311 | 313 | " fitted_patch_transformed = fitted_patch @ orient_matrix.T + patch_center\n", |
312 | | - " \n", |
| 314 | + "\n", |
313 | 315 | " mean_curv, principal_curv = _calculate_mean_curvature_on_patch(\n", |
314 | 316 | " fitted_query_point, fitting_params)\n", |
315 | | - " \n", |
| 317 | + "\n", |
316 | 318 | " mean_curvatures[idx] = mean_curv\n", |
317 | 319 | " principal_curvatures[idx] = principal_curv" |
318 | 320 | ] |
|
0 commit comments