Hi Jianxu,
The initial release of the ITK 5.0.0 Python packages contained a bug that may be the source of your problem. Please try
python -m pip install --upgrade itk
to install the itk-5.0.0.post1
Python package.
The code can replace by this single call:
itk_GAC = itk.geodesic_active_contour_level_set_image_filter(itk_seed,
feature_image=itk_img_sigmoid,
propagation_scaling=10.0,
curvature_scaling=1.0,
advection_scaling=1.0,
MaximumRMSError=0.02,
number_of_iterations=60)
Notice than the corresponding API is easily implied, we can use snake case, we do not need to specify the filter type, and a single call replaces instantiating the filter, setting its parameters, calling .Update()
, and calling .GetOutput()
.
An overview of the new interface can be found in the ITK 5.0 Beta 1: Pythonic Interface release announcement.
@hjmjohnson is leading a major update to the ITK Sphinx Examples. This is currently a work in progress, but the plan to improve these to use the new interface as the dust settles.