本文整理汇总了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))
示例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")
示例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"))
示例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)