Commit ffaf8788 authored by dpace's avatar dpace
Browse files

ENH: Fix model maker parameters in editor module

- Supply outputHierarchy's MRML node instead of ID to demonstrate that python cli implementation correctly handles MRML node inputs (the ID works as well)

git-svn-id: http://svn.slicer.org/Slicer4/trunk@15599 3bd1e089-480b-0410-8dfb-8563597acbee
parent 69f73c12
...@@ -1389,15 +1389,21 @@ class MakeModelOptions(EditOptions): ...@@ -1389,15 +1389,21 @@ class MakeModelOptions(EditOptions):
parameters = {} parameters = {}
parameters['Name'] = self.modelName.text parameters['Name'] = self.modelName.text
parameters["InputVolume"] = volumeNode.GetID() parameters["InputVolume"] = volumeNode.GetID()
parameters['FilterType'] = "Sinc" # TODO may or may not work parameters['FilterType'] = "Sinc"
parameters['GenerateAll'] = True parameters['GenerateAll'] = True
parameters['Labels'] = self.getPaintLabel()
parameters["JointSmooth"] = True # not needed: setting StartLabel and EndLabel instead
#parameters['Labels'] = self.getPaintLabel()
parameters["JointSmoothing"] = True
parameters["SplitNormals"] = True parameters["SplitNormals"] = True
parameters["PointNormals"] = True parameters["PointNormals"] = True
parameters["SkipUnNamed"] = True parameters["SkipUnNamed"] = True
parameters["StartLabel"] = "-1" # TODO - may or may not work
parameters["EndLabel"] = "-1" # TODO - may or may not work # create models for all labels
parameters["StartLabel"] = -1
parameters["EndLabel"] = -1
if self.smooth.checked: if self.smooth.checked:
parameters["Decimate"] = 0.25 parameters["Decimate"] = 0.25
parameters["Smooth"] = 10 parameters["Smooth"] = 10
...@@ -1423,7 +1429,7 @@ class MakeModelOptions(EditOptions): ...@@ -1423,7 +1429,7 @@ class MakeModelOptions(EditOptions):
outHierarchy.SetName( "Editor Models" ) outHierarchy.SetName( "Editor Models" )
slicer.mrmlScene.AddNode( outHierarchy ) slicer.mrmlScene.AddNode( outHierarchy )
parameters["ModelSceneFile"] = outHierarchy.GetID() parameters["ModelSceneFile"] = outHierarchy
modelMaker = slicer.modules.modelmaker modelMaker = slicer.modules.modelmaker
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment