当前位置: 首页>>代码示例>>Python>>正文


Python ResultsTable.reset方法代码示例

本文整理汇总了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]
开发者ID:leec13,项目名称:MorphoBactPy,代码行数:51,代码来源:MorphoBact.py

示例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)))

	


开发者ID:cmci,项目名称:CellClusterIndex,代码行数:27,代码来源:ClusterIndex.py


注:本文中的ij.measure.ResultsTable.reset方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。