Changing Input/Ouput for Module from Volume Nodes to Directories

Hi, working on the GUI for an extension. It was originally a CLI extension that took in an input directory of dcm files and an ouput directory for storing an obj file made with dcm images. Trying to do the same thing but with the GUI and I was able to edit it down to what I need in terms of elements:

Screenshot 2020-07-09 13.02.06

However I’m having a hard time figuring out what the qMRMLNodeComboBox elements should be. I tried looking in the API for anything related to directory and I tried looking at the nodeTypes to see if I could find an alternative for vtkMRMLScalarVolumeNode that would better suit my need, but I’m stumped.

Is there anywhere else I should be looking? I want to use directories instead of the volume nodes because the point is to create a specific obj from the files and the end-user doesn’t need to access the other features of slicer.

Hi - you can use something like this (search the code for similar examples that use this).

self.outputDirSelector = ctk.ctkPathLineEdit()
self.outputDirSelector.filters = ctk.ctkPathLineEdit.Dirs
1 Like