@@ -32,6 +32,7 @@ class SimpleFilters:
3232 import inspect
3333 __file__ = inspect .getframeinfo (inspect .currentframe ())[0 ]
3434
35+ scalarVolumeNodeClasses = ["vtkMRMLScalarVolumeNode" , "vtkMRMLLabelMapVolumeNode" ]
3536 ICON_DIR = os .path .dirname (os .path .realpath (__file__ )) + '/Resources/Icons/'
3637 JSON_DIR = os .path .dirname (os .path .realpath (__file__ )) + '/Resources/json/'
3738
@@ -842,7 +843,7 @@ def create(self, json):
842843
843844 self .outputSelector = slicer .qMRMLNodeComboBox ()
844845 self .widgets .append (self .outputSelector )
845- self .outputSelector .nodeTypes = [ "vtkMRMLScalarVolumeNode" , "vtkMRMLLabelMapVolumeNode" ]
846+ self .outputSelector .nodeTypes = SimpleFilters . scalarVolumeNodeClasses
846847 self .outputSelector .selectNodeUponCreation = True
847848 self .outputSelector .addEnabled = True
848849 self .outputSelector .removeEnabled = False
@@ -884,7 +885,7 @@ def create(self, json):
884885 def createInputWidget (self ,n , noneEnabled = False ):
885886 inputSelector = slicer .qMRMLNodeComboBox ()
886887 self .widgets .append (inputSelector )
887- inputSelector .nodeTypes = [ "vtkMRMLScalarVolumeNode" , "vtkMRMLLabelMapVolumeNode" ]
888+ inputSelector .nodeTypes = SimpleFilters . scalarVolumeNodeClasses
888889 inputSelector .selectNodeUponCreation = True
889890 inputSelector .addEnabled = False
890891 inputSelector .removeEnabled = False
0 commit comments