コード例 #1
0
    def _createPETTumorSegmentationParameterNode(self):
        """create the PETTumorSegmentation parameter node - a singleton in the scene
    This is used internally by getPETTumorSegmentationParameterNode - shouldn't really
    be called for any other reason.
    """
        node = slicer.vtkMRMLPETTumorSegmentationParametersNode()
        self.scene.AddNode(node)
        # Since we are a singleton, the scene won't add our node into the scene,
        # but will instead insert a copy, so we find that and return it
        node = self._findPETTumorSegmentationParameterNodeInScene()

        centerFiducialList = slicer.vtkMRMLFiducialListNode()
        self.scene.AddNode(centerFiducialList)
        node.SetCenterPointIndicatorListReference(centerFiducialList.GetID())

        globalRefinementFiducialList = slicer.vtkMRMLFiducialListNode()
        self.scene.AddNode(globalRefinementFiducialList)
        node.SetGlobalRefinementIndicatorListReference(
            globalRefinementFiducialList.GetID())

        localRefinementFiducialList = slicer.vtkMRMLFiducialListNode()
        self.scene.AddNode(localRefinementFiducialList)
        node.SetLocalRefinementIndicatorListReference(
            localRefinementFiducialList.GetID())

        return node
コード例 #2
0
ファイル: ffHelper.py プロジェクト: hjmjohnson/FastFiducial
 def __init__(self, slicerVersion):
     self.volume = slicer.vtkMRMLScalarVolumeNode()
     self.display = slicer.vtkMRMLScalarVolumeDisplayNode()
     if slicerVersion == 4:
         self.fiducialList = slicer.vtkMRMLAnnotationHierarchyNode()
         self.newFiducial = slicer.vtkMRMLAnnotationFiducialNode()
     else:
         self.fiducialList = slicer.vtkMRMLFiducialListNode()
         self.newFiducial = slicer.vtkMRMLFiducial()
コード例 #3
0
 def _setFiducialLists(self, sceneFixedList=None, sceneMovingList=None):
     self.fixed = sceneFixedList
     self.moving = sceneMovingList
     if self.fixed.GetClassName() == 'vtkMRMLAnnotationHierarchyNode':
         # slicer4 style
         self.fiducialStyle = 4
         self.fixedCount = self.fixed.GetNumberOfChildren()
         self.movingCount = self.moving.GetNumberOfChildren()
         self.newFixed = slicer.vtkMRMLAnnotationHierarchyNode()
         self.newMoving = slicer.vtkMRMLAnnotationHierarchyNode()
     else:
         # slicer3 style
         self.fiducialStyle = 3
         self.fixedCount = self.fixed.GetNumberOfFiducials()
         self.movingCount = self.moving.GetNumberOfFiducials()
         self.newFixed = slicer.vtkMRMLFiducialListNode()
         self.newMoving = slicer.vtkMRMLFiducialListNode()
     return self.run()
コード例 #4
0
 def _setFiducialLists(self, sceneFixedList=None, sceneMovingList=None):
     self.fixed = sceneFixedList
     self.moving = sceneMovingList
     if self.fixed.GetClassName() == 'vtkMRMLAnnotationHierarchyNode':
         # slicer4 style
         self.fiducialStyle = 4
         self.fixedCount = self.fixed.GetNumberOfChildren()
         self.movingCount = self.moving.GetNumberOfChildren()
         self.newFixed = slicer.vtkMRMLAnnotationHierarchyNode()
         self.newMoving = slicer.vtkMRMLAnnotationHierarchyNode()
     else:
         # slicer3 style
         self.fiducialStyle = 3
         self.fixedCount = self.fixed.GetNumberOfFiducials()
         self.movingCount = self.moving.GetNumberOfFiducials()
         self.newFixed = slicer.vtkMRMLFiducialListNode()
         self.newMoving = slicer.vtkMRMLFiducialListNode()
     return self.run()
コード例 #5
0
 def __init__(self, slicerVersion):
     self.volume = slicer.vtkMRMLScalarVolumeNode()
     self.display = slicer.vtkMRMLScalarVolumeDisplayNode()
     if slicerVersion == 4:
         self.fiducialList = slicer.vtkMRMLAnnotationHierarchyNode()
         self.newFiducial = slicer.vtkMRMLAnnotationFiducialNode()
     else:
         self.fiducialList = slicer.vtkMRMLFiducialListNode()
         self.newFiducial = slicer.vtkMRMLFiducial()
コード例 #6
0
 def _createPETTumorSegmentationParameterNode(self):
   """create the PETTumorSegmentation parameter node - a singleton in the scene
   This is used internally by getPETTumorSegmentationParameterNode - shouldn't really
   be called for any other reason.
   """
   node = slicer.modulemrml.vtkMRMLPETTumorSegmentationParametersNode()
   self.scene.AddNode(node)
   # Since we are a singleton, the scene won't add our node into the scene,
   # but will instead insert a copy, so we find that and return it
   node = self._findPETTumorSegmentationParameterNodeInScene()
   
   centerFiducialList = slicer.vtkMRMLFiducialListNode()
   self.scene.AddNode( centerFiducialList )
   node.SetCenterPointIndicatorListReference( centerFiducialList.GetID() )
   
   globalRefinementFiducialList = slicer.vtkMRMLFiducialListNode()
   self.scene.AddNode( globalRefinementFiducialList )
   node.SetGlobalRefinementIndicatorListReference( globalRefinementFiducialList.GetID() )
   
   localRefinementFiducialList = slicer.vtkMRMLFiducialListNode()
   self.scene.AddNode( localRefinementFiducialList )
   node.SetLocalRefinementIndicatorListReference( localRefinementFiducialList.GetID() )
   
   return node