Temporary .nrrd files after loading DICOM data

Hello there! I am using the DICOMScalarVolumePlugin to programmatically load a series of dicom data inside a user specified directory. It works well, but I noticed that sometimes it leaves large .nrrd files inside the Slicer temporary directory (JHCI_vtkMRMLScalarVolumeNodeBD.nrrd for example). What could I do to avoid this behavior? Is there a better DICOM loader alternative/example script?

Hi -

Hmm, the scalar volume plugin shouldn’t be creating nrrd files - are you sure it’s not one of the other dicom plugin classes? The filename indicates it’s the result of running a Command Line Interface (CLI) module. For example the diffusion plugin does that to estimate tesors. If you have an example to reproduce the behavior that would be helpful.

1 Like

When “Developer mode” is enabled in application settings, CLI module input and output files are not removed (to make debugging easier). You can clean up your temp folder time to time, disable “developer mode”, or disable “prefer executable CLIs” (in application settings / Modules; this make images transfer within memory instead of via files).

1 Like

Oh, nice, I made a test here and indeed disabling the developer mode does not keep those .nrrd files. Thanks.

Hello, I am using a code I found in another module, here is the snippet:

    plugin = slicer.modules.dicomPlugins['DICOMScalarVolumePlugin']()
    loadables = plugin.examine([files])