Hidden crop when GROW from seeds tool is applied (Segment Editor Module)

Hello 3DSlicer forum ,

I have encountered a weird behavior with the tool “Grow From Seed” in the Segment Editor module :

Sometimes when I apply Grow from Seeds , after having painted inside a segment (choosing “inside segment” and “overwrite visible” as parameters), my previous segment (in which I have painted) isn’t fully completed.
Like the "Grow from seed " tool only take into account a small region and not my entire segment mask. For information, the mask (i.e. the bone on which I apply my Grow from seeds), is the tibia completely colored initially.
Also, normally by coloring my tibia completely on more images I won’t have this error, but I would like to know if it is possible to color automatically the whole mask.

Therefore the “Grow from seed” Result stop abrulty at a line.

Another same example but here we can clearly see the left bottom left and rigth boudaries of the blur grow from seed result.

Do you know why ? Is there a solution for this problem ? ( If necessary I not afraid of scripting something )

Region growing is performed around the area designated by the seeds, expanded with about a 20% margin on all sides. All you need to do to expand the segmentation further in any direction is to paint a small additional seed close to the boundary.

hello Lassoan ,

Thanks for you help, so I need to do some manual paint for this tool to work.
Is there a way to tweak the code or script something to automate this task ?

Remove the region limitation or increase the margin maybe ?

Grow from seeds requires a at least one small seed region for each segment. For easy segmentation tasks you can generate these seeds fully automatically or use other tools (e.g., Thresholding and Islands / Split islands to segments). If you describe what you would like to achieve on what kind of images then we can give more specific advice.

1 Like

Hello Lassoan,

Thank you for your time and your help. I think I misspoke indeed my goal is not really to do the segmentation of this image ( it was just an example to illustrate an issue in the grow from seed tool that I want to correct) .

I’m currently develloping a Python module extension that use the grow from seed tool.

I want to know how it’s possible to remove this Roi limitation in the GFS tool by code and set the work region for a whole segmentation mask ?

Is there a solution for this problem , Should I go c++ or still possible in python in which files ?

Best regards
Thank you

You can modify extentGrowthRatio to add a larger margin around the seeds. If you specify a very large value then it will always include the entire volume. For example, if you use the Segment editor module:

gfs = slicer.modules.SegmentEditorWidget.editor.effectByName('Grow from seeds').self()
gfs.extentGrowthRatio = 10000

You may also try Local threshold effect, which takes care of the extent (it uses whatever large extent is needed), allows setting the threshold range in the same tool (you draw a small region to specify the threshold range, then you get the complete segmentation with a single Ctrl-click):

1 Like