Skip to content
A lightweight, efficient DICOM processing library
Go
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dcmdictgen
dicom
testdata
CONTRIBUTING.md
LICENSE
README.md

README.md

Go DICOM parser

The Go DICOM parser is a library to parse DICOM files.

Getting Started

Installing

To start using, install Go 1.8 or above and run go get:

go get github.com/googlecloudplatform/go-dicom-parser/dicom

This will download the library source code into your $GOPATH

Examples

package main

import (
  "log"
  "os"
  "fmt"
  "github.com/googlecloudplatform/go-dicom-parser/dicom"
)

func main() {
  r, err := os.Open("dicomfile.dcm")
  if err != nil {
    log.Fatalf("os.Open(_) => %v", err)
  }
  dataSet, err := dicom.Parse(r)
  if err != nil {
    log.Fatalf("dicom.Parse(_) => %v", err)
  }

  for tag, element := range dataSet.Elements {
    fmt.Println(tag, element.VR, element.ValueField)
  }
}

For more examples on library usage please visit the godoc https://godoc.org/github.com/googlecloudplatform/go-dicom-parser

You can’t perform that action at this time.