本文整理汇总了Python中omero_model_ImageI.ImageI.linkAnnotation方法的典型用法代码示例。如果您正苦于以下问题:Python ImageI.linkAnnotation方法的具体用法?Python ImageI.linkAnnotation怎么用?Python ImageI.linkAnnotation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类omero_model_ImageI.ImageI
的用法示例。
在下文中一共展示了ImageI.linkAnnotation方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testGetAttrGood
# 需要导入模块: from omero_model_ImageI import ImageI [as 别名]
# 或者: from omero_model_ImageI.ImageI import linkAnnotation [as 别名]
def testGetAttrGood(self):
i = ImageI()
assert i.loaded
assert i.isLoaded()
assert not i.name
i.name = rstring("name")
assert i.name
i.setName(None)
assert not i.getName()
i.copyAnnotationLinks()
i.linkAnnotation(omero.model.BooleanAnnotationI())
示例2: testSequences
# 需要导入模块: from omero_model_ImageI import ImageI [as 别名]
# 或者: from omero_model_ImageI.ImageI import linkAnnotation [as 别名]
def testSequences(self):
img = ImageI()
assert img.sizeOfAnnotationLinks() >= 0
img.linkAnnotation(None)
img.unload()
try:
assert not img.sizeOfAnnotationLinks() >= 0
assert len(img.copyAnnotationLinks()) == 0
assert False, "can't reach here"
except:
# These are true, but can't be tested
pass
示例3: testSequences
# 需要导入模块: from omero_model_ImageI import ImageI [as 别名]
# 或者: from omero_model_ImageI.ImageI import linkAnnotation [as 别名]
def testSequences(self):
img = ImageI()
self.assert_( img.sizeOfAnnotationLinks() >= 0 )
img.linkAnnotation(None)
img.unload()
try:
self.assert_( not img.sizeOfAnnotationLinks() >= 0 )
self.assert_( len(img.copyAnnotationLinks()) == 0 )
self.fail("can't reach here")
except:
# These are true, but can't be tested
pass
示例4: testBasicUsage
# 需要导入模块: from omero_model_ImageI import ImageI [as 别名]
# 或者: from omero_model_ImageI.ImageI import linkAnnotation [as 别名]
def testBasicUsage(self):
usr = self.client.sf.getAdminService().getEventContext().userId
img = ImageI()
img.name = rstring("name")
img.acquisitionDate = rtime(0)
tag = TagAnnotationI()
img.linkAnnotation(tag)
img = self.client.sf.getUpdateService().saveAndReturnObject(img)
img = self.client.sf.getQueryService().findByQuery(
"""
select img from Image img
join fetch img.annotationLinksCountPerOwner
where img.id = %s
""" % (img.id.val), None
)
assert img
assert img.getAnnotationLinksCountPerOwner()[usr] > 0