Hi, we have found this and want to check if it may be a bug.
In MultiVolumeImporter there is a Helper function in
…/Slicer-4.10.2-linux-amd64/lib/Slicer-4.10/qt-scripted-modules/MultiVolumeImporterLib/Helper.py
-----------------------------------------------------------------------------------
from __main__ import vtk, slicer
class Helper( object ):
@staticmethod
def SetBgFgVolumes(bg, fg):
appLogic = slicer.app.applicationLogic()
selectionNode = appLogic.GetSelectionNode()
selectionNode.SetReferenceActiveVolumeID(bg)
selectionNode.SetReferenceSecondaryVolumeID(fg)
appLogic.PropagateVolumeSelection()
------------------------------------------------------------------------------------------
This Helper function is called from MultiVolumeImporter.py in two places with this line:
Helper.SetBgFgVolumes(mvNode.GetID(),None)
This causes an error in the line of the Helper:
selectionNode.SetReferenceSecondaryVolumeID(fg)
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 MultiVolumeImporter.py 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.
Thanks.