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:
- markerndarray
The marker image.
- fg_idinteger
The value that should be treated as foreground.
- bg_idinteger
The value that should be treated as background.
- Returns:
- fgmarkers, bgmarkersnadarray
The fore- and background markers as boolean images.