Skip to content

Commit

Permalink
Merge pull request #154 from TimMonko/ndev
Browse files Browse the repository at this point in the history
switch all neuralDev to nDev
  • Loading branch information
TimMonko authored Jan 5, 2025
2 parents 5202b2f + 9254c7c commit d6b79e7
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 23 deletions.
4 changes: 2 additions & 2 deletions docs/beginner_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ Inside napari, navigate to `Plugins` --> `Install/Uninstall Plugins...`. In the

![Console-installation](resources/gifs/console-full-installation.gif)

This method only installs python libraries that are BSD3 licensed. Some image formats (such as czi and lif) are not available unless installing the full neuralDev package. To install extra plugins go to the integrated `napari console` (lower left button in UI) and enter `!pip install napari-ndev[all]`. **Note**: napari will freeze when you enter this command; please be patient as it downloads and sets up the remaining packages. **Restart napari for changes to take affect.**
This method only installs python libraries that are BSD3 licensed. Some image formats (such as czi and lif) are not available unless installing the full nDev package. To install extra plugins go to the integrated `napari console` (lower left button in UI) and enter `!pip install napari-ndev[all]`. **Note**: napari will freeze when you enter this command; please be patient as it downloads and sets up the remaining packages. **Restart napari for changes to take affect.**

### opening widgets

![Widget opening](resources/gifs/widget-opening.gif)

Navigate to `Plugins` --> `neuralDev` --> Click any widget. **Note:** Something (I believe napari) appears to be currently bugged and requires that the first widget be opened twice; the first time it will give a warning, the second time it should open.
Navigate to `Plugins` --> `nDev` --> Click any widget. **Note:** Something (I believe napari) appears to be currently bugged and requires that the first widget be opened twice; the first time it will give a warning, the second time it should open.

### bio-formats support

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/utilities/image_utilities.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"source": [
"# Image Utilities\n",
"\n",
"This example will describe how to manage metadata, crop, and annotate images with the Image Utilities widget. The widget can be opened from `Plugins --> neuralDev --> Image Utilities`. To crop layers in the viewer, open `Plugins --> crop region (napari_crop)`. Below, we load napari and open the Image Utilities Widget and load in a large image originally saved with the widget from a multi-scene CZI file. Note that currently no metadata populates the widget because the file was not selected with `Select Files`. Instead, the image was opened with the [`napari-bioio`](https://github.com/TimMonko/napari-bioio) plugin; however, the metadata is saved and could normally be accessed from `viewer.layers[n].metadata['bioimage']`.\n",
"This example will describe how to manage metadata, crop, and annotate images with the Image Utilities widget. The widget can be opened from `Plugins --> nDev --> Image Utilities`. To crop layers in the viewer, open `Plugins --> crop region (napari_crop)`. Below, we load napari and open the Image Utilities Widget and load in a large image originally saved with the widget from a multi-scene CZI file. Note that currently no metadata populates the widget because the file was not selected with `Select Files`. Instead, the image was opened with the [`napari-bioio`](https://github.com/TimMonko/napari-bioio) plugin; however, the metadata is saved and could normally be accessed from `viewer.layers[n].metadata['bioimage']`.\n",
"\n",
"To access metadata from any image in the viewer, press the `Selected Layer` button in the `Update Metadata from:` box. "
]
Expand Down
3 changes: 1 addition & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# napari-ndev (neuralDev)
# napari-ndev (nDev)

