Skip to content
This repository has been archived by the owner on Oct 29, 2022. It is now read-only.

GoogleCloudPlatform/go-dicom-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A lightweight, efficient DICOM processing library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages