grailbio / go-dicom Goto Github PK
View Code? Open in Web Editor NEWDICOM parser for golang
License: MIT License
DICOM parser for golang
License: MIT License
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.
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
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.
Is there a way to get custom Dicom headers?
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.
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 } }
Hi @grailbio, the v.io/x/lib/vlog
import is causing errors when vendoring. I believe the new source for https://v.io/x/lib is https://github.com/vanadium/go.lib. Please update the repo to reflect the new path. Thanks!
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
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?
Line 108 in c30d9ea
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.