Skip to content

Commit

Permalink
Move to the use of "atlas space" instead of "standard space" (#53)
Browse files Browse the repository at this point in the history
* move from standard to atlas space naming

* fix typo
  • Loading branch information
adamltyson authored Oct 27, 2023
1 parent 914e18d commit 45fd3bd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ This is typically only used in other software, but you can enable it yourself:
* Open napari
* Navigate to `Plugins` -> `Plugin Call Order`
* In the `Plugin Sorter` window, select `napari_get_reader` from the `select hook...` dropdown box
* Drag `brainreg_read_dir_standard_space` (the atlas space viewer plugin) above `brainreg_read_dir` (the normal plugin) to ensure that the atlas space plugin is used preferentially.
* Drag `brainreg_read_dir_atlas_space` (the atlas space viewer plugin) above `brainreg_read_dir` (the normal plugin) to ensure that the atlas space plugin is used preferentially.


### cellfinder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
PathOrPaths = Union[List[os.PathLike], os.PathLike]


def brainreg_read_dir_standard_space(path: PathOrPaths) -> Optional[Callable]:
def brainreg_read_dir_atlas_space(path: PathOrPaths) -> Optional[Callable]:
"""A basic implementation of the napari_get_reader hook specification.
Parameters
Expand Down Expand Up @@ -69,7 +69,7 @@ def reader_function(path: os.PathLike) -> List[LayerDataTuple]:
path,
layers,
search_string="downsampled_standard",
exlusion_string="downsampled_standard.tiff",
exclusion_string="downsampled_standard.tiff",
)
layers.append(
(
Expand Down
6 changes: 3 additions & 3 deletions brainglobe_napari_io/brainreg/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ def load_additional_downsampled_channels(
layers: List[LayerDataTuple],
extension: str = ".tiff",
search_string: str = "downsampled_",
exlusion_string: str = "downsampled_standard",
exclusion_string: str = "downsampled_standard",
) -> List[LayerDataTuple]:
# Get additional downsampled channels, but not main one, and not those
# in standard space
# in atlas space

for file in path.iterdir():
if (
(file.suffix == extension)
and file.name.startswith(search_string)
and not file.name.startswith(exlusion_string)
and not file.name.startswith(exclusion_string)
):
print(
f"Found additional downsampled image: {file.name}, "
Expand Down
8 changes: 4 additions & 4 deletions brainglobe_napari_io/napari.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ contributions:
title: Brainreg Read Directory
python_name: brainglobe_napari_io.brainreg.reader_dir:brainreg_read_dir

- id: brainglobe-napari-io.brainreg_read_dir_standard_space
title: Brainreg Read Directory Standard Space
python_name: brainglobe_napari_io.brainreg.reader_dir_standard_space:brainreg_read_dir_standard_space
- id: brainglobe-napari-io.brainreg_read_dir_atlas_space
title: Brainreg Read Directory Atlas Space
python_name: brainglobe_napari_io.brainreg.reader_dir_atlas_space:brainreg_read_dir_atlas_space

- id: brainglobe-napari-io.cellfinder_read_dir
title: Cellfinder Read Directory
Expand All @@ -29,7 +29,7 @@ contributions:
- '*.tiff'
accepts_directories: true

- command: brainglobe-napari-io.brainreg_read_dir_standard_space
- command: brainglobe-napari-io.brainreg_read_dir_atlas_space
filename_patterns:
- '*.tiff'
accepts_directories: true
Expand Down

0 comments on commit 45fd3bd

Please sign in to comment.