mbircone.phantom

Functions:

gen_shepp_logan(num_rows, num_cols)

Generate a Shepp Logan phantom

gen_shepp_logan_3d(num_rows, num_cols, ...)

Generate a 3D Shepp Logan phantom.

gen_microscopy_sample(num_rows, num_cols)

Generate a microscopy sample phantom.

gen_microscopy_sample_3d(num_rows, num_cols, ...)

Generate a 3D microscopy sample phantom.

mbircone.phantom.gen_microscopy_sample(num_rows, num_cols)[source]

Generate a microscopy sample phantom.

Parameters:
  • num_rows – int, number of rows.

  • num_cols – int, number of cols.

Returns:

out_image – 2D array, num_rows*num_cols

mbircone.phantom.gen_microscopy_sample_3d(num_rows, num_cols, num_slices)[source]

Generate a 3D microscopy sample phantom.

Parameters:
  • num_rows – int, number of rows.

  • num_cols – int, number of cols.

  • num_slices – int, number of slices.

Returns:

out_image – 3D array, num_slices*num_rows*num_cols

mbircone.phantom.gen_shepp_logan(num_rows, num_cols)[source]

Generate a Shepp Logan phantom

Parameters:
  • num_rows – int, number of rows.

  • num_cols – int, number of cols.

Returns:

out_image – 2D array, num_rows*num_cols

mbircone.phantom.gen_shepp_logan_3d(num_rows, num_cols, num_slices, block_size=(2, 2, 2), scale=1.0, offset_x=0.0, offset_y=0.0, offset_z=0.0)[source]

Generate a 3D Shepp Logan phantom. Optional arguments can be used to control the scale and position, and block average smoothing is used to reduce aliasing artifacts.

Parameters:
  • num_rows – int, number of rows in generated phantom.

  • num_cols – int, number of columns in generated phantom.

  • num_slices – int, number of slices in generated phantom.

  • block_size – (int, int, int): size of block average.

  • scale – (scalar, optional), scaling factor of phantom within the image. from 0 to 1

  • offset_x – scalar, proportion of x-axis that is added to x-coordinate of phantom within image

  • offset_y – scalar, proportion of y-axis that is added to y-coordinate of phantom within image

  • offset_z – scalar, proportion of z-axis that is added to z-coordinate of phantom within image

Returns:

out_image – 3D array, num_slices*num_rows*num_cols