Metadata-Version: 2.1
Name: tiatoolbox
Version: 0.6.0
Summary: Computational pathology toolbox developed by TIA Lab.
Home-page: https://github.com/tialab/tiatoolbox
Author: TIA Lab
Author-email: tialab@dcs.warwick.ac.uk
License: UNKNOWN
Description: <p align="center">
          <img src="https://raw.githubusercontent.com/TIA-Lab/tiatoolbox/develop/docs/tia_logo.png">
        </p>
        <h1 align="center">TIA Toolbox</h1>
        <p align="center">
          <a href="https://tia-toolbox.readthedocs.io/en/latest/?badge=latest">
            <img src="https://readthedocs.org/projects/tia-toolbox/badge/?version=latest" alt="Documentation Status" />
          </a>
          <a href="https://travis-ci.org/TIA-Lab/tiatoolbox">
            <img src="https://travis-ci.org/TIA-Lab/tiatoolbox.svg?branch=master" alt="Travis CI Status" />
          </a>
          <a href="https://badge.fury.io/py/tiatoolbox">
            <img src="https://badge.fury.io/py/tiatoolbox.svg" alt="PyPI Status" />
          </a>
            <a href="https://codecov.io/gh/TIA-Lab/tiatoolbox">
              <img src="https://codecov.io/gh/TIA-Lab/tiatoolbox/branch/master/graph/badge.svg?token=7UZEMacQHm"/>
            </a>
        </p>
        
        Computational Pathology Toolbox developed at the TIA Centre
        
        ## Getting Started
        
        ### All Users
        
        This package is for those interested in digital pathology: including graduate students, medical staff, members of the TIA Centre and of PathLAKE, and anyone, anywhere, who may find it useful. We will continue to improve this package, taking account of developments in pathology, microscopy, computing and related disciplines. Please send comments and criticisms to **[tia@dcs.warwick.ac.uk](mailto:tialab@dcs.warwick.ac.uk)**.
        
        **`tiatoolbox`** is a multipurpose name that we use for 1) a certain computer program, 2) a Python package of related programs, created by us at the TIA Centre to help people get started in Digital Pathology, 3) this repository, 4) a certain virtual environment.
        
        
        ### Developers
        
        Anyone wanting to contribute to this repository, please first look at our [Wiki](https://github.com/TIA-Lab/tiatoolbox/wiki) and at our web page for [contributors](https://github.com/TIA-Lab/tiatoolbox/blob/master/CONTRIBUTING.rst). See also the *Prepare for development* section of this document.
        
        ### Links, if needed
        The [bash](https://www.gnu.org/software/bash) shell is available on all commonly encountered platforms. Commands in this README are in bash. Windows users can use the command prompt to install conda and python packages.
        
        
        [`conda`](https://github.com/conda/conda) is a management system for software packages and [virtual environments](https://docs.conda.io/projects/conda/en/latest/user-guide/concepts/environments.html). To get `conda`, download [Anaconda](https://www.anaconda.com/), which includes hundreds of the most useful Python packages, using 2GB disk space. Alternatively, [miniconda](https://docs.conda.io/en/latest/miniconda.html) uses 400MB, and packages can be added as needed.
        
        [Github](https://github.com/about) is powered by the version control system [git](https://git-scm.com/), which has many users and uses. In Github, it is used to track versions of code and other documents.
        
        
        ### Examples Taster
        
        1. [Click here](https://github.com/TIA-Lab/tiatoolbox/tree/develop/examples) for [jupyter notebooks](https://jupyter.org/), hosted on the web, with demos of `tiatoolbox`. All necessary resources to run the notebooks are remotely provided, so you don't need to have Python installed on your computer.
        2. Click on a filename with suffix `.ipynb` and the notebook will open in your browser.
        3. Click on one of the two blue checkboxes in your browser window labelled either **Open in Colab** or **Open in Kaggle**: [colab](https://colab.research.google.com/notebooks/intro.ipynb#) and [kaggle](https://www.kaggle.com/) are websites providing free-of-charge platforms for running jupyter notebooks.
        4. Operate the notebook in your browser, editing, inserting or deleting cells as desired.
        5. Changes you make to the notebook will last no longer than your colab or kaggle session.
        
        ### Install Python package
        
        If you wish to use our programs, perhaps without developing them further, run the command `pip install tiatoolbox`.
        
        To understand better how the programs work, study the jupyter notebooks referred to under the heading **Examples Taster**.
        
        ### Command Line
        tiatoolbox supports various features through command line. For more information, please try `tiatoolbox --help`
        
        ### Prepare for development
        
        Prepare a computer as a convenient platform for further development of the Python package `tiatoolbox` and related programs as follows.
        1. Open a `bash` terminal window<br/>
        `cd <future-home-of-tiatoolbox-directory>` <br/>
        2. Download a complete copy of the `tiatoolbox`.<br/>`conda clone https://github.com/TIA-Lab/tiatoolbox.git`<br/>
        3. `cd tiatoolbox`
        4. `conda env create -f requirements.conda.yml`<br/>
        creates the virtual environment `tiatoolbox`. Details in the text file `requirements.conda.yml`
        5. To use the packages installed in the environment, run the command:<br/>`conda activate tiatoolbox`
        
        ### License
        
        The source code TIA Toolbox (tiatoolbox) as hosted on GitHub is released under the [GNU General Public License (Version 3)].
        
        The full text of the licence is included in [LICENSE.md](https://raw.githubusercontent.com/TIA-Lab/tiatoolbox/develop/LICENSE.md).
        
        [gnu general public license (version 3)]: https://www.gnu.org/licenses/gpl-3.0.html
        
        ### Auxiliary Files
        
        Auxiliary files, such as pre-trained model weights downloaded from the TIA Centre webpage (https://warwick.ac.uk/fac/cross_fac/tia/), are provided under the [Creative Commons Attribution-NonCommercial-ShareAlike Version 4 (CC BY-NC-SA 4.0) license](https://creativecommons.org/licenses/by-nc-sa/4.0/).
        
        ### Dual License
        
        If you would like to use any of the source code or auxiliary files (e.g. pre-trained model weights) under a different license agreement please contact the Tissue Image Analytics (TIA) Lab at the University of Warwick (tialab@dcs.warwick.ac.uk).
        
        
        History
        =======
        
        0.6.0 (2021-05-11)
        ------------------
        ### Major and Feature Improvements
        - Add `TissueMasker` class to allow tissue masking using `Otsu` and `Morphological` processing.
        - Add helper/convenience method to WSIReader(s) to produce a mask. Add reader object to allow reading a mask conveniently as if it were a WSI i.e., use same location and resolution to read tissue area and mask area.
        - Add `PointsPatchExtractor` returns patches that can be used by classification models. Takes `csv`, `json` or `pd.DataFrame` and returns patches corresponding to each pixel location.
        - Add feature `FixedWindowPatchExtractor` to run sliding window deep learning algorithms.
        - Add example notebooks for patch extraction and tissue masking.
        - Update readme with improved instructions to use the toolbox. Make the README file somewhat more comprehensible to beginners, particularly those with not much background or experience.
        
        ### Changes to API
        - `tiatoolbox.dataloader` replaced by `tiatoolbox.wsicore`
        
        ### Bug Fixes and Other Changes
        - Minor bug fixes
        
        ### Development-related changes
        - Improve unit test coverage.
        - Move test data to tiatoolbox server.
        
        
        ------------------
        
        0.5.2 (2021-03-12)
        ------------------
        ### Bug Fixes and Other Changes
        - Fix URL for downloading test JP2 image.
        - Update readme with new logo.
        
        ------------------
        
        0.5.1 (2020-12-31)
        ------------------
        ### Bug Fixes and Other Changes
        - Add `scikit-image` as dependency in `setup.py`
        - Update notebooks to add instructions to install dependencies
        
        ------------------
        0.5.0 (2020-12-30)
        ------------------
        ### Major and Feature Improvements
        
        - Adds `get_wsireader()` to return appropriate WSIReader.
        - Adds new functions to allow reading of regions using WSIReader at different resolutions given in units of:
          - microns per-pixel (mpp)
          - objective lens power (power)
          - pixels-per baseline (baseline)
          - resolution level (level)
        - Adds functions for reading regions are `read_bounds` and `read_rect`.
          - `read_bounds` takes a tuple (left, top, right, bottom) of coordinates in baseline (level 0) reference frame and returns a region bounded by those.
          - `read_rect` takes one coordinate in baseline reference frame and an output size in pixels.
        - Adds `VirtualWSIReader` as a subclass of WSIReader which can be used to read visual fields (tiles).
          - `VirtualWSIReader`  accepts ndarray or image path as input.
        - Adds MPP fall back to standard TIFF resolution tags  with warning.
          - If OpenSlide cannot determine microns per pixel (`mpp`) from the metadata, checks the TIFF resolution units (TIFF tags: `ResolutionUnit`, `XResolution` and  `YResolution`) to calculate MPP. Additionally, add function to estimate missing objective power if MPP is known of derived from TIFF resolution tags.
        - Estimates missing objective power from MPP with warning.
        - Adds example notebooks for stain normalisation and WSI reader.
        - Adds caching to slide info property. This is done by checking if a private `self._m_info` exists and returning it if so, otherwise `self._info` is called to create the info for the first time (or to force regenerating) and the result is assigned to `self._m_info`. This could in future be made much simpler with the `functools.cached_property` decorator in Python 3.8+.
        - Adds pre processing step to stain normalisation where stain matrix encodes colour information from tissue region only.
        
        ### Changes to API
        - `read_region` refactored to be backwards compatible with openslide arguments.
        - `slide_info` changed to `info`
        - Updates WSIReader which only takes one input
        - `WSIReader` `input_path` variable changed to `input_img`
        - Adds `tile_read_size`, `tile_objective_value` and `output_dir` to WSIReader.save_tiles()
        - Adds `tile_read_size` as a tuple
        - `transforms.imresize` takes additional arguments `output_size` and interpolation method 'optimise' which selects `cv2.INTER_AREA` for `scale_factor<1` and `cv2.INTER_CUBIC` for `scale_factor>1`
        
        ### Bug Fixes and Other Changes
        - Refactors glymur code to use index slicing instead of deprecated read function.
        - Refactors thumbnail code to use `read_bounds` and be a member of the WSIReader base class.
        - Updates `README.md` to clarify installation instructions.
        - Fixes slide_info.py for changes in WSIReader API.
        - Fixes save_tiles.py for changes in WSIReader API.
        - Updates `example_wsiread.ipynb` to reflect the changes in WSIReader.
        - Adds Google Colab and Kaggle links to allow user to run notebooks directly on colab or kaggle.
        - Fixes a bug in taking directory input for stainnorm operation for command line interface.
        - Pins `numpy<=1.19.3` to avoid compatibility issues with opencv.
        - Adds `scikit-image` or `jupyterlab` as a dependency.
        
        ### Development related changes
        - Moved `test_wsireader_jp2_save_tiles` to test_wsireader.py.
        - Change recipe in Makefile for coverage to use pytest-cov instead of coverage.
        - Runs travis only on PR.
        - Adds [pre-commit](https://pre-commit.com/#install) for easy setup of client-side git [hooks](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks) for [black code formatting](https://github.com/psf/black#version-control-integration) and flake8 linting.
        - Adds [flake8-bugbear](https://github.com/PyCQA/flake8-bugbear) to pre-commit for catching potential deepsource errors.
        - Adds constants for test regions in `test_wsireader.py`.
        - Rearranges `usage.rst` for better readability.
        - Adds `pre-commit`, `flake8`, `flake8-bugbear`, `black`, `pytest-cov` and `recommonmark` as dependency.
        
        
        ------------------
        0.4.0 (2020-10-25)
        ------------------
        
        ### Major and Feature Improvements
        
        - Adds `OpenSlideWSIReader` to read Openslide image formats
        - Adds support to read Omnyx jp2 images using `OmnyxJP2WSIReader`.
        - New feature added to perform stain normalisation using `Ruifork`, `Reinhard`, `Vahadane`, `Macenko` methods and using custom stain matrices.
        - Adds example notebook to read whole slide images via the toolbox.
        - Adds `WSIMeta` class to save meta data for whole slide images. `WSIMeta` casts properties to python types. Properties from OpenSlide are returned as string. raw values can always be accessed via `slide.raw`. Adds data validation e.g., checking that level_count matches up with the length of the `level_dimensions` and `level_downsamples`. Adds type hints to `WSIMeta`.
        - Adds exceptions `FileNotSupported` and `MethodNotSupported`
        
        
        ### Changes to API
        
        -  Restructures `WSIReader` as parent class to allow support to read whole slide images in other formats.
        - Adds `slide_info` as a property of `WSIReader`
        - Updates `slide_info` type to `WSIMeta` from `dict`
        - Depreciates support for multiprocessing from within the toolbox. The toolbox is focused on processing single whole slide and standard images. External libraries can be used to run using multiprocessing on multiple files.
        
        ### Bug Fixes and Other Changes
        
        - Adds `scikit-learn`, `glymur` as a dependency
        - Adds licence information
        - Removes `pathos` as a dependency
        - Updates `openslide-python` requirement to 1.1.2
        
        ------------------
        0.3.0 (2020-07-19)
        ------------------
        
        ### Major and Feature Improvements
        
        - Adds feature `read_region` to read a small region from whole slide images
        - Adds feature `save_tiles` to save image tiles from whole slide images
        - Adds feature `imresize` to resize images
        - Adds feature `transforms.background_composite` to avoid creation of black tiles from whole slide images.
        
        ### Changes to API
        
        - None
        
        ### Bug Fixes and Other Changes
        
        - Adds `pandas` as dependency
        
        ------------------
        0.2.2 (2020-07-12)
        ------------------
        
        ### Major and Feature Improvements
        
        -   None
        
        ### Changes to API
        
        -   None
        
        ### Bug Fixes and Other Changes
        
        -   Fix command line interface for `slide-info` feature and travis pypi deployment
        
        ------------------
        0.2.1 (2020-07-10)
        ------------------
        
        ### Major and Feature Improvements
        
        -   None
        
        ### Changes to API
        
        -   None
        
        ### Bug Fixes and Other Changes
        
        -   Minor changes to configuration files.
        
        ------------------
        0.2.0 (2020-07-10)
        ------------------
        
        ### Major and Feature Improvements
        
        -   Adds feature slide\_info to read whole slide images and display meta
            data information
        -   Adds multiprocessing decorator TIAMultiProcess to allow running
            toolbox functions using multiprocessing.
        
        ### Changes to API
        
        -   None
        
        ### Bug Fixes and Other Changes
        
        -   Adds Sphinx Readthedocs support
            <https://readthedocs.org/projects/tia-toolbox/> for stable and
            develop branches
        -   Adds code coverage tools to test the pytest coverage of the package
        -   Adds deepsource integration to highlight and fix bug risks,
            performance issues etc.
        -   Adds README to allow users to setup the environment.
        -   Adds conda and pip requirements instructions
        
        ------------------
        0.1.0 (2020-05-28)
        ------------------
        
        -   First release on PyPI.
        
        
Keywords: tiatoolbox
Platform: UNKNOWN
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Requires-Python: >=3.6
Description-Content-Type: text/markdown
