Skip to content

Commit

Permalink
test: better mesh from seg test
Browse files Browse the repository at this point in the history
  • Loading branch information
seankmartin committed Aug 16, 2024
1 parent e1af340 commit 7d29fd6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions manual_tests/segmentation_from_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
from cryoet_data_portal_neuroglancer.precompute.segmentation_mask import encode_segmentation
from cryoet_data_portal_neuroglancer.utils import determine_size_of_non_zero_bounding_box

logging.basicConfig(level=logging.DEBUG, force=True)
#logging.basicConfig(level=logging.DEBUG, force=True)

zarr_path = "102-membrane-1.0_segmentationmask.zarr"
output_path = "102-membrane-1.0_segmentationmask_encoded"
resolution = 1.0 # Non 1.0 is a harder test
resolution = 1.1 # Non 1.0 is a harder test


def grab_annotation():
Expand All @@ -41,14 +41,15 @@ def make_precomputed_segmentation():

def make_multi_res_mesh():
dask_data = load_omezarr_data(zarr_path)
max_simplification_error = 10 * max(1, int(resolution))
mesh_shape = determine_size_of_non_zero_bounding_box(dask_data)
del dask_data
generate_multiresolution_mesh_from_segmentation(
output_path,
"mesh",
max_lod=2,
mesh_shape=mesh_shape,
max_simplification_error=0,
max_simplification_error=max_simplification_error,
)
clean_mesh_folder(output_path, "mesh")

Expand Down

0 comments on commit 7d29fd6

Please sign in to comment.