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


Python ProjectManager.downloadProjectFromDvid方法代码示例

本文整理汇总了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
开发者ID:CVML,项目名称:ilastik,代码行数:21,代码来源:headlessShell.py


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