svmbir.phantom

Functions:

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.

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 based on below reference.

nrmse(image, reference_image)

Compute the normalized root mean square error between image and reference_image.

svmbir.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

svmbir.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

svmbir.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

svmbir.phantom.gen_shepp_logan_3d(num_rows, num_cols, num_slices)[source]

Generate a 3D Shepp Logan phantom based on below reference.

Kak AC, Slaney M. Principles of computerized tomographic imaging. Page.102. IEEE Press, New York, 1988. https://engineering.purdue.edu/~malcolm/pct/CTI_Ch03.pdf

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

svmbir.phantom.nrmse(image, reference_image)[source]

Compute the normalized root mean square error between image and reference_image.

Parameters:
  • image – Calculated image

  • reference_image – Ground truth image

Returns:

Root mean square of (image - reference_image) divided by RMS of reference_image