parameters: (self)
docstring: Do whatever is needed to reset the state - typically a scene clear will be enough.
docstring_summary: Do whatever is needed to reset the state - typically a scene clear will be enough.
docstring_tokens: Do whatever is needed to reset the state - typically a scene clear will be enough .
function: def setUp(self):
      """ Do whatever is needed to reset the state - typically a scene clear will be enough.
      """
      slicer.mrmlScene.Clear(0)
      import SampleData
      self.image1 = SampleData.downloadSample('MRBrainTumor1')
      self.image2 = SampleData.downloadSample('MRBrainTumor2')
  
      # make the output volume appear in all the slice views
      selectionNode = slicer.app.applicationLogic().GetSelectionNode()
      selectionNode.SetActiveVolumeID(self.image1.GetID())
      selectionNode.SetSecondaryVolumeID(self.image2.GetID())
      slicer.app.applicationLogic().PropagateVolumeSelection(1)
  
      # Show slice and 3D views
      layoutManager = slicer.app.layoutManager()
      layoutManager.setLayout(slicer.vtkMRMLLayoutNode.SlicerLayoutFourUpView)
      for sliceViewNodeId in ['vtkMRMLSliceNodeRed', 'vtkMRMLSliceNodeYellow', 'vtkMRMLSliceNodeGreen']:
        slicer.mrmlScene.GetNodeByID(sliceViewNodeId).SetSliceVisible(True)
  
      self.tempDir= slicer.app.temporaryPath + '/ScreenCaptureTest'
      self.numberOfImages = 10
      self.imageFileNamePattern = "image_%05d.png"
  
      self.logic = ScreenCaptureLogic()
function_tokens: def setUp ( self ) : slicer . mrmlScene . Clear ( 0 ) import SampleData self . image1 = SampleData . downloadSample ( 'MRBrainTumor1' ) self . image2 = SampleData . downloadSample ( 'MRBrainTumor2' ) # make the output volume appear in all the slice views selectionNode = slicer . app . applicationLogic ( ) . GetSelectionNode ( ) selectionNode . SetActiveVolumeID ( self . image1 . GetID ( ) ) selectionNode . SetSecondaryVolumeID ( self . image2 . GetID ( ) ) slicer . app . applicationLogic ( ) . PropagateVolumeSelection ( 1 ) # Show slice and 3D views layoutManager = slicer . app . layoutManager ( ) layoutManager . setLayout ( slicer . vtkMRMLLayoutNode . SlicerLayoutFourUpView ) for sliceViewNodeId in [ 'vtkMRMLSliceNodeRed' , 'vtkMRMLSliceNodeYellow' , 'vtkMRMLSliceNodeGreen' ] : slicer . mrmlScene . GetNodeByID ( sliceViewNodeId ) . SetSliceVisible ( True ) self . tempDir = slicer . app . temporaryPath + '/ScreenCaptureTest' self . numberOfImages = 10 self . imageFileNamePattern = "image_%05d.png" self . logic = ScreenCaptureLogic ( )