No SimpleITK GeodesicActiveContourShapePriorLevelSetImageFilter


(Ibraheem) #1

Dear all,

I couldn’t find a SimpleITK filter of GeodesicActiveContourShapePriorLevelSetImageFilter. I only found GeodesicActiveContourLevelSetImageFilter which does not use shape information.

If it is not implemented, is there any simple tutorial how to write a new simpleitk filter from itk filter?

Regards!


(Bradley Lowekamp) #2

Hello!

That filter is not currently wrapped in SimpleITK.

This filter has the additional feature of utilizing a Shape Prior, that is distinct from the other level set filters in SimpleITK. Additionally, ITK provides a flexible way to specify the shape prior via a FunctorType. The trick is to determine how to expose that in SimpleITK. The time and experience with this filter is needed to determine what is the expected interface, and flexible interface for SimpleITK to provide for this filters. I suspect it may be just following theITK example and providing just a PCSGeodesicActiveContourShapePriorLevelSetImageFilter implementation.

Once you are comfortable building, it is not too hard to and a basic filter to SimpleITK. When doing development on a new SimpleITK filter, it is recommended to use shared libraries, disable all wrapped languages, and unsure you building in parallel by using a generator such a “ninja”.

It is useful to read “The Design of SimpleITK” to get an overview of SimpleITK.

To add a filter to SimpleITK it is just a matter of adding a JSON filter description to the SimpleITK directory. You could begin by copying the one for GeodesicActiveContourLevelSetImageFilter to GeodesicActiveContourShapePriorLevelSetImageFilter.json as a starting point. There is a document describing the J[SON](simpleitk doxygenhttps://itk.org/SimpleITKDoxygen/html/FilterTemplatesPage.html), but it is a bit out of date.

That should be enough to get you started. You are welcome to create a pull request on GitHub for adding this filter, and utilize the CI.


SimpleITK add filter / module
(Ibraheem) #3

Many thanks for your quick and detailed reply. I will start working on this. Also, it would be nice to automate this process in the future e.g. providing a converter to generate the JSON file from the itk source files.