Edit default dicom import directory

hello to all 3dslicer fans!

I use slicer 5.8.1 on PC Windows 10 pro

I use “import dicom” very often.

unfortunately the “Import DICOM files from directory” window always open in the same folder:

C:\Users\7064654\AppData\Local\slicer.org\Slicer 5.8.1

I want to edit the default pathway into the other folder where I store all my dicoms.

Sure, I could create a shortcut, but I would like something more straightforward.

I looked on:

  • 3dslicer App Settings “General” or “Dicom”: no solution
  • chatgpt: no good solution
  • 3dslicer forums: no solution.

Does anyone have an idea?

thanks for help!

mathieu

In all the apps I develop, I store tha last used directory in application settings (QSettings, i.e. the Slicer.ini file). It would be quite easy to add this to the DICOM import.

dear csaba pinter,

many thx for answer!!

unfortunately, i m not sure i understand well:

you mean that i could create an app or modify (like python programming) an existing app? that is above my competences.

I asked if there was an easy way to do this in settings.

if there is no easy way, the shortcut inside the default folder is an easier way to achieve goal.

MANY THX indeed for your time! i appreciate!

mathieu

What I said is that the developers could add this feature simply.

I don’t think there is any setting exposed for this.

It could be that this directory shortcut available in the Import DICOM dialog box is handled by Qt itself.

On Linux, my Slicer startup script edits $HOME/.config/QtProject.conf to add a few directories to the shortcut key. Then the above mentioned dialog box shows the edited shortcuts.

But there’s a caveat. If just after starting Slicer, the Add data/Choose file(s) to add dialog box is raised, the shortcuts in that configuration file get overwritten to $HOME.

The workaround is good enough for me, your’s would be good enough for you. A general solution would be nice indeed, I have no idea if it’s Qt or application related.

+1 for remembering a last-used import directory for DICOM import. That would be a nice quality of life improvement.

If someone is working on this, it would also be nice to remember the recently used dicom database locations too.