<!-- ![Logo](images/neuralDev-logo.svg) -->
[![License BSD-3](https://img.shields.io/pypi/l/napari-ndev.svg?color=green)](https://github.com/TimMonko/napari-ndev/raw/main/LICENSE)
[![PyPI](https://img.shields.io/pypi/v/napari-ndev.svg?color=green)](https://pypi.org/project/napari-ndev)
[![Python Version](https://img.shields.io/pypi/pyversions/napari-ndev.svg?color=green)](https://python.org)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/widget_further_info.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 1. Image Utilities

A quick and easy way to save annotations (a napari labels layer) and corresponding images to corresponding folders. Best if the images are opened with the `neuralDev` reader (using [bioio] under the hood) -- which can be as simple as drag and drop opening by setting the appropriate default reader for each file type in Preferences -> Plugins--in order to utilize the metadata present for saving the image-label pairs.
A quick and easy way to save annotations (a napari labels layer) and corresponding images to corresponding folders. Best if the images are opened with the `nDev` reader (using [bioio] under the hood) -- which can be as simple as drag and drop opening by setting the appropriate default reader for each file type in Preferences -> Plugins--in order to utilize the metadata present for saving the image-label pairs.

Quick uniform adjustments to a folder of images, saving the output. Currently supports selecting channels, slicing Z, cropping/downsampling in XY, and doing a max projection of the sliced/cropped image data. To be added: alternative projection types, slicing in T, and compatibility with non TCZYX images (but this is not a priority since [bioio] currently always extracts images as TCZYX even if a dim is only length 1.

Expand Down
6 changes: 3 additions & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ site_url: https://TimMonko.github.io/napari-ndev/
site_description: Napari widgets to process microscopy images
repo_name: timmonko/napari-ndev
repo_url: https://github.com/timmonko/napari-ndev
copyright: Copyright &copy; 2023-2024 Tim Monko
copyright: Copyright &copy; 2023-2025 Tim Monko

theme:
name: material
favicon: resources/images/neuralDev-icon.svg
logo: resources/images/neuralDev-icon.svg
favicon: resources/images/nDev-icon.svg
logo: resources/images/nDev-icon.svg
icon:
repo: fontawesome/brands/github
palette:
Expand Down
1 change: 0 additions & 1 deletion src/napari_ndev/_tests/widgets/test_utilities_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ def test_update_metadata_from_layer(make_napari_viewer, test_data):

assert (
'Tried to update metadata, but could only update scale'
# ' because layer not opened with neuralDev reader'
) in container._results.value
assert container._scale_tuple.value == (1, 2, 3)

Expand Down
7 changes: 1 addition & 6 deletions src/napari_ndev/napari.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: napari-ndev
display_name: neuralDev
display_name: nDev
visibility: public
contributions:
commands:
Expand All @@ -18,9 +18,6 @@ contributions:
- id: napari-ndev.make_apoc_container
python_name: napari_ndev.widgets._apoc_container:ApocContainer
title: Make Batch APOC
# - id: napari-ndev.make_custom_apoc
# python_name: napari_ndev.widgets._apoc_feature_stack:ApocFeatureStack
# title: Make Custom APOC Feature Set
- id: napari-ndev.make_measure_container
python_name: napari_ndev.widgets._measure_container:MeasureContainer
title: Make Measure Container
Expand All @@ -34,8 +31,6 @@ contributions:
display_name: Workflow Widget
- command: napari-ndev.make_apoc_container
display_name: APOC Widget
# - command: napari-ndev.make_custom_apoc
# display_name: Custom APOC Feature Set
- command: napari-ndev.make_measure_container
display_name: Measure Widget

Expand Down
6 changes: 2 additions & 4 deletions src/napari_ndev/widgets/_ndev_container.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from __future__ import annotations

from pathlib import Path
from typing import TYPE_CHECKING

from magicclass.widgets import (
Expand Down Expand Up @@ -39,11 +38,10 @@ def __init__(self, viewer: napari.viewer.Viewer = None):
"""
super().__init__(labels=False)

self.min_width = 600 # TODO: remove this hardcoded value
self.min_width = 700 # TODO: remove this hardcoded value
self._viewer = viewer if viewer is not None else None

_logo_path = Path(__file__).parent.parent / 'resources' / 'nDev-logo-small.png'
# _logo_path = r'src\napari_ndev\resources\nDev-logo-small.png'
_logo_path = r'resources\nDev-logo-small.png'
self._logo_label = Label(
value='<h1 style="text-align: center;">'
f'<img src="{_logo_path}"/>'
Expand Down
4 changes: 2 additions & 2 deletions src/napari_ndev/widgets/_utilities_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ def append_scene_to_name(self):
except AttributeError:
self._results.value = (
'Tried to append scene to name, but layer not opened with'
' neuralDev reader.'
' nDev reader.'
)
else:
self._results.value = (
Expand Down Expand Up @@ -529,7 +529,7 @@ def update_metadata_from_layer(self):
)
self._results.value = (
'Tried to update metadata, but could only update scale'
' because layer not opened with neuralDev reader.'
' because layer not opened with nDev reader.'
f'\nAt {time.strftime("%H:%M:%S")}'
)

Expand Down

0 comments on commit d6b79e7

Please sign in to comment.