https://github.com/matbryan52/image-viewer
https://github.com/matbryan52/image-viewer
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/matbryan52/image-viewer
- Owner: matbryan52
- License: mit
- Created: 2023-10-29T06:48:05.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-11T08:41:00.000Z (over 1 year ago)
- Last Synced: 2025-03-25T10:37:35.733Z (about 1 year ago)
- Language: Python
- Size: 89.8 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
Image Viewer
============
Demonstrate use of `LiberTEM-panel-ui `_
to build a simple image viewer application.
Integrates into Jupyter using
`jupyter-server-proxy `_.
Launch via Binder with default image:
``_
.. image:: https://mybinder.org/badge_logo.svg
:target: https://mybinder.org/v2/gh/matbryan52/image-viewer/HEAD?urlpath=/image-viewer?default=true
Directly load an image from the :code:`data` directory:
``_
.. image:: https://mybinder.org/badge_logo.svg
:target: https://mybinder.org/v2/gh/matbryan52/image-viewer/HEAD?urlpath=/image-viewer?path=./data/logo.png
Development server
------------------
.. code-block:: console
$ panel serve src/image_viewer/app.py --port 9123 --dev
Notes
-----
- Load directly from file on the server, or external URL, via url-arguments (:code:`?url=`, :code:`?path=`)
- Data reading using :code:`rosettasciio`, delegates to :code:`skimage.io.imread` for normal images.
- Multi-channel images (stacks, named channels, 3-D, 4-D data cubes) supported where :code:`rosettasciio`
generates compatible axis annotations.
- Image display downsampling enabled by default above a certain size
- Image toolbox (adjustable color map etc)
- RGB(A) colour image support is possible, but needs work to have downsampling in this mode
- The page is a normal :code:`Panel` layout so can add text / metadata / more interactivity easily
- The same base could be used for a 4D-STEM viewer or Spectrum viewer
based on what is already implemented in :code:`LiberTEM-panel-ui`. This is
a minimal example which only displays a 2D greyscale image.