本文整理汇总了Python中dax.XnatUtils.select_assessor方法的典型用法代码示例。如果您正苦于以下问题:Python XnatUtils.select_assessor方法的具体用法?Python XnatUtils.select_assessor怎么用?Python XnatUtils.select_assessor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dax.XnatUtils
的用法示例。
在下文中一共展示了XnatUtils.select_assessor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1:
# 需要导入模块: from dax import XnatUtils [as 别名]
# 或者: from dax.XnatUtils import select_assessor [as 别名]
from dax import XnatUtils
ASSESSOR_TYPE = 'GIF_Parcellation_v1'
HOST = 'http://cmic-xnat.cs.ucl.ac.uk'
PROJECT = 'Prisma_upgrade'
OLD_RESOURCE = 'VOLUME'
NEW_RESOURCE = 'STATS'
ASSESSOR = None
TMP_DIR = '/Users/byvernault/data/tempGIF/'
try:
xnat = XnatUtils.get_interface(host=HOST)
if ASSESSOR:
li_assessors = [XnatUtils.select_assessor(xnat, ASSESSOR)]
sys.stdout.write('Renaming resources %s to %s for assessor %s'
% (OLD_RESOURCE, NEW_RESOURCE, ASSESSOR))
else:
li_assessors = XnatUtils.list_project_assessors(xnat, PROJECT)
sys.stdout.write('Renaming resources %s to %s for assessor type %s\n'
% (OLD_RESOURCE, NEW_RESOURCE, ASSESSOR_TYPE))
for assessor in li_assessors:
sys.stdout.write(' - assessor: %s ...\n' % assessor['label'])
assessors = XnatUtils.get_full_object(xnat, assessor)
old_res = assessors.resource(OLD_RESOURCE)
files = None
if old_res.exists():
files = XnatUtils.download_files_from_obj(TMP_DIR, old_res)
if files: