-
-
Notifications
You must be signed in to change notification settings - Fork 150
Description
HI there, this is more of a question than and issue, but I wanted to explain an issue I encountered with the various go-netdicom repos out there (see: #246)
When interacting with a network connection data PDU's (actions DT-1 and AR-7) it's necessary to encode a DIMSE message using what appears to be an equivalent to your dicomio.Writer. (before refactor, is was dicomio.Encoder.). In the original version "WriteElement" was an exposed function from the dicom object, not presented as function receiver. So, it was callable by passing in a dicomio.Encoder. Here's the line:
https://github.com/grailbio/go-dicom/blob/b0e216a1c5cd39a087b0b20538327cc4ae16abdd/writer.go#L117
Here's my challenge, in your dicom.NewWriter() function, you are creating a new dicomio.Writer.
Line 40 in 4c45b44
| func NewWriter(out io.Writer, opts ...WriteOption) (*Writer, error) { |
However, in my situation, I need to pass in an already created dicomio.Writer (or at least an io.Writer) created in previous steps in this process. Would you have any suggestions here, or should I simply update dicomio with a function that returns the embedded io.writer?
Thanks for your help and great work.