You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When parsing a non-conforming DICOM file that doesn't have the MetaElementGroupLength tag using NewParserFromFile (e.g. dicomutil) the error is masked by an interface conversion error.
The cause is in the NewParserFromFile function that is trying to convert the interface, which can be nil, before checking the error from the call to NewParser() in parse.go line 81. Instead, the error should be checked before attempting to convert the interface. Alternatively, the second return value of the interface conversion could be checked to make sure that the conversion succeeds, avoiding the panic.
The text was updated successfully, but these errors were encountered:
When parsing a non-conforming DICOM file that doesn't have the MetaElementGroupLength tag using NewParserFromFile (e.g. dicomutil) the error is masked by an interface conversion error.
The cause is in the NewParserFromFile function that is trying to convert the interface, which can be nil, before checking the error from the call to NewParser() in parse.go line 81. Instead, the error should be checked before attempting to convert the interface. Alternatively, the second return value of the interface conversion could be checked to make sure that the conversion succeeds, avoiding the panic.
The text was updated successfully, but these errors were encountered: