Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update get_csa_header to return none on CSAReadError
Some non-MRI dicom datasets have just strings in CSA Header tags. This causes the read on line 68 to throw an error because the string is not a CSA header. Unfortunately this throws out other packages such as dcmstack which use nibabel. The proposed fix returns none if a read error is encountered when such strings are parsed. It is possible such strings may pass the initial check for 0 < n_tags <=128 which throws the CSAReadError but fail later in which case the except block can be be modified to handle those exceptions as well.
- Loading branch information