I’m trying to launch Slicer with just a single module on Mac. Would the steps here work with Mac as well? Has anybody tried this? I tried a few things, but couldn’t get it to work.
My aim is to let my user click on ‘ModulName.app’ and show the module with ModuleName with only necessary GUI components of Slicer. I’ve been able to do this on Windows, but we would like to have a version for Mac as well.
I’ve never tried the settings approach, but it should work the same on mac as anywhere else. Another option is to remove the files related to modules you don’t want to load. There’s also the CustomSlicerGenerator although I haven’t used it in a while. Of course, building your own SlicerCAT is the most powerful approach.
Thanks Steve! I think SlicerCAT is too much work for the simple single module that I’m trying to create.
These are the steps that I followed for my scripted module
- Copy the
- Make a copy of
bin/SlicerLauncherSettings.ini and rename it to
- Make edits in
I’m confused about the path in the [Application] section of the .ini file, since there’s no
bin/Slicer (which is what the original SlicerLauncherSettings.ini file was pointing to), and hence no
bin/ModuleName as well.
MacOS packaging works differently, and I’m afraid I need help understanding how things are connected to make this work.
Slicer accepts the option
--modules-to-ignore, from the command line, specifying the list of modules to ignore as
ModuleNameA,ModuleNameB,... should allow you to achieve this.
This command line parameter has its equivalent in the revision specific settings file shipped along side the application, on macOS it would be
NNNNN is the slicer revision.
In this file, there is the following:
IgnoreModules to the list of modules should allow to achieve the desired effect on all platforms.
Updating default settings (e.g home module)
- Create an empty the file
Slicer.app/Contents/www.na-mic.org/Slicer.ini (or equivalent on Linux and Windows)
- Configure Module settings or any other settings of your choice
The setting found in the install tree will now be used and should allow you to create a zip file on all platform.
Notes about renaming
On macOS, you should be able to rename
Since the main application name is hard-coded in the executable at build time, you should not rename the settings files bundled in the package.