3D single generator
- class biapy.data.generators.single_data_3D_generator.Single3DImageDataGenerator(zflip=False, **kwars)[source]
Bases:
SingleBaseDataGenerator
Custom 3D data generator based on imgaug and our own augmentors.py transformations. This generator will yield an image and its corresponding mask.
Based on microDL and Shervine’s blog.
- Parameters:
zflip (bool, optional) – To activate flips in z dimension.
- apply_transform(image)[source]
Transform the input image with one of the selected choices based on a probability.
- Parameters:
image (3D/4D Numpy array) – Image to transform. E.g.
(y, x, channels)
in2D
or(z, y, x, channels)
in3D
.- Returns:
image – Transformed image. E.g.
(y, x, channels)
in2D
or(z, y, x, channels)
in3D
.- Return type:
3D/4D Numpy array