From 9751b33cb42984ac232f78d948bc42c70f721542 Mon Sep 17 00:00:00 2001 From: Viktor Plattner Date: Wed, 6 Mar 2024 12:52:14 +0000 Subject: [PATCH 1/3] removing rotated_annotations to fix mesh orientation --- .../atlas_generation/atlas_scripts/princeton_mouse.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/brainglobe_atlasapi/atlas_generation/atlas_scripts/princeton_mouse.py b/brainglobe_atlasapi/atlas_generation/atlas_scripts/princeton_mouse.py index 35c7c59b..d737d542 100644 --- a/brainglobe_atlasapi/atlas_generation/atlas_scripts/princeton_mouse.py +++ b/brainglobe_atlasapi/atlas_generation/atlas_scripts/princeton_mouse.py @@ -127,9 +127,9 @@ def add_parent_id(child_id): meshes_dir_path.mkdir(exist_ok=True) tree = get_structures_tree(structs_dict) - rotated_annotations = np.rot90(annotated_volume, axes=(0, 2)) + # rotated_annotations = np.rot90(annotated_volume, axes=(0, 2)) - labels = np.unique(rotated_annotations).astype(np.int32) + labels = np.unique(annotated_volume).astype(np.int32) for key, node in tree.nodes.items(): if key in labels: is_label = True @@ -153,7 +153,7 @@ def add_parent_id(child_id): node, tree, labels, - rotated_annotations, + annotated_volume, ROOT_ID, closing_n_iters, decimate_fraction, @@ -177,7 +177,7 @@ def add_parent_id(child_id): node, tree, labels, - rotated_annotations, + annotated_volume, ROOT_ID, closing_n_iters, decimate_fraction, From 7338e45339312f21588bf16c77ecf4fd4ea198db Mon Sep 17 00:00:00 2001 From: Viktor Plattner Date: Thu, 7 Mar 2024 14:32:10 +0000 Subject: [PATCH 2/3] set mesh scaling to True --- .../atlas_generation/atlas_scripts/princeton_mouse.py | 1 + 1 file changed, 1 insertion(+) diff --git a/brainglobe_atlasapi/atlas_generation/atlas_scripts/princeton_mouse.py b/brainglobe_atlasapi/atlas_generation/atlas_scripts/princeton_mouse.py index d737d542..72565809 100644 --- a/brainglobe_atlasapi/atlas_generation/atlas_scripts/princeton_mouse.py +++ b/brainglobe_atlasapi/atlas_generation/atlas_scripts/princeton_mouse.py @@ -232,6 +232,7 @@ def add_parent_id(child_id): hemispheres_stack=None, cleanup_files=False, compress=True, + scale_meshes=True, ) return output_filename From 4cbc10cd4bdd4fbecf20f7d31176ce8b9954c5f0 Mon Sep 17 00:00:00 2001 From: Alessandro Felder Date: Mon, 11 Mar 2024 10:46:56 +0000 Subject: [PATCH 3/3] remove unnecessary line was commented out and a relic of former brainrender issues --- .../atlas_generation/atlas_scripts/princeton_mouse.py | 1 - 1 file changed, 1 deletion(-) diff --git a/brainglobe_atlasapi/atlas_generation/atlas_scripts/princeton_mouse.py b/brainglobe_atlasapi/atlas_generation/atlas_scripts/princeton_mouse.py index 72565809..9802373f 100644 --- a/brainglobe_atlasapi/atlas_generation/atlas_scripts/princeton_mouse.py +++ b/brainglobe_atlasapi/atlas_generation/atlas_scripts/princeton_mouse.py @@ -127,7 +127,6 @@ def add_parent_id(child_id): meshes_dir_path.mkdir(exist_ok=True) tree = get_structures_tree(structs_dict) - # rotated_annotations = np.rot90(annotated_volume, axes=(0, 2)) labels = np.unique(annotated_volume).astype(np.int32) for key, node in tree.nodes.items():