gillesdemey/go-dicom

parser.Parse(bytes) is empty

zdy2027 opened this issue · 3 comments

I use the code "data, _ := parser.Parse(bytes)" to parse my dcm, but data is empty.
I wonder why DicomMessage'msg is not Msg

I must add

dcm := &dicom.DicomFile{}
gw := new(sync.WaitGroup)
dcm.Discard(c,gw)
gw.Wait()

before

for _, elem := range datax.Elements {
fmt.Printf("%+v\n", &elem)
}
"
than it can print elem

you should fmt.Printf("%+v\n", elem) not &elem

also in dicomPipes.go's WriteToFile and Log should print *dcmMsg.msg not dcmMsg.msg