Git Product home page Git Product logo

variable-jain / medicalimaging Goto Github PK

View Code? Open in Web Editor NEW

This project forked from asvcode/medicalimaging

0.0 0.0 0.0 48.43 MB

Tutorials that take an in depth look at how to view and manipulate DICOM images and how to get them ready for machine learning

Home Page: https://asvcode.github.io/MedicalImaging/

License: Apache License 2.0

Ruby 0.05% Makefile 0.01% Dockerfile 0.01% Shell 0.03% Python 0.02% Smarty 0.02% HTML 0.18% Jupyter Notebook 99.37% JavaScript 0.09% SCSS 0.22%

medicalimaging's Introduction

Click on the link above to go to the tutorials

Medical Imaging

These tutorials take an in depth look at how to view DICOM images and what information is contained within the head of the DICOM. These tutorials also look at what considerations should be taken when evaluating models for medical diagnosis such as Positive and Negative Predictive values, Specificity, Sensitivity, what RescaleSlope and RescaleIntercept are and how to view diffent tissues densities, Windowing and how to normalize images using bins.

These tutorials are based on the lastest release of fastai which was officially released in August 2020 and Medical Imaging using Fastai provides an in depth look at the fastai's medical.imaging.module.

Currently 3 easily accessible datasets are used for the tutorials. These can be found in the Getting to know DICOMS tutorial

What are DICOMs?

DICOM(Digital Imaging and COmmunications in Medicine) is the de-facto standard that establishes rules that allow medical images(X-Ray, MRI, CT) and associated information to be exchanged between imaging equipment from different vendors, computers, and hospitals. The DICOM format provides a suitable means that meets health infomation exchange (HIE) standards for transmission of health related data among facilities and HL7 standards which is the messaging standard that enables clinical applications to exchange data.

DICOM files typically have a .dcm extension and provides a means of storing data in seperate 'tags' such as patient information as well as image/pixel data. A DICOM file consists of a header and image data sets packed into a single file. The information within the header is organized as a constant and standardized series of tags. By extracting data from these tags one can access important information regarding the patient demographics, study parameters, etc

16 bit DICOM images have values ranging from -32768 to 32768 while 8-bit greyscale images store values from 0 to 255. The value ranges in DICOM images are useful as they correlate with the Hounsfield Scale which is a quantitative scale for describing radiodensity

Parts of a DICOM

Requirements

Requires the most recent version of fastai, installation instructions can be viewed at fastai

Also requires installing pydicom

  • pip install pydicom

and scikit-image

  • pip install scikit-image

and kornia

  • pip install kornia===0.2.0

(there is a current incompatability with the lastest version of kornia. Installing version 0.2.0 solves this issue

Using with Google Colab:

Click on the link below for an example of loading the dependancies on Colab

Open In Colab

Fastai provides an easy to access slim dicom dataset (250 DICOM files, ~30MB) from the SIIM-ACR Pneumothorax Segmentation dataset for us to experiment with dicom images. The file structure of the dataset is as follows:

Images from the notebooks

>hist_scaled(in Part1)

hist_scaled provides a way to scale a tensor of pixels evenly using freqhist_bins to values between 0 and 1. This is the histogram of image pixel values scaled from 0 to 255. As explained in this notebook

Scaled histogram now has pixel values ranging from 0 to 1

medicalimaging's People

Contributors

asvcode avatar dependabot[bot] 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.