本文整理汇总了Python中dax.XnatUtils.is_cscan_unusable方法的典型用法代码示例。如果您正苦于以下问题:Python XnatUtils.is_cscan_unusable方法的具体用法?Python XnatUtils.is_cscan_unusable怎么用?Python XnatUtils.is_cscan_unusable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dax.XnatUtils
的用法示例。
在下文中一共展示了XnatUtils.is_cscan_unusable方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: needs_run
# 需要导入模块: from dax import XnatUtils [as 别名]
# 或者: from dax.XnatUtils import is_cscan_unusable [as 别名]
def needs_run(self, cscan, xnat):
"""needs_run function overridden from base-class.
:param cscan: CacheScan object from XnatUtils
:return: True if needs to run or False otherwise
"""
# Unusable
if XnatUtils.is_cscan_unusable(cscan):
LOGGER.debug('Scan unusable.')
return False
# Check output
if XnatUtils.has_resource(cscan, 'NIFTI'):
LOGGER.debug('Has NIFTI')
return False
# Check input
if not XnatUtils.has_resource(cscan, 'DICOM'):
LOGGER.debug('no DICOM resource')
return False
return True
示例2: has_inputs
# 需要导入模块: from dax import XnatUtils [as 别名]
# 或者: from dax.XnatUtils import is_cscan_unusable [as 别名]
def has_inputs(self, cscan):
"""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 cscan: object cscan define in dax.XnatUtils
(see XnatUtils in dax for information)
:return: status, qcstatus
"""
if XnatUtils.is_cscan_unusable(cscan):
return -1, 'Scan unusable'
# Check has_resource PARREC or NIFTI
if XnatUtils.has_resource(cscan, 'NIFTI'):
return 1, None
LOGGER.debug('GIF Parcellation: NIFTI not found.')
return 0, 'No NIFTI'