Skip to content

Commit

Permalink
Remove references to manual segmentation (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamltyson authored Dec 8, 2023
1 parent 77f8802 commit 29de6f8
Show file tree
Hide file tree
Showing 21 changed files with 17 additions and 19 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@

Segmentation of 1/2/3D brain structures in a common anatomical space

`brainglobe-segmentation` is a companion to [`brainreg`](https://github.com/brainglobe/brainreg) allowing manual segmentation of regions/objects within the brain (e.g. injection sites, probes etc.) allowing for automated analysis of brain region distribution, and visualisation (e.g. in [brainrender](https://github.com/brainglobe/brainrender)).
`brainglobe-segmentation` is a companion to [`brainreg`](https://github.com/brainglobe/brainreg) allowing segmentation
of regions/objects within the brain (e.g. injection sites, probes etc.) allowing for automated analysis of brain
region distribution, and visualisation (e.g. in [brainrender](https://github.com/brainglobe/brainrender)).
`brainglobe-segmentation` is the successor to [`brainreg-segment`](https://github.com/brainglobe/brainreg-segmentation).

`brainglobe-segmentation` and `brainreg` were developed by [Adam Tyson](https://github.com/adamltyson) and [Charly Rousseau](https://github.com/crousseau) in the [Margrie Lab](https://www.sainsburywellcome.org/web/groups/margrie-lab), based on [aMAP](https://doi.org/10.1038/ncomms11879) by [Christian Niedworok](https://github.com/cniedwor). The work was generously supported by the [Sainsbury Wellcome Centre](https://www.sainsburywellcome.org/web/).
Expand Down
2 changes: 1 addition & 1 deletion brainglobe_segmentation/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Paths:

def __init__(self, brainreg_directory, atlas_space=False):
self.brainreg_directory = brainreg_directory
self.main_directory = self.brainreg_directory / "manual_segmentation"
self.main_directory = self.brainreg_directory / "segmentation"

if atlas_space:
self.segmentation_directory = self.main_directory / "atlas_space"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "brainglobe-segmentation"
description = "Manual segmentation of 3D brain structures in a common anatomical space"
description = "Segmentation of anatomical structures in a common coordinate space"
readme = "README.md"
authors = [
{ name = "Adam Tyson, Horst Obenhaus", email = "[email protected]" },
Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def segmentation_widget_with_data_atlas_space(tmp_path, segmentation_widget):
Fixture to load a brainreg directory into the segmentation widget.
Data is copied to tmpdir so that when it's loaded, so all the paths
are set correctly.
The manual segmentation data is then deleted so that saving/export
The segmentation data is then deleted so that saving/export
can be properly tested
"""
tmp_input_dir = tmp_path / "brainreg_output"
Expand All @@ -44,6 +44,6 @@ def segmentation_widget_with_data_atlas_space(tmp_path, segmentation_widget):
)
segmentation_widget.directory = Path(tmp_input_dir)
segmentation_widget.load_brainreg_directory()
# delete manual segmentation data to ensure it's saved correctly in tests
# delete segmentation data to ensure it's saved correctly in tests
shutil.rmtree(segmentation_widget.paths.main_directory)
return segmentation_widget
10 changes: 5 additions & 5 deletions tests/tests/test_integration/test_gui/test_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,27 +100,27 @@ def check_defaults(widget):


def check_paths(widget):
assert widget.paths.main_directory == brainreg_dir / "manual_segmentation"
assert widget.paths.main_directory == brainreg_dir / "segmentation"

assert (
widget.paths.segmentation_directory
== brainreg_dir / "manual_segmentation" / "atlas_space"
== brainreg_dir / "segmentation" / "atlas_space"
)

assert (
widget.paths.regions_directory
== brainreg_dir / "manual_segmentation" / "atlas_space" / "regions"
== brainreg_dir / "segmentation" / "atlas_space" / "regions"
)

assert (
widget.paths.region_summary_csv
== brainreg_dir
/ "manual_segmentation"
/ "segmentation"
/ "atlas_space"
/ "regions"
/ "summary.csv"
)
assert (
widget.paths.tracks_directory
== brainreg_dir / "manual_segmentation" / "atlas_space" / "tracks"
== brainreg_dir / "segmentation" / "atlas_space" / "tracks"
)
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@

brainreg_dir = Path.cwd() / "tests" / "data" / "brainreg_output"
validate_regions_dir = (
brainreg_dir / "manual_segmentation" / "atlas_space" / "regions"
brainreg_dir / "segmentation" / "atlas_space" / "regions"
)


@pytest.fixture
def test_regions_dir(tmp_path):
tmp_input_dir = tmp_path / "brainreg_output"
test_regions_dir = (
tmp_input_dir / "manual_segmentation" / "atlas_space" / "regions"
tmp_input_dir / "segmentation" / "atlas_space" / "regions"
)
return test_regions_dir

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,13 @@
import pytest

brainreg_dir = Path.cwd() / "tests" / "data" / "brainreg_output"
validate_tracks_dir = (
brainreg_dir / "manual_segmentation" / "atlas_space" / "tracks"
)
validate_tracks_dir = brainreg_dir / "segmentation" / "atlas_space" / "tracks"


@pytest.fixture
def test_tracks_dir(tmp_path):
tmp_input_dir = tmp_path / "brainreg_output"
test_tracks_dir = (
tmp_input_dir / "manual_segmentation" / "atlas_space" / "tracks"
)
test_tracks_dir = tmp_input_dir / "segmentation" / "atlas_space" / "tracks"
return test_tracks_dir


Expand Down
2 changes: 1 addition & 1 deletion tests/tests/test_unit/test_regions/test_region_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
)

region_image_path = Path(
"tests/data/brainreg_output/manual_segmentation/"
"tests/data/brainreg_output/segmentation/"
"sample_space/regions/region_0.tiff"
)
atlas_resolution = (50, 50, 50)
Expand Down

0 comments on commit 29de6f8

Please sign in to comment.