Skip to content

Commit

Permalink
Merge pull request #196 from che85/last_minute_changes
Browse files Browse the repository at this point in the history
BUG: slicer.mrmlScene.GetNodesByClass(..) causes leaks when quitting …
  • Loading branch information
che85 authored Sep 18, 2017
2 parents 45dd506 + aec1e97 commit 0530006
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DICOMPlugins/DICOMTID1500Plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ def load(self, loadable):

table = self.metadata2vtkTableNode(outputFile)
if table:
segmentationNodes = slicer.mrmlScene.GetNodesByClass("vtkMRMLSegmentationNode")
segmentationNodeID = segmentationNodes.GetItemAsObject(segmentationNodes.GetNumberOfItems()-1).GetID()
segmentationNodes = slicer.util.getNodesByClass('vtkMRMLSegmentationNode')
segmentationNodeID = segmentationNodes[-1].GetID()
table.SetAttribute("ReferencedSegmentationNodeID", segmentationNodeID)
self.cleanup()
return table is not None
Expand Down

0 comments on commit 0530006

Please sign in to comment.