本文整理汇总了Python中lib.images.Images.isAtLeastOneImageExists方法的典型用法代码示例。如果您正苦于以下问题:Python Images.isAtLeastOneImageExists方法的具体用法?Python Images.isAtLeastOneImageExists怎么用?Python Images.isAtLeastOneImageExists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lib.images.Images
的用法示例。
在下文中一共展示了Images.isAtLeastOneImageExists方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: meetRequirement
# 需要导入模块: from lib.images import Images [as 别名]
# 或者: from lib.images.Images import isAtLeastOneImageExists [as 别名]
def meetRequirement(self, result = True):
images = Images((self.getCorrectionImage("dwi", 'corrected'), 'corrected'),
(self.getPreparationImage("dwi"), 'diffusion weighted'))
if not images.isAtLeastOneImageExists():
return False
images = Images((self.getParcellationImage('norm'), 'freesurfer normalize'),
(self.getParcellationImage('mask'), 'freesurfer mask'))
return images
示例2: meetRequirement
# 需要导入模块: from lib.images import Images [as 别名]
# 或者: from lib.images.Images import isAtLeastOneImageExists [as 别名]
def meetRequirement(self):
images = Images((self.getDenoisingImage("dwi", 'denoise'), 'denoise'),
(self.getPreparationImage("dwi"), 'diffusion weighted'))
if not images.isAtLeastOneImageExists():
return False
images = Images((self.getParcellationImage('norm'), 'freesurfer normalize'),
(self.getParcellationImage('mask'), 'freesurfer mask'),
(self.getPreparationImage('grad', None, 'bvals'), 'gradient .bvals encoding file'),
(self.getPreparationImage('grad', None, 'bvecs'), 'gradient .bvecs encoding file'),
(self.getPreparationImage('grad', None, 'b'), 'gradient .b encoding file'))
# if fieldmap available
if Images(self.getPreparationImage("mag"), self.getPreparationImage("phase")).isAllImagesExists():
images.append((self.getParcellationImage('anat', 'freesurfer'), "freesurfer anatomical"))
return images