Skip to content

Commit

Permalink
Merge branch 'cuttlefish-atlas' of https://github.com/kjungwoo5/brain…
Browse files Browse the repository at this point in the history
…globe-atlasapi into cuttlefish-atlas
  • Loading branch information
kjungwoo5 committed Dec 8, 2024
2 parents 84f9d47 + bbf96d4 commit 80f188e
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions validation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import shutil
from pathlib import Path

import napari
Expand All @@ -16,12 +15,11 @@
validate_atlas_files,
validate_checksum,
validate_image_dimensions,
validate_mesh_matches_image_extents,
)

all_validation_functions = [
validate_atlas_files,
#validate_mesh_matches_image_extents,
# validate_mesh_matches_image_extents,
open_for_visual_check,
validate_checksum,
validate_image_dimensions,
Expand All @@ -42,16 +40,16 @@

# make sure we have the latest packaged version in .brainglobe
# by replacing it with the working_dir version if needed
#atlas_name_with_version = f"{atlas_name}_{resolution}um_v1.{minor_version}"
#source_dir = working_dir / atlas_name / atlas_name_with_version
#destination_dir = brainglobe_dir / atlas_name_with_version
#destination_dir = working_dir / atlas_name_with_version
#if destination_dir.exists() and destination_dir.is_dir():
# atlas_name_with_version = f"{atlas_name}_{resolution}um_v1.{minor_version}"
# source_dir = working_dir / atlas_name / atlas_name_with_version
# destination_dir = brainglobe_dir / atlas_name_with_version
# destination_dir = working_dir / atlas_name_with_version
# if destination_dir.exists() and destination_dir.is_dir():
# shutil.rmtree(destination_dir)
#assert source_dir.exists()
#if source_dir.exists():
# assert source_dir.exists()
# if source_dir.exists():
# shutil.copytree(source_dir, destination_dir)
#assert destination_dir.exists()
# assert destination_dir.exists()

# run validation functions on the new atlas
atlas = BrainGlobeAtlas(f"{atlas_name}_{resolution}um")
Expand Down Expand Up @@ -88,13 +86,11 @@

viewer = Viewer()
viewer.dims.ndisplay = 3
napari_atlas = NapariAtlasRepresentation(
atlas, viewer
)
napari_atlas = NapariAtlasRepresentation(atlas, viewer)
napari_atlas.add_structure_to_viewer("AAB")
napari_atlas.add_structure_to_viewer("V")
napari_atlas.add_structure_to_viewer("Or")
napari_atlas.add_structure_to_viewer("BPCl")
napari_atlas.add_to_viewer()

napari.run()
napari.run()

0 comments on commit 80f188e

Please sign in to comment.