|
@@ -38,12 +38,29 @@ def getVisitFilter(row,xconfig):
|
|
|
'value':getVisitId(row,xconfig),
|
|
|
'oper':'eq'}
|
|
|
|
|
|
+def getFilter(xconfig):
|
|
|
+ row={}
|
|
|
+ fields={getPatientField(xconfig):getIdFilter,
|
|
|
+ getVisitField(xconfig):getVisitFilter}
|
|
|
+
|
|
|
+ qfilter=[]
|
|
|
+ for f in fields:
|
|
|
+ try:
|
|
|
+ row[f]=xconfig[f]
|
|
|
+ qfilter.append(fields[f](row,xconfig))
|
|
|
+ except KeyError:
|
|
|
+ continue
|
|
|
+ return qfilter
|
|
|
+
|
|
|
+
|
|
|
def getCode(row,xconfig):
|
|
|
return '{}_{}'.format(getPatientId(row,xconfig),getVisitId(row,xconfig))
|
|
|
|
|
|
def getTargetSeqNum(row,xconfig):
|
|
|
if getVisitId(row,xconfig)=='OBR':
|
|
|
return 2
|
|
|
+ if getVisitId(row,xconfig)=='MIR1':
|
|
|
+ return 3
|
|
|
return 1
|
|
|
|
|
|
def getPathList(row,xconfig):
|
|
@@ -101,6 +118,16 @@ def getFitParFinalName(code,nc,j,aType):
|
|
|
|
|
|
return '{}_fitParFinal.txt'.format(fCode)
|
|
|
|
|
|
+def getFitPNGNames(code,nc,j,aType):
|
|
|
+ fCode='{}_{}_{}'.format(code,nc,j+1)
|
|
|
+ if aType!='global':
|
|
|
+ fCode='{}_{}'.format(fCode,aType)
|
|
|
+ names=[]
|
|
|
+ for i in range(nc):
|
|
|
+ names.append('{}_centers{}.txt'.format(fCode,i+1))
|
|
|
+ return names
|
|
|
+
|
|
|
+
|
|
|
def printFitParFinalRowNames(r,setup,aType):
|
|
|
names=[]
|
|
|
nr=setup['nr']
|
|
@@ -110,7 +137,9 @@ def printFitParFinalRowNames(r,setup,aType):
|
|
|
for nc in nclass:
|
|
|
for j in range(nr):
|
|
|
names.append(getFitParFinalName(code,nc,j,aType))
|
|
|
- #names.append('{}_centerWeight.nrrd'.format(fCode))
|
|
|
+#add pngs of the fit (good QA)
|
|
|
+#this are only partial fits, from which global parameters are taken
|
|
|
+ #names+=getFitPNGNames(code,nc,j,aType)
|
|
|
return names
|
|
|
|
|
|
def getPixelFitParFinalName(code,nc,s2,mode):
|