本文整理汇总了Python中ilastik.shell.projectManager.ProjectManager.downloadProjectFromDvid方法的典型用法代码示例。如果您正苦于以下问题:Python ProjectManager.downloadProjectFromDvid方法的具体用法?Python ProjectManager.downloadProjectFromDvid怎么用?Python ProjectManager.downloadProjectFromDvid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilastik.shell.projectManager.ProjectManager
的用法示例。
在下文中一共展示了ProjectManager.downloadProjectFromDvid方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: downloadProjectFromDvid
# 需要导入模块: from ilastik.shell.projectManager import ProjectManager [as 别名]
# 或者: from ilastik.shell.projectManager.ProjectManager import downloadProjectFromDvid [as 别名]
def downloadProjectFromDvid(cls, dvid_key_url):
# By convention, command-line users specify the location of the project
# keyvalue data using the same format that the DVID API itself uses.
url_format = "^protocol://hostname/api/node/uuid/kv_instance_name(\\?/key/keyname)?"
for field in ['protocol', 'hostname', 'uuid', 'kv_instance_name', 'keyname']:
url_format = url_format.replace( field, '(?P<' + field + '>[^?]+)' )
match = re.match( url_format, dvid_key_url )
if not match:
# DVID is the only url-based format we support right now.
# So if it looks like the user gave a URL that isn't a valid DVID node, then error.
raise RuntimeError("Invalid URL format for DVID key-value data: {}".format(projectFilePath))
fields = match.groupdict()
projectFilePath = ProjectManager.downloadProjectFromDvid( fields['hostname'],
fields['uuid'],
fields['kv_instance_name'],
fields['keyname'] )
return projectFilePath