Is there a way to define my own filter/Actions
HI Ascent, Read the doc and found that ascent provides below filter for pipeline Is there a way that one can define its own? better not to change source code of ascent.
Bests, Bin https://ascent.readthedocs.io/en/latest/Actions/Actions.html
Contour Threshold Slice Three Slice Clip Clip by field Isovolume Vector magnitude
You can define your own. Unfortunately, we don't have any documentation currently on how to do it.
You will want to create your filter in ascent/runtimes/flow_filters
You can create your own ascent_runtime_yourfilter_filters.cpp/.hpp
An example of a filter is contour: https://github.com/Alpine-DAV/ascent/blob/develop/src/libs/ascent/runtimes/flow_filters/ascent_runtime_vtkh_filters.cpp#L110
The functions you will alter are verify_params(...,...) and execute().
In verify_params(.... , ...) you'll declare the keywords you want to use to call your filter via your ascent_actions.json/yaml file (Example of contour ascent_actions.yaml https://ascent.readthedocs.io/en/latest/Actions/Examples.html#an-example-of-the-contour-filter-with-a-single-iso-value).
The function execute() is where you will access the data in Ascent and can transform it or analyze it however you like.
You'll also have to declare your filter in the ascent_runtimes_filters.cpp: https://github.com/Alpine-DAV/ascent/blob/develop/src/libs/ascent/runtimes/flow_filters/ascent_runtime_filters.cpp#L120
Please let me know if you have any questions about doing this.
In the past, we have supported registering a filter compiled external to ascent, but we need better documentation for this cases and there might be some barriers since it's not commonly exercised. We would like to support this more broadly.
Thanks @cyrush and @nicolemarsaglia for the guidelines.
Bests, Bin