Skip to content

Commit

Permalink
Issue #46: Fix unit tests and linting.
Browse files Browse the repository at this point in the history
  • Loading branch information
MattClarkson committed May 27, 2022
1 parent 2c6e366 commit 3384c99
Show file tree
Hide file tree
Showing 90 changed files with 2,792 additions and 39 deletions.
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ six>=1.10
numpy>=1.11
opencv-contrib-python-headless>=4.1.1.26
scikit-surgerycore>=0.1.7
scikit-surgeryimage>=0.2.0
scikit-surgeryvtk>=0.19.1
#scikit-surgeryarucotracker>=0.0.4 fixme
scikit-surgeryimage>=0.10.1
scikit-surgeryvtk>=1.0.6
scikit-surgeryarucotracker>=0.2.7
scikit-surgerycalibration>=0.2.1
PySide2==5.12.0
PySide2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-0.291690 -0.001882 0.007161 -0.000171 0.374519
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
1766.276290 0.000000 915.665775
0.000000 1769.623383 458.985368
0.000000 0.000000 1.000000
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-0.291115 0.226945 -0.000367 0.013965 -0.121846
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
1792.669020 0.000000 1113.645820
0.000000 1792.169495 478.497416
0.000000 0.000000 1.000000
52 changes: 52 additions & 0 deletions tests/data/laparoscope_calibration/cbh-viking/config-cbh-dots.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"tracker": {
"tracker type": "unit test",
"use quaternions": false,
"tracked objects": {
"marker": "config/8700339.rom",
"laparoscope": "config/8700449.rom",
"pointer": "config/8700340.rom"
}
},
"calibration": {
"general": {
"load previous calibration file": true,
"left intrinsics": "",
"left distortion": "",
"right intrinsics": "",
"right distortion": "",
"l2r": "",
"features": "dots",
"frames required": 5,
"smooth images": false,
"iterative": false,
"maximum reprojection error": 20,
"maximum reconstruction error": 5,
"display good or bad": true,
"required to pass": false
},
"charuco": {
"minimum points per frame": 50,
"squares": [19, 26],
"square sizes": [5, 4],
"chessboard squares": [9, 14],
"chessboard square size": 3,
"filter markers": false,
"error if no chessboard": true,
"error if no charuco": false
},
"dots": {
"intrinsic params": "tests/data/calibration/cbh-viking/calib.left.intrinsics.txt",
"distortion coeffs": "tests/data/calibration/cbh-viking/calib.left.distortion.txt",
"minimum points per frame": 36,
"dots": [14, 16],
"separation in mm": 4,
"fiducial indexes": [69, 74, 149, 154],
"reference image size in pixels": [1200, 1360],
"pixels per mm": 80
}
},
"recording": {
"output dir": "output/"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-0.982398 -0.164113 -0.089220 72.810715
-0.008690 0.517266 -0.855780 -263.958832
0.186595 -0.839942 -0.509588 -1396.689209
0.000000 0.000000 0.000000 1.000000
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-0.982717 -0.162246 -0.089131 72.787117
-0.007737 0.517065 -0.855911 -263.931549
0.184955 -0.840428 -0.509384 -1396.719971
0.000000 0.000000 0.000000 1.000000
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-0.982798 -0.161738 -0.089161 72.783470
-0.007532 0.517470 -0.855668 -263.936035
0.184533 -0.840277 -0.509786 -1396.716064
0.000000 0.000000 0.000000 1.000000
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-0.982774 -0.161856 -0.089202 72.792496
-0.007553 0.517448 -0.855681 -263.932983
0.184655 -0.840268 -0.509757 -1396.728027
0.000000 0.000000 0.000000 1.000000
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
nan nan nan nan
nan nan nan nan
nan nan nan nan
nan nan nan nan
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-0.982902 -0.161179 -0.089024 72.783546
-0.007396 0.517651 -0.855560 -263.924164
0.183982 -0.840273 -0.509992 -1396.731201
0.000000 0.000000 0.000000 1.000000
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-0.982862 -0.161351 -0.089152 72.793602
-0.007386 0.517705 -0.855527 -263.921356
0.184194 -0.840207 -0.510024 -1396.717651
0.000000 0.000000 0.000000 1.000000
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-0.982902 -0.161175 -0.089025 72.777924
-0.007394 0.517654 -0.855558 -263.921570
0.183979 -0.840272 -0.509995 -1396.695679
0.000000 0.000000 0.000000 1.000000
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-0.982908 -0.161018 -0.089251 72.785416
-0.007027 0.517258 -0.855801 -263.899078
0.183965 -0.840546 -0.509548 -1396.661499
0.000000 0.000000 0.000000 1.000000
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-0.974732 -0.205281 -0.088079 72.982742
-0.031747 0.517605 -0.855030 -264.551239
0.221111 -0.830629 -0.511043 -1395.835815
0.000000 0.000000 0.000000 1.000000
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-0.976352 -0.197388 -0.088175 72.941139
-0.027534 0.518080 -0.854889 -264.480377
0.214426 -0.832245 -0.511263 -1395.980469
0.000000 0.000000 0.000000 1.000000
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-0.976963 -0.194236 -0.088409 72.939697
-0.025577 0.517852 -0.855088 -264.430023
0.211872 -0.833127 -0.510891 -1396.021362
0.000000 0.000000 0.000000 1.000000
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-0.977317 -0.192506 -0.088278 72.926239
-0.024757 0.517827 -0.855127 -264.402130
0.210330 -0.833545 -0.510847 -1396.077759
0.000000 0.000000 0.000000 1.000000
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-0.978301 -0.188249 -0.086541 74.033569
-0.024157 0.518483 -0.854746 -265.486938
0.205775 -0.834109 -0.511780 -1396.832520
0.000000 0.000000 0.000000 1.000000
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-0.979023 -0.184886 -0.085623 74.031738
-0.023645 0.520491 -0.853539 -265.775879
0.202373 -0.833610 -0.513945 -1396.724243
0.000000 0.000000 0.000000 1.000000
140 changes: 140 additions & 0 deletions tests/data/laparoscope_calibration/chessboard_14_10_3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
0 0 0
3 0 0
6 0 0
9 0 0
12 0 0
15 0 0
18 0 0
21 0 0
24 0 0
27 0 0
30 0 0
33 0 0
36 0 0
39 0 0
0 3 0
3 3 0
6 3 0
9 3 0
12 3 0
15 3 0
18 3 0
21 3 0
24 3 0
27 3 0
30 3 0
33 3 0
36 3 0
39 3 0
0 6 0
3 6 0
6 6 0
9 6 0
12 6 0
15 6 0
18 6 0
21 6 0
24 6 0
27 6 0
30 6 0
33 6 0
36 6 0
39 6 0
0 9 0
3 9 0
6 9 0
9 9 0
12 9 0
15 9 0
18 9 0
21 9 0
24 9 0
27 9 0
30 9 0
33 9 0
36 9 0
39 9 0
0 12 0
3 12 0
6 12 0
9 12 0
12 12 0
15 12 0
18 12 0
21 12 0
24 12 0
27 12 0
30 12 0
33 12 0
36 12 0
39 12 0
0 15 0
3 15 0
6 15 0
9 15 0
12 15 0
15 15 0
18 15 0
21 15 0
24 15 0
27 15 0
30 15 0
33 15 0
36 15 0
39 15 0
0 18 0
3 18 0
6 18 0
9 18 0
12 18 0
15 18 0
18 18 0
21 18 0
24 18 0
27 18 0
30 18 0
33 18 0
36 18 0
39 18 0
0 21 0
3 21 0
6 21 0
9 21 0
12 21 0
15 21 0
18 21 0
21 21 0
24 21 0
27 21 0
30 21 0
33 21 0
36 21 0
39 21 0
0 24 0
3 24 0
6 24 0
9 24 0
12 24 0
15 24 0
18 24 0
21 24 0
24 24 0
27 24 0
30 24 0
33 24 0
36 24 0
39 24 0
0 27 0
3 27 0
6 27 0
9 27 0
12 27 0
15 27 0
18 27 0
21 27 0
24 27 0
27 27 0
30 27 0
33 27 0
36 27 0
39 27 0
Loading

0 comments on commit 3384c99

Please sign in to comment.