Commit 5072564a3e927ace8eb481f0df8ed00ef2322c3a
1 parent
94e17db7
Exists in
rotvol
Styles
Showing
1 changed file
with
19 additions
and
16 deletions
Show diff stats
invesalius/data/styles.py
| ... | ... | @@ -1412,7 +1412,7 @@ class ReorientImageInteractorStyle(DefaultInteractorStyle): |
| 1412 | 1412 | def __init__(self, viewer): |
| 1413 | 1413 | DefaultInteractorStyle.__init__(self, viewer) |
| 1414 | 1414 | |
| 1415 | - self.viewer = viewer | |
| 1415 | + self.viewer = viewer | |
| 1416 | 1416 | |
| 1417 | 1417 | self.AddObserver("KeyPressEvent", self.OnKeyPress) |
| 1418 | 1418 | |
| ... | ... | @@ -1440,25 +1440,28 @@ class ReorientImageInteractorStyle(DefaultInteractorStyle): |
| 1440 | 1440 | |
| 1441 | 1441 | self.viewer.slice_.rotations = (rx, ry, rz) |
| 1442 | 1442 | |
| 1443 | - self.viewer.slice_.discard_all_buffers() | |
| 1443 | + for buffer_ in self.viewer.slice_.buffer_slices.values(): | |
| 1444 | + buffer_.discard_vtk_image() | |
| 1445 | + buffer_.discard_image() | |
| 1446 | + | |
| 1444 | 1447 | self.viewer.slice_.current_mask.clear_history() |
| 1445 | 1448 | Publisher.sendMessage('Reload actual slice') |
| 1446 | 1449 | |
| 1447 | 1450 | |
| 1448 | 1451 | def get_style(style): |
| 1449 | 1452 | STYLES = { |
| 1450 | - const.STATE_DEFAULT: DefaultInteractorStyle, | |
| 1451 | - const.SLICE_STATE_CROSS: CrossInteractorStyle, | |
| 1452 | - const.STATE_WL: WWWLInteractorStyle, | |
| 1453 | - const.STATE_MEASURE_DISTANCE: LinearMeasureInteractorStyle, | |
| 1454 | - const.STATE_MEASURE_ANGLE: AngularMeasureInteractorStyle, | |
| 1455 | - const.STATE_PAN: PanMoveInteractorStyle, | |
| 1456 | - const.STATE_SPIN: SpinInteractorStyle, | |
| 1457 | - const.STATE_ZOOM: ZoomInteractorStyle, | |
| 1458 | - const.STATE_ZOOM_SL: ZoomSLInteractorStyle, | |
| 1459 | - const.SLICE_STATE_SCROLL: ChangeSliceInteractorStyle, | |
| 1460 | - const.SLICE_STATE_EDITOR: EditorInteractorStyle, | |
| 1461 | - const.SLICE_STATE_WATERSHED: WaterShedInteractorStyle, | |
| 1462 | - const.SLICE_STATE_REORIENT: ReorientImageInteractorStyle, | |
| 1463 | - } | |
| 1453 | + const.STATE_DEFAULT: DefaultInteractorStyle, | |
| 1454 | + const.SLICE_STATE_CROSS: CrossInteractorStyle, | |
| 1455 | + const.STATE_WL: WWWLInteractorStyle, | |
| 1456 | + const.STATE_MEASURE_DISTANCE: LinearMeasureInteractorStyle, | |
| 1457 | + const.STATE_MEASURE_ANGLE: AngularMeasureInteractorStyle, | |
| 1458 | + const.STATE_PAN: PanMoveInteractorStyle, | |
| 1459 | + const.STATE_SPIN: SpinInteractorStyle, | |
| 1460 | + const.STATE_ZOOM: ZoomInteractorStyle, | |
| 1461 | + const.STATE_ZOOM_SL: ZoomSLInteractorStyle, | |
| 1462 | + const.SLICE_STATE_SCROLL: ChangeSliceInteractorStyle, | |
| 1463 | + const.SLICE_STATE_EDITOR: EditorInteractorStyle, | |
| 1464 | + const.SLICE_STATE_WATERSHED: WaterShedInteractorStyle, | |
| 1465 | + const.SLICE_STATE_REORIENT: ReorientImageInteractorStyle, | |
| 1466 | + } | |
| 1464 | 1467 | return STYLES[style] | ... | ... |