Giter Club home page Giter Club logo

wsi2dicom's Introduction

Cite our work:

Gu, Qiangqiang, Naresh Prodduturi, Jun Jiang, Thomas J. Flotte, and Steven N. Hart. "Dicom_wsi: A python implementation for converting whole-slide images to digital imaging and Communications in Medicine compliant files." Journal of Pathology Informatics 12, no. 1 (2021): 21.

This repo shows how to convert whole slide image into multi-frame DICOM images. It depends on Openslides and Pydicom figure

Motivation

  • Standardize WSI formatting and transferring throughout institutions.
  • Enable more encapsulation options for massive data storage
  • Potentially simplify patch/frame level accessibility of whole slide images

Here is an example showing the converted DICOM can be viewed in a DICOM viewer Orthanc. example

Dependencies Installation

pip install pydicom openslide_python

You may also need to install OpenSlide library other than python interface.

Quick Start

Code is super easy to use. Test data can be downloaded from here.

wsi_fn = '/path/to/your/WSI/example/CMU-1-JP2K-33005.svs'
wsi_dicom_dir = "/path/to/your/output/example/CMU-1-JP2K-33005"

# # convert without compression
# p = parameters(JPEG_COMPRESS=False, image_levels=range(0, 3))
# wsi_c = WSIDICOM_Converter(wsi_fn, wsi_dicom_dir, p)
# wsi_c.convert()

# convert with compression
p = parameters(JPEG_COMPRESS=True)
wsi_c = WSIDICOM_Converter(wsi_fn, wsi_dicom_dir, p)
wsi_c.convert()

References

[1] Clunie, David, Dan Hosseinzadeh, Mikael Wintell, David De Mena, Nieves Lajara, Marcial Garcia-Rojo, Gloria Bueno et al. "Digital imaging and communications in medicine whole slide imaging connectathon at digital pathology association pathology visions 2017." Journal of pathology informatics 9 (2018).

[2] http://dicom.nema.org/Dicom/DICOMWSI/

[3] ftp://medical.nema.org/medical/dicom/final/sup145_ft.pdf

wsi2dicom's People

Contributors

smujiang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

wsi2dicom's Issues

grayscale/low resolution problem

Hi,
I converted the example file (CMU-1-JP2K-33005.svs) into a dicom file with this code. Unfortunately, however, when I checked the converted dicom file, I found that the resolution was very low and turned grayscale.
Below is a part of instance_1.
The second picture below is an error that occurred as my code progressed. Do you happen to know a solution?

스크린샷_20230220_072842
스크린샷_20230220_073639

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.