active contour without edge

@blowekamp thanks for pointing that out. That’s really helpful.

But, I am having a hard time to find any instruction on how to use it. What I found is http://insightsoftwareconsortium.github.io/SimpleITK-Notebooks/Python_html/300_Segmentation_Overview.html

But, it does not have a demo of ScalarChanVese, only saying it is supported. I tried a few different ways, my current one is

lsFilter = sitk.ScalarChanAndVeseDenseLevelSetImageFilter()
lsFilter.SetMaximumRMSError(0.02)
lsFilter.SetNumberOfIterations(20)
ls = lsFilter.Execute(init_levelset, itk_img_smooth)

But, I cannot any public member function to set other parameters like number of iterations and RMSError. I think there should be some paramter to control the curvature? Anyway, above code still gives me

Traceback (most recent call last):
File “test_ac.py”, line 110, in
ls = lsFilter.Execute(init_levelset, itk_img_smooth)
File “/home/jianxuc/anaconda3/lib/python3.6/site-packages/SimpleITK/SimpleITK.py”, line 58659, in Execute
return _SimpleITK.ScalarChanAndVeseDenseLevelSetImageFilter_Execute(self, *args)
NotImplementedError: Wrong number or type of arguments for overloaded function ‘ScalarChanAndVeseDenseLevelSetImageFilter_Execute’.
Possible C/C++ prototypes are:
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::Execute(itk::simple::Image const &,itk::simple::Image const &)
itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::Execute(itk::simple::Image const &,itk::simple::Image const &,double,uint32_t,double,double,double,double,double,double,double,double,itk::simple::ScalarChanAndVeseDenseLevelSetImageFilter::HeavisideStepFunctionType,bool)

Other info:
raw is a np.float32 3D numpy array.

itk_img = itk.GetImageFromArray(raw)
gradientAnisotropicDiffusionFilter = itk.GradientAnisotropicDiffusionImageFilter.New(itk_img)
gradientAnisotropicDiffusionFilter.SetNumberOfIterations(5)
gradientAnisotropicDiffusionFilter.SetTimeStep(0.0625)
gradientAnisotropicDiffusionFilter.SetConductanceParameter(1.2)
gradientAnisotropicDiffusionFilter.Update()
itk_img_smooth = gradientAnisotropicDiffusionFilter.GetOutput()

Any thoughts? Or any advice on documentation or intructions?

Many thanks!