Commit 2d43afbd authored by Thomas Dowrick's avatar Thomas Dowrick

Issue #90: Add test for reslice widget

parent b77774f9
Pipeline #3918 failed with stages
in 6 minutes and 27 seconds
......@@ -6,7 +6,7 @@ from sksurgeryarucotracker.arucotracker import ArUcoTracker
qApp = QtWidgets.QApplication([])
dicom_path = 'tests/data/dicom/LegoPhantom'
dicom_path = 'tests/data/dicom/LegoPhantom_3slices'
tracker = ArUcoTracker({})
tracker.start_tracking()
......
......@@ -33,7 +33,7 @@ class VTKResliceWidget(QVTKRenderWindowInteractor):
self.x_spacing, self.y_spacing, self.z_spacing = \
reader.GetOutput().GetSpacing()
self._x0, self.y_0, self.z_0 = reader.GetOutput().GetOrigin()
self.x_0, self.y_0, self.z_0 = reader.GetOutput().GetOrigin()
self.center =\
[self.x_0 + self.x_spacing * 0.5 * (self.x_min + self.x_max),
......
import pytest
from sksurgeryvtk.widgets import vtk_reslice_widget
def test_slice_viewer(qtbot):
dicom_path = 'tests/data/dicom/LegoPhantom_3slices'
reslice = vtk_reslice_widget.VTKSliceViewer(dicom_path)
qtbot.addWidget(reslice)
reslice.update_slice_positions(1,1,1)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment