diff --git a/invesalius/constants.py b/invesalius/constants.py index 764be5f..b8a9e3a 100644 --- a/invesalius/constants.py +++ b/invesalius/constants.py @@ -147,7 +147,7 @@ WINDOW_LEVEL = {"Abdomen":(350,50), "Vasculature - Hard":(240,80), "Vasculature - Soft":(650,160)} -REDUCE_IMAGEDATA_QUALITY = 1 +REDUCE_IMAGEDATA_QUALITY = 0 # if 1, use vtkVolumeRaycastMapper, if 0, use vtkFixedPointVolumeRayCastMapper TYPE_RAYCASTING_MAPPER = 0 diff --git a/invesalius/data/slice_.py b/invesalius/data/slice_.py index ab6f5c9..2a23a50 100644 --- a/invesalius/data/slice_.py +++ b/invesalius/data/slice_.py @@ -294,7 +294,7 @@ class Slice(object): def GetOutput(self): - return self.cast_filter.GetOutput() + return self.cross.GetOutput() @@ -338,13 +338,13 @@ class Slice(object): cross.Modified() self.cross = cross - cast = vtk.vtkImageCast() - cast.SetInput(cross.GetOutput()) - cast.GetOutput().SetUpdateExtentToWholeExtent() - cast.SetOutputScalarTypeToUnsignedChar() - cast.Update() + #cast = vtk.vtkImageCast() + #cast.SetInput(cross.GetOutput()) + #cast.GetOutput().SetUpdateExtentToWholeExtent() + #cast.SetOutputScalarTypeToUnsignedChar() + #cast.Update() - self.cast_filter = cast + #self.cast_filter = cast def UpdateCursorPosition(self, pubsub_evt): @@ -352,7 +352,7 @@ class Slice(object): new_pos = pubsub_evt.data self.cross.SetCursorPosition(new_pos) self.cross.Modified() - self.cast_filter.Update() + self.cross.Update() ps.Publisher().sendMessage('Update slice viewer') def UpdateCursorPositionSingleAxis(self, pubsub_evt): @@ -363,7 +363,7 @@ class Slice(object): new_pos[key] = axis_pos[key] self.cross.SetCursorPosition(new_pos) self.cross.Modified() - self.cast_filter.Update() + self.cross.Update() ps.Publisher().sendMessage('Update slice viewer') diff --git a/invesalius/data/viewer_slice.py b/invesalius/data/viewer_slice.py index 0e42c68..6912f20 100755 --- a/invesalius/data/viewer_slice.py +++ b/invesalius/data/viewer_slice.py @@ -40,14 +40,14 @@ class Viewer(wx.Panel): self.SetBackgroundColour(colour) # Interactor additional style - self.modes = []#['DEFAULT'] + self.modes = ['DEFAULT'] self.mouse_pressed = 0 # All renderers and image actors in this viewer self.slice_data_list = [] # The layout from slice_data, the first is number of cols, the second # is the number of rows - self.layout = (1, 1) + self.layout = (2, 2) self.__init_gui() @@ -102,7 +102,7 @@ class Viewer(wx.Panel): def append_mode(self, mode): #TODO: Temporary - self.modes = [] + #self.modes = [] # Retrieve currently set modes self.modes.append(mode) @@ -238,9 +238,12 @@ class Viewer(wx.Panel): def ChangeZoomMode(self, pubsub_evt): self.append_mode('ZOOM') + print "Zoom" self.mouse_pressed = 0 ICON_IMAGE = wx.Image("../icons/tool_zoom.png",wx.BITMAP_TYPE_PNG) - self.interactor.SetCursor(wx.CursorFromImage(ICON_IMAGE)) + ICON_IMAGE.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 0) + ICON_IMAGE.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 0) + wx.SetCursor(wx.CursorFromImage(ICON_IMAGE)) def ChangePanMode(self, pubsub_evt): self.append_mode('PAN') @@ -250,7 +253,7 @@ class Viewer(wx.Panel): def ChangeZoomSelectMode(self, pubsub_evt): self.append_mode('ZOOMSELECT') ICON_IMAGE = wx.Image("../icons/tool_zoom.png",wx.BITMAP_TYPE_PNG) - self.interactor.SetCursor(wx.CursorFromImage(ICON_IMAGE)) + wx.SetCursor(wx.CursorFromImage(ICON_IMAGE)) def OnPanMove(self, evt, obj): if (self.mouse_pressed): -- libgit2 0.21.2