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


Python ImagePlus.setTitle方法代码示例

本文整理汇总了Python中ij.ImagePlus.setTitle方法的典型用法代码示例。如果您正苦于以下问题:Python ImagePlus.setTitle方法的具体用法?Python ImagePlus.setTitle怎么用?Python ImagePlus.setTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ij.ImagePlus的用法示例。


在下文中一共展示了ImagePlus.setTitle方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: ImageStack

# 需要导入模块: from ij import ImagePlus [as 别名]
# 或者: from ij.ImagePlus import setTitle [as 别名]
   stkA.add(orthoimp)
   #orthoimp.show()
stk = ImageStack(stkA.get(0).getWidth(), stkA.get(0).getHeight())
for item in stkA:
   stk.addSlice("slcie", item.getProcessor())
out = ImagePlus("out", stk)
#out.setCalibration(imp.getCalibration().copy())

IJ.run(out, "Grays", "");
IJ.run(out, "RGB Color", "");

# load data from file
filepath = '/Users/miura/Dropbox/Mette/20_23h/20_23hrfull_corrected_1_6_6_netdispZ40.csv'
filename = os.path.basename(filepath)
newfilename = os.path.join(os.path.splitext(filename)[0], '_plotStack.tif')
out.setTitle(os.path.basename(filename)+'_OutStack.tif')

PLOT_ONLY_IN_FRAME1 = False
data = readCSV(filepath)
calib = imp.getCalibration()
xscale = calib.pixelWidth
yscale = calib.pixelHeight
zscale = calib.pixelDepth
cred = Color(255, 0, 0)
cblue = Color(0, 0, 255)
xoffset = imp.getWidth()
yoffset = imp.getHeight()
for d in data:
   frame = int(d[1])
   if frame < out.getStack().getSize():
      x1 = int(round(float(d[2]) / xscale))
开发者ID:cmci,项目名称:ijmacros,代码行数:33,代码来源:3dextractor.py

示例2: print

# 需要导入模块: from ij import ImagePlus [as 别名]
# 或者: from ij.ImagePlus import setTitle [as 别名]
	if file.endswith(".tif"):
		name = os.path.splitext(file)[0]
		names.append(name)

names.sort()

sSat = "saturated=%.2f" % sFac
strBar = "width=%g height=%g font=%g color=%s location=[%s] bold" % (barW, barH, barF, barC, barL)

for name in names:
	path = basePath + os.sep + name + ".tif"
	print(path)
	orig = ImagePlus(path)
	strName = os.path.basename(path)
	print(strName)
	orig.setTitle(strName)
	orig.show()
	IJ.run(orig, "Enhance Contrast", sSat)
	IJ.run(orig, "RGB Color", "")
	IJ.run(orig, "Add Scale Bar", strBar)
	orig.show()
	pngPath = sPngPath + name + ".png"
	fs = FileSaver(orig)
	if fs.saveAsPng(pngPath):
		print "png saved successfully at ", pngPath
	orig.changes = False
	time.sleep(1)
	orig.close()

print("done")
开发者ID:jrminter,项目名称:OSImageAnalysis,代码行数:32,代码来源:makePngWithSbCalAnalysisTif.py

示例3: print

# 需要导入模块: from ij import ImagePlus [as 别名]
# 或者: from ij.ImagePlus import setTitle [as 别名]
arOut  = []

query = sImgPath + "*.dm3"
print(query)
lFiles = glob.glob(query)
i = 0
for fi in lFiles:
  i += 1
  orig = ImagePlus(fi)
  strName = os.path.basename(fi)
  strName = strName.split('.')[0]
  lStr =  strName.split('-')
  l = len(lStr)
  strNum = lStr[l-1]
  iNum = int(strNum)
  orig.setTitle(strNum)
  if i == 1:
    # a hack to get the scale bars to work reliably
    foo = orig.duplicate()
    IJ.run(foo, "RGB Color", "")
    IJ.run(foo, "Add Scale Bar", strBar)
  iZero = jmg.findI0(orig, maxSearchFrac=0.5, chAvg=5)
  # print(iZero)
  rt = jmg.anaParticlesWatershed(orig, minPx=30)
  nMeas = rt.getCounter()
  
  nCols = rt.getLastColumn()
  lArea   = rt.getColumn(rt.getColumnIndex("Area"))
  lMode   = rt.getColumn(rt.getColumnIndex("Mode"))
  # lPeri   = rt.getColumn(rt.getColumnIndex("Perim."))
  # lMaj    = rt.getColumn(rt.getColumnIndex("Major"))
开发者ID:jrminter,项目名称:OSImageAnalysis,代码行数:33,代码来源:anaClumpedAgX.py

示例4: print

# 需要导入模块: from ij import ImagePlus [as 别名]
# 或者: from ij.ImagePlus import setTitle [as 别名]

query = sTifPath + "*.tif"
print(query)
lFiles = glob.glob(query)
i = 0
for fi in lFiles:
	i += 1
	fi = fi.replace("\\", "/")
	print(fi)
	orig = ImagePlus(fi)
	strName = os.path.basename(fi)
	strName = strName.split('.')[0]
	lStr = strName.split('-')
	ti = orig.getShortTitle()
	orig.setTitle(ti)
	IJ.run(orig, "Measure","")
	time.sleep(1)
	orig.close()

rt = ResultsTable.getResultsTable()
nMeas = rt.getCounter()
minC = rt.getColumnIndex("Min")
maxC = rt.getColumnIndex("Max")
minStats = DSS()
maxStats = DSS()
for i in range(nMeas): 
	minVal = rt.getValueAsDouble(minC, i)
	minStats.addValue(minVal)
	maxVal = rt.getValueAsDouble(maxC, i)
	maxStats.addValue(maxVal)
开发者ID:jrminter,项目名称:OSImageAnalysis,代码行数:32,代码来源:measGrayStatsTifDir.py


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