Allow partial reading
Closed this issue · 0 comments
Currently up to v1.1, if the parsing fails, the current parsed dataset is not returned because an exception is thrown. A new way to parse the files is being implemented, which does not throw any exception, but tries to read the DICOM object as much as possible. As soon as it finds an error, it will return with a dataset composed of all elements read up to failure. Status will be returned as PARTIAL, so users can decide what to do with the object and dataset.
These are the new constants to be implemented:
const INITIAL = 0; // Not parsed yet.
const PARTIAL = 1; // Some tags were read.
const SUCCESS = 2; // Is it a DICOM object.
const FAILURE = 3; // Not a DICOM object.