Skip to content

Commit

Permalink
Merge 27d265c into 94b7740
Browse files Browse the repository at this point in the history
  • Loading branch information
alessiamarcolini committed Jul 27, 2020
2 parents 94b7740 + 27d265c commit 6fb053a
Show file tree
Hide file tree
Showing 16 changed files with 93 additions and 51 deletions.
14 changes: 9 additions & 5 deletions CHANGELOG.rst
@@ -1,16 +1,20 @@
Changelog
=========

v0.0.5b
-------

- Fix `issue #100 <https://github.com/histolab/histolab/issues/100>`_
- Fix `issue #108 <https://github.com/histolab/histolab/issues/108>`_
- `Grid Tiler <https://github.com/histolab/histolab/issues/99>`_ added


v0.0.4b
-------

- Fix kmeans segmentation image filter default parameters
- Fix rag threshold image filter default parameters
- Fix check tissue on `Tile` to discard almost white tiles

v0.0.5b
-------

- Fix `issue #100 <https://github.com/histolab/histolab/issues/100>`_
- Fix `issue #108 <https://github.com/histolab/histolab/issues/108>`_
- `Grid Tiler <https://github.com/histolab/histolab/issues/99>`_ added
.. toctree::
11 changes: 11 additions & 0 deletions docs/api/data.rst
@@ -0,0 +1,11 @@
Data
====================================

.. toctree::
:caption: API Reference
:maxdepth: 2

.. automodule:: src.histolab.data
:members:

.. toctree::
6 changes: 3 additions & 3 deletions docs/api/filters.rst
@@ -1,13 +1,13 @@
Filters
====================================

.. toctree::

.. toctree::
:maxdepth: 2
:caption: API Reference

filters/image_filters
filters/image_filters_functional
filters/morphological_filters
filters/morphological_filters_functional
filters/morphological_filters_functional

.. toctree::
6 changes: 3 additions & 3 deletions docs/api/filters/image_filters.rst
@@ -1,11 +1,11 @@
Image Filters
====================================

.. toctree::

.. toctree::
:caption: Filters
:maxdepth: 2

.. automodule:: src.histolab.filters.image_filters
:members:
:members:

.. toctree::
5 changes: 3 additions & 2 deletions docs/api/filters/image_filters_functional.rst
@@ -1,11 +1,12 @@
Image Filters Functional
====================================

.. toctree::

.. toctree::
:caption: Filters
:maxdepth: 2

.. automodule:: src.histolab.filters.image_filters_functional
:members:
:members:

.. toctree::
6 changes: 3 additions & 3 deletions docs/api/filters/morphological_filters.rst
@@ -1,11 +1,11 @@
Morphological Filters
====================================

.. toctree::

.. toctree::
:caption: Filters
:maxdepth: 2

.. automodule:: src.histolab.filters.morphological_filters
:members:
:members:

.. toctree::
7 changes: 4 additions & 3 deletions docs/api/filters/morphological_filters_functional.rst
@@ -1,11 +1,12 @@
Morphological Filters Functional
====================================

.. toctree::

.. toctree::
:caption: Filters
:maxdepth: 2

.. automodule:: src.histolab.filters.morphological_filters_functional
:members:
:members:


.. toctree::
6 changes: 3 additions & 3 deletions docs/api/slide.rst
@@ -1,11 +1,11 @@
Slide
====================================

.. toctree::

.. toctree::
:caption: API Reference
:maxdepth: 2

.. automodule:: src.histolab.slide
:members:
:members:

.. toctree::
6 changes: 3 additions & 3 deletions docs/api/tile.rst
@@ -1,11 +1,11 @@
Tile
====================================

.. toctree::

.. toctree::
:caption: API Reference
:maxdepth: 2

.. automodule:: src.histolab.tile
:members:
:members:

.. toctree::
6 changes: 3 additions & 3 deletions docs/api/tiler.rst
@@ -1,12 +1,12 @@
Tiler
====================================

.. toctree::

.. toctree::
:caption: API Reference
:maxdepth: 2

