Constraining flood fill to size brushsize

Yesterday I came across this video (https://www.youtube.com/watch?v=HdTKZKumw8o) from the people of Itkgray (https://web.stanford.edu/group/vista/cgi-bin/wiki/index.php/ItkGray). It’s a branch of ItkSnap.

Here you see them using the paintbrush with a ‘Floodfill’ setting for segmenting the white matter of the brain.

  • Set the active drawing label to ‘white’ with the correct hemisphere.
  • Use the Paintbrush tool to fill in most of the white matter and the ventricles.
    The axial view works well for this; using Floodfill with the 3D brush on at a tolerance of ~5 and/or the square and round brush.
  • It may help to start dorsally and work down, cleaning up the subcortical areas as you progress.

I was wondering if this option is also available in Slicer? I haven’t found it (yet) and from what I noticed, it now only works on the entire 3D-image and you can’t contain it to only a brushsize or other volume.

Or is there maybe a workaround for this? My idea would be to do a coarse, completely filled segmentation with for instance the ‘Fill between slices’ option and then use the ‘Flood filling’, constrained to the coarse segmentation.

Any other suggestions?

You are very lucky. @Sunderlandkyl have just added yesterday (rev 28613) a new effect “Local threshold” Segment Editor effect (via SegmentEditorExtraEffects extension) that does this. It computes an intensity range from a small region that you draw on the image, then you Ctrl-click at the position you want to fill around. You can choose between various fill strategies (flood fill, grow from seeds, watershed) and it works quite robustly in 3D.

Great work! Lucky me!