Skip to content

Commit

Permalink
Merge pull request #68 from SarthakJariwala/v0.4.x
Browse files Browse the repository at this point in the history
Dynamic indexing in `ImageGrid`; `map_func` to transform image data
  • Loading branch information
SarthakJariwala authored Nov 10, 2020
2 parents eaf0ee3 + 2f78568 commit 4ecefc8
Show file tree
Hide file tree
Showing 15 changed files with 878 additions and 326 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,16 @@ Check out the docs [here](https://seaborn-image.readthedocs.io/).

## Installation

For latest release
```bash
pip install seaborn-image
```

For latest commit
```bash
pip install git+https://github.com/SarthakJariwala/seaborn-image
```

## Usage

Check out the [quickstart guide](https://seaborn-image.readthedocs.io/en/latest/quickstart.html) and [examples](https://seaborn-image.readthedocs.io/auto_examples/index.html).
Check out the [tutorial](https://seaborn-image.readthedocs.io/en/latest/tutorial.html) and [examples](https://seaborn-image.readthedocs.io/auto_examples/index.html).
193 changes: 193 additions & 0 deletions docs/Tutorial/Image Collection.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Tutorial/Image Distribution.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
}
],
"source": [
"f = isns.imghist(img)"
"f = isns.imghist(img, describe=True)"
]
},
{
Expand Down
16 changes: 12 additions & 4 deletions docs/Tutorial/Image Filters.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@
"metadata": {},
"outputs": [],
"source": [
"%matplotlib inline\n",
"import seaborn_image as isns\n",
"\n",
"isns.set_context(\"notebook\")\n",
"isns.set_image(cmap=\"inferno\")"
"isns.set_image(cmap=\"inferno\") # set default colormap to inferno"
]
},
{
Expand Down Expand Up @@ -97,7 +96,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## User-defined filters"
"## User-defined filters or any callable filter function"
]
},
{
Expand All @@ -124,6 +123,13 @@
"ax = isns.filterplot(pol, filt=scharr)"
]
},
{
"source": [
"## Fast-Fourier Transform"
],
"cell_type": "markdown",
"metadata": {}
},
{
"cell_type": "code",
"execution_count": 27,
Expand Down Expand Up @@ -188,7 +194,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## FilterGrid"
"## FilterGrid\n",
"\n",
"Explore relationships between different parameters of a filter"
]
},
{
Expand Down
169 changes: 0 additions & 169 deletions docs/Tutorial/Image Grid.ipynb

This file was deleted.

155 changes: 55 additions & 100 deletions docs/Tutorial/Image Visualization.ipynb

Large diffs are not rendered by default.

260 changes: 260 additions & 0 deletions docs/Tutorial/Multi Dim Images.ipynb

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/Tutorial/RGB Images.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"metadata": {},
"outputs": [],
"source": [
"%matplotlib inline\n",
"import seaborn_image as isns\n",
"from skimage.data import astronaut\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
nbsphinx_prompt_width = 0
nbsphinx_allow_errors = True
nbsphinx_execute = "always"
nbsphinx_kernel_name = 'python3'
nbsphinx_kernel_name = "python3"

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
Expand Down
34 changes: 17 additions & 17 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ seaborn-image: image data visualization
Description
===========

Seaborn-image is a Python **image** visualization library based on matplotlib, scikit-image and scipy.
Seaborn-image provides a high-level API to **draw attractive and informative images quickly**
Seaborn-image is a Python **image** visualization library based on matplotlib
and provides a high-level API to **draw attractive and informative images quickly**
**and effectively**.

It is heavily inspired by `seaborn <https://seaborn.pydata.org/>`_, a high-level visualization library
for drawing attractive statistical graphics in Python.

To view example images, check out the :doc:`gallery page <auto_examples/index>` and :doc:`reference <reference>`.
For specific how-to questions, refer to the :doc:`how-to page <how_to>`.
For specific how-to questions, refer to the :doc:`tutorial page <tutorial>`.

Check out the source code on `github <https://github.com/SarthakJariwala/seaborn-image>`_.
If you come across any bugs, please open an `issue <https://github.com/SarthakJariwala/seaborn-image/issues>`_.
If you come across any bugs/issues, please open an `issue <https://github.com/SarthakJariwala/seaborn-image/issues>`_.


Installation
Expand All @@ -49,11 +49,11 @@ Installation
pip install seaborn-image
Usage
=====
Quick Usage
===========

Simple usage
************
Visualize 2-D images
********************

.. code-block:: python
Expand All @@ -64,11 +64,10 @@ Simple usage
isns.set_image(cmap="deep", despine=True)
isns.set_scalebar(color="red")
"""Plot image"""
isns.imgplot(data)
pol = isns.load_image("polymer")
"""Image with a scalebar"""
isns.imgplot(data, dx=1, units="um")
ax = isns.imgplot(pol, dx=0.01, units="um")
"""Get basic image stats"""
isns.imgplot(data, describe=True)
Expand All @@ -78,16 +77,18 @@ Visualize image distribution

.. code-block:: python
isns.imghist(data)
f = isns.imghist(pol)
Filter image and plot
*********************
Multi-dimensional images
************************

.. code-block:: python
isns.filterplot(data, filt="gaussian", sigma=2.5)
cells = isns.load_image("cells")
g = isns.ImageGrid(cells, slices=[10, 20, 30, 40])
For more information check out examples in :doc:`api <reference>` and :doc:`gallery <auto_examples/index>`.
For more information check out examples in :doc:`tutorial <tutorial>`, :doc:`api <reference>` and :doc:`gallery <auto_examples/index>`.


Contents
Expand All @@ -99,7 +100,6 @@ Contents
Gallery <auto_examples/index>
Reference <reference>
Tutorial <tutorial>
How-to? <how_to>
License <license>
Authors <authors>
GitHub <https://github.com/SarthakJariwala/seaborn-image>
Expand Down
50 changes: 47 additions & 3 deletions docs/tutorial.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,55 @@
Tutorial
========

2-D Image Visualization
-----------------------

.. toctree::
:maxdepth: 3
:maxdepth: 2

Image Visualization <Tutorial/Image Visualization.ipynb>
RGB Images <Tutorial/RGB Images.ipynb>


Visualize the Distribution within Image Data
--------------------------------------------

.. toctree::
:maxdepth: 2

Visualize Image Distribution <Tutorial/Image Distribution.ipynb>
Visualize 3-D images <Tutorial/Image Grid.ipynb>


Working with RGB Images
-----------------------

.. toctree::
:maxdepth: 2

RGB Images <Tutorial/RGB Images.ipynb>


Working with Multi-dimensional Images
-------------------------------------

.. toctree::
:maxdepth: 2

Multi-dimensional images <Tutorial/Multi Dim Images.ipynb>


Working with a Collection of Images
-----------------------------------

.. toctree::
:maxdepth: 2

Collection of images <Tutorial/Image Collection.ipynb>


Image Filters - Individual Filters and Exploring Relationships between Parameters
---------------------------------------------------------------------------------

.. toctree::
:maxdepth: 2

Applying Image Filters <Tutorial/Image Filters.ipynb>
Loading

0 comments on commit 4ecefc8

Please sign in to comment.