Skip to content

ENH: added support for ScalarVolume inheritant #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions SimpleFilters/SimpleFilters.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class SimpleFilters:
import inspect
__file__ = inspect.getframeinfo(inspect.currentframe())[0]

scalarVolumeNodeClasses = ["vtkMRMLScalarVolumeNode", "vtkMRMLLabelMapVolumeNode"]
ICON_DIR = os.path.dirname(os.path.realpath(__file__)) + '/Resources/Icons/'
JSON_DIR = os.path.dirname(os.path.realpath(__file__)) + '/Resources/json/'

Expand Down Expand Up @@ -842,7 +843,7 @@ def create(self, json):

self.outputSelector = slicer.qMRMLNodeComboBox()
self.widgets.append(self.outputSelector)
self.outputSelector.nodeTypes = ["vtkMRMLScalarVolumeNode", "vtkMRMLLabelMapVolumeNode"]
self.outputSelector.nodeTypes = SimpleFilters.scalarVolumeNodeClasses
self.outputSelector.selectNodeUponCreation = True
self.outputSelector.addEnabled = True
self.outputSelector.removeEnabled = False
Expand Down Expand Up @@ -884,7 +885,7 @@ def create(self, json):
def createInputWidget(self,n, noneEnabled=False):
inputSelector = slicer.qMRMLNodeComboBox()
self.widgets.append(inputSelector)
inputSelector.nodeTypes = ["vtkMRMLScalarVolumeNode", "vtkMRMLLabelMapVolumeNode"]
inputSelector.nodeTypes = SimpleFilters.scalarVolumeNodeClasses
inputSelector.selectNodeUponCreation = True
inputSelector.addEnabled = False
inputSelector.removeEnabled = False
Expand Down