本文整理匯總了Python中pylinac.core.image.Image.from_multiples方法的典型用法代碼示例。如果您正苦於以下問題:Python Image.from_multiples方法的具體用法?Python Image.from_multiples怎麽用?Python Image.from_multiples使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pylinac.core.image.Image
的用法示例。
在下文中一共展示了Image.from_multiples方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_combine_multiples
# 需要導入模塊: from pylinac.core.image import Image [as 別名]
# 或者: from pylinac.core.image.Image import from_multiples [as 別名]
def test_combine_multiples(self):
bad_img_path = [dcm_path, img_path]
self.assertRaises(AttributeError, Image.from_multiples, bad_img_path)
good_img_path = [img_path, img_path]
combined_img = Image.from_multiples(good_img_path)
self.assertIsInstance(combined_img, Image)
示例2: load_multiple_images
# 需要導入模塊: from pylinac.core.image import Image [as 別名]
# 或者: from pylinac.core.image.Image import from_multiples [as 別名]
def load_multiple_images(self, filepath_list):
"""Load multiple images via the file path.
.. versionadded:: 0.5.1
Parameters
----------
filepath_list : sequence
An iterable sequence of filepath locations.
"""
self.image = Image.from_multiples(filepath_list)
示例3: load_multiple_images
# 需要導入模塊: from pylinac.core.image import Image [as 別名]
# 或者: from pylinac.core.image.Image import from_multiples [as 別名]
def load_multiple_images(self, path_list):
"""Load and superimpose multiple images.
.. versionadded:: 0.9
Parameters
----------
path_list : iterable
An iterable of path locations to the files to be loaded/combined.
"""
self.image = Image.from_multiples(path_list, method='mean')
self._check_for_noise()
self.image.check_inversion()