This change wraps the read methods in read.go into a lightweight reader struct. This allows for easier sharing of some common variables, for example the parse options set without having to inject them through deep read call chains.
This also does the following:
Moves readMetadata into read.go
removes parseOptSet from Dataset.
updates dicomio.NewReader signature to not include an error (not needed).
We may want to revisit the naming of some of these entities at some point. There now exists a dicom.reader (unexported) and a lower level dicomio.Reader (referred to as rawReader in this change). Ideally we can also make future refactors to eliminate the need for Parser to be aware of the rawReader (should be easy).
This change wraps the read methods in read.go into a lightweight reader struct. This allows for easier sharing of some common variables, for example the parse options set without having to inject them through deep read call chains.
This also does the following:
We may want to revisit the naming of some of these entities at some point. There now exists a dicom.reader (unexported) and a lower level dicomio.Reader (referred to as rawReader in this change). Ideally we can also make future refactors to eliminate the need for Parser to be aware of the rawReader (should be easy).