Skip to content
⚡High Performance DICOM Medical Image Parser in Go.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dicomio Update import paths (#1) May 12, 2019
dicomlog More dicom logging cleanup Jun 20, 2018
dicomtag More dicom logging cleanup Jun 20, 2018
dicomuid Update import paths (#1) May 12, 2019
dicomutil Update import paths (#1) May 12, 2019
examples Push git-lfs-managed files manually. Jun 20, 2018
fuzztest Update import paths (#1) May 12, 2019
pydicomtest Update import paths (#1) May 12, 2019
.gitignore Implement buffered reading [10x speed increase] (#33) Oct 16, 2018
.travis.yml Add Makefile and Dockerfile for builds of utility tool (#15) Jul 9, 2018
Dockerfile Update import paths (#1) May 12, 2019
Gopkg.lock Update import paths (#1) May 12, 2019
Gopkg.toml Add dep, delete unused files, update import paths (#4) Jun 28, 2018
LICENSE Fix license file Jul 30, 2018
Makefile Implement streaming frames as they are parsed (#21) Jul 13, 2018
README.md Update README, add icon (#7) May 12, 2019
dicomdir.go Update import paths (#1) May 12, 2019
dicomdir_test.go Update import paths (#1) May 12, 2019
doc.go Initial commit (from grailbio/go-dicom) Jun 20, 2018
element.go Update import paths (#1) May 12, 2019
parse.go Update import paths (#1) May 12, 2019
parse_test.go Update import paths (#1) May 12, 2019
query_test.go Update import paths (#1) May 12, 2019
queryretrieve.go Update import paths (#1) May 12, 2019
writer.go Update import paths (#1) May 12, 2019
writer_test.go Update import paths (#1) May 12, 2019

README.md

dicom

High Performance Golang DICOM Medical Image Parser

This is a (hard-ish) fork of work I did at gradienthealth which built on top of go-dicom--a golang DICOM image parsing library and command line tool. We have been working on this package with the goal of building a full-featured and high-performance dicom parser in Golang with new features and improvements. I will continue to add some (potentially API breaking) improvements on my repository fork here.

So far, improvements that have made on top of go-dicom include:

  • parsing and extracting multi-frame DICOM imagery (both encapsulated and native pixel data)
  • exposing a Parser golang interface to make mock-based testing easier for clients
  • Channel-based streaming of Frames to a client as they are parsed out of the dicom
  • Parsing performance improvements
  • General refactors to the go-dicom code (though there's more work to be done here) for maintainability an readability.

Usage

To use this in your golang project, simply import our pacakge github.com/suyashkumar/dicom and then you can use our Parser for your parsing needs:

p, err := dicom.NewParserFromFile("myfile.dcm", nil)
opts := dicom.ParseOptions{DropPixelData: true}

element := p.ParseNext(opts) // parse and return the next dicom element
// or
dataset, err := p.Parse(opts) // parse whole dicom

More details about the package can be found in the godoc

CLI Tool

A CLI tool that uses this package to parse imagery and metadata out of DICOMs is provided in the dicomutil package.

Usage

dicomutil --extract-images myfile.dcm

Note: for some dicoms (with native pixel data) no automatic intensity scaling is applied yet (this is coming). You can apply this in your image viewer if needed.

Docker build

To build the tool for all platforms (Mac, Windows, Linux) from source using docker, execute the following in the cloned repo:

docker build . -t godicom
docker run -it -v $PWD/build:/go/src/github.com/suyashkumar/dicom/build godicom make release

You can then use the binaries that will show up in the build folder in your current working directory

Build manually

To build manually, ensure you have make, golang, and dep installed on your machine. Clone (or go get) this repo into your gopath then:

make

Acknowledgements

You can’t perform that action at this time.