Changing all paths in Slicer

We are using Slicer in a docker environment. There is a persistent storage mounted under /home/docker/mydata so that individual settings/files are saved there and when the container is stop that they are retained.

I have been manually configuring default paths (like download, cache, default location), in Slicer.ini that we build the docker image with. But it turns out I am missing other things (like DICOM cache folder), and probably there are other path settings that I am not aware of .

So, what would be the most robust way that all default path variables are prefixed by /home/docker/mydata/Slicer or something along those lines?

All settings are saved in Slicer.ini and Slicer-NNN.ini, so it is enough set the content of those two files correctly. Modules do not (should not) invent their own root paths but should derive their paths from those provided by the application.

In Slicer core, the only module that use a custom root path is the DICOM module, as it places the DICOM database in QStandardPaths::DocumentsLocation. It should point to a good location by default, but if this is not the case in your special configuration, then all you need to set (in addition to the qSlicerCoreApplication-managed paths) in your Slicer.ini is the DICOM database.

1 Like