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 @@ -426,9 +426,6 @@ def parse_x_protocol(pattern: str, dicomfile: Path) -> str:
426426 :return: The string extracted values from the dicom-file according to the given pattern
427427 """
428428
429- if not is_dicomfile_siemens (dicomfile ):
430- LOGGER .warning (f"Parsing { pattern } may fail because { dicomfile } does not seem to be a Siemens DICOM file" )
431-
432429 regexp = '^' + pattern + '\t = \t (.*)\n '
433430 regex = re .compile (regexp .encode ('utf-8' ))
434431
@@ -438,6 +435,9 @@ def parse_x_protocol(pattern: str, dicomfile: Path) -> str:
438435 if match :
439436 return match .group (1 ).decode ('utf-8' )
440437
438+ if not is_dicomfile_siemens (dicomfile ):
439+ LOGGER .warning (f"Parsing { pattern } may have failed because { dicomfile } does not seem to be a Siemens DICOM file" )
440+
441441 LOGGER .warning (f"Pattern: '{ regexp .encode ('unicode_escape' ).decode ()} ' not found in: { dicomfile } " )
442442 return ''
443443
You can’t perform that action at this time.
0 commit comments