scikit-surgeryvtk 2.2.3__tar.gz → 2.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {scikit-surgeryvtk-2.2.3/scikit_surgeryvtk.egg-info → scikit_surgeryvtk-2.3.0}/PKG-INFO +19 -2
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0/scikit_surgeryvtk.egg-info}/PKG-INFO +19 -2
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/scikit_surgeryvtk.egg-info/SOURCES.txt +1 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/scikit_surgeryvtk.egg-info/requires.txt +1 -1
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/setup.py +1 -1
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/_version.py +4 -4
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/camera/vtk_camera_model.py +1 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/models/voxelise.py +8 -2
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/models/vtk_base_model.py +1 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/models/vtk_cylinder_model.py +2 -4
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/models/vtk_grid_model.py +2 -3
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/models/vtk_sphere_model.py +2 -3
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/models/vtk_surface_model.py +2 -4
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/models/vtk_tube_model.py +2 -3
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/text/text_overlay.py +2 -1
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/utils/projection_utils.py +2 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/widgets/vtk_base_calibrated_window.py +3 -3
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/widgets/vtk_interlaced_stereo_window.py +3 -4
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/widgets/vtk_lus_simulator.py +1 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/widgets/vtk_overlay_window.py +2 -1
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/widgets/vtk_rendering_generator.py +1 -1
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/widgets/vtk_reslice_widget.py +2 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/widgets/vtk_zbuffer_window.py +1 -1
- scikit_surgeryvtk-2.3.0/tests/test_requirements.py +51 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/versioneer.py +795 -340
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/LICENSE +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/MANIFEST.in +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/README.rst +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/scikit_surgeryvtk.egg-info/dependency_links.txt +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/scikit_surgeryvtk.egg-info/top_level.txt +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/setup.cfg +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/__init__.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/camera/__init__.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/models/__init__.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/models/outline_render.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/models/surface_model_loader.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/models/vtk_base_actor.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/models/vtk_image_model.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/models/vtk_point_model.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/models/vtk_surface_model_directory_loader.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/text/__init__.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/utils/__init__.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/utils/matrix_utils.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/utils/platform_utils.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/utils/polydata_utils.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/widgets/__init__.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/tests/camera/__init__.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/tests/camera/test_liver_overlay.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/tests/camera/test_vtk_camera_model.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/tests/models/__init__.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/tests/models/test_surface_model_loader.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/tests/models/test_voxelise.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/tests/models/test_vtk_cylinder_model.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/tests/models/test_vtk_image_model.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/tests/models/test_vtk_point_model.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/tests/models/test_vtk_sphere_model.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/tests/models/test_vtk_surface_model.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/tests/models/test_vtk_surface_model_directory_loader.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/tests/models/test_vtk_tube_model.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/tests/models/test_vtk_unstructured_grid.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/tests/utils/__init__.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/tests/utils/test_matrix_utills.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/tests/utils/test_polydata_utils.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/tests/utils/test_projection_utils.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/tests/widgets/__init__.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/tests/widgets/test_interlaced_stereo_window.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/tests/widgets/test_lus_simulator.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/tests/widgets/test_rendering_generator.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/tests/widgets/test_vtk_overlay_window.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/tests/widgets/test_vtk_overlay_window_5_layers.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/tests/widgets/test_vtk_overlay_window_with_outlines.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/tests/widgets/test_vtk_reslice.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/tests/widgets/test_vtkzbuffer_window.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: scikit-surgeryvtk
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.0
|
|
4
4
|
Summary: scikit-surgeryvtk uses VTK for Image Guided Surgery applications
|
|
5
5
|
Home-page: https://github.com/SciKit-Surgery/scikit-surgeryvtk
|
|
6
6
|
Author: Thomas Dowrick
|
|
@@ -19,6 +19,23 @@ Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
|
19
19
|
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
|
|
20
20
|
Description-Content-Type: text/x-rst
|
|
21
21
|
License-File: LICENSE
|
|
22
|
+
Requires-Dist: numpy>=1.11
|
|
23
|
+
Requires-Dist: vtk>=9.5.0
|
|
24
|
+
Requires-Dist: PySide6>=6.5.1.1
|
|
25
|
+
Requires-Dist: opencv-contrib-python-headless>=4.2.0.32
|
|
26
|
+
Requires-Dist: scikit-surgerycore>=0.1.7
|
|
27
|
+
Requires-Dist: scikit-surgeryimage>=0.10.1
|
|
28
|
+
Dynamic: author
|
|
29
|
+
Dynamic: author-email
|
|
30
|
+
Dynamic: classifier
|
|
31
|
+
Dynamic: description
|
|
32
|
+
Dynamic: description-content-type
|
|
33
|
+
Dynamic: home-page
|
|
34
|
+
Dynamic: keywords
|
|
35
|
+
Dynamic: license
|
|
36
|
+
Dynamic: license-file
|
|
37
|
+
Dynamic: requires-dist
|
|
38
|
+
Dynamic: summary
|
|
22
39
|
|
|
23
40
|
scikit-surgeryvtk
|
|
24
41
|
=================
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: scikit-surgeryvtk
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.0
|
|
4
4
|
Summary: scikit-surgeryvtk uses VTK for Image Guided Surgery applications
|
|
5
5
|
Home-page: https://github.com/SciKit-Surgery/scikit-surgeryvtk
|
|
6
6
|
Author: Thomas Dowrick
|
|
@@ -19,6 +19,23 @@ Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
|
19
19
|
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
|
|
20
20
|
Description-Content-Type: text/x-rst
|
|
21
21
|
License-File: LICENSE
|
|
22
|
+
Requires-Dist: numpy>=1.11
|
|
23
|
+
Requires-Dist: vtk>=9.5.0
|
|
24
|
+
Requires-Dist: PySide6>=6.5.1.1
|
|
25
|
+
Requires-Dist: opencv-contrib-python-headless>=4.2.0.32
|
|
26
|
+
Requires-Dist: scikit-surgerycore>=0.1.7
|
|
27
|
+
Requires-Dist: scikit-surgeryimage>=0.10.1
|
|
28
|
+
Dynamic: author
|
|
29
|
+
Dynamic: author-email
|
|
30
|
+
Dynamic: classifier
|
|
31
|
+
Dynamic: description
|
|
32
|
+
Dynamic: description-content-type
|
|
33
|
+
Dynamic: home-page
|
|
34
|
+
Dynamic: keywords
|
|
35
|
+
Dynamic: license
|
|
36
|
+
Dynamic: license-file
|
|
37
|
+
Dynamic: requires-dist
|
|
38
|
+
Dynamic: summary
|
|
22
39
|
|
|
23
40
|
scikit-surgeryvtk
|
|
24
41
|
=================
|
|
@@ -42,6 +42,7 @@ sksurgeryvtk/widgets/vtk_overlay_window.py
|
|
|
42
42
|
sksurgeryvtk/widgets/vtk_rendering_generator.py
|
|
43
43
|
sksurgeryvtk/widgets/vtk_reslice_widget.py
|
|
44
44
|
sksurgeryvtk/widgets/vtk_zbuffer_window.py
|
|
45
|
+
tests/test_requirements.py
|
|
45
46
|
tests/camera/__init__.py
|
|
46
47
|
tests/camera/test_liver_overlay.py
|
|
47
48
|
tests/camera/test_vtk_camera_model.py
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
# This file was generated by 'versioneer.py' (0.
|
|
2
|
+
# This file was generated by 'versioneer.py' (0.29) from
|
|
3
3
|
# revision-control system data, or from the parent directory name of an
|
|
4
4
|
# unpacked source archive. Distribution tarballs contain a pre-generated copy
|
|
5
5
|
# of this file.
|
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "2025-
|
|
11
|
+
"date": "2025-09-03T07:49:14+0100",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "2.
|
|
14
|
+
"full-revisionid": "f505235c59e32ca11f5172769e659f62e4e8ed53",
|
|
15
|
+
"version": "2.3.0"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
|
@@ -211,6 +211,8 @@ def load_points_from_file(filename):
|
|
|
211
211
|
mesh = reader.GetOutput()
|
|
212
212
|
return mesh
|
|
213
213
|
|
|
214
|
+
|
|
215
|
+
# pylint: disable=too-many-positional-arguments, too-many-statements
|
|
214
216
|
def voxelise(input_mesh: Union[np.ndarray, vtk.vtkDataObject, str],
|
|
215
217
|
output_grid: Union[vtk.vtkStructuredGrid, str] \
|
|
216
218
|
= None,
|
|
@@ -327,7 +329,9 @@ def voxelise(input_mesh: Union[np.ndarray, vtk.vtkDataObject, str],
|
|
|
327
329
|
raise IOError(err)
|
|
328
330
|
b = grid.GetBounds()
|
|
329
331
|
size = b[1] - b[0]
|
|
330
|
-
|
|
332
|
+
dimensions = [0] * 3
|
|
333
|
+
grid.GetDimensions(dimensions)
|
|
334
|
+
grid_elements = dimensions[0]
|
|
331
335
|
|
|
332
336
|
else:
|
|
333
337
|
grid = createGrid(size, grid_elements)
|
|
@@ -336,7 +340,9 @@ def voxelise(input_mesh: Union[np.ndarray, vtk.vtkDataObject, str],
|
|
|
336
340
|
grid = output_grid
|
|
337
341
|
b = grid.GetBounds()
|
|
338
342
|
size = b[1] - b[0]
|
|
339
|
-
|
|
343
|
+
dimensions = [0] * 3
|
|
344
|
+
grid.GetDimensions(dimensions)
|
|
345
|
+
grid_elements = dimensions[0]
|
|
340
346
|
|
|
341
347
|
# We don't already have a grid, create one
|
|
342
348
|
else:
|
|
@@ -9,6 +9,7 @@ import sksurgeryvtk.utils.matrix_utils as mu
|
|
|
9
9
|
from sksurgeryvtk.models.vtk_base_actor import VTKBaseActor
|
|
10
10
|
from sksurgeryvtk.models.outline_render import VTKOutlineActor
|
|
11
11
|
|
|
12
|
+
# pylint: disable=too-many-positional-arguments
|
|
12
13
|
|
|
13
14
|
class VTKBaseModel(VTKBaseActor):
|
|
14
15
|
"""
|
{scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/models/vtk_cylinder_model.py
RENAMED
|
@@ -7,8 +7,7 @@ VTKCylinderModel contains a VTK pipeline to render a cylinder.
|
|
|
7
7
|
import vtk
|
|
8
8
|
import sksurgeryvtk.models.vtk_surface_model as vbs
|
|
9
9
|
|
|
10
|
-
# pylint:disable=
|
|
11
|
-
|
|
10
|
+
# pylint: disable=too-many-positional-arguments
|
|
12
11
|
|
|
13
12
|
class VTKCylinderModel(vbs.VTKSurfaceModel):
|
|
14
13
|
"""
|
|
@@ -35,8 +34,7 @@ class VTKCylinderModel(vbs.VTKSurfaceModel):
|
|
|
35
34
|
:param opacity: float [0,1]
|
|
36
35
|
"""
|
|
37
36
|
|
|
38
|
-
super(
|
|
39
|
-
opacity)
|
|
37
|
+
super().__init__(None, colour, visibility, opacity)
|
|
40
38
|
self.name = name
|
|
41
39
|
|
|
42
40
|
cyl = vtk.vtkCylinderSource()
|
|
@@ -14,7 +14,7 @@ import sksurgerycore.utilities.validate_file as vf
|
|
|
14
14
|
import sksurgeryvtk.models.vtk_base_model as vbm
|
|
15
15
|
|
|
16
16
|
# pylint: disable=too-many-instance-attributes
|
|
17
|
-
# pylint: disable=
|
|
17
|
+
# pylint: disable=too-many-positional-arguments, dangerous-default-value
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
class VTKUnstructuredGridModel(vbm.VTKBaseModel):
|
|
@@ -32,8 +32,7 @@ class VTKUnstructuredGridModel(vbm.VTKBaseModel):
|
|
|
32
32
|
:param opacity: float [0,1]
|
|
33
33
|
:param pickable: boolean, True|False
|
|
34
34
|
"""
|
|
35
|
-
super(
|
|
36
|
-
opacity, pickable)
|
|
35
|
+
super().__init__(colour, visibility, opacity, pickable)
|
|
37
36
|
|
|
38
37
|
self.source_file = None
|
|
39
38
|
self.reader = None
|
|
@@ -11,7 +11,7 @@ from vtk.util import numpy_support
|
|
|
11
11
|
|
|
12
12
|
import sksurgeryvtk.models.vtk_base_model as vbm
|
|
13
13
|
|
|
14
|
-
# pylint:disable=
|
|
14
|
+
# pylint: disable=too-many-positional-arguments
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
class VTKSphereModel(vbm.VTKBaseModel):
|
|
@@ -32,8 +32,7 @@ class VTKSphereModel(vbm.VTKBaseModel):
|
|
|
32
32
|
:param pickable: boolean, True|False
|
|
33
33
|
:param resolution: the resolution (theta and phy)
|
|
34
34
|
"""
|
|
35
|
-
super(
|
|
36
|
-
pickable)
|
|
35
|
+
super().__init__(colour, visibility, opacity, pickable)
|
|
37
36
|
|
|
38
37
|
# Validate as much as possible, up front.
|
|
39
38
|
if points is None:
|
{scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/models/vtk_surface_model.py
RENAMED
|
@@ -13,8 +13,7 @@ import sksurgerycore.utilities.validate_file as vf
|
|
|
13
13
|
import sksurgeryvtk.models.vtk_base_model as vbm
|
|
14
14
|
import sksurgeryvtk.utils.matrix_utils as mu
|
|
15
15
|
|
|
16
|
-
# pylint: disable=too-many-instance-attributes
|
|
17
|
-
# pylint:disable=super-with-arguments
|
|
16
|
+
# pylint: disable=too-many-instance-attributes, too-many-positional-arguments
|
|
18
17
|
|
|
19
18
|
|
|
20
19
|
class VTKSurfaceModel(vbm.VTKBaseModel):
|
|
@@ -34,8 +33,7 @@ class VTKSurfaceModel(vbm.VTKBaseModel):
|
|
|
34
33
|
:param pickable: boolean, True|False
|
|
35
34
|
:param outline: boolean, do we render a model outline?
|
|
36
35
|
"""
|
|
37
|
-
super(
|
|
38
|
-
pickable, outline)
|
|
36
|
+
super().__init__(colour, visibility, opacity, pickable, outline)
|
|
39
37
|
|
|
40
38
|
self.source_file = None
|
|
41
39
|
self.reader = None
|
|
@@ -10,7 +10,7 @@ import numpy as np
|
|
|
10
10
|
import vtk
|
|
11
11
|
import sksurgeryvtk.models.vtk_base_model as vbm
|
|
12
12
|
|
|
13
|
-
# pylint:disable=
|
|
13
|
+
# pylint:disable=too-many-positional-arguments
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
class VTKTubeModel(vbm.VTKBaseModel):
|
|
@@ -33,8 +33,7 @@ class VTKTubeModel(vbm.VTKBaseModel):
|
|
|
33
33
|
:param pickable: boolean, True|False
|
|
34
34
|
:param outline: boolean, do we render a model outline?
|
|
35
35
|
"""
|
|
36
|
-
super(
|
|
37
|
-
pickable, outline)
|
|
36
|
+
super().__init__(colour, visibility, opacity, pickable, outline)
|
|
38
37
|
|
|
39
38
|
# Validate as much as possible, up front.
|
|
40
39
|
if points is None:
|
|
@@ -12,7 +12,7 @@ import vtk
|
|
|
12
12
|
logging.basicConfig(level=logging.INFO)
|
|
13
13
|
LOGGER = logging.getLogger(__name__)
|
|
14
14
|
|
|
15
|
-
#pylint:disable
|
|
15
|
+
# pylint:disable=invalid-name,no-member,attribute-defined-outside-init
|
|
16
16
|
|
|
17
17
|
class VTKCornerAnnotation:
|
|
18
18
|
"""
|
|
@@ -184,6 +184,7 @@ class VTKText(VTKTextBase):
|
|
|
184
184
|
:param colour: Colour, RGB tuple
|
|
185
185
|
"""
|
|
186
186
|
|
|
187
|
+
# pylint: disable=too-many-positional-arguments
|
|
187
188
|
def __init__(self, text, x, y, font_size=24, colour=(1.0, 0, 0)):
|
|
188
189
|
""" Create a VTK text actor.
|
|
189
190
|
"""
|
|
@@ -85,6 +85,7 @@ def project_points(points,
|
|
|
85
85
|
return projected
|
|
86
86
|
|
|
87
87
|
|
|
88
|
+
# pylint: disable=too-many-positional-arguments
|
|
88
89
|
def project_facing_points(points,
|
|
89
90
|
normals,
|
|
90
91
|
camera_to_world,
|
|
@@ -146,6 +147,7 @@ def project_facing_points(points,
|
|
|
146
147
|
return projected_points
|
|
147
148
|
|
|
148
149
|
|
|
150
|
+
# pylint: disable=too-many-positional-arguments
|
|
149
151
|
def compute_rms_error(model_points,
|
|
150
152
|
image_points,
|
|
151
153
|
renderer,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
|
|
3
3
|
# pylint: disable=too-many-instance-attributes, no-name-in-module, too-many-statements
|
|
4
|
-
# pylint:disable=
|
|
4
|
+
# pylint:disable=too-many-positional-arguments, too-many-arguments, line-too-long, too-many-public-methods
|
|
5
5
|
|
|
6
6
|
"""
|
|
7
7
|
Module to provide a base class for OpenCV-style calibrated windows.
|
|
@@ -44,7 +44,7 @@ class VTKBaseCalibratedWindow(QVTKRenderWindowInteractor):
|
|
|
44
44
|
"""
|
|
45
45
|
Constructs a new VTKBaseCalibratedWindow.
|
|
46
46
|
"""
|
|
47
|
-
super(
|
|
47
|
+
super().__init__()
|
|
48
48
|
LOGGER.info("Creating VTKBaseCalibratedWindow")
|
|
49
49
|
|
|
50
50
|
# Take and cache/store constructor arguments.
|
|
@@ -82,7 +82,7 @@ class VTKBaseCalibratedWindow(QVTKRenderWindowInteractor):
|
|
|
82
82
|
will ensure that cameras are correctly scaled as the window size changes.
|
|
83
83
|
:param ev: Event
|
|
84
84
|
"""
|
|
85
|
-
super(
|
|
85
|
+
super().resizeEvent(ev)
|
|
86
86
|
self._update_video_image_cameras()
|
|
87
87
|
self._update_projection_matrices()
|
|
88
88
|
self.Render()
|
|
@@ -6,7 +6,6 @@ driving things like the Storz 3D laparoscope monitor.
|
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
8
|
# pylint: disable=c-extension-no-member, no-name-in-module, too-many-instance-attributes
|
|
9
|
-
# pylint:disable=super-with-arguments
|
|
10
9
|
|
|
11
10
|
import cv2
|
|
12
11
|
import numpy as np
|
|
@@ -26,7 +25,7 @@ class VTKStereoInterlacedWindow(QtWidgets.QWidget):
|
|
|
26
25
|
:param init_widget: If True we will call self.Initialize and self.Start
|
|
27
26
|
as part of the init function. Set to false if you're on Linux.
|
|
28
27
|
"""
|
|
29
|
-
|
|
28
|
+
# pylint: disable=too-many-positional-arguments
|
|
30
29
|
def __init__(self,
|
|
31
30
|
offscreen=False,
|
|
32
31
|
left_camera_matrix=None,
|
|
@@ -116,7 +115,7 @@ class VTKStereoInterlacedWindow(QtWidgets.QWidget):
|
|
|
116
115
|
"""
|
|
117
116
|
Ensure that the interlaced image is recomputed.
|
|
118
117
|
"""
|
|
119
|
-
super(
|
|
118
|
+
super().paintEvent(ev)
|
|
120
119
|
self.render()
|
|
121
120
|
|
|
122
121
|
# pylint: disable=invalid-name
|
|
@@ -124,7 +123,7 @@ class VTKStereoInterlacedWindow(QtWidgets.QWidget):
|
|
|
124
123
|
"""
|
|
125
124
|
Ensure that the interlaced image is recomputed.
|
|
126
125
|
"""
|
|
127
|
-
super(
|
|
126
|
+
super().resizeEvent(ev)
|
|
128
127
|
self.render()
|
|
129
128
|
|
|
130
129
|
def set_current_viewer_index(self, viewer_index):
|
{scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/widgets/vtk_lus_simulator.py
RENAMED
|
@@ -32,6 +32,7 @@ class VTKLUSSimulator(rg.VTKRenderingGenerator):
|
|
|
32
32
|
:param liver2camera_reference_file: [4x4] matrix in text file, numpy format
|
|
33
33
|
:param probe2camera_reference_file: [4x4] matrix in text file, numpy format
|
|
34
34
|
"""
|
|
35
|
+
# pylint: disable=too-many-positional-arguments
|
|
35
36
|
def __init__(self,
|
|
36
37
|
models_json_file,
|
|
37
38
|
background_image_file,
|
{scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/widgets/vtk_overlay_window.py
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
|
|
3
|
-
# pylint:
|
|
3
|
+
# pylint:disable=too-many-instance-attributes, no-name-in-module, too-many-statements
|
|
4
4
|
# pylint:disable=super-with-arguments, too-many-arguments, line-too-long, too-many-public-methods
|
|
5
5
|
|
|
6
6
|
"""
|
|
@@ -75,6 +75,7 @@ class VTKOverlayWindow(bcw.VTKBaseCalibratedWindow):
|
|
|
75
75
|
:param layer_3_interactive: True if you want the VTK interactor to pickup events in this layer.
|
|
76
76
|
layer_1_interactive and layer_3_interactive are mutually exclusive.
|
|
77
77
|
"""
|
|
78
|
+
# pylint: disable=too-many-positional-arguments
|
|
78
79
|
def __init__(
|
|
79
80
|
self,
|
|
80
81
|
offscreen=False,
|
{scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/widgets/vtk_rendering_generator.py
RENAMED
|
@@ -5,7 +5,7 @@ Module to provide a basic VTK render window for test data generation.
|
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
7
|
# pylint: disable=too-many-instance-attributes,
|
|
8
|
-
# pylint: disable=no-name-in-module, too-many-arguments
|
|
8
|
+
# pylint: disable=no-name-in-module, too-many-positional-arguments, too-many-arguments
|
|
9
9
|
|
|
10
10
|
import os
|
|
11
11
|
import numpy as np
|
{scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/widgets/vtk_reslice_widget.py
RENAMED
|
@@ -130,6 +130,8 @@ class VTKResliceWidget(QVTKRenderWindowInteractor):
|
|
|
130
130
|
|
|
131
131
|
def reset_position(self):
|
|
132
132
|
""" Set slice position to the middle of the axis. """
|
|
133
|
+
lower = 0
|
|
134
|
+
upper = 0
|
|
133
135
|
if self.axis == 'x':
|
|
134
136
|
lower, upper = self.x_min, self.x_max
|
|
135
137
|
if self.axis == 'y':
|
{scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.0}/sksurgeryvtk/widgets/vtk_zbuffer_window.py
RENAMED
|
@@ -59,7 +59,7 @@ class VTKZBufferWindow(bcw.VTKBaseCalibratedWindow):
|
|
|
59
59
|
:param init_widget: If True we call self.Initialise and self.Start
|
|
60
60
|
as part of the init function. Set to false if you're on Linux.
|
|
61
61
|
"""
|
|
62
|
-
|
|
62
|
+
# pylint: disable=too-many-positional-arguments
|
|
63
63
|
def __init__(
|
|
64
64
|
self,
|
|
65
65
|
offscreen=False,
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
|
|
3
|
+
"""scikit-surgery-evaluation tests"""
|
|
4
|
+
|
|
5
|
+
# Pytest style
|
|
6
|
+
|
|
7
|
+
def test_requirements_vs_setup():
|
|
8
|
+
"""
|
|
9
|
+
Test that requirements.txt matches setup.py
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
# setup=open("setup.py","r")
|
|
13
|
+
# setuptxt = setup.read()
|
|
14
|
+
# setup.close()
|
|
15
|
+
|
|
16
|
+
with open("setup.py", "r") as file_to_read:
|
|
17
|
+
searchlines = file_to_read.readlines()
|
|
18
|
+
|
|
19
|
+
install_line = -1
|
|
20
|
+
for i, line in enumerate(searchlines):
|
|
21
|
+
if "install_requires" in line:
|
|
22
|
+
install_line = i
|
|
23
|
+
break
|
|
24
|
+
|
|
25
|
+
end_line = -1
|
|
26
|
+
for i, line in enumerate(searchlines[install_line:]):
|
|
27
|
+
if "]" in line:
|
|
28
|
+
end_line = install_line + i
|
|
29
|
+
break
|
|
30
|
+
|
|
31
|
+
setup_reqs = []
|
|
32
|
+
|
|
33
|
+
for line in searchlines[install_line + 1: end_line]:
|
|
34
|
+
req = line.replace(',', '').replace("'", "")
|
|
35
|
+
req = req.replace(' ', '').replace('\n', '')
|
|
36
|
+
setup_reqs.append(req)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
with open("requirements.txt", "r") as file_to_read:
|
|
40
|
+
searchlines = file_to_read.readlines()
|
|
41
|
+
|
|
42
|
+
reqs = []
|
|
43
|
+
for line in searchlines:
|
|
44
|
+
if "#" not in line:
|
|
45
|
+
reqs.append(line.replace('\n', ''))
|
|
46
|
+
|
|
47
|
+
for setup_req in setup_reqs:
|
|
48
|
+
assert setup_req in reqs
|
|
49
|
+
|
|
50
|
+
for req in reqs:
|
|
51
|
+
assert req in setup_reqs
|