# Remove Selected Island in 3D view?

**URL:** <https://discourse.slicer.org/t/remove-selected-island-in-3d-view/1391>\
**Category:** Support\
**Created:** [November 7, 2017, 12:03am UTC](https://discourse.slicer.org/t/remove-selected-island-in-3d-view/1391 "2017-11-07T00:03:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hherhold](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/hherhold/32/12199_2.png) [@hherhold](https://discourse.slicer.org/u/hherhold)\
**Post date:** [November 7, 2017, 12:03am UTC](https://discourse.slicer.org/t/remove-selected-island-in-3d-view/1391/1 "2017-11-07T00:03:34Z")

</div>

“Remove Selected Island” is one of my most often-used features - I rely on it heavily. Is there a reason it’s not implemented in the 3D view like some of the other tools (paint, scissors, eraser)?

I’d be curious to take a crack at implementing it as long as there’s no significant technical hurdle like “ITK/VTK doesn’t support it”.

Thanks!

-Hollister

---

<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 7, 2017, 12:30am UTC](https://discourse.slicer.org/t/remove-selected-island-in-3d-view/1391/2 "2017-11-07T00:30:55Z")

</div>

What I usually do now is that I enable crosshair on the toolbar, then move the crosshair by Shift+MouseMove in the 3D view, then I click on the island in one of the 2D views. This is not ideal, as it requires an extra click in the slice view, so it would be great if you could contribute the enhancement that would remove the need for the extra click.

The only non-trivial part of the implementation is how to get the segment id from a 3D position. The problem is that the cursor position is right at the segment boundary, so it might be slightly outside the segment. You cannot simply check if that exact position is inside a segment but you may need to add a slight offset along the camera projection line at that position to make sure you get an position inside a segment; or compute the closest distance to all segments, and choose the segment that is closest to the current position.

---

<div class="post-metadata">

**Author:** ![hherhold](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/hherhold/32/12199_2.png) [@hherhold](https://discourse.slicer.org/u/hherhold)\
**Post date:** [November 7, 2017, 12:43am UTC](https://discourse.slicer.org/t/remove-selected-island-in-3d-view/1391/3 "2017-11-07T00:43:10Z")

</div>

Yep, the crosshair trick is what I do right now.

I’ll take a look at adding it. I will most probably be back with more questions - thanks for getting me started!

-Hollister

---

<div class="post-metadata">

**Author:** ![TudorSlicer](https://avatars.discourse-cdn.com/v4/letter/t/b77776/32.png) [@TudorSlicer](https://discourse.slicer.org/u/TudorSlicer)\
**Post date:** [January 11, 2022, 10:52pm UTC](https://discourse.slicer.org/t/remove-selected-island-in-3d-view/1391/4 "2022-01-11T22:52:13Z")

</div>

I am trying to use Islands to keep one of the bones in a wrist CT. In Segment Editor I click on Islands and the select Keep Selected Island. With the crosshair within the radius on all three windows I do not get the option to “apply” and discard everything else.  
What am I doing wrong?

---

<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:** [March 13, 2022, 4:39am UTC](https://discourse.slicer.org/t/remove-selected-island-in-3d-view/1391/5 "2022-03-13T04:39:34Z")

</div>

After you choose the “Keep selected island” option, you need to click in the slice view to select an island. If you used the crosshair to find a position in 3D view then you need to click near the crosshair in a slice view. I’ve now improved the [documentation of the Islands effect](https://github.com/Slicer/Slicer/blob/master/Docs/user_guide/modules/segmenteditor.md#-islands) to make things more clear.
