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


Python XnatUtils.is_cassessor_good_type方法代码示例

本文整理汇总了Python中dax.XnatUtils.is_cassessor_good_type方法的典型用法代码示例。如果您正苦于以下问题:Python XnatUtils.is_cassessor_good_type方法的具体用法?Python XnatUtils.is_cassessor_good_type怎么用?Python XnatUtils.is_cassessor_good_type使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在dax.XnatUtils的用法示例。


在下文中一共展示了XnatUtils.is_cassessor_good_type方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_cmds

# 需要导入模块: from dax import XnatUtils [as 别名]
# 或者: from dax.XnatUtils import is_cassessor_good_type [as 别名]
    def get_cmds(self, assessor, jobdir):
        """Method to generate the spider command for cluster job.

        :param assessor: pyxnat assessor object
        :param jobdir: jobdir where the job's output will be generated
        :return: command to execute the spider in the job script
        """
        proj_label = assessor.parent().parent().parent().label()
        subj_label = assessor.parent().parent().label()
        sess_label = assessor.parent().label()

        nb_acq = 1
        csess = XnatUtils.CachedImageSession(assessor._intf, proj_label,
                                             subj_label, sess_label)
        reg_verdict = ''
        for cassr in csess.assessors():
            if XnatUtils.is_cassessor_good_type(cassr, [self.proctype]):
                reg_verdict = cassr

        if XnatUtils.has_resource(reg_verdict, 'ACQ2'):
            nb_acq = 2

        cmd = SPIDER_FORMAT.format(spider=self.spider_path,
                                   proj=proj_label,
                                   subj=subj_label,
                                   sess=sess_label,
                                   dir=jobdir,
                                   nb_acq=nb_acq,
                                   proctype=self.proctype,
                                   mc=self.mc,
                                   camino=self.camino,
                                   scheme=self.scheme_file,
                                   suffix_proc=self.suffix_proc)

        return [cmd]
开发者ID:byvernault,项目名称:ucl_processing,代码行数:37,代码来源:Processor_Compute_ADC_Verdict.py

示例2: has_inputs

# 需要导入模块: from dax import XnatUtils [as 别名]
# 或者: from dax.XnatUtils import is_cassessor_good_type [as 别名]
    def has_inputs(self, csess):
        """Method overridden from base class.

        By definition:
            status = 0  -> NEED_INPUTS,
            status = 1  -> NEED_TO_RUN
            status = -1 -> NO_DATA
            qcstatus needs a value only when -1 or 0.
        You need to set qcstatus to a short string that explain
        why it's no ready to run. e.g: No NIFTI

        :param csess: object csess define in dax.XnatUtils
                      (see XnatUtils in dax for information)
        :return: status, qcstatus
        """
        verdict_cscans = XnatUtils.get_good_cscans(csess, self.modalities)
        if not verdict_cscans:
            LOGGER.debug('Processor_Registration_Verdict: \
        cannot run at all, no VERDICT image found')
            return -1, 'VERDICT not found'

        verdict_cassrs = list()
        for cassr in csess.assessors():
            if XnatUtils.is_cassessor_good_type(cassr, [self.proctype]):
                verdict_cassrs.append(cassr)
        if not verdict_cassrs:
            LOGGER.debug('Processor_Compute_ADC_Verdict: \
        cannot run, no good QA Registration VERDICT found')
            return 0, 'Registration missing'

        cassr = verdict_cassrs[0]
        LOGGER.debug('Processor_Compute_ADC_Verdict: \
good registration assessor found: %s', cassr.info()['label'])

        if not XnatUtils.has_resource(cassr, 'ACQ1'):
            LOGGER.debug('Processor_Compute_ADC_Verdict: \
cannot run, no ACQ resource found for %s assessor',
                         cassr.info()['label'])
            return 0, "Missing ACQ#"

        return 1, None
开发者ID:byvernault,项目名称:ucl_processing,代码行数:43,代码来源:Processor_Compute_ADC_Verdict.py


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