Extension settings in C++ code

@jamesobutler

To clarify the question, let’s assume that we are going through an extension with a python version.

Through the extension wizard, you can create the following structure through the process of creating an extension and adding a module.

image

Now I need to add my module to custom_extenion.py .

If I didn’t misunderstand your previous reply, I understood that I had to keep the framework for class (ScriptedLoadableModule/ScriptedLoadableModuleWidget/ScriptedLoadableModuleLogic) of custom_extension.py and paste my code below it.

Therefore, I pasted my code in the empty space above(red rectangle) and declared a shortcut key function to perform the extension of the python version. To achieve the above method, I went through the process of modifying my module, which was previously composed of several files, into a single file.

I was curious about how to extend without merging into one file. Isn’t the cmakelist.txt you mentioned used when building in code using c++?

Are you saying that when adding a module composed of multiple files to 3d slicer, regardless of the version(python, c++ ), all cmakelist.txt should be modified?