Trouble loading custom scripted module (HallerIndex) in Slicer 5.8.1 on macOS

Hello everyone,

I’m trying to load a custom scripted module called HallerIndex into 3D Slicer 5.8.1 on macOS, but the module is not being recognized by the application.

:wrench: My goals:

The module aims to calculate the Haller Index from CT images, using a simple UI built in Qt Designer. It is structured as a standard ScriptedLoadableModule.

:file_folder: My folder structure:

objectivec

CopiarEditar

HallerIndex_Extracted/
β”œβ”€β”€ CMakeLists.txt
└── HallerIndex/
    β”œβ”€β”€ CMakeLists.txt
    β”œβ”€β”€ HallerIndex.py
    β”œβ”€β”€ __init__.py
    └── Resources/
        └── UI/
            └── HallerIndex.ui

:white_check_mark: Steps already taken:

  • I added the path in Application Settings > Modules > Additional module paths.
  • Restarted Slicer.
  • Searched for the module using the Module Finder.
  • Tried loading via slicer.modules.hallerindex in the Python console.
  • Also tested with Slicer 5.8.0 and 5.6.2.
  • Verified naming, indentation, and ScriptedLoadableModule compliance.

:cross_mark: Result:

  • The module doesn’t appear in the module list.
  • The Python console returns:
    AttributeError: module 'modules' has no attribute 'hallerindex'
  • When trying to load it via the Extension Wizard, I get:
    KeyError: script does not set 'EXTENSION_HOMEPAGE' or
    EOFError: could not find project

:sos_button: What I need:

I’d like help identifying what might be wrong in the setup or code that’s preventing the module from loading. Has anyone successfully installed a custom ScriptedLoadableModule in Slicer 5.8.1 on macOS recently?

Thank you in advance!
β€”Giovani

Did you find the entry β€œHallerIndex” in the module finder dialog and did it indicate not loaded?

What was the full path that you added?

Good morning, I’ll send it now

The full path I added in Application Settings > Modules > Additional module paths was:


swift

/Users/giovaniwaltrickmezzalira/Desktop/HallerIndex_Extracted

Inside this folder, I have:


objectivec

HallerIndex_Extracted/
β”œβ”€β”€ CMakeLists.txt
└── HallerIndex/
    β”œβ”€β”€ CMakeLists.txt
    β”œβ”€β”€ HallerIndex.py
    β”œβ”€β”€ __init__.py
    └── Resources/
        └── UI/
            └── HallerIndex.ui

Let me know if I should change the structure or path. Thanks for your help!

β€œHere is a screenshot of the folder I added as the module path.

(Attachment CMakeLists.txt is missing)

(Attachment HallerIndex.py is missing)

(Attachment HallerIndex.zip is missing)

Instead of a path to the extension directory, try specifying the path to the module directory.

/Users/giovaniwaltrickmezzalira/Desktop/HallerIndex_Extracted/HallerIndex