go-dicom-parser

module
v0.0.0-...-768c9a2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2018 License: Apache-2.0

README

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

Directories

Path Synopsis
Package main generates a list of tags from the DICOM data dictionary
Package main generates a list of tags from the DICOM data dictionary
Package dicom provides functions and data structures for manipulating the DICOM file format.
Package dicom provides functions and data structures for manipulating the DICOM file format.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL