|
@@ -423,6 +423,12 @@ def dicomValue(file,tag,seqTag=None,shell=False):
|
|
except subprocess.CalledProcessError as e:
|
|
except subprocess.CalledProcessError as e:
|
|
return None
|
|
return None
|
|
|
|
|
|
|
|
+ if debug:
|
|
|
|
+ print("Tag {} Line '{}'").format(tag,out)
|
|
|
|
+ if len(out)==0:
|
|
|
|
+ return out
|
|
|
|
+
|
|
|
|
+
|
|
lst=out.split('\n')
|
|
lst=out.split('\n')
|
|
return getTagValue(lst,tag,seqTag)
|
|
return getTagValue(lst,tag,seqTag)
|
|
|
|
|
|
@@ -431,11 +437,6 @@ def getTagValue(lst,tag,seqTag=None):
|
|
|
|
|
|
debug=False
|
|
debug=False
|
|
|
|
|
|
- if debug:
|
|
|
|
- print("Tag {} Line '{}'").format(tag,out)
|
|
|
|
- if len(out)==0:
|
|
|
|
- return out
|
|
|
|
-
|
|
|
|
|
|
|
|
longTag="^\({}\)".format(tag)
|
|
longTag="^\({}\)".format(tag)
|
|
|
|
|
|
@@ -443,12 +444,13 @@ def getTagValue(lst,tag,seqTag=None):
|
|
if debug:
|
|
if debug:
|
|
print("Tag:{} seqTag:{}").format(tag,seqTag)
|
|
print("Tag:{} seqTag:{}").format(tag,seqTag)
|
|
longTag="^\({}\).\({}\)".format(seqTag,tag)
|
|
longTag="^\({}\).\({}\)".format(seqTag,tag)
|
|
-
|
|
+
|
|
- lst=out.split('\n')
|
|
|
|
|
|
|
|
pattern=r'^.*\[(.*)\].*$'
|
|
pattern=r'^.*\[(.*)\].*$'
|
|
|
|
+
|
|
|
|
|
|
rpl=[re.sub(pattern,r'\1',f) for f in lst]
|
|
rpl=[re.sub(pattern,r'\1',f) for f in lst]
|
|
|
|
+
|
|
|
|
|
|
mtchPattern=[re.match(pattern,f) for f in lst]
|
|
mtchPattern=[re.match(pattern,f) for f in lst]
|
|
|
|
|