示例#1
0
 def addTransform(self):
     """Create and add a transform node with a display node to the
        mrmlScene.
        Returns the transform node and its display node
     """
     transformNode = slicer.mrmlScene.AddNode(slicer.vtkMRMLTransformNode())
     transformDisplayNode = slicer.mrmlScene.AddNode(slicer.vtkMRMLTransformDisplayNode())
     transformNode.SetAndObserveDisplayNodeID(transformDisplayNode.GetID())
     return transformNode, transformDisplayNode
 def addTransform(self):
   """Create and add a transform node with a display node to the
      mrmlScene.
      Returns the transform node and its display node
   """
   transformNode = slicer.mrmlScene.AddNode(slicer.vtkMRMLTransformNode())
   transformDisplayNode = slicer.mrmlScene.AddNode(slicer.vtkMRMLTransformDisplayNode())
   transformNode.SetAndObserveDisplayNodeID(transformDisplayNode.GetID())
   return transformNode, transformDisplayNode