Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust README #72

Merged
merged 3 commits into from
Nov 3, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,35 +24,36 @@ https://napari.org/docs/plugins/index.html

## Installation

You can install `napari-ome-zarr` via [pip]:
[Install napari] if not already installed.

You can install `napari-ome-zarr` via [pip]. Activate the same environment as you installed napari into, then:

pip install napari-ome-zarr

## Usage

Napari will use `ome-zarr` to open images that the plugin recognises as ome-zarr.
Napari will use `napari-ome-zarr` plugin to open images that the plugin recognises as ome-zarr.
The image metadata from OMERO will be used to set channel names and rendering settings
in napari::

$ napari "https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.3/9836842.zarr/"
napari "https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.3/9836842.zarr/"


If a dialog in napari pops up, encouraging you to choose a reader, choose ``napari-ome-zarr`` and click OK.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could mention that you can specify the plugin on cli with napari --plugin napari-ome-zarr "https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.3/9836842.zarr/"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But, confusingly, when opening from S3, napari is not confused about which plugin to use.
Whereas locally, it is different, such as

napari --plugin napari-ome-zarr '6001240.zarr'

Does not produce a dialog, whereas

napari  '6001240.zarr'

Produces

Screenshot 2022-11-03 at 11 09 57

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in 509461c

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why the difference when the file is local. But you say "If a dialog in napari pops up, encouraging you to choose a reader, choose napari-ome-zarr and click OK."
If that happens, you can stop it happening with --plugin napari-ome-zarr, regardless of whether the file is local or not. So I would mention --plugin napari-ome-zarr option before mentioning local usage

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in 2680af2


# Also works with local files
$ napari 6001240.zarr
To open a local file::

napari 13457227.zarr

OR in python::

import napari

viewer = napari.Viewer()
viewer.open('https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.3/9836842.zarr/')
viewer.open("https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.4/idr0101A/13457537.zarr", plugin="napari-ome-zarr")

napari.run()

If single zarray is passed to the plugin, it will be opened without the use of
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I tried this, I didn't need the napari.run() at least in a python terminal

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, can confirm this in python terminal. But if you leave it out in the script, then napari opens and immediately closes. With the napari.run() in the script, napari persists and is usable.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah 👍

the metadata::

$ napari '/tmp/6001240.zarr/0'

## Contributing

Expand All @@ -68,6 +69,7 @@ Distributed under the terms of the [BSD-3] license,

If you encounter any problems, please [file an issue] along with a detailed description.

[Install napari]: https://napari.org/stable/tutorials/fundamentals/installation.html
[napari]: https://github.com/napari/napari
[Cookiecutter]: https://github.com/audreyr/cookiecutter
[@napari]: https://github.com/napari
Expand Down