Previous topic

medpy.graphcut.maxflow.GraphInt

Next topic

medpy.graphcut.wrapper.graphcut_split

This Page

medpy.graphcut.wrapper.split_marker

medpy.graphcut.wrapper.split_marker(marker, fg_id=1, bg_id=2)[source]

Splits an integer marker image into two binary image containing the foreground and background markers respectively. All encountered 1’s are hereby treated as foreground, all 2’s as background, all 0’s as neutral marker and all others are ignored. This behaviour can be changed by supplying the fg_id and/or bg_id parameters.

Parameters:

marker : ndarray

The marker image.

fg_id : integer

The value that should be treated as foreground.

bg_id : integer

The value that should be treated as background.

Returns:

fgmarkers, bgmarkers : nadarray

The fore- and background markers as boolean images.