pieper / CustomSlicerGenerator

Tool to help deploy custom applications
1 stars 7 forks source link

ENH: modifying the default startup module and/or the favorite ones #10

Closed Punzo closed 7 years ago

Punzo commented 7 years ago

Hi @pieper, I was also wondering if it is easy to modify with the CustomSlicerGenerator the default startup module or the favorite ones.

Another way is to compile from scratch Slicer and setting the cmake keywords for that. However, I would prefer to use the binaries (of 3DSlicer and SlicerAstro) provided by the Kitware factory machines.

Punzo commented 7 years ago

using something like this should work (in the init of the generated $NAME$customizer.py): settings = slicer.app.userSettings() settings.setValue("Modules/HomeModule", "$NameHomeModule$"). settings.setValue("Modules/FavoriteModules", ("NameFavoriteModule1","NameFavoriteModule2","NameFavoriteModule3"))

It will be nice to be able to do it using the json file. If you like the idea I can implement it.

pieper commented 7 years ago

Yes, the customizer module is there specifically to allow you to make these kinds of changes programmatically the first time the customized Slicer runs on a user machine. It's a bit of a tradeoff, but I wanted to leave open the possibility of making pretty broad customizations this way and keep the json simpler. Although it requires the user to restart SlicerAstro once, you have very broad control and you can use the binaries from the factory. (Also note you can use any OS platform to generate customized Slicers for all platforms).

Punzo commented 7 years ago

Yeap, for me is fine! Thanks!