Coder Social home page Coder Social logo

hettiepath / tissueloc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pingjunchen/tissueloc

0.0 0.0 0.0 22.73 MB

Whole slide digital pathology image tissue localization

Home Page: https://tissueloc.readthedocs.io

License: MIT License

Python 90.48% TeX 9.52%

tissueloc's Introduction

tissueloc: Whole slide digital pathology image tissue localization

Codacy Badge codecov Build Status Documentation Status PyPI version DOI Downloads Banner

Please consider star this repo if you find tissueloc to be helpful for your work.

Installation

  1. Install OpenSlide.
$ sudo apt-get install openslide-tools
  1. Installing Python dependencies.
$ pip install scikit-image==0.14.2
$ pip install opencv-python==4.1.2.30
$ pip install openslide-python==1.1.1
  1. Install tissueloc.
$ pip install tissueloc==2.1.0

Usage example

Interface

def locate_tissue_cnts(slide_path,
                       max_img_size=2048,
                       smooth_sigma=13,
                       thresh_val = 0.80,
                       min_tissue_size=10000):
    """ Locate tissue contours of whole slide image
    Parameters
    ----------
    slide_path : valid slide path
        The slide to locate the tissue.
    max_img_size: int
        Max height and width for the size of slide with selected level.
    smooth_sigma: int
        Gaussian smoothing sigma.
    thresh_val: float
        Thresholding value.
    min_tissue_size: int
        Minimum tissue area.
    Returns
    -------
    cnts: list
        List of all contours coordinates of tissues.
    d_factor: int
        Downsampling factor of selected level compared to level 0
    """

Demo

Testing slide can be downloaded from Figshare.

import tissueloc as tl
slide_path = "../data/SoftTissue/TCGA-B9EB312E82F6.svs"
# locate tissue contours with default parameters
cnts, d_factor = tl.locate_tissue_cnts(slide_path, max_img_size=2048, smooth_sigma=13,
                                       thresh_val=0.80,min_tissue_size=10000)

Documentation

Hosted in https://tissueloc.readthedocs.io, powered by readthedocs and Sphinx.

Contributing

tissueloc is an open source project and anyone is welcome to contribute. An easy way to get started is by suggesting a new enhancement on the Issues. If you have found a bug, then either report this through Issues, or even better, make a fork of the repository, fix the bug and then create a Pull Requests to get the fix into the master branch.

We would like to test this package on more diversified digital slides. Slides (low level images would be better) and their corresponding results are also very welcome as Pull Requests.

License

tissueloc is free software made available under the MIT License. For details see the LICENSE file.

Contributors

See the AUTHORS.md file for a complete list of contributors to the project.

Citing

tissueloc is published in the Journal of Open Source Software - please consider cite if it's useful for your research:

@article{chen2019tissueloc,
  author    = {Pingjun Chen and Lin Yang},
  title     = {tissueloc: Whole slide digital pathology image tissue localization},
  journal   = {J. Open Source Software},
  volume    = {4},
  number    = {33},
  pages     = {1148},
  year      = {2019},
  url       = {https://doi.org/10.21105/joss.01148},
  doi       = {10.21105/joss.01148}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.