Artificial Data¶
Functions to generate artificial datasets to test.
- registration_tools.data.sphere(out=None, num_images=10, image_size=100, num_channels=1, num_spatial_dims=3, min_radius=5, max_radius=20, jump=2, stride=(1, 1, 1), decay_factor=0.5, dtype=<class 'numpy.uint8'>, verbose=False)[source]¶
This function creates a series of 3D images of a sphere moving along an L-shaped path while increasing the radius. The radius of the spheres increases linearly from min_radius to max_radius across the images. The spheres have Gaussian intensity from the center to the border. The images are saved in the specified directory with a specified stride.
- Parameters:
out (str) – The directory or zarr file where the images will be saved. If None, the images are stored in memory. Default is None.
num_images (int) – The number of images to generate. Default is 10.
image_size (int) – The size of each dimension of the cubic images. Default is 100.
num_channels (int) – The number of channels for the images. Default is 1.
min_radius (int) – The minimum radius of the spheres. Default is 5.
max_radius (int) – The maximum radius of the spheres. Default is 20.
jump (int) – The step size for the L-shaped path points. Default is 2.
stride (tuple) – The stride to apply when saving the images. Default is (1, 1, 1).
decay_factor (float) – The exponential decay factor for the Gaussian intensity. Default is 0.5.
verbose (bool) – If True, print detailed information. Default is False.
- Returns:
The dataset object containing the generated images if saved to a directory, or a zarr array if saved to a zarr file or in memory.
- Return type:
Dataset or zarr array