Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve finding of python classes #317

Open
kolibril13 opened this issue Oct 22, 2021 · 1 comment
Open

Improve finding of python classes #317

kolibril13 opened this issue Oct 22, 2021 · 1 comment

Comments

@kolibril13
Copy link
Contributor

kolibril13 commented Oct 22, 2021

Let's say I want to find out more about BinaryDilate
Here are some approaches:

A)

Looking in the simpleitk documentation search get one hit and that is only the migration guide:
image

B)

In the C++ API I can only find BinaryDilateImageFilter
But that does not help me too much in finding out how to e.g. change the kernelType parameter.

C)

Finally, I can search in the GithubNotebooks repo but also here, not too much information about setting the parameter.
image

Solutions:

idea i)

adding a notebook into the notebook gallery, where this parameter is set, e.g. something like this:
https://simpleitk.org/doxygen/latest/html/namespaceitk_1_1simple.html#a38998f2c7b469b1ad8e337a0c6c0697b
image

idea ii)

adding more documentation about how to set parameters in python at simpleitk.readthedocs.io

@zivy
Copy link
Member

zivy commented Oct 22, 2021

Hi @kolibril13,

This is more of a core SimpleITK filter/function documentation task, not specific to the notebooks. In the notebooks we have longer use cases and examples, combinations of multiple toolkit features, or showing toolkit wide concepts.

Ideally, the short examples you are proposing would be auto-generated using the toolkit's json based generation mechanism. Currently each of the filters has a json file in which tests are specified. This approach could be extended to documentation. The Python test input template is here, combined with the json test input for the BinaryDilateImageFilter it generates the tests for that filter. A Lua based script automatically generates tests from these inputs. A similar thing could be implemented to generate examples (or reuse the tests as examples too). The Lua infrastructure is very clunky and you could probably replace that with the use of Jinja.

This is heavy lifting, but maybe you are up for the challenge?

If you want to continue the discussion, please close this one and open it on the SimpleITK issues. Or if this is too much, just close this dicussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants