File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -94,15 +94,19 @@ def create_seqinfo(
94
94
series_desc = get_typed_attr (dcminfo , "SeriesDescription" , str , "" )
95
95
protocol_name = get_typed_attr (dcminfo , "ProtocolName" , str , "" )
96
96
97
- if dcminfo .get ([0x18 , 0x24 ]):
98
- # GE and Philips
99
- sequence_name = dcminfo [0x18 , 0x24 ].value
100
- elif dcminfo .get ([0x19 , 0x109C ]):
101
- # Siemens
102
- sequence_name = dcminfo [0x19 , 0x109C ].value
103
- elif dcminfo .get ([0x18 , 0x9005 ]):
104
- # Siemens XA
105
- sequence_name = dcminfo [0x18 , 0x9005 ].value
97
+ for k , m in (
98
+ ([0x18 , 0x24 ], "GE and Philips" ),
99
+ ([0x19 , 0x109C ], "Siemens" ),
100
+ ([0x18 , 0x9005 ], "Siemens XA" ),
101
+ ):
102
+ if v := dcminfo .get (k ):
103
+ sequence_name = v .value
104
+ lgr .debug (
105
+ "Identified sequence name as %s coming from the %r family of MR scanners" ,
106
+ sequence_name ,
107
+ m ,
108
+ )
109
+ break
106
110
else :
107
111
sequence_name = ""
108
112
You can’t perform that action at this time.
0 commit comments