Changeset 38816 for trunk/ippToPsps/jython/stackbatch.py
- Timestamp:
- Oct 7, 2015, 12:05:17 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/jython/stackbatch.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/jython/stackbatch.py
r38802 r38816 248 248 sqlLine = sqlUtility("INSERT INTO " + tablename + " (") 249 249 250 sqlLine.group("stack MetaID",str(stackID))250 sqlLine.group("stackImageID", str(stackID)) 251 251 sqlLine.group("batchID", str(self.batchID)) 252 252 sqlLine.group("surveyID", str(self.surveyID)) … … 333 333 # NOTE: filter:ippDetectID (eg, gippDetectID) are inserted in selectDvoObjIDs() 334 334 sqlLine.group("a."+filter+"stackDetectID", "b.detectID") # eg, gstackDetectID (from dvo.measure.extID) 335 sqlLine.group("a."+filter+"stack MetaID", str(stackID)) # eg, gstackMetaID (from cmf.IMAGEID)335 sqlLine.group("a."+filter+"stackImageID", str(stackID)) # eg, gstackImageID (from cmf.IMAGEID) 336 336 337 337 sqlLine.group("a.dvoRegionID", "b.catID") # this is not filter dependent, but is re-written for each filter (if data exists) … … 996 996 for filter in self.filters: 997 997 998 stack metaID = self.stackIDs[filter]999 if stack metaID > 0:998 stackImageID = self.stackIDs[filter] 999 if stackImageID > 0: 1000 1000 1001 imageIDs = self.gpc1Db.getImageIDsForThisStackID(stack metaID)1001 imageIDs = self.gpc1Db.getImageIDsForThisStackID(stackImageID) 1002 1002 1003 1003 for imageID in imageIDs: 1004 1004 1005 sql = "INSERT INTO StackToImage (stack MetaID, imageID) \1005 sql = "INSERT INTO StackToImage (stackImageID, imageID) \ 1006 1006 VALUES (\ 1007 " + str(stack metaID) + ", " + imageID + ")"1007 " + str(stackImageID) + ", " + imageID + ")" 1008 1008 self.scratchDb.execute(sql) 1009 1009 1010 1010 # now update StackMeta with correct number of inputs 1011 sql = "UPDATE "+filter+"StackMeta SET nP2Images = (SELECT COUNT(distinct(floor(imageID/100))) FROM StackToImage where stack MetaID = "+str(stackmetaID)+")"1011 sql = "UPDATE "+filter+"StackMeta SET nP2Images = (SELECT COUNT(distinct(floor(imageID/100))) FROM StackToImage where stackImageID = "+str(stackImageID)+")" 1012 1012 self.scratchDb.execute(sql) 1013 1013 … … 1192 1192 fields += filter + "stackDetectID, " 1193 1193 # fields += filter + "StackDetectRowID, " 1194 fields += filter + "stack MetaID " # careful here: do not add comma to last entry1194 fields += filter + "stackImageID " # careful here: do not add comma to last entry 1195 1195 if (i < len(self.filters) - 1): 1196 1196 fields += ", "
Note:
See TracChangeset
for help on using the changeset viewer.
