Giter Club home page Giter Club logo

falsecolor's Introduction

FalseColor-Python

A rapid digital staining module designed for translating two-channel fluorescence images (i.e. a nuclear and cytoplasmic stain) to the traditional H&E histopathology color space. Virtual H&E coloring methods based on: Giacomelli et al.

Full methods described in: R. Serafin et al.

Installation

In order to use FalseColor Python's GPU acceleration install cudatoolkit using conda:

conda install cudatoolkit

FalseColor Python can be installed using pip:

pip install falsecolor

Or by running setup.py install while in the working directory.

python setup.py install

Usage

See Examples to get started.

Several methods within color.py are setup with GPU acceleration using numba.cuda.jit: (See Example/GPU examples.ipynb)

#Set color levels for false coloring using background subtraction

import falseColor.coloring as fc
#Using Defaults:
settings_dict = fc.getColorSettings(key = 'HE')
nuclei_RGBsettings = settings_dict['nuclei']
cyto_RGBsettings = settings_dict['cyto']
#Or Levels can be set manually, provided they are in the following order
nuclei_RGBsettings = [R,G,B] # list of floats (0.0:1.0) for color levels in nuclear channel
cyto_RGBsettings = [R,G,B] # list of floats (0.0:1.0) for color levels in cyto channel

#nuclei,cyto are 2D numpy arrays for false coloring see GPU example.ipynb for more details
pseudo_colored_data = fc.rapidFalseColor(nuclei,cyto,
                                         nuclei_RGBsettings,cyto_RGBsettings)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

GNU Affero General Public License v3.0

Copyright (c) 2019 Rob Serafin, Liu Lab, The University of Washington Department of Mechanical Engineering

License: GPL

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

falsecolor's People

Contributors

serrob23 avatar

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.