Level set plugin issue


I have tried to use level sets plugin to execute fast marching algorithm on mammograms to detect the breast boundary. When I do that though the gray level is same the algorithm doesnt chose the correct region why is that? if any one using this plugin may be he or she can address on this issue.

in the second image I have circled the points that the region discontinued. Is there a way to overcome this problem.

Thank you


Can you post the original image you used to generate these example snapshots? That way we can try to reproduce your results and find a solution…

eta :slight_smile:

Sure I have done some pre-processing to the original image, in order to keep the homogeneity between regions.

you can find the image here. I cannot upload it I think because of the size.

thank you…!


Sorry - I should have asked this before… why are you choosing to use this Level Sets plugin to find the boundary?! Just running a simple threshold using the automatic default settings I get:

This will be much more reproducible in the end - no?! Because level sets is very much dependent on your original seed point… and lead to variation from image-to-image because of this - no?


Dear eta,

this is not enough. Actually I am trying to reproduce a project done using matlab. They have successfully done this using fast marching algorithm.

Best regards.

I agree with @etadobson that autothresholding seems to work well for the image you posted, and that Level Sets will be more difficult to make work well.

Please clarify what you mean by “not enough.” If you simply mean that it does not select enough of the tissue here, you can try other autothresholding algorithms. To my eye, RenyiEntropy looks like a good match, but you can just for yourself using the Auto Threshold plugin with the “Try all” option checked.

I understand why you were trying the Level Sets plugin then as discussed on another thread. But as @iarganda mentioned on that thread, the Level Sets plugin does not do exactly what you are looking for out of the box. Unless you have the time to read and understand its source code, it will be difficult to compare and validate the plugin’s approach vs. the relevant MATLAB function.