All Projects → danishm → Mritopng

danishm / Mritopng

Licence: mit
A simple python module to make it easy to batch convert DICOM files to PNG images.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Mritopng

deid
best effort anonymization for medical images using python
Stars: ✭ 108 (-4.42%)
Mutual labels:  dicom, medical
dicomweb-pacs
Easy to use DICOMWEB enabled PACS with DIMSE services based on sqlite database
Stars: ✭ 42 (-62.83%)
Mutual labels:  dicom, medical
DICOM.jl
Julia package for reading and writing DICOM (Digital Imaging and Communications in Medicine) files
Stars: ✭ 45 (-60.18%)
Mutual labels:  dicom, medical
AlizaMS
DICOM Viewer
Stars: ✭ 144 (+27.43%)
Mutual labels:  dicom, medical
Ami
AMI Medical Imaging (AMI) JS ToolKit
Stars: ✭ 569 (+403.54%)
Mutual labels:  dicom, medical
dicom-standard-chinese
Chinese translation of DICOM standard, DICOM协议中文版
Stars: ✭ 26 (-76.99%)
Mutual labels:  dicom, medical
clara-dicom-adapter
DICOM Adapter is a component of the Clara Deploy SDK which facilitates integration with DICOM compliant systems, enables ingestion of imaging data, helps triggering of jobs with configurable rules and offers pushing the output of jobs to PACS systems.
Stars: ✭ 31 (-72.57%)
Mutual labels:  dicom, medical
dicom
C++11 and boost based implementation of the DICOM standard.
Stars: ✭ 14 (-87.61%)
Mutual labels:  dicom, medical
Medpy
Medical image processing in Python
Stars: ✭ 321 (+184.07%)
Mutual labels:  dicom, medical
wolfpacs
WolfPACS is an DICOM load balancer written in Erlang.
Stars: ✭ 1 (-99.12%)
Mutual labels:  dicom, medical
Fo Dicom
Fellow Oak DICOM for .NET, .NET Core, Universal Windows, Android, iOS, Mono and Unity
Stars: ✭ 674 (+496.46%)
Mutual labels:  dicom, medical
Dicom
⚡High Performance DICOM Medical Image Parser in Go.
Stars: ✭ 643 (+469.03%)
Mutual labels:  dicom, medical
Starviewer
Starviewer, a cross-platform open source medical imaging software
Stars: ✭ 83 (-26.55%)
Mutual labels:  dicom, medical
Projectaiai
AiAi.care project is teaching computers to "see" chest X-rays and interpret them how a human Radiologist would. We are using 700,000 Chest X-Rays + Deep Learning to build an FDA 💊 approved, open-source screening tool for Tuberculosis and Lung Cancer. After an MRMC clinical trial, AiAi CAD will be distributed for free to emerging nations, charitable hospitals, and organizations like WHO 🌏 We will also release our pretrained models and weights as Medical Imagenet.
Stars: ✭ 92 (-18.58%)
Mutual labels:  dicom
Models
DLTK Model Zoo
Stars: ✭ 101 (-10.62%)
Mutual labels:  medical
Heartypatch
A single lead ECG heart-rate variability monitoring patch with ESP32
Stars: ✭ 92 (-18.58%)
Mutual labels:  medical
Png To Ico
convert png to ico format
Stars: ✭ 88 (-22.12%)
Mutual labels:  png
Protodot
transforming your .proto files into .dot files (and .svg, .png if you happen to have graphviz installed)
Stars: ✭ 107 (-5.31%)
Mutual labels:  png
Pubmed Rct
PubMed 200k RCT dataset: a large dataset for sequential sentence classification.
Stars: ✭ 101 (-10.62%)
Mutual labels:  medical
Fastai
R interface to fast.ai
Stars: ✭ 85 (-24.78%)
Mutual labels:  medical

Convert DICOM Files to PNG

CircleCI License: MIT

Important Changes

  • 8/26/2018 - Ability to apply auto-contrast to the converted images

Introduction

A simple python module to make it easy to batch convert a binary DICOM file, which is usually an output from an MRI scan to a PNG image.

The MRI scanning facilities typically hand you a CD containing your MRI scans. This CD will typically not contain any image files in traditional formats that can be opened up by your default image viewing program. The CD contains a list of DICOM files, which can only be viewed by the included viewer, which is mostly only supported on a Windows machine.

This module should help you convert all the DICOM based scans to PNG files. This tool can be used as a command line tools as well as a library in your python code

Installation

To have known to work dependencies use beforehand::

pip install -r requirements.txt

mritopng comes with a setup.py script to use with distutils. After unpacking the distribution, cd into the directory and execute the command::

python setup.py install

This will install two things

  • The mritopng module will be installed; import mritopng will allow you to use it
  • A command line utility called mritopng which can be used from the console

Quick Start

mritopng will install a command line utility that can be used to convert individual DICOM files or folders

Getting Help

$ mritopng --help
usage: mritopng [-h] [-f] [-c] dicom_path png_path

Convert a dicom MRI file to png. To conver a whole folder recursivly, use the
-f option

positional arguments:
  dicom_path           Full path to the mri file
  png_path             Full path to the generated png file

optional arguments:
  -h, --help           show this help message and exit
  -f, --folder         Convert a whole folder instead of a single file
  -c, --auto-contrast  Apply contrast after converting default image

Convert Single File

# Converts the file /DICOM/SCAN1 to a file called output.png,
# while applying auto contrast
$ mritopng --auto-contrast /DICOM/SCAN1 output.png

Note: If file output.png already exists, it will be overwritten

Convert Folder Tree

The utility can also be used to convert a whole folder recursively by using the -f option::

# Takes all the files in /DICOM, converts the files to png and
# puts them in the /PNG folder with the same structure as /DICOM. 
$ mritopng -f /DICOM /PNG

Note:

  • Existing top level folder will NOT be over-written e.g. the example above will fail of the folder /PNG already exists
  • The tool will try to convert as many files as it can, skipping the ones that it can't

Using it as a Library

It's pretty easy to get up and running with mritopng in your own project

import mritopng

# Convert a single file with auto-contrast
mritopng.convert_file('/home/user/DICOM/SCAN1', '/home/user/output.png', auto_contrast=True)

# Convert a whole folder recursively
mritopng.convert_folder('/home/user/DICOM/', '/home/user/PNG/')
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].