Commit 2f14ff94cf172bae229952d7bbd9782e090b45ca

Authored by Thiago Franco de Moraes
1 parent 48a76302
Exists in vtk6

Saving screenshots with vtk6

invesalius/data/viewer_slice.py
@@ -753,6 +753,7 @@ class Viewer(wx.Panel): @@ -753,6 +753,7 @@ class Viewer(wx.Panel):
753 image = vtk.vtkRenderLargeImage() 753 image = vtk.vtkRenderLargeImage()
754 image.SetInput(ren) 754 image.SetInput(ren)
755 image.SetMagnification(1) 755 image.SetMagnification(1)
  756 + image.Update()
756 757
757 image = image.GetOutput() 758 image = image.GetOutput()
758 759
@@ -769,8 +770,8 @@ class Viewer(wx.Panel): @@ -769,8 +770,8 @@ class Viewer(wx.Panel):
769 elif (filetype == const.FILETYPE_TIF): 770 elif (filetype == const.FILETYPE_TIF):
770 writer = vtk.vtkTIFFWriter() 771 writer = vtk.vtkTIFFWriter()
771 filename = "%s.tif"%filename.strip(".tif") 772 filename = "%s.tif"%filename.strip(".tif")
772 -  
773 - writer.SetInput(image) 773 +
  774 + writer.SetInputData(image)
774 writer.SetFileName(filename) 775 writer.SetFileName(filename)
775 writer.Write() 776 writer.Write()
776 777
invesalius/data/viewer_volume.py
@@ -318,6 +318,7 @@ class Viewer(wx.Panel): @@ -318,6 +318,7 @@ class Viewer(wx.Panel):
318 image = vtk.vtkRenderLargeImage() 318 image = vtk.vtkRenderLargeImage()
319 image.SetInput(self.ren) 319 image.SetInput(self.ren)
320 image.SetMagnification(1) 320 image.SetMagnification(1)
  321 + image.Update()
321 322
322 image = image.GetOutput() 323 image = image.GetOutput()
323 324
@@ -333,12 +334,12 @@ class Viewer(wx.Panel): @@ -333,12 +334,12 @@ class Viewer(wx.Panel):
333 elif (filetype == const.FILETYPE_TIF): 334 elif (filetype == const.FILETYPE_TIF):
334 writer = vtk.vtkTIFFWriter() 335 writer = vtk.vtkTIFFWriter()
335 filename = "%s.tif"%filename.strip(".tif") 336 filename = "%s.tif"%filename.strip(".tif")
336 -  
337 - writer.SetInput(image) 337 +
  338 + writer.SetInputData(image)
338 writer.SetFileName(filename) 339 writer.SetFileName(filename)
339 writer.Write() 340 writer.Write()
340 Publisher.sendMessage('End busy cursor') 341 Publisher.sendMessage('End busy cursor')
341 - 342 +
342 def OnCloseProject(self, pubsub_evt): 343 def OnCloseProject(self, pubsub_evt):
343 if self.raycasting_volume: 344 if self.raycasting_volume:
344 self.raycasting_volume = False 345 self.raycasting_volume = False