File tree Expand file tree Collapse file tree 1 file changed +7
-20
lines changed Expand file tree Collapse file tree 1 file changed +7
-20
lines changed Original file line number Diff line number Diff line change 3030pydicom = read_file = tag_for_keyword = Sequence = None
3131
3232try :
33- import dicom as pydicom
33+ import pydicom
3434except ImportError :
35- try :
36- import pydicom
37- except ImportError :
38- have_dicom = False
39- else : # pydicom module available
40- from pydicom .dicomio import read_file
41- from pydicom .sequence import Sequence
42- # Values not imported by default
43- import pydicom .values
44- else : # dicom module available
35+ have_dicom = False
36+ else : # pydicom module available
37+ from pydicom .dicomio import read_file
38+ from pydicom .sequence import Sequence
4539 # Values not imported by default
46- import dicom .values
47- from dicom .sequence import Sequence
48- read_file = pydicom .read_file
40+ import pydicom .values
4941
5042if have_dicom :
51- try :
52- # Versions >= 1.0
53- tag_for_keyword = pydicom .datadict .tag_for_keyword
54- except AttributeError :
55- # Versions < 1.0 - also has more search options.
56- tag_for_keyword = pydicom .datadict .tag_for_name
43+ tag_for_keyword = pydicom .datadict .tag_for_keyword
5744
5845
5946@deprecate_with_version ("dicom_test has been moved to nibabel.nicom.tests" ,
You can’t perform that action at this time.
0 commit comments