Add option to not hold entire dataset in memory at once
Opened this issue · 2 comments
suyashkumar commented
Some dataset items must be held in memory as context to read future tags/values properly. But, we can have an option where only the essential tags are held in memory, and if you're using incremental parsing (Parser.Next()
) you can process things 1 element at a time if appropriate for your use case.
suyashkumar commented
For example for a pipeline you could do something like
var elem *dicom.Element
var err error
for err != dicom.EndOfDICOM {
elem, err = parser.Next()
newElem := doSomeProcessing(elem)
writer.WriteElement(elem)
}
and possibly don't have to hold the all of the DICOMs elements in memory at one time
suyashkumar commented
#267 has a draft of this!