浏览代码

Adding entry filter to allow for selection in processing, also, debug parameter in template stops processing after the first entry

Andrej Studen 1 年之前
父节点
当前提交
6ddf9fcc67
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      pythonScripts/runSegmentationDM.py

+ 4 - 3
pythonScripts/runSegmentationDM.py

@@ -224,8 +224,9 @@ def doSegmentation(parameterFile):
 
 
     #all images from database
-    ds=db.selectRows(project,schema,dataset,[])
-
+    qFilter=pars['entryFilter']
+    ds=db.selectRows(project,schema,dataset,qFilter)
+    print('Got {} rows'.format(len(ds['rows'])))
     
     #input
     #use webdav to transfer file (even though it is localhost)
@@ -278,7 +279,7 @@ def doSegmentation(parameterFile):
         print(db.modifyRows(mode,pars['project'],pars['segmentationSchema'],pars['segmentationQuery'],[outRow]))
         #push results back to LabKey
         i+=1
-        if i==1:
+        if i==1 and pars['debug']:
             break
     print("Done")