Переглянути джерело

Adding scanningSequence and sequenceVariant to dicom tags, have loadPatient return metadata as well as nodes

Andrej 3 роки тому
батько
коміт
e2219ce208
1 змінених файлів з 10 додано та 4 видалено
  1. 10 4
      loadPatient.py

+ 10 - 4
loadPatient.py

@@ -16,7 +16,7 @@ def getOICode(db, project, label):
 
 
 def load(db,fb,fbDMR,iDicom,lDicom,project,label):
-    print('loadPatient.load ver: 0.0.2')
+    print('loadPatient.load ver: 1.0.1')
 
     idFilter={'variable':'EMBRACE_ID','value':label,'oper':'eq'}
     ctFilter={'variable':'type','value':'CT','oper':'eq'}
@@ -40,7 +40,7 @@ def load(db,fb,fbDMR,iDicom,lDicom,project,label):
         rDicom=dsDicom['rows'][0]
     except IndexError:
         return returnObj
-
+    
     iPath=['dicom',rDicom['Study'],rDicom['Series']]
     dicomReadFilter={'seriesNumber':"SeriesLabel",
                         'studyInstanceUid':None,
@@ -65,7 +65,9 @@ def load(db,fb,fbDMR,iDicom,lDicom,project,label):
                         'sequenceName':"*tse2d1_3",
                         'percentPhaseFieldOfView':90,
                         'studyInstanceUid':None,
-                        'frameOfReferenceInstanceUid':None}
+                        'frameOfReferenceInstanceUid':None,
+                        'scanningSequence':None,
+                        'sequenceVariant':None
 
     dmrVolumes=iDicom.loadVolumes(fbDMR,project,iPath,dicomReadFilter)
     try:
@@ -99,5 +101,9 @@ def load(db,fb,fbDMR,iDicom,lDicom,project,label):
     rtNode=rtSeg[0]['node']
     rtNode.SetName(label+'_CTRS')
 
-    return {'CT':ctNode,'DMR':dmrNode,'CTRS':rtNode}
+    return {'CT':ctNode,'DMR':dmrNode,'CTRS':rtNode,
+        'metadataCT':ctVolumes[0]['metadata'],
+        'metadataDMR':dmrVolumes[0]['metadata'],
+        'metadataCTRS':rtSeg[0]['metadata']
+        }