Commit 13a025778e431d0e7f66965e168a98594def173a

Authored by Thiago Franco de Moraes
1 parent 2c15acb2
Exists in master

Flipping slice in preview

Showing 1 changed file with 8 additions and 1 deletions   Show diff stats
invesalius/gui/dicom_preview_panel.py
... ... @@ -911,12 +911,19 @@ class SingleImagePreview(wx.Panel):
911 911  
912 912 image = colorer.GetOutput()
913 913  
  914 + flip = vtk.vtkImageFlip()
  915 + flip.SetInputData(image)
  916 + flip.SetFilteredAxis(1)
  917 + flip.FlipAboutOriginOn()
  918 + flip.ReleaseDataFlagOn()
  919 + flip.Update()
  920 +
914 921 if self.actor is None:
915 922 self.actor = vtk.vtkImageActor()
916 923 self.renderer.AddActor(self.actor)
917 924  
918 925 # PLOT IMAGE INTO VIEWER
919   - self.actor.SetInputData(image)
  926 + self.actor.SetInputData(flip.GetOutput())
920 927 self.renderer.ResetCamera()
921 928 self.interactor.Render()
922 929  
... ...