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 30
30
pydicom = read_file = tag_for_keyword = Sequence = None
31
31
32
32
try :
33
- import dicom as pydicom
33
+ import pydicom
34
34
except 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
45
39
# 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
49
41
50
42
if 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
57
44
58
45
59
46
@deprecate_with_version ("dicom_test has been moved to nibabel.nicom.tests" ,
You can’t perform that action at this time.
0 commit comments