本文整理汇总了Python中ij.measure.ResultsTable.reset方法的典型用法代码示例。如果您正苦于以下问题:Python ResultsTable.reset方法的具体用法?Python ResultsTable.reset怎么用?Python ResultsTable.reset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ij.measure.ResultsTable
的用法示例。
在下文中一共展示了ResultsTable.reset方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __localwand
# 需要导入模块: from ij.measure import ResultsTable [as 别名]
# 或者: from ij.measure.ResultsTable import reset [as 别名]
def __localwand(self, x, y, ip, seuil, method, light):
self.__image.killRoi()
ip.snapshot()
if method == "mean" :
peak=ip.getPixel(x,y)
tol = (peak - self.getMean())*seuil
w = Wand(ip)
w.autoOutline(x, y, tol, Wand.EIGHT_CONNECTED)
#print "method=", method, tol, peak
elif method == "background" :
radius = self.getMinF()/4
bs = BackgroundSubtracter()
#rollingBallBackground(ImageProcessor ip, double radius, boolean createBackground, boolean lightBackground, boolean useParaboloid, boolean doPresmooth, boolean correctCorners)
bs.rollingBallBackground(ip, radius, False, light, False, True, False)
peak=ip.getPixel(x,y)
tol = peak*seuil
w = Wand(ip)
w.autoOutline(x, y, tol, Wand.EIGHT_CONNECTED)
ip.reset()
#print "method=", method, tol, radius, peak
else :
peak=ip.getPixel(x,y)
tol = peak*seuil
w = Wand(ip)
w.autoOutline(x, y, tol, Wand.EIGHT_CONNECTED)
#print "method=", method, tol
peak=ip.getPixel(x,y)
temproi=PolygonRoi(w.xpoints, w.ypoints, w.npoints, PolygonRoi.POLYGON)
self.__image.setRoi(temproi)
#self.__image.show()
#time.sleep(1)
#peakip=self.__image.getProcessor()
#stats=peakip.getStatistics()
temprt = ResultsTable()
analyser = Analyzer(self.__image, Analyzer.AREA+Analyzer.INTEGRATED_DENSITY+Analyzer.FERET, temprt)
analyser.measure()
#temprt.show("temprt")
rtValues=temprt.getRowAsString(0).split("\t")
area=float(rtValues[1])
intDen=float(rtValues[4])
feret=float(rtValues[2])
mean=intDen/area
#time.sleep(2)
temprt.reset()
self.__image.killRoi()
return [peak, area, mean, intDen, feret]
示例2: range
# 需要导入模块: from ij.measure import ResultsTable [as 别名]
# 或者: from ij.measure.ResultsTable import reset [as 别名]
# Morphological dilate
binner.setup('dilate', None)
clusters = 0
initialCells = 0
# dilate by 'SAMPLEITER'
for i in range(SAMPLEITER+1):
p.analyze(binimp)
cellcounts = rt.getCounter()
if i == 0:
initialCells = cellcounts
#IJ.log("iter:" + str(i) + " -- cell counts: " + str(cellcounts))
if i == SAMPLEITER:
clusters = cellcounts
binner.run(binimp.getProcessor())
rt.reset()
#binimp.show()
#binorg.show()
IJ.log("==== " + imp3.getTitle() + " =====")
IJ.log("Number of Nucleus : " + str(initialCells))
IJ.log("Clusters at dilation " + str(SAMPLEITER) + ": " + str(clusters))
IJ.log("Clusters/Nucleus " + str(float(clusters)/float(initialCells)))