Skip to content

Connected clusters

ofgulban edited this page Jul 27, 2018 · 1 revision

After creating a binary image, connected clusters thresholding can be used to remove the speckle-like small structures.

Here is an example python script to perform connected clusters thresholding from command line.

  1. Download the script.
  2. In your command line:
python /path/to/connected_clusters.py /path/to/image.nii.gz -c 100
  1. For further options:
python /path/to/connected_clusters.py -h

TODO: I might add this utility to segmentator. The example script is quite slow but does the job.

Clone this wiki locally