suyashkumar / dicom

⚡High Performance DICOM Medical Image Parser in Go.
MIT License
920 stars 133 forks source link

Write API: When using WriteElement API, ensure proper transfer syntax is used to encode the data (Write() works fine) #322

Open suyashkumar opened 1 month ago

suyashkumar commented 1 month ago

Right now, the WriteElement API blindly writes out elements to the output stream. I think this means we may not write out dicoms in the transfer syntax that may be in their metadata (the Write API which has the full dataset context does this properly, though).

We'll want to intercept the transfer syntax metadata element, and set a flag that will write all future non-metadata elements using that transfer syntax by default. Need to look into this a little more.