class MaskInitialiser[source]

A plugin to initialise a binary mask for level sets and distance transform segmentations. Seeds are generated by providing coordinates of three points in 3D space (start-middle-finish) and connecting them with a cylinder of a certain radius. Importantly the Z coordinate is given following VOLUME_XY vertical pattern

Parameters
  • mask1_coordinates – X0,Y0,Z0 (start) X1,Y1,Z1 (middle) and X2,Y2,Z2 (finish) coordinates of three points. Default: [10, 10, 0, 15, 15, 15, 20, 20, 20].

  • mask1_radius – Mask1 will be initialised with an ellipse of radius. Default: 5.

  • mask2_coordinates – The second mask coordinates. Default: None.

  • mask2_radius – Mask2 will be initialised with an ellipse of radius. Default: None.

  • out_datasets – The default names . Default: [‘INIT_MASK’].

get_max_frames()[source]
nInput_datasets()[source]

The number of datasets required as input to the plugin

Returns

Number of input datasets

nOutput_datasets()[source]

The number of datasets created by the plugin

Returns

Number of output datasets

pre_process()[source]

This method is called immediately after base_pre_process().

process_frames(data)[source]

This method is called after the plugin has been created by the pipeline framework and forms the main processing step

Parameters

data (list(np.array)) – A list of numpy arrays for each input dataset.

setup()[source]

This method is first to be called after the plugin has been created. It determines input/output datasets and plugin specific dataset information such as the pattern (e.g. sinogram/projection).

mask_gen(mask, coordX, coordY, coordZ, mask_radius, dimX, dimY, index_current)[source]