stackObjects(EBImage)
stackObjects()所属R语言包:EBImage
Places detected objects into an image stack
地方检测到的图像堆栈中的对象
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Places detected objects into an image stack.
地方检测到的图像堆栈中的对象。
用法----------Usage----------
stackObjects(x, ref, index, combine=TRUE, rotate, bg.col='black', ext, centerby, rotateby)
参数----------Arguments----------
参数:x
An Image object or an array containing object masks. Object masks are sets of pixels with the same unique integer value.
Image对象或数组,包含对象口罩。对象口罩套像素具有相同的唯一的整数值。
参数:ref
An Image object or an array, containing the intensity values of the objects.
Image对象或数组,包含对象的强度值。
参数:combine
If x contains multiple images, specifies if the resulting list of image stacks with individual objects should be combined using combine into a single image stack.
x如果包含多个图像,指定应结合使用combine到一个单一的形象栈与个别物体的图像栈。
参数:bg.col
Background pixel color.
背景像素的颜色。
参数:ext
A numeric controlling the size of the output simage. If missing, ext is estimated from data. See details.
数字控制的输出simage的大小。如果丢失,ext估计数据。查看详情。
参数:index, rotate, centerby, rotateby
Deprecated.
已过时。
Details
详情----------Details----------
stackObjects creates a set of nbobj images of size (2*ext+1, 2*ext+1), where nbobj is the number of objects in x, and places each object of x in this set.
stackObjectsnbobj大小的图像(2*ext+12*ext+1),其中nbobj是对象x的数量,并创建一个集地方x在这个集合的每个对象。
If not specified, ext is estimated using the 95% quantile of 2*sqrt(g.l1), where g.l1 is the semi-major axis descriptor extracted from hullFeatures, taken over all the objects of the image x.
如果没有指定,ext估计使用2 * SQRT(g.l1),其中g.l1是半长轴描述,从hullFeatures提取,95%分位数超过图像x所有的对象。
值----------Value----------
An Image object containing the stacked objects contained in x. If x contains multiple images and if combine is TRUE, stackObjects returns a list of Image objects.
一个Image对象,其中包含了堆放在x包含的对象。如果x包含多张图片,如果combineTRUE,stackObjectsImage对象返回一个列表。
作者(S)----------Author(s)----------
Oleg Sklyar, <a href="mailto sklyar@ebi.ac.uk">osklyar@ebi.ac.uk</a>, 2006-2007
参见----------See Also----------
combine, tile, hullFeatures
combine,tile,hullFeatures
举例----------Examples----------
## simple example[#简单的例子]
x = readImage(system.file('images', 'shapes.png', package='EBImage'))
x = x[110:512,1:130]
y = bwlabel(x)
if (interactive()) display(normalize(y), title='Objects')
z = stackObjects(y, normalize(y))
if (interactive()) display(z, title='Stacked objects')
## load images[#载入图像]
nuc = readImage(system.file('images', 'nuclei.tif', package='EBImage'))
cel = readImage(system.file('images', 'cells.tif', package='EBImage'))
img = rgbImage(green=cel, blue=nuc)
if (interactive()) display(img, title='Cells')
## segment nuclei[#段原子核的]
nmask = thresh(nuc, 10, 10, 0.05)
nmask = opening(nmask, makeBrush(5, shape='disc'))
nmask = fillHull(bwlabel(nmask))
## segment cells, using propagate and nuclei as 'seeds'[#段的单元,利用宣传和核作为“种子”]
ctmask = opening(cel>0.1, makeBrush(5, shape='disc'))
cmask = propagate(cel, nmask, ctmask)
## using paintObjects to highlight objects[#使用paintObjects的突出对象]
res = paintObjects(cmask, img, col='#ff00ff')[FF00FF)]
res = paintObjects(nmask, res, col='#ffff00')[FFFF00“)]
if (interactive()) display(res, title='Segmented cells')
## stacked cells[#堆放单元]
st = stackObjects(cmask, img)
if (interactive()) display(st, title='Stacked objects')
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|