File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -169,6 +169,9 @@ def validate_dicom(
169
169
Parse DICOM attributes. Returns None if not valid.
170
170
"""
171
171
mw = dw .wrapper_from_file (fl , force = True , stop_before_pixels = True )
172
+ if dcmfilter is not None and dcmfilter (mw .dcm_data ):
173
+ lgr .warning ("Ignoring %s because of DICOM filter" , fl )
174
+ return None
172
175
# clean series signature
173
176
for sig in ("iop" , "ICE_Dims" , "SequenceName" ):
174
177
try :
@@ -189,9 +192,6 @@ def validate_dicom(
189
192
except AttributeError as e :
190
193
lgr .warning ('Ignoring %s since not quite a "normal" DICOM: %s' , fl , e )
191
194
return None
192
- if dcmfilter is not None and dcmfilter (mw .dcm_data ):
193
- lgr .warning ("Ignoring %s because of DICOM filter" , fl )
194
- return None
195
195
if mw .dcm_data [0x0008 , 0x0016 ].repval in (
196
196
"Raw Data Storage" ,
197
197
"GrayscaleSoftcopyPresentationStateStorage" ,
You can’t perform that action at this time.
0 commit comments