Phantom images: the Phantoms module

class nnfbp.Phantoms.EightEllipses(size, rSeed=None)[source]

Bases: nnfbp.Phantoms.Phantom

Object that creates 8Ellipses phantoms.

Parameters:
  • size (int) – Number of rows/columns of the phantom. Only square phantoms are supported at the moment.
  • rSeed (int) – Optional random seed to use.
createPhantom(img)[source]
class nnfbp.Phantoms.Phantom(size, rSeed=None)[source]

Bases: object

A base Phantom object to be used with nnfbp.DataSet.PhantomSet. Implementing objects should define a createPhantom(self,img) method, that creates a (random) phantom in img, a numpy.ndarray.

Parameters:
  • size (int) – Number of rows/columns of the phantom. Only square phantoms are supported at the moment.
  • rSeed (int) – Optional random seed to use.
clipCircle(img)[source]

Zeroes elements outside circle.

get()[source]

Return a random phantom image.

setRandomSeed(seed)[source]
class nnfbp.Phantoms.ThreeShape(size, rSeed=None)[source]

Bases: nnfbp.Phantoms.Phantom

Object that creates ThreeShape phantoms.

Parameters:
  • size (int) – Number of rows/columns of the phantom. Only square phantoms are supported at the moment.
  • rSeed (int) – Optional random seed to use.
createPhantom(img)[source]

Previous topic

Datasets: the DataSet module

This Page