FastMarchingImageFilter for multiple-labels?


(Yannick Suter) #1

Dear all,

I would like to refine/vary a given multi-label segmentation with the multi-label fast marching algorithm. For a single label, I was able to use the FastMarchingImageFilter in python ITK.
Is it possible to use this filter to a multi-label task? I could process the labels separately, but would like to enforce mutually exclusive labels.

For a single label I use:

NodeType = itk.LevelSetNode.F3
NodeContainer = itk.VectorContainer[itk.UI, NodeType]
container = NodeContainer.New()
container.Initialize()
for i,p in enumerate(seed4):
    node = NodeType()
    node.SetIndex(p.tolist())
    node.SetValue(0.0)
    container.InsertElement(i, node)

fm_filter = itk.FastMarchingImageFilter.IF3IF3.New(t1c, TrialPoints=container)

Best and thanks,
Yannick


(Matt McCormick) #2

Hi Yannick,

I could process the labels separately, but would like to enforce mutually exclusive labels

One possible approach is to process the labels separately, then use label voting on the result.

HTH,
Matt


(grothausmann.roman) #3

Depending on your problem, you could make the multi labels binary, run FM once and then the morphological watershed on the FM map with the original labels as seeds. Would that work for you?