Skip to content

Commit 4d22cf4

Browse files
committed
Last version
1 parent b1a65dc commit 4d22cf4

File tree

2 files changed

+3
-110
lines changed

2 files changed

+3
-110
lines changed

exercise-03/_widget.py

Lines changed: 0 additions & 84 deletions
This file was deleted.

exercise-03/astrocytes.py

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
import napari
22
import open3d as o3d
3-
from scipy.spatial import KDTree, Delaunay
4-
import csv
5-
from multiprocessing import Pool
6-
from functools import partial
73
import numpy as np
84
import os
95
import math
@@ -429,30 +425,11 @@ def run_workflow():
429425
acs.decimate(0.8)
430426

431427
# 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)
441430

431+
show_in_napari(acs)
442432

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))
455433

456434
if __name__ == "__main__":
457435
run_workflow()
458-
# show_in_napari(acs)

0 commit comments

Comments
 (0)