scikit-surgeryvtk 2.2.3__tar.gz → 2.3.1__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.1}/PKG-INFO +19 -2
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1/scikit_surgeryvtk.egg-info}/PKG-INFO +19 -2
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/scikit_surgeryvtk.egg-info/SOURCES.txt +1 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/scikit_surgeryvtk.egg-info/requires.txt +2 -2
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/setup.py +2 -2
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/sksurgeryvtk/_version.py +4 -4
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/sksurgeryvtk/camera/vtk_camera_model.py +1 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/sksurgeryvtk/models/voxelise.py +8 -2
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/sksurgeryvtk/models/vtk_base_model.py +1 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/sksurgeryvtk/models/vtk_cylinder_model.py +2 -4
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/sksurgeryvtk/models/vtk_grid_model.py +2 -3
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/sksurgeryvtk/models/vtk_sphere_model.py +2 -3
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/sksurgeryvtk/models/vtk_surface_model.py +2 -4
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/sksurgeryvtk/models/vtk_tube_model.py +2 -3
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/sksurgeryvtk/text/text_overlay.py +2 -1
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/sksurgeryvtk/utils/projection_utils.py +4 -4
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/sksurgeryvtk/widgets/vtk_base_calibrated_window.py +3 -4
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/sksurgeryvtk/widgets/vtk_interlaced_stereo_window.py +3 -6
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/sksurgeryvtk/widgets/vtk_lus_simulator.py +1 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/sksurgeryvtk/widgets/vtk_overlay_window.py +2 -1
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/sksurgeryvtk/widgets/vtk_rendering_generator.py +1 -1
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/sksurgeryvtk/widgets/vtk_reslice_widget.py +2 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/sksurgeryvtk/widgets/vtk_zbuffer_window.py +1 -1
- scikit_surgeryvtk-2.3.1/tests/test_requirements.py +51 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/versioneer.py +795 -340
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/LICENSE +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/MANIFEST.in +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/README.rst +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/scikit_surgeryvtk.egg-info/dependency_links.txt +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/scikit_surgeryvtk.egg-info/top_level.txt +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/setup.cfg +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/sksurgeryvtk/__init__.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/sksurgeryvtk/camera/__init__.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/sksurgeryvtk/models/__init__.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/sksurgeryvtk/models/outline_render.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/sksurgeryvtk/models/surface_model_loader.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/sksurgeryvtk/models/vtk_base_actor.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/sksurgeryvtk/models/vtk_image_model.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/sksurgeryvtk/models/vtk_point_model.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/sksurgeryvtk/models/vtk_surface_model_directory_loader.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/sksurgeryvtk/text/__init__.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/sksurgeryvtk/utils/__init__.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/sksurgeryvtk/utils/matrix_utils.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/sksurgeryvtk/utils/platform_utils.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/sksurgeryvtk/utils/polydata_utils.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/sksurgeryvtk/widgets/__init__.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/tests/camera/__init__.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/tests/camera/test_liver_overlay.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/tests/camera/test_vtk_camera_model.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/tests/models/__init__.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/tests/models/test_surface_model_loader.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/tests/models/test_voxelise.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/tests/models/test_vtk_cylinder_model.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/tests/models/test_vtk_image_model.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/tests/models/test_vtk_point_model.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/tests/models/test_vtk_sphere_model.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/tests/models/test_vtk_surface_model.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/tests/models/test_vtk_surface_model_directory_loader.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/tests/models/test_vtk_tube_model.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/tests/models/test_vtk_unstructured_grid.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/tests/utils/__init__.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/tests/utils/test_matrix_utills.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/tests/utils/test_polydata_utils.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/tests/utils/test_projection_utils.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/tests/widgets/__init__.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/tests/widgets/test_interlaced_stereo_window.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/tests/widgets/test_lus_simulator.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/tests/widgets/test_rendering_generator.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/tests/widgets/test_vtk_overlay_window.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/tests/widgets/test_vtk_overlay_window_5_layers.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/tests/widgets/test_vtk_overlay_window_with_outlines.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/tests/widgets/test_vtk_reslice.py +0 -0
- {scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/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.1
|
|
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.10.0,>=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.1
|
|
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.10.0,>=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-10-24T08:32:40+0100",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "2.
|
|
14
|
+
"full-revisionid": "1a0b61bcda94c0aaad8cf148516f7260dde2e9fa",
|
|
15
|
+
"version": "2.3.1"
|
|
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.1}/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.1}/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
|
"""
|
|
@@ -36,12 +36,11 @@ def _validate_input_for_projection(points,
|
|
|
36
36
|
|
|
37
37
|
if camera_to_world is None:
|
|
38
38
|
raise ValueError('camera_to_world is NULL')
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
if not isinstance(camera_to_world, np.ndarray):
|
|
40
|
+
raise TypeError('camera_to_world is not an np.ndarray')
|
|
41
41
|
|
|
42
42
|
if camera_matrix is None:
|
|
43
43
|
raise ValueError('camera_matrix is NULL')
|
|
44
|
-
|
|
45
44
|
vm.validate_camera_matrix(camera_matrix)
|
|
46
45
|
|
|
47
46
|
if distortion is not None:
|
|
@@ -63,7 +62,6 @@ def project_points(points,
|
|
|
63
62
|
:raises: ValueError, TypeError:
|
|
64
63
|
:return: nx2 ndarray representing 2D points, typically in pixels
|
|
65
64
|
"""
|
|
66
|
-
|
|
67
65
|
_validate_input_for_projection(points,
|
|
68
66
|
camera_to_world,
|
|
69
67
|
camera_matrix,
|
|
@@ -85,6 +83,7 @@ def project_points(points,
|
|
|
85
83
|
return projected
|
|
86
84
|
|
|
87
85
|
|
|
86
|
+
# pylint: disable=too-many-positional-arguments
|
|
88
87
|
def project_facing_points(points,
|
|
89
88
|
normals,
|
|
90
89
|
camera_to_world,
|
|
@@ -146,6 +145,7 @@ def project_facing_points(points,
|
|
|
146
145
|
return projected_points
|
|
147
146
|
|
|
148
147
|
|
|
148
|
+
# pylint: disable=too-many-positional-arguments
|
|
149
149
|
def compute_rms_error(model_points,
|
|
150
150
|
image_points,
|
|
151
151
|
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()
|
|
@@ -332,7 +332,6 @@ class VTKBaseCalibratedWindow(QVTKRenderWindowInteractor):
|
|
|
332
332
|
Sets the camera position and orientation, from a numpy 4x4 array.
|
|
333
333
|
:param camera_to_world: camera_to_world transform.
|
|
334
334
|
"""
|
|
335
|
-
vm.validate_rigid_matrix(camera_to_world)
|
|
336
335
|
self.camera_to_world = camera_to_world
|
|
337
336
|
vtk_mat = mu.create_vtk_matrix_from_numpy(camera_to_world)
|
|
338
337
|
self._update_pose_matrices(vtk_mat)
|
|
@@ -6,14 +6,12 @@ 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
|
|
13
12
|
from PySide6 import QtWidgets
|
|
14
13
|
from PySide6.QtWidgets import QSizePolicy
|
|
15
14
|
import sksurgeryimage.processing.interlace as i
|
|
16
|
-
import sksurgerycore.utilities.validate_matrix as vm
|
|
17
15
|
import sksurgeryvtk.widgets.vtk_overlay_window as ow
|
|
18
16
|
import sksurgeryvtk.camera.vtk_camera_model as cm
|
|
19
17
|
|
|
@@ -26,7 +24,7 @@ class VTKStereoInterlacedWindow(QtWidgets.QWidget):
|
|
|
26
24
|
:param init_widget: If True we will call self.Initialize and self.Start
|
|
27
25
|
as part of the init function. Set to false if you're on Linux.
|
|
28
26
|
"""
|
|
29
|
-
|
|
27
|
+
# pylint: disable=too-many-positional-arguments
|
|
30
28
|
def __init__(self,
|
|
31
29
|
offscreen=False,
|
|
32
30
|
left_camera_matrix=None,
|
|
@@ -116,7 +114,7 @@ class VTKStereoInterlacedWindow(QtWidgets.QWidget):
|
|
|
116
114
|
"""
|
|
117
115
|
Ensure that the interlaced image is recomputed.
|
|
118
116
|
"""
|
|
119
|
-
super(
|
|
117
|
+
super().paintEvent(ev)
|
|
120
118
|
self.render()
|
|
121
119
|
|
|
122
120
|
# pylint: disable=invalid-name
|
|
@@ -124,7 +122,7 @@ class VTKStereoInterlacedWindow(QtWidgets.QWidget):
|
|
|
124
122
|
"""
|
|
125
123
|
Ensure that the interlaced image is recomputed.
|
|
126
124
|
"""
|
|
127
|
-
super(
|
|
125
|
+
super().resizeEvent(ev)
|
|
128
126
|
self.render()
|
|
129
127
|
|
|
130
128
|
def set_current_viewer_index(self, viewer_index):
|
|
@@ -227,7 +225,6 @@ class VTKStereoInterlacedWindow(QtWidgets.QWidget):
|
|
|
227
225
|
|
|
228
226
|
:param left_to_right: 4x4 numpy ndarray, rigid transform
|
|
229
227
|
"""
|
|
230
|
-
vm.validate_rigid_matrix(left_to_right)
|
|
231
228
|
self.left_to_right = left_to_right
|
|
232
229
|
|
|
233
230
|
def set_camera_poses(self, left_camera_to_world):
|
{scikit-surgeryvtk-2.2.3 → scikit_surgeryvtk-2.3.1}/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.1}/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.1}/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.1}/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.1}/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
|