本文整理匯總了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