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