.. automodule:: src.histolab.tiler
:members:
:exclude-members: Tiler
:exclude-members: Tiler

.. toctree::
File renamed without changes.
2 changes: 2 additions & 0 deletions docs/contributing.rst
Expand Up @@ -208,4 +208,6 @@ Attribution
This Code of Conduct is adapted from the `Contributor Covenant <http://contributor-covenant.org>`_\ , version 1.4,
available at `http://contributor-covenant.org/version/1/4 <http://contributor-covenant.org/version/1/4/>`_

.. toctree::

.. toctree::
3 changes: 2 additions & 1 deletion docs/index.rst
Expand Up @@ -85,7 +85,8 @@ References
api/filters
api/tile
api/tiler
utils
api/data
api/utils


Indices and tables
Expand Down
2 changes: 2 additions & 0 deletions docs/quickstart.rst
Expand Up @@ -180,4 +180,6 @@ least 80% of tissue inside.
:alt: caption


.. toctree::

.. toctree::
2 changes: 1 addition & 1 deletion docs/readme.rst
Expand Up @@ -72,7 +72,7 @@ References


.. toctree::
:hidden:


.. toctree::
:caption: API Reference
Expand Down
62 changes: 41 additions & 21 deletions src/histolab/data/__init__.py
Expand Up @@ -215,14 +215,15 @@ def _load_svs(f: str) -> Tuple[openslide.OpenSlide, str]:
Parameters
----------
f: str
data_filename: str
f : str
Name of the file in the histolab repository
Returns
-------
slide : OpenSlide object
An OpenSlide object representing a whole-slide image.
slide : openslide.OpenSlide
An OpenSlide object representing a whole-slide image.
path : str
Path where the slide is saved
Raises
------
Expand All @@ -241,52 +242,61 @@ def _load_svs(f: str) -> Tuple[openslide.OpenSlide, str]:
def cmu_small_region() -> Tuple[openslide.OpenSlide, str]:
"""Carnegie Mellon University MRXS sample tissue
This image is available here
http://openslide.cs.cmu.edu/download/openslide-testdata/Aperio/
Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication.
Returns
-------
cmu_mrxs_tissue : OpenSlide object
cmu_mrxs_tissue : openslide.OpenSlide
Sample CMU tissue Whole-Slide-Image
path : str
Path where the slide is saved
"""
return _load_svs("data/cmu_small_region.svs")


def aorta_tissue() -> Tuple[openslide.OpenSlide, str]: # pragma: no cover
"""Aorta tissue, brightfield, JPEG 2000, YCbCr
This image is avaliable here
This image is available here
http://openslide.cs.cmu.edu/download/openslide-testdata/Aperio/
Free to use and distribute, with or without modification
Returns
-------
aorta_tissue : OpenSlide object
aorta_tissue : openslide.OpenSlide
Aorta tissue Whole-Slide-Image
path : str
Path where the slide is saved
"""
return _load_svs("aperio/JP2K-33003-1.svs")


def heart_tissue() -> Tuple[openslide.OpenSlide, str]: # pragma: no cover
"""Heart tissue, brightfield, JPEG 2000, YCbCr
This image is avaliable here
This image is available here
http://openslide.cs.cmu.edu/download/openslide-testdata/Aperio/
Free to use and distribute, with or without modification
Returns
-------
heart_tissue : OpenSlide object
heart_tissue : openslide.OpenSlide
Heart tissue Whole-Slide-Image
path : str
Path where the slide is saved
"""
return _load_svs("aperio/JP2K-33003-2.svs")


def breast_tissue() -> Tuple[openslide.OpenSlide, str]: # pragma: no cover
"""Breast tissue, TCGA-BRCA dataset
"""Breast tissue, TCGA-BRCA dataset.
This image is avaliable here
This image is available here
https://portal.gdc.cancer.gov/files/9c960533-2e58-4e54-97b2-8454dfb4b8c8
or through the API
https://api.gdc.cancer.gov/data/9c960533-2e58-4e54-97b2-8454dfb4b8c8
Expand All @@ -295,16 +305,18 @@ def breast_tissue() -> Tuple[openslide.OpenSlide, str]: # pragma: no cover
Returns
-------
breast_tissue : OpenSlide object
breast_tissue : openslide.OpenSlide
Breast tissue Whole-Slide-Image
path : str
Path where the slide is saved
"""
return _load_svs("tcga/breast/9c960533-2e58-4e54-97b2-8454dfb4b8c8")


def prostate_tissue() -> Tuple[openslide.OpenSlide, str]: # pragma: no cover
"""Prostate tissue, TCGA-
"""Prostate tissue, TCGA-PRAD dataset.
This image is avaliable here
This image is available here
https://portal.gdc.cancer.gov/files/6b725022-f1d5-4672-8c6c-de8140345210
or through the API
https://api.gdc.cancer.gov/data/6b725022-f1d5-4672-8c6c-de8140345210
Expand All @@ -314,8 +326,10 @@ def prostate_tissue() -> Tuple[openslide.OpenSlide, str]: # pragma: no cover
Returns
-------
prostate_tissue : OpenSlide object
prostate_tissue : openslide.OpenSlide
Prostate tissue Whole-Slide-Image
path : str
Path where the slide is saved
"""
return _load_svs("tcga/prostate/6b725022-f1d5-4672-8c6c-de8140345210")

Expand All @@ -325,7 +339,7 @@ def breast_tissue_diagnostic_green_pen() -> Tuple[
]: # pragma: no cover
"""Breast tissue, TCGA-BRCA dataset. Diagnostic slide with green pen.
This image is avaliable here
This image is available here
https://portal.gdc.cancer.gov/files/da36d3aa-9b19-492a-af4f-cc028a926d96
or through the API
https://api.gdc.cancer.gov/data/da36d3aa-9b19-492a-af4f-cc028a926d96
Expand All @@ -334,8 +348,10 @@ def breast_tissue_diagnostic_green_pen() -> Tuple[
Returns
-------
breast_tissue : OpenSlide object
breast_tissue : openslide.OpenSlide
Breast tissue Whole-Slide-Image
path : str
Path where the slide is saved
"""
return _load_svs("tcga/breast/da36d3aa-9b19-492a-af4f-cc028a926d96")

Expand All @@ -345,7 +361,7 @@ def breast_tissue_diagnostic_red_pen() -> Tuple[
]: # pragma: no cover
"""Breast tissue, TCGA-BRCA dataset. Diagnostic slide with red pen.
This image is avaliable here
This image is available here
https://portal.gdc.cancer.gov/files/f8b4cee6-9149-45b4-ae53-82b0547e1e34
or through the API
https://api.gdc.cancer.gov/data/f8b4cee6-9149-45b4-ae53-82b0547e1e34
Expand All @@ -354,8 +370,10 @@ def breast_tissue_diagnostic_red_pen() -> Tuple[
Returns
-------
breast_tissue : OpenSlide object
breast_tissue : openslide.OpenSlide
Breast tissue Whole-Slide-Image
path : str
Path where the slide is saved
"""
return _load_svs("tcga/breast/f8b4cee6-9149-45b4-ae53-82b0547e1e34")

Expand All @@ -365,7 +383,7 @@ def breast_tissue_diagnostic_black_pen() -> Tuple[
]: # pragma: no cover
"""Breast tissue, TCGA-BRCA dataset. Diagnostic slide with black pen.
This image is avaliable here
This image is available here
https://portal.gdc.cancer.gov/files/31e248bf-ee24-4d18-bccb-47046fccb461
or through the API
https://api.gdc.cancer.gov/data/31e248bf-ee24-4d18-bccb-47046fccb461
Expand All @@ -374,7 +392,9 @@ def breast_tissue_diagnostic_black_pen() -> Tuple[
Returns
-------
breast_tissue : OpenSlide object
breast_tissue : openslide.OpenSlide
Breast tissue Whole-Slide-Image
path : str
Path where the slide is saved
"""
return _load_svs("tcga/breast/31e248bf-ee24-4d18-bccb-47046fccb461")

0 comments on commit 6fb053a

Please sign in to comment.