How to call the FEM module in Python?

How to use the FEM module?

I must be doing something terribly silly. Can you please help me to access the FEM module? I was just trying to translate DeformableRegistration1.cxx into Python. Thanks.

import itk

itk.fem

Traceback (most recent call last):
  File "<string>", line 19, in __PYTHON_EL_eval
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.10/site-packages/itk/support/lazy.py", line 130, in __getattribute__
    value = types.ModuleType.__getattribute__(self, attr)
AttributeError: module 'itk' has no attribute 'fem'

FEM module is not compiled by default. And it does not have Python wrapping. All because it is not frequently used. While you could add Python wrapping, that is a non-trivial task.

1 Like

Thank you very much (: