In the "KEEP_LARGEST_ISLAND", is there a size limit for the largest island?

在应用KEEP_LARGEST_ISLAND时, 我得到了"0 island, 2 ignored", 可能是因为我"cropped volume"的太小了?

When applying KEEP_LARGEST_ISLAND, I got “0 island, 2 ignored”. Maybe it is because my “cropped volume” is too small?

How to change the “MinimumSize” of island.
既然是"the largest island", 为何还要限制尺寸呢?感觉逻辑有问题呀

Since it is “the largest island”, why do we need to limit the size? I feel that there is a problem with the logic.

@lassoan@Juicy@jamesobutler @jcfr @pieper@RafaelPalomar

Good catch. “Keep largest island” mode expects that the island you want to get is sufficiently big, but it is possible that you want to extract an island that is smaller than the currently set minimum size. We’ll keep the “Minimum size” option enabled for “Keep largest island” mode.

As a workaround, you can switch to “Remove small island” option, set the minimum size to a 1, then switch back to “Keep largest island” mode.

@lassoan How to get the only one largest island? How to set the number of islands?

Largest island option returns the largest island (one island).

    segmentEditorWidget.setActiveEffectByName("Islands")
    effect = segmentEditorWidget.activeEffect()
    effect.setParameter("Operation", "KEEP_LARGEST_ISLAND")
    minSize = 1
    effect.setParameter("MinimumSize", minSize)
    effect.setParameter("maxNumberOfSegments", 1)

    effect.self().onApply()
3 islands created (0 ignored)

what’s wrong? above

There is nothing wrong. Largest island option returns the largest island (one island). The debug message indicated that 3 islands were larger than the minimum size.

1 Like

Thanks, I see… :+1: :+1: :+1: :+1: :+1: