Git Product home page Git Product logo

go-dicom's People

Contributors

cian avatar ematvey avatar hkethi002 avatar yasushi-saito avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-dicom's Issues

Add native support for OF VR

Awesome and very helpful library so far.

However, It would be cool if there was native support for the "OF" VR so that we could natively return a []float32 instead of the []string that it defaults to.

The read example can not run in doc.go

Below code is not working, the error is st is not defined.

	data, err := dicom.ReadDataSetFromFile(`a.dcm`, st.size())

So I changed to below

data, err := dicom.ReadDataSetFromFile(`a.dcm`, dicom.ReadOptions{true})

Then it works

Unexpected extra flags

Hi. First of all, thanks for building this project, I've just started using it and it has already been very helpful.

I built a simple program to extract some basic information from a DICOM file such as the patient name and added a few flags to my program via the flag package in the stdlib.

When I ran my binary with --help I was surprised to see a lot of extra flags, such as -v, -vmodule and others. Looks like this is from the vlog library. I'm not sure what that library does and I wouldn't expect to get a bunch of new flags registered just by importing a new lib. Is it really necessary? Are there any known ways around it?

If the only way around it is to remove the dependency, would you like if I submitted a PR doing that? I don't know anything about vlog but I'm assuming it's a logging library, if that's the case it shouldn't be difficult.

Unknown encodings not defaulting to utf-8

Error message here states that in case of unknown encoding decoder defaults to utf-8, but this doesn't seem to be happening. In my case the encoding is ISO_IR 192, which seems to be a DICOM-specific alias for utf-8, but it is not correctly decoded as such.

get dataSet value by dicomTag

is there a way to get a value of a dataset element by dicomtag?
e.g.:
ds.Elements.getByDicomTag(dicomtag.StudyInstanceUID)
instead:
for _, ele := range ds.Elements { if ele.Tag == dicomtag.StudyInstanceUID { return ele.Value } }

Read nested elements

I'm trying to read nested elements from a DICOM file like this:

beamSequence, err := data.FindElementByTag(dicomtag.BeamSequence)
  if err != nil {
    fmt.Printf(err.Error())
  } else{
    for _, elem:= range beamSequence.Value {
      beamItem := elem.(*dicom.Element).Value
      cps, err := beamItem.FindElementByTag(dicomtag.ControlPointSequence)
    }
  }

But this raises an exception (beamItem.FindElementByTag undefined). What I'm doing wrong?
Thanks beforehand

Panicking on ReadElement failed to consume data

Google Storage frequently throws input/output errors. My code anticipates this and handles it. However, when I call into god-dicom, the code panics because go-dicom panics in ReadDataSet. It seems like it could instead return an error, no?

panic(fmt.Sprintf("ReadElement failed to consume data: position %d: %v", startLen, buffer.Error()))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.