-
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add dask-image quickstart documentation (#108)
* Add dask-image quickstart documentation * Update quickstart.rst * Make clearer location of quickstart notebook * Link to dask array docs * Use restructured text formatting, not markdown * Don't recommend .compute() to dask-image beginners
- Loading branch information
1 parent
21047b4
commit 8ff0f16
Showing
2 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ Contents | |
:maxdepth: 1 | ||
|
||
installation | ||
quickstart | ||
api | ||
contributing | ||
authors | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
.. highlight:: shell | ||
|
||
========== | ||
Quickstart | ||
========== | ||
|
||
|
||
Importing dask-image | ||
-------------------- | ||
Import dask image is with an underscore, like this example: | ||
|
||
.. code-block:: python | ||
import dask_image.imread | ||
import dask_image.ndfilters | ||
Dask Examples | ||
------------- | ||
We highly recommend checking out the dask-image-quickstart.ipynb notebook | ||
(and any other dask-image example notebooks) at the dask-examples repository. | ||
You can find the dask-image quickstart notebook in the ``applications`` folder | ||
of this repository: | ||
|
||
https://github.com/dask/dask-examples | ||
|
||
All the example notebooks are available to launch with | ||
mybinder and test out interactively. | ||
|
||
|
||
An Even Quicker Start | ||
--------------------- | ||
|
||
You can read files stored on disk into a dask array | ||
by passing the filename, or regex matching multiple filenames | ||
into ``imread()``. | ||
|
||
.. code-block:: python | ||
filename_pattern = 'path/to/image-*.png' | ||
images = dask_image.imread.imread(filename_pattern) | ||
If your images are parts of a much larger image, | ||
dask can stack, concatenate or block chunks together: | ||
http://docs.dask.org/en/latest/array-stack.html | ||
|
||
|
||
Calling dask-image functions is also easy. | ||
|
||
.. code-block:: python | ||
import dask_image.ndfilters | ||
blurred_image = dask_image.ndfilters.gaussian_filter(images, sigma=10) | ||
Many other functions can be applied to dask arrays. | ||
See the dask_array_documentation_ for more detail on general array operations. | ||
|
||
.. _dask_array_documentation: http://docs.dask.org/en/latest/array.html | ||
|
||
.. code-block:: python | ||
result = function_name(images) | ||
Further Reading | ||
--------------- | ||
|
||
Good places to start include: | ||
|
||
* The dask-image API documentation: http://image.dask.org/en/latest/api.html | ||
* The documentation on working with dask arrays: http://docs.dask.org/en/latest/array.html |