1.monai.data.
NiftiDataset
(image_files, seg_files=None, labels=None, as_closest_canonical=False, transform=None, seg_transform=None, image_only=True, dtype=<class 'numpy.float32'>)
作用:对Nifti类型的数据创建训练所需要的data loader ,分类和分割任务都可以用此函数创建data loader
参数:image_files 图像地址列表
seg_files: 如果是做分割,则此参数为mask的图像地址,否则为None
labels: 如果是分类,则该项为图像的分类标签列表
as_closest_canonical: if True, load the image as closest to canonical orientation transform: transform to apply to image arrays(不明白)
transform: 为对图像做的transform集合,由monai.transform的相关函数得到
seg_transform: 如果为分割任务,则需要对mask做同样的transform
image_only: 设定只返回图像的矩阵,还是返回矩阵+其他文件信息