|
@@ -152,6 +152,7 @@ class imageBrowserWidget(ScriptedLoadableModuleWidget):
|
|
|
self.setupList=qt.QComboBox()
|
|
|
self.setupList.addItem('<Select>')
|
|
|
self.setupList.addItem("limfomiPET_iBrowser.json")
|
|
|
+ self.setupList.addItem("limfomiPET_iBrowser_selected.json")
|
|
|
self.setupList.addItem("iraemm_iBrowserProspective.json")
|
|
|
self.setupList.addItem("iraemm_iBrowserRetrospective.json")
|
|
|
self.setupList.currentIndexChanged.connect(self.onSetupListChanged)
|
|
@@ -521,10 +522,32 @@ class imageBrowserLogic(ScriptedLoadableModuleLogic):
|
|
|
#include filters...
|
|
|
|
|
|
ds=self.getDataset()
|
|
|
-
|
|
|
- ids=[row[self.isetup['participantField']] for row in ds['rows']]
|
|
|
+ try:
|
|
|
+ filterValue=self.isetup['filterEntries']
|
|
|
+ except KeyError:
|
|
|
+ #this is default
|
|
|
+ ids=[row[self.isetup['participantField']] for row in ds['rows']]
|
|
|
+ status['ids']=list(set(ids))
|
|
|
+ return status
|
|
|
+
|
|
|
+ #look for entries where segmentation was already done
|
|
|
+ dsSet=self.getDataset('SegmentationsMaster')
|
|
|
+ segMap={'{}:{}'.format(r['ParticipantId'],r['visitCode']):r['comments']
|
|
|
+ for r in dsSet['rows']}
|
|
|
+ ids=[]
|
|
|
+ for r in ds['rows']:
|
|
|
+ code='{}:{}'.format(r['ParticipantId'],r['visitCode'])
|
|
|
+ try:
|
|
|
+ comment=segMap[code]
|
|
|
+ except KeyError:
|
|
|
+ ids.append(r['ParticipantId'])
|
|
|
+ continue
|
|
|
+ if comment==filterValue:
|
|
|
+ ids.append(r['ParticipantId'])
|
|
|
status['ids']=list(set(ids))
|
|
|
return status
|
|
|
+
|
|
|
+
|
|
|
|
|
|
def getVarName(self,name="Imaging",var="visitField"):
|
|
|
dset=self.isetup['datasets'][name]
|
|
@@ -627,6 +650,7 @@ class imageBrowserLogic(ScriptedLoadableModuleLogic):
|
|
|
filetype=filetype,properties=properties)
|
|
|
|
|
|
if not keepCached:
|
|
|
+ pass
|
|
|
#os.remove(localPath)
|
|
|
|
|
|
|