surface watershed¶
Usage
Run using mc_script surface watershed after installation or using ~ndcn0236/bin/mc_script surface watershed on jalapeno.
Import in python using from mcutils.scripts.surface import watershed
Documentation
Creates maps of gyri or sulci using watershed algorithm
The watershed algorithm sorts all vertices based on sulcal depth (or some other metric) and then visits them one by one:
if none of the neighbour have been visited yet (i.e., the vertex is a local minimum) the vertex is given a new label
if only one neighbour has a label (or all neighbours have the same label), the vertex is given that label
if different neigbours of the vertex have different labels one of the following two actions is taken:
if either of the masks is below the minumum size (in mm^2) or below the minimum depth (i.e., the difference between the lowest value of the metric and the value in the current vertex) then the two parcels are merged (and the vertex is given the value of the new parcel)
otherwise both parcels are kept separate and the vertex is identified as being on the ridge between these parcels.
Functions
|
Runs watershed on the graph generated on the surface |
|
Returns a parcellation with requested number of parcels based on watershed algorithm |
CLI interface
|
Creates the parser of the command line arguments |
|
Runs the script based on a Namespace containing the command line arguments |