Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to not hold entire dataset in memory at once #257

Open
suyashkumar opened this issue Feb 20, 2023 · 2 comments
Open

Add option to not hold entire dataset in memory at once #257

suyashkumar opened this issue Feb 20, 2023 · 2 comments

Comments

@suyashkumar
Copy link
Owner

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
Copy link
Owner Author

suyashkumar commented Feb 20, 2023

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
Copy link
Owner Author

#267 has a draft of this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant