Skip to content

Commit bf793c9

Browse files
committed
BF(workaround): add kludge for read_file for dcmstack
1 parent bc191af commit bf793c9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

heudiconv/dicoms.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@
4646
# suppress warning
4747
import nibabel.nicom.dicomwrappers as dw
4848

49+
# TODO: remove the kludge whenever
50+
# https://github.com/moloney/dcmstack/pull/90 is merged and released
51+
if not hasattr(dcm, "read_file"):
52+
dcm.read_file = dcm.dcmread
53+
4954
lgr = logging.getLogger(__name__)
5055
total_files = 0
5156
# Might be monkey patched by user heuristic to tune desired compression level.

0 commit comments

Comments
 (0)