probability_to_levelset(probability_image, mask_image=None, save_data=False, overwrite=False, output_dir=None, file_name=None)¶
Levelset from probability map
Creates a levelset surface representations from a probabilistic map or a mask. The levelset indicates each voxel’s distance to the closest boundary. It takes negative values inside and positive values outside of the object.
- probability_image (niimg) – Probability image to be turned into levelset. Values should be in [0, 1], either a binary mask or defining the boundary at 0.5.
- mask_image (niimg, optional) – Mask image defining the region in which to compute the levelset. Values equal to zero are set to maximum distance.
- save_data (bool, optional) – Save output data to file (default is False)
- overwrite (bool, optional) – Overwrite existing results (default is False)
- output_dir (str, optional) – Path to desired output directory, will be created if it doesn’t exist
- file_name (str, optional) – Desired base name for output files with file extension (suffixes will be added)
Dictionary collecting outputs under the following keys (suffix of output files in brackets)
- result (niimg): Levelset representation of surface (_p2l-surf)
Original Java module by Pierre-Louis Bazin