medpy.graphcut.wrapper.graphcut_split#
- medpy.graphcut.wrapper.graphcut_split(graphcut_function, regions, gradient, foreground, background, minimal_edge_length=100, overlap=10, processes=None)[source]#
Executes a graph cut by splitting the original volume into a number of sub-volumes of a minimal edge length. These are then processed in subprocesses.
This can be significantly faster than the traditional graph cuts, but should be used with, as it can lead to different results. To minimize this effect, the overlap parameter allows control over how much the respective sub-volumes should overlap.
- Parameters:
- graphcut_functionfunction
The graph cut to use (e.g.
graphcut_stawiaski
).- regionsndarray
The regions image / label map.
- gradientndarray
The gradient image.
- foregroundndarray
The foreground markers.
- backgroundndarray
The background markers.
- minimal_edge_lengthinteger
The minimal edge length of the sub-volumes in voxels.
- overlapinteger
The overlap (in voxels) between the generated sub-volumes.
- processesinteger or None
The number of processes to run simultaneously, if not supplied, will be the same as the number of processors.
- Returns:
- segmentationndarray
The graph-cut segmentation result as boolean array.