# Segment Editor: unable to restart Grow from Seeds effect from scratch if Volume deleted

**URL:** <https://discourse.slicer.org/t/segment-editor-unable-to-restart-grow-from-seeds-effect-from-scratch-if-volume-deleted/20449>\
**Category:** Feature requests\
**Tags:** segmentation\
**Created:** [November 2, 2021, 6:25am UTC](https://discourse.slicer.org/t/segment-editor-unable-to-restart-grow-from-seeds-effect-from-scratch-if-volume-deleted/20449 "2021-11-02T06:25:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DIV](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/div/32/12816_2.png) [@DIV](https://discourse.slicer.org/u/DIV)\
**Post date:** [November 2, 2021, 6:25am UTC](https://discourse.slicer.org/t/segment-editor-unable-to-restart-grow-from-seeds-effect-from-scratch-if-volume-deleted/20449/1 "2021-11-02T06:25:57Z")

</div>

The _Grow from Seeds_ effect in the **Segment Editor** module has a couple of quirky points.

First is one small matter: it only considers seeds for `Segments` that are toggled visible (in the current `Segmentation`). Actually this is not a bad thing. The problem for me is that I didn’t see it mentioned in the GUI. Frankly speaking, I didn’t notice it at first in the [documentation for the **Segment Editor** module](https://slicer.readthedocs.io/en/latest/user_guide/modules/segmenteditor.html#grow-from-seeds) either, although eventually I see that it does say “_Only visible segments are used by this effect._”. Perhaps just one word could be inserted in the GUI to address this:  
“`Minimum two segments are required`”  
could be amended to  
“`Minimum two visible segments are required`”.

Secondly, it seems that there is a kind of ‘dead end’ created when the preview `Volume` is deleted through the **Data** module.  
Eventually I discovered the following workflow:

1. (a) Paint seeds in many segments. (b) Toggle visibility of some relevant segments off.
2. Set up _Grow from Seeds_ effect by clicking `Initialize`. This produces ‘wrong’ results in the preview `Volume`.
3. Click `Cancel` in the _Grow from Seeds_ effect’s panel.
4. Toggle visibility of all relevant segments on.
5. Set up _Grow from Seeds_ effect anew by clicking `Initialize` again. This produces ‘right’ results.

But there is a problem here:

1. [as above]
2. [as above]
3. (a) Delete the preview `Volume` in the _Subject heirarchy_ tab of the **Data** module. (b) **The `Cancel` button in the _Grow from Seeds_ effect’s panel is disabled**.
4. [as above]
5. Set up _Grow from Seeds_ effect anew by clicking `Initialize` again. **This produces the same ‘wrong’ results as before, because `Cancel` was not clicked.**

—DIV

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [November 2, 2021, 7:58pm UTC](https://discourse.slicer.org/t/segment-editor-unable-to-restart-grow-from-seeds-effect-from-scratch-if-volume-deleted/20449/2 "2021-11-02T19:58:59Z")

</div>

> [@DIV](#):
>
> Perhaps just one word could be inserted in the GUI to address this:

We host the Slicer documentation on github and welcome any suggestions there. Click on the “Edit on github” button on the top-right corner to edit the file and create a pull request from the suggested changes automatically.

> [@DIV](#):
>
> Secondly, it seems that there is a kind of ‘dead end’ created when the preview `Volume` is deleted through the **Data** module.

It was obvious for the developers that the user must not delete the preview volume, but maybe not for all users. If you think that adding a note to the documentation would help then please add it. However, probably it would be better to make the effect more resilient. You can add submit a feature request to the [issue tracker](https://github.com/Slicer/Slicer/issues) about this and someone will get to it eventually (you could volunteer, too).

> [@DIV](#):
>
> - Paint seeds in many segments. (b) Toggle visibility of some relevant segments off.
> - Set up _Grow from Seeds_ effect by clicking `Initialize` . This produces ‘wrong’ results in the preview `Volume` .

This is the intended, good, and useful behavior. Always using all segments for “Grow from seeds” would seriously limit what you can do with it. We already documented the behavior in that short sentence and rely on this in several tutorials, but maybe we should further explain it in the documentation with examples?

---

<div class="post-metadata">

**Author:** ![DIV](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/div/32/12816_2.png) [@DIV](https://discourse.slicer.org/u/DIV)\
**Post date:** [November 4, 2021, 1:56am UTC](https://discourse.slicer.org/t/segment-editor-unable-to-restart-grow-from-seeds-effect-from-scratch-if-volume-deleted/20449/3 "2021-11-04T01:56:19Z")

</div>

> [@lassoan](#):
>
> > [@DIV](#):
> >
> > Perhaps just one word could be inserted in the GUI to address this:
> 
> We host the Slicer documentation on github and welcome any suggestions there. Click on the “Edit on github” button on the top-right corner to edit the file and create a pull request from the suggested changes automatically.

I had a go, but accidentally clicked the `Enter` button before I’d finished describing the change (or verifying what I’d actually changed).  
I couldn’t see how to edit a Pull Request, but maybe it’s alright.

> [@lassoan](#):
>
> > [@DIV](#):
> >
> > Secondly, it seems that there is a kind of ‘dead end’ created when the preview `Volume` is deleted through the **Data** module.
> 
> It was obvious for the developers that the user must not delete the preview volume, but maybe not for all users. If you think that adding a note to the documentation would help then please add it. However, probably it would be better to make the effect more resilient. You can add submit a feature request to the [issue tracker](https://github.com/Slicer/Slicer/issues) about this and someone will get to it eventually (you could volunteer, too).

For me deleting the preview volume (after I discovered its existence) _seemed_ to be the most conclusive course of action, because (in my mind) once it was gone, there couldn’t be any trace of the previous initialisation remaining. Compared with an (in my mind) ‘anonymous’ `Cancel` button for which I wasn’t too sure what precisely was being “cancelled”.  
I agree with you that in this matter changing the documentation would be more of a stopgap, and a better solution would be to make the software more robust. For that I can suggest two alternative options:

1. Deleting the preview volume automatically invokes all of the actions that would have been invoked by clicking `Cancel`. The `Cancel` button becomes disabled/inactive upon completion. (_Preferred_)
2. Deleting the preview volume does not have any further consequences. The `Cancel` button remains enabled/active upon completion. (_Less preferred_)

> [@lassoan](#):
>
> > [@DIV](#):
> >
> > - Paint seeds in many segments. (b) Toggle visibility of some relevant segments off.
> > 
> > > - Set up _Grow from Seeds_ effect by clicking `Initialize` . This produces ‘wrong’ results in the preview `Volume` .
> 
> This is the intended, good, and useful behavior. Always using all segments for “Grow from seeds” would seriously limit what you can do with it. We already documented the behavior in that short sentence and rely on this in several tutorials, but maybe we should further explain it in the documentation with examples?

Now that I understand what’s happening I can agree that it is indeed useful behaviour — at least when _irrelevant_ segments are toggled off (although I had toggled off some _relevant_ segments, which I tried to indicate in the enumerated workflows above).

It may be just me that missed the short sentence in the primary documentation on the first reading (but noticed it eventually). I’ll take your word that it’s covered in the tutorials, which I either (for some) went through in the past and forgot that detail of, or else (for some others) did not go through.  
Perhaps with the small extra cue in the GUI (as suggested above) there _might not_ be a need for further changes in the documentation, as the GUI provides the most ‘immediate’ guidance — unless several other users have also stumbled as I did.
