suyashkumar / dicom

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

Consider Parse API refactor #326

Open suyashkumar opened 1 month ago

suyashkumar commented 1 month ago

Considering a Parse API refactor along with the next round of API-breaking changes. However, since the Parse API is likely the most used API we should be careful and only change it when we've gotten it right and are ready to commit.

Couple high level thoughts:

Something like

func NewParser(in io.Reader, opts ...ParseOption) (*Parser, error) {} // To use with Parser.Next() API

func Parse(in io.Reader, opts ...ParseOption) (Dataset, error) {} // To get a Dataset directly

Open thoughts:

suyashkumar commented 1 month ago

@wkoszek @lnogueir and others feel free to weigh in!