|
@@ -20,49 +20,47 @@ sys.path.insert(0,setup["paths"]["orthancInterface"])
|
|
|
import orthancInterface
|
|
|
import orthancFileBrowser
|
|
|
|
|
|
-
|
|
|
-
|
|
|
+sys.path.insert(1,setup['paths']['analysisInterface'])
|
|
|
+import analysisInterface
|
|
|
|
|
|
|
|
|
fconfig=os.path.join(fhome,'.labkey','network.json')
|
|
|
|
|
|
-
|
|
|
matlab=setup["paths"]["matlab"]
|
|
|
-
|
|
|
generalCodes=setup["paths"]["generalCodes"]
|
|
|
-
|
|
|
niftiTools=setup["paths"]["niftiTools"]
|
|
|
-
|
|
|
|
|
|
net=labkeyInterface.labkeyInterface()
|
|
|
net.init(fconfig)
|
|
|
db=labkeyDatabaseBrowser.labkeyDB(net)
|
|
|
fb=labkeyFileBrowser.labkeyFileBrowser(net)
|
|
|
|
|
|
-
|
|
|
onet=orthancInterface.orthancInterface()
|
|
|
onet.init(fconfig)
|
|
|
ofb=orthancFileBrowser.orthancFileBrowser(onet)
|
|
|
|
|
|
+parameterFile=sys.argv[1]
|
|
|
+runid=sys.argv[2]
|
|
|
+
|
|
|
+ana=analysisInterface.analysisInterface(db,fb,runid)
|
|
|
+ana.updateStatus(2)
|
|
|
+pars=ana.getParameters(parameterFile)
|
|
|
+
|
|
|
hi=0
|
|
|
-project='iPNUMMretro/Study'
|
|
|
-
|
|
|
-project='IPNUMMprospektiva/Study'
|
|
|
-dataset='Imaging1'
|
|
|
+project=pars['Database']['project']
|
|
|
+dataset=pars['Database']['queryName']
|
|
|
+schema=pars['Database']['schemaName']
|
|
|
+
|
|
|
tempBase=os.path.join(fhome,'temp')
|
|
|
|
|
|
|
|
|
-participantField='PatientId'
|
|
|
-
|
|
|
-participantField='ParticipantId'
|
|
|
+participantField=pars['Database']['participantField']
|
|
|
|
|
|
|
|
|
-ds=db.selectRows(project,'study',dataset,[])
|
|
|
-
|
|
|
+ds=db.selectRows(project,schema,dataset,[])
|
|
|
imageSelector={"CT":"CT_orthancId","PET":"PETWB_orthancId"}
|
|
|
imageResampledField={"CT":"ctResampled","PET":"petResampled"}
|
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
|
@@ -145,7 +143,7 @@ def updateRow(project,dataset,row,imageResampledField,gzFileNames,\
|
|
|
db.modifyRows('update',project,'study',dataset,[row])
|
|
|
|
|
|
|
|
|
-
|
|
|
+ana.updateStatus(3)
|
|
|
i=0
|
|
|
for row in ds["rows"]:
|
|
|
|
|
@@ -248,5 +246,5 @@ for row in ds["rows"]:
|
|
|
break
|
|
|
i=i+1
|
|
|
|
|
|
-
|
|
|
+ana.updateStatus(4)
|
|
|
print("Done")
|