def load(self, path):
""" A method that load the image data and associated metadata.
Parameters
----------
path: str
the path to the image to be loaded.
Return
------
image: Image
the loaded image.
"""
_image = nibabel.load(path)
return Image(spacing=_image.header.get_zooms(),
data_type="scalar",
metadata={"path": path},
data=_image.get_data())
评论列表
文章目录