|
1 | 1 | import napari
|
2 | 2 | import open3d as o3d
|
3 |
| -from scipy.spatial import KDTree, Delaunay |
4 |
| -import csv |
5 |
| -from multiprocessing import Pool |
6 |
| -from functools import partial |
7 | 3 | import numpy as np
|
8 | 4 | import os
|
9 | 5 | import math
|
@@ -429,30 +425,11 @@ def run_workflow():
|
429 | 425 | acs.decimate(0.8)
|
430 | 426 |
|
431 | 427 | # Exporting mesh as PLY
|
432 |
| - for i, m in enumerate(acs.meshes): |
433 |
| - o3d.io.write_triangle_mesh(f"/home/benedetti/Downloads/I2K/data/astrocytes/astrocytes-{i}.ply", m) |
434 |
| - |
435 |
| - # Counting holes |
436 |
| - # all_holes = acs.process_n_holes() |
437 |
| - # for holes in all_holes: |
438 |
| - # print("Number of holes: ", len(holes)) |
439 |
| - # print(np.unique([len(hole) for hole in holes])) |
440 |
| - show_in_napari(acs) |
| 428 | + # for i, m in enumerate(acs.meshes): |
| 429 | + # o3d.io.write_triangle_mesh(f"/home/benedetti/Downloads/I2K/data/astrocytes/astrocytes-{i}.ply", m) |
441 | 430 |
|
| 431 | + show_in_napari(acs) |
442 | 432 |
|
443 |
| -def dump(): |
444 |
| - acs = AstrocytesContact() |
445 |
| - target_folder = "/home/benedetti/Downloads/I2K/data/" |
446 |
| - target_path = os.path.join(target_folder, "test-holes.ply") |
447 |
| - acs.open_mesh(target_path) |
448 |
| - |
449 |
| - all_holes = acs.process_n_holes() |
450 |
| - for holes in all_holes: |
451 |
| - print("Number of holes: ", len(holes)) |
452 |
| - print(np.unique([len(hole) for hole in holes])) |
453 |
| - # for hole in holes: |
454 |
| - # print("Hole size: ", len(hole)) |
455 | 433 |
|
456 | 434 | if __name__ == "__main__":
|
457 | 435 | run_workflow()
|
458 |
| - # show_in_napari(acs) |
0 commit comments