How can I approximate the magic wand tool in Avizo/Amira?

I have a skull that I segmented using thresholding that I would like to segment into two layers, corresponding to the upper and lower jaws. I have previously done this in Amira/Avizo, where I select one of the two volumes using magic wand and transfer it to a new material layer.

However, Slicer does not appear to have a function exactly approximating the magic wand tool. I have tried using the Flood Fill extension in the SegmentEditorsExtraEffects package but when I select the volume in the initial material there is no indication an area is highlighted and the material is apparently not being selected by the tool (I cannot get it to move to the new layer). This occurs even when I turn the intensity tolerance to be very large or change the neighborhood size. I have not been able to find any tutorials that show what Flood Fill is supposed to look like when it works correctly.

I also tried using Grow From Seeds but this results in the entire image being segmented, rather than keeing the upper and lower jaws separate (as they are in the original data stack).

Does anyone know why Flood Fill is not working, or another possible alternative to Magic Wand?

If the upper and lower jaws are not connected then you can simply split them by using the Islands effect’s Split islands to segments method.

If they are not separated then you can use Scissors effect to split the segment (what Amira calls a segment is called “segment” in Slicer) into two, using Scissors effect by setting Operation → Fill inside and Editable area → Inside all segments. See detailed step-by-step instructions here. If you can find a view where the jaws appear separate then you only need the second part of the recipe.

If you want to split segments with a very complex, fuzzy border, then you can use Grow from seeds effect. Make sure to select, Editable area → Inside all segments to prevent re-segmentation of the entire image.

In general, you can expect that you can do much more with Slicer than with Amira/Avizo, but since Slicer is a more complex and versatile tool, with much more functions, it is not always that easy to figure out how to achieve something. If instructions from bing-chat/chatgpt don’t work and you cannot find an answer by googling either then you can always ask here.

1 Like

The split islands to segments method is helpful. Is there a way to split all objects that are not truly connected? I tried using it but what ends up happening is the function ends up removing a large amount of my threshholded volume, retains only the teeth (very little of the thinner bone), and creates two new segments but does not separate the upper and lower jaw into new segments.

Before:

After:

A single voxel that touches both structures in a single slice would block split islands. A quick and simple way to deal with that is to shrink your segment by 1-2 voxels, run your split islands tool, and then dilate each new segment the same amount you shrank.

.

1 Like

@muratmaga this is Ă©n excellent suggestion.

Also note that you don’t need to restrict editing with masking settings if you use Islands effect / Split islands to segments (in fact, it may interfere with how you use the effect).

If the data has a well-defined threshold-based boundary like the CT you show, then you may want to do the shrink, then separate the islands, then grow by more than you shrank, and re-apply the threshold so that you don’t lose resolution from the shrink-grow operation.

2 Likes