Error using MultiVolumeImporter for a nifti multivolume

Hi, we have found this and want to check if it may be a bug.

In MultiVolumeImporter there is a Helper function in

from __main__ import vtk, slicer

class Helper( object ):

  def SetBgFgVolumes(bg, fg):
    appLogic =
    selectionNode = appLogic.GetSelectionNode()

This Helper function is called from in two places with this line:


This causes an error in the line of the Helper:


TypeError: SetReferenceSecondaryVolumeID argument 1: expected a sequence of 0 values, got NoneType

This error was found when loading a nifti multivolume.
We could temporarily fix the error by editing or the Helper and changing None by [] or ‘’ but there must be a better solution. If this is not a bug, please let us know the correct use of the module.


You can replace fg by fg if fg else ''. If it fixes the issue the. Please send a pull request with this change. Thank you!

Thanks Andras.
This has been taken into account in MultiViewImporter some time ago but after the build of the stable release.

Thanks Andras.
The issue was taken into account in MultiVolumeImporter some time ago but after the build of the last stable release.

Thanks for checking. I would recommend to use a recent Slicer Preview Release then.