Script to extract the contours from binary objects. Consider the following image
To extract the 1-pixel wide contour, we simply run
In [1]:
medpy_extract_contour.py resources/brainmask.nii.gz output/contour.nii.gz
Which results in
This tool is, as all medpy scripts, dimensionality free. For more than two dimensions shells rather than contours are created.
In [ ]: