### Slicer Python Environment Path Source: https://github.com/lukaskonietzka/slicertoothanalyser/blob/main/Documentation/Developers.md Locates the Slicer Python executable within the installation folder. This path must be selected in your IDE for development. ```bash ./Slicer/bin/PythonSlicer ``` -------------------------------- ### Define Python Resources Source: https://github.com/lukaskonietzka/slicertoothanalyser/blob/main/ToothAnalyserMicroCT/CMakeLists.txt Lists the Python resource files (icons, UI) for the module. ```cmake set( MODULE_PYTHON_RESOURCES Resources/Icons/${MODULE_NAME}.png Resources/UI/${MODULE_NAME}.ui ) ``` -------------------------------- ### Python Module Structure Reference Source: https://github.com/lukaskonietzka/slicertoothanalyser/blob/main/Documentation/Developers.md This markdown structure illustrates the recommended directory layout for standalone Python modules within the project. Place complex algorithms in the 'Algorithms' directory. ```markdown └── ToothAnalyserMicroCT ├── Algorithms │ ├── Anatomical.py │ ├── Scanco.py │ └── utils.py ├── SampleData └── tha ``` -------------------------------- ### Build Scripted Module Source: https://github.com/lukaskonietzka/slicertoothanalyser/blob/main/ToothAnalyserMicroCT/CMakeLists.txt Uses a CMake macro to build the scripted module with specified scripts and resources, including generic tests. ```cmake slicerMacroBuildScriptedModule( NAME ${MODULE_NAME} SCRIPTS ${MODULE_PYTHON_SCRIPTS} RESOURCES ${MODULE_PYTHON_RESOURCES} WITH_GENERIC_TESTS ) ``` -------------------------------- ### Define Module Name Source: https://github.com/lukaskonietzka/slicertoothanalyser/blob/main/ToothAnalyserMicroCT/CMakeLists.txt Sets the name of the current module. ```cmake set(MODULE_NAME ToothAnalyserMicroCT) ``` -------------------------------- ### Add Python Unit Test Source: https://github.com/lukaskonietzka/slicertoothanalyser/blob/main/ToothAnalyserMicroCT/CMakeLists.txt Registers a Python unittest subclass in the main script as a ctest. The test will also be available at runtime. ```cmake slicer_add_python_unittest(SCRIPT ${MODULE_NAME}.py) ``` -------------------------------- ### Define Python Scripts Source: https://github.com/lukaskonietzka/slicertoothanalyser/blob/main/ToothAnalyserMicroCT/CMakeLists.txt Lists the Python scripts associated with the module. ```cmake set( MODULE_PYTHON_SCRIPTS ${MODULE_NAME}.py Testing/Python/${MODULE_NAME}Tests.py ) ``` -------------------------------- ### Conditional Build Testing Source: https://github.com/lukaskonietzka/slicertoothanalyser/blob/main/ToothAnalyserMicroCT/CMakeLists.txt Enables additional build-time testing if the BUILD_TESTING option is enabled. ```cmake if(BUILD_TESTING) # Register the unittest subclass in the main script as a ctest. # Note that the test will also be available at runtime. slicer_add_python_unittest(SCRIPT ${MODULE_NAME}.py) # Additional build-time testing add_subdirectory(Testing) endif() ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.