本文整理汇总了Python中dax.XnatUtils.get_good_cassr方法的典型用法代码示例。如果您正苦于以下问题:Python XnatUtils.get_good_cassr方法的具体用法?Python XnatUtils.get_good_cassr怎么用?Python XnatUtils.get_good_cassr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dax.XnatUtils
的用法示例。
在下文中一共展示了XnatUtils.get_good_cassr方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_cmds
# 需要导入模块: from dax import XnatUtils [as 别名]
# 或者: from dax.XnatUtils import get_good_cassr [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()
assr_label = assessor.label()
csess = XnatUtils.CachedImageSession(assessor._intf, proj_label,
subj_label, sess_label)
dti_cscans = XnatUtils.get_good_cscans(csess, self.dtitypes)
dtis = ','.join([cscan.info()['ID'] for cscan in dti_cscans])
gif_cassrs = XnatUtils.get_good_cassr(csess, self.giftypes)
working_dir = os.path.join(self.working_dir, assr_label)
cmd = SPIDER_FORMAT.format(spider=self.spider_path,
proj=proj_label,
subj=subj_label,
sess=sess_label,
dir=jobdir,
suffix_proc=self.suffix_proc,
dti=dtis,
gif=gif_cassrs[0].info()['label'],
exe=self.exe,
gif_path=self.exe_args,
number_core=self.ppn,
working_dir=working_dir)
return [cmd]
示例2: has_inputs
# 需要导入模块: from dax import XnatUtils [as 别名]
# 或者: from dax.XnatUtils import get_good_cassr [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
"""
# DTI:
dti_cscans = XnatUtils.get_good_cscans(csess, self.dtitypes)
if not dti_cscans:
LOGGER.debug('Processor_Diffusion_Model_Fitting: \
cannot run at all, no DTI images found')
return -1, 'DTI not found'
for dti_cscan in dti_cscans:
if not XnatUtils.has_resource(dti_cscan, 'NIFTI'):
LOGGER.debug('Processor_Diffusion_Model_Fitting: cannot run, \
no NIFTI found for DTI image %s' % dti_cscan.info()['ID'])
return 0, "no NIFTI for %s" % dti_cscan.info()['ID']
# T1:
t1_cscans = XnatUtils.get_good_cscans(csess, self.t1types)
if not t1_cscans:
LOGGER.debug('Processor_Diffusion_Model_Fitting: \
cannot run at all, no T1 images found')
return -1, 'T1 not found'
# GIF:
gif_cassrs = XnatUtils.get_good_cassr(csess, self.giftypes)
if not gif_cassrs:
LOGGER.debug('Processor_Diffusion_Model_Fitting: \
cannot run, no good GIF Parcellation found')
return 0, 'good GIF not found'
if len(gif_cassrs) > 1:
LOGGER.debug('Processor_Diffusion_Model_Fitting: \
cannot run, no good GIF Parcellation found')
return 0, 'too many good GIF'
return 1, None
示例3: get_good_cassr
# 需要导入模块: from dax import XnatUtils [as 别名]
# 或者: from dax.XnatUtils import get_good_cassr [as 别名]
def get_good_cassr(csess, sp_types, needs_qc):
return XnatUtils.get_good_cassr(csess, sp_types, needs_qc)