Giter VIP home page Giter VIP logo

wsidom's Introduction

Whole Slide Image Description of Morphology

First, setup your environment:

pip install -r requirements.txt

Profile

Generate the profile json using the exported csv from Google Docs: Color coding can be updated in the csv files located in /profiles/gdoc_csv.

python create_profile_from_gdoc_csv.py

Javascript to visualize the profile: profile_v1.json

Examples

To run the provided examples, first download the example slide from the TCGA:

cd examples
./gdc-client download 978e66db-80be-4b80-9142-09577aa97241

Visualize the Annotations

# Organs
python visualize.py --annotation_path examples/source.geojson --svs_path examples/978e66db-80be-4b80-9142-09577aa97241/TCGA-BH-A1FE-01Z-00-DX1.8FB57ECF-350B-44E4-8612-63E8374D3C4B.svs  --profile_path profiles/tissue_types_v1.json --output_path output/source.png --output_resolution 16
# Tissue Types
python visualize.py --annotation_path examples/tissue_types.geojson --svs_path examples/978e66db-80be-4b80-9142-09577aa97241/TCGA-BH-A1FE-01Z-00-DX1.8FB57ECF-350B-44E4-8612-63E8374D3C4B.svs  --profile_path profiles/tissue_types_v1.json --output_path output/tissue_types.png --output_resolution 16
# Pathological Alterations
python visualize.py --annotation_path examples/pathological_alterations.geojson --svs_path examples/978e66db-80be-4b80-9142-09577aa97241/TCGA-BH-A1FE-01Z-00-DX1.8FB57ECF-350B-44E4-8612-63E8374D3C4B.svs --profile_path profiles/tissue_types_v1.json --output_path output/pathological_alterations.png --output_resolution 16

Generates the following images:

Export the Annotations as a .png

python export.py --layer_1_path examples/source.geojson --layer_2_path examples/tissue_types.geojson --layer_3_path examples/pathological_alterations.geojson --output_path output/annotation.png --output_resolution 16 --profile_path profiles/tissue_types_v1.json --svs_path examples/978e66db-80be-4b80-9142-09577aa97241/TCGA-BH-A1FE-01Z-00-DX1.8FB57ECF-350B-44E4-8612-63E8374D3C4B.svs

Saves the annotations in the three channels of a .png:

wsidom's People

Contributors

lomadi avatar fialag avatar

Stargazers

Robert avatar

Watchers

Robert Reihs avatar  avatar Robert avatar  avatar Emilian Jungwirth 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.