From 0dc851990b0969d1d41e9fe60230d07d71004bc2 Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Fri, 8 Dec 2023 21:12:54 +0000 Subject: [PATCH 01/35] New submodule for feret calculations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New submodule `measures.feret` with functions for calculation of min and max feret and the associated co-ordinates. Utilises code from Skan developer see [gist](https://gist.github.com/VolkerH/0d07d05d5cb189b56362e8ee41882abf) and as [suggested](https://github.com/scikit-image/scikit-image/issues/4817#issuecomment-758900250) it adds tests. In doing so I found sorting points prior to calculation of upper and lower convex hulls missed some points. I'm also not sure about the `rotating_calipers()` function as it doesn't seem to return all pairs formed across the points from the upper and lower convex hulls and so have included but not used the `all_pairs()` function which does, although if used in place this doesn't return the minimum feret correctly, rather just the smallest distance. Currently some of the tests for the `curved_line` fail too. The intention is to use this without instantiating the `GrainStats` class to be used in profiles (#748) and could serve as a concise stand-alone set of functions outside of `GrainStats` class which currently has static methods for the calculations (#750). Benchmarking In light of #750 and re-implementing feret calculations as a new sub-module I wanted to see how this compares in terms of performance to those in `GrainStats()` class so have run some very basic benchmarking. Note this is not the full pipeline of taking labelled images and finding the outlines/edge points which are required as inputs to the calculations, its purely on the calculation of min-max feret from the edge points. ``` import timeit import numpy as np from skimage import draw from topostats.measure import feret from topostats.grainstats import GrainStats holo_circle = np.zeros((14, 14), dtype=np.uint8) rr, cc = draw.circle_perimeter(6, 6, 5) holo_circle[rr, cc] = 1 holo_circle_edge_points = np.argwhere(holo_circle == 1) %timeit feret.min_max_feret(holo_circle_edge_points) 83 µs ± 686 ns per loop (mean ± std. dev. of 7 runs, 10,000 loops each) %timeit GrainStats.get_max_min_ferets(holo_circle_edge_points) 1.06 ms ± 10.4 µs per loop (mean ± std. dev. of 7 runs, 1,000 loops each) ``` So this new implementation is faster. --- tests/measure/test_feret.py | 564 ++++++++++++++++++++++++++++++++++++ topostats/measure/feret.py | 184 ++++++++++++ 2 files changed, 748 insertions(+) create mode 100644 tests/measure/test_feret.py create mode 100644 topostats/measure/feret.py diff --git a/tests/measure/test_feret.py b/tests/measure/test_feret.py new file mode 100644 index 0000000000..43a5bf90af --- /dev/null +++ b/tests/measure/test_feret.py @@ -0,0 +1,564 @@ +"""Tests for feret functions.""" +import numpy as np +import numpy.typing as npt +import pytest +from skimage import draw + +from topostats.measure import feret + +POINT1 = (0, 0) +POINT2 = (1, 0) +POINT3 = (1, 1) +POINT4 = (2, 0) +POINT5 = (0, 1) +POINT6 = (0, 2) + +tiny_circle = np.zeros((3, 3), dtype=np.uint8) +rr, cc = draw.circle_perimeter(1, 1, 1) +tiny_circle[rr, cc] = 1 + +small_circle = np.zeros((5, 5), dtype=np.uint8) +rr, cc = draw.circle_perimeter(2, 2, 2) +small_circle[rr, cc] = 1 + +holo_circle = np.zeros((14, 14), dtype=np.uint8) +rr, cc = draw.circle_perimeter(6, 6, 5) +holo_circle[rr, cc] = 1 + +holo_ellipse_vertical = np.zeros((16, 10), dtype=np.uint8) +rr, cc = draw.ellipse_perimeter(8, 5, 3, 6, orientation=np.deg2rad(90)) +holo_ellipse_vertical[rr, cc] = 1 + +holo_ellipse_horizontal = np.zeros((10, 16), dtype=np.uint8) +rr, cc = draw.ellipse_perimeter(5, 8, 6, 3, orientation=np.deg2rad(90)) +holo_ellipse_horizontal[rr, cc] = 1 + +holo_ellipse_angled = np.zeros((12, 14), dtype=np.uint8) +rr, cc = draw.ellipse_perimeter(6, 7, 3, 5, orientation=np.deg2rad(30)) +holo_ellipse_angled[rr, cc] = 1 + +curved_line = np.zeros((10, 10), dtype=np.uint8) +rr, cc = draw.bezier_curve(1, 5, 5, -2, 8, 8, 2) +curved_line[rr, cc] = 1 + +filled_circle = np.zeros((14, 14), dtype=np.uint8) +rr, cc = draw.disk((6, 6), 6) +filled_circle[rr, cc] = 1 + +filled_ellipse_vertical = np.zeros((16, 10), dtype=np.uint8) +rr, cc = draw.ellipse(8, 5, 3, 6, rotation=np.deg2rad(90)) +filled_ellipse_vertical[rr, cc] = 1 + +filled_ellipse_horizontal = np.zeros((10, 16), dtype=np.uint8) +rr, cc = draw.ellipse(5, 8, 6, 3, rotation=np.deg2rad(90)) +filled_ellipse_horizontal[rr, cc] = 1 + +filled_ellipse_angled = np.zeros((12, 14), dtype=np.uint8) +rr, cc = draw.ellipse(6, 7, 3, 5, rotation=np.deg2rad(30)) +filled_ellipse_angled[rr, cc] = 1 + + +@pytest.mark.parametrize( + ("point1", "point2", "point3", "target"), + [ + (POINT3, POINT2, POINT1, 1), # Clockwise + (POINT1, POINT2, POINT3, -1), # Anti-clockwise + (POINT1, POINT2, POINT4, 0), # Vertical Line + (POINT1, POINT5, POINT6, 0), # Horizontal Line + ], +) +def test_orientation(point1: tuple, point2: tuple, point3: tuple, target: int) -> None: + """Test calculation of orientation of three points.""" + assert feret.orientation(point1, point2, point3) == target + + +@pytest.mark.parametrize( + ("shape", "upper_target", "lower_target"), + [ + (tiny_circle, [[0, 1], [1, 2], [2, 1]], [[0, 1], [1, 0], [2, 1]]), + (small_circle, [[0, 1], [0, 3], [1, 4], [3, 4], [4, 3]], [[0, 1], [1, 0], [3, 0], [4, 1], [4, 3]]), + ( + holo_circle, + [[1, 4], [1, 8], [4, 11], [8, 11], [11, 8]], + [[1, 4], [4, 1], [8, 1], [11, 4], [11, 8]], + ), + ( + holo_ellipse_horizontal, + [[1, 5], [1, 11], [2, 13], [3, 14], [5, 14], [7, 12], [8, 10]], + [[1, 5], [2, 3], [4, 1], [6, 1], [7, 2], [8, 4], [8, 10]], + ), + ( + holo_ellipse_vertical, + [[1, 3], [1, 5], [3, 7], [5, 8], [11, 8], [13, 7], [14, 6]], + [[1, 3], [2, 2], [4, 1], [10, 1], [12, 2], [14, 4], [14, 6]], + ), + ( + holo_ellipse_angled, + [[1, 3], [1, 7], [2, 9], [4, 11], [6, 12], [8, 12], [10, 10]], + [[1, 3], [3, 1], [5, 1], [7, 2], [9, 4], [10, 6], [10, 10]], + ), + ( + curved_line, + [[1, 5], [8, 8]], + [[1, 5], [2, 3], [4, 1], [5, 1], [6, 2], [7, 4], [8, 7], [8, 8]], + ), + ], +) +def test_hulls(shape: npt.NDArray, upper_target: list, lower_target: list) -> None: + """Test construction of upper and lower hulls.""" + print(f"{holo_ellipse_angled=}") + print(f"{np.argwhere(shape == 1)=}") + upper, lower = feret.hulls(np.argwhere(shape == 1)) + np.testing.assert_array_equal(upper, upper_target) + np.testing.assert_array_equal(lower, lower_target) + + +@pytest.mark.parametrize( + ("shape", "points_target"), + [ + ( + tiny_circle, + [ + ([0, 1], [1, 0]), + ([0, 1], [2, 1]), + ([0, 1], [1, 2]), + ([1, 0], [1, 2]), + ([1, 2], [2, 1]), + ([1, 0], [2, 1]), + ], + ), + ( + small_circle, + [ + ([0, 1], [1, 0]), + ([0, 1], [3, 0]), + ([0, 1], [4, 1]), + ([0, 1], [4, 3]), + ([0, 1], [0, 3]), + ([0, 3], [1, 0]), + ([0, 3], [3, 0]), + ([0, 3], [4, 1]), + ([0, 3], [4, 3]), + ([0, 1], [1, 4]), + ([1, 0], [1, 4]), + ([1, 4], [3, 0]), + ([1, 4], [4, 1]), + ([1, 4], [4, 3]), + ([0, 1], [3, 4]), + ([1, 0], [3, 4]), + ([3, 0], [3, 4]), + ([3, 4], [4, 1]), + ([3, 4], [4, 3]), + ([1, 0], [4, 3]), + ([3, 0], [4, 3]), + ([4, 1], [4, 3]), + ], + ), + ( + holo_circle, + [ + ([1, 4], [4, 1]), + ([1, 4], [8, 1]), + ([1, 4], [11, 4]), + ([1, 4], [11, 8]), + ([1, 4], [1, 8]), + ([1, 8], [4, 1]), + ([1, 8], [8, 1]), + ([1, 8], [11, 4]), + ([1, 8], [11, 8]), + ([1, 4], [4, 11]), + ([4, 1], [4, 11]), + ([4, 11], [8, 1]), + ([4, 11], [11, 4]), + ([4, 11], [11, 8]), + ([1, 4], [8, 11]), + ([4, 1], [8, 11]), + ([8, 1], [8, 11]), + ([8, 11], [11, 4]), + ([8, 11], [11, 8]), + ([4, 1], [11, 8]), + ([8, 1], [11, 8]), + ([11, 4], [11, 8]), + ], + ), + ( + holo_ellipse_horizontal, + [ + ([1, 5], [2, 3]), + ([1, 5], [4, 1]), + ([1, 5], [6, 1]), + ([1, 5], [7, 2]), + ([1, 5], [8, 4]), + ([1, 5], [8, 10]), + ([1, 5], [1, 11]), + ([1, 11], [2, 3]), + ([1, 11], [4, 1]), + ([1, 11], [6, 1]), + ([1, 11], [7, 2]), + ([1, 11], [8, 4]), + ([1, 11], [8, 10]), + ([1, 5], [2, 13]), + ([2, 3], [2, 13]), + ([2, 13], [4, 1]), + ([2, 13], [6, 1]), + ([2, 13], [7, 2]), + ([2, 13], [8, 4]), + ([2, 13], [8, 10]), + ([1, 5], [3, 14]), + ([2, 3], [3, 14]), + ([3, 14], [4, 1]), + ([3, 14], [6, 1]), + ([3, 14], [7, 2]), + ([3, 14], [8, 4]), + ([3, 14], [8, 10]), + ([1, 5], [5, 14]), + ([2, 3], [5, 14]), + ([4, 1], [5, 14]), + ([5, 14], [6, 1]), + ([5, 14], [7, 2]), + ([5, 14], [8, 4]), + ([5, 14], [8, 10]), + ([1, 5], [7, 12]), + ([2, 3], [7, 12]), + ([4, 1], [7, 12]), + ([6, 1], [7, 12]), + ([7, 2], [7, 12]), + ([7, 12], [8, 4]), + ([7, 12], [8, 10]), + ([2, 3], [8, 10]), + ([4, 1], [8, 10]), + ([6, 1], [8, 10]), + ([7, 2], [8, 10]), + ([8, 4], [8, 10]), + ], + ), + ( + holo_ellipse_vertical, + [ + ([1, 3], [2, 2]), + ([1, 3], [4, 1]), + ([1, 3], [10, 1]), + ([1, 3], [12, 2]), + ([1, 3], [14, 4]), + ([1, 3], [14, 6]), + ([1, 3], [1, 5]), + ([1, 5], [2, 2]), + ([1, 5], [4, 1]), + ([1, 5], [10, 1]), + ([1, 5], [12, 2]), + ([1, 5], [14, 4]), + ([1, 5], [14, 6]), + ([1, 3], [3, 7]), + ([2, 2], [3, 7]), + ([3, 7], [4, 1]), + ([3, 7], [10, 1]), + ([3, 7], [12, 2]), + ([3, 7], [14, 4]), + ([3, 7], [14, 6]), + ([1, 3], [5, 8]), + ([2, 2], [5, 8]), + ([4, 1], [5, 8]), + ([5, 8], [10, 1]), + ([5, 8], [12, 2]), + ([5, 8], [14, 4]), + ([5, 8], [14, 6]), + ([1, 3], [11, 8]), + ([2, 2], [11, 8]), + ([4, 1], [11, 8]), + ([10, 1], [11, 8]), + ([11, 8], [12, 2]), + ([11, 8], [14, 4]), + ([11, 8], [14, 6]), + ([1, 3], [13, 7]), + ([2, 2], [13, 7]), + ([4, 1], [13, 7]), + ([10, 1], [13, 7]), + ([12, 2], [13, 7]), + ([13, 7], [14, 4]), + ([13, 7], [14, 6]), + ([2, 2], [14, 6]), + ([4, 1], [14, 6]), + ([10, 1], [14, 6]), + ([12, 2], [14, 6]), + ([14, 4], [14, 6]), + ], + ), + ( + holo_ellipse_angled, + [ + ([1, 3], [3, 1]), + ([1, 3], [5, 1]), + ([1, 3], [7, 2]), + ([1, 3], [9, 4]), + ([1, 3], [10, 6]), + ([1, 3], [10, 10]), + ([1, 3], [1, 7]), + ([1, 7], [3, 1]), + ([1, 7], [5, 1]), + ([1, 7], [7, 2]), + ([1, 7], [9, 4]), + ([1, 7], [10, 6]), + ([1, 7], [10, 10]), + ([1, 3], [2, 9]), + ([2, 9], [3, 1]), + ([2, 9], [5, 1]), + ([2, 9], [7, 2]), + ([2, 9], [9, 4]), + ([2, 9], [10, 6]), + ([2, 9], [10, 10]), + ([1, 3], [4, 11]), + ([3, 1], [4, 11]), + ([4, 11], [5, 1]), + ([4, 11], [7, 2]), + ([4, 11], [9, 4]), + ([4, 11], [10, 6]), + ([4, 11], [10, 10]), + ([1, 3], [6, 12]), + ([3, 1], [6, 12]), + ([5, 1], [6, 12]), + ([6, 12], [7, 2]), + ([6, 12], [9, 4]), + ([6, 12], [10, 6]), + ([6, 12], [10, 10]), + ([1, 3], [8, 12]), + ([3, 1], [8, 12]), + ([5, 1], [8, 12]), + ([7, 2], [8, 12]), + ([8, 12], [9, 4]), + ([8, 12], [10, 6]), + ([8, 12], [10, 10]), + ([3, 1], [10, 10]), + ([5, 1], [10, 10]), + ([7, 2], [10, 10]), + ([9, 4], [10, 10]), + ([10, 6], [10, 10]), + ], + ), + ( + curved_line, + [ + ([1, 5], [2, 3]), + ([1, 5], [4, 1]), + ([1, 5], [5, 1]), + ([1, 5], [6, 2]), + ([1, 5], [7, 4]), + ([1, 5], [8, 7]), + ([1, 5], [8, 8]), + ([2, 3], [8, 8]), + ([4, 1], [8, 8]), + ([5, 1], [8, 8]), + ([6, 2], [8, 8]), + ([7, 4], [8, 8]), + ([8, 7], [8, 8]), + ], + ), + ], +) +def test_all_pairs(shape: npt.NDArray, points_target: list) -> None: + """Test calculation of all pairs.""" + points = feret.all_pairs(np.argwhere(shape == 1)) + np.testing.assert_array_equal(list(points), points_target) + + +@pytest.mark.parametrize( + ("shape", "points_target"), + [ + (tiny_circle, [([0, 1], [2, 1]), ([0, 1], [1, 0]), ([1, 2], [1, 0]), ([1, 2], [0, 1]), ([2, 1], [0, 1])]), + ( + small_circle, + [ + ([0, 1], [4, 3]), + ([0, 1], [4, 1]), + ([0, 3], [4, 1]), + ([0, 3], [3, 0]), + ([1, 4], [3, 0]), + ([1, 4], [1, 0]), + ([3, 4], [1, 0]), + ([3, 4], [0, 1]), + ([4, 3], [0, 1]), + ], + ), + ( + holo_circle, + [ + ([1, 4], [11, 8]), + ([1, 4], [11, 4]), + ([1, 8], [11, 4]), + ([1, 8], [8, 1]), + ([4, 11], [8, 1]), + ([4, 11], [4, 1]), + ([8, 11], [4, 1]), + ([8, 11], [1, 4]), + ([11, 8], [1, 4]), + ], + ), + ( + holo_ellipse_horizontal, + [ + ([1, 5], [8, 10]), + ([1, 5], [8, 4]), + ([1, 11], [8, 4]), + ([1, 11], [7, 2]), + ([2, 13], [7, 2]), + ([2, 13], [6, 1]), + ([3, 14], [6, 1]), + ([3, 14], [4, 1]), + ([5, 14], [4, 1]), + ([5, 14], [2, 3]), + ([7, 12], [2, 3]), + ([7, 12], [1, 5]), + ([8, 10], [1, 5]), + ], + ), + ( + holo_ellipse_vertical, + [ + ([1, 3], [14, 6]), + ([1, 3], [14, 4]), + ([1, 5], [14, 4]), + ([1, 5], [12, 2]), + ([3, 7], [12, 2]), + ([3, 7], [10, 1]), + ([5, 8], [10, 1]), + ([5, 8], [4, 1]), + ([11, 8], [4, 1]), + ([11, 8], [2, 2]), + ([13, 7], [2, 2]), + ([13, 7], [1, 3]), + ([14, 6], [1, 3]), + ], + ), + ( + holo_ellipse_angled, + [ + ([1, 3], [10, 10]), + ([1, 3], [10, 6]), + ([1, 7], [10, 6]), + ([1, 7], [9, 4]), + ([2, 9], [9, 4]), + ([2, 9], [7, 2]), + ([4, 11], [7, 2]), + ([4, 11], [5, 1]), + ([6, 12], [5, 1]), + ([6, 12], [3, 1]), + ([8, 12], [3, 1]), + ([8, 12], [1, 3]), + ([10, 10], [1, 3]), + ], + ), + # ( + # curved_line, + # [], + # ), + ], +) +def test_rotating_calipers(shape: npt.NDArray, points_target: list) -> None: + """Test calculation of rotating caliper pairs.""" + points = feret.rotating_calipers(np.argwhere(shape == 1)) + np.testing.assert_array_equal(list(points), points_target) + + +@pytest.mark.parametrize( + ( + "shape", + "min_feret_distance_target", + "min_feret_coord_target", + "max_feret_distance_target", + "max_feret_coord_target", + ), + [ + (tiny_circle, 1.4142135623730951, ([0, 1], [1, 0]), 2, ([2, 1], [0, 1])), + (small_circle, 4.0, ([0, 1], [4, 1]), 4.47213595499958, ([4, 3], [0, 1])), + (holo_circle, 9.899494936611665, ([1, 8], [8, 1]), 10.770329614269007, ([11, 8], [1, 4])), + (holo_ellipse_horizontal, 7.0710678118654755, ([1, 5], [8, 4]), 13.341664064126334, ([3, 14], [6, 1])), + (holo_ellipse_vertical, 7.0710678118654755, ([5, 8], [4, 1]), 13.341664064126334, ([14, 6], [1, 3])), + (holo_ellipse_angled, 8.54400374531753, ([1, 7], [9, 4]), 12.083045973594572, ([8, 12], [3, 1])), + # (curved_line, 5.656854249492381, ([1, 5], [5, 1]), 8.06225774829855, ([8, 8], [4, 1])), + ], +) +def test_min_max_feret( + shape: npt.NDArray, + min_feret_distance_target: float, + min_feret_coord_target: list, + max_feret_distance_target: float, + max_feret_coord_target: list, +) -> None: + """Test calculation of min/max feret.""" + min_feret_distance, min_feret_coord, max_feret_distance, max_feret_coord = feret.min_max_feret( + np.argwhere(shape == 1) + ) + assert min_feret_distance == min_feret_distance_target + assert min_feret_coord == min_feret_coord_target + assert max_feret_distance == max_feret_distance_target + assert max_feret_coord == max_feret_coord_target + + +@pytest.mark.parametrize( + ( + "shape", + "min_feret_distance_target", + "min_feret_coord_target", + "max_feret_distance_target", + "max_feret_coord_target", + ), + [ + (tiny_circle, 1.4142135623730951, ([0, 1], [1, 0]), 2, ([2, 1], [0, 1])), + (small_circle, 4.0, ([0, 1], [4, 1]), 4.47213595499958, ([4, 3], [0, 1])), + (holo_circle, 9.899494936611665, ([1, 8], [8, 1]), 10.770329614269007, ([11, 8], [1, 4])), + (holo_ellipse_horizontal, 7.0710678118654755, ([1, 5], [8, 4]), 13.341664064126334, ([3, 14], [6, 1])), + (holo_ellipse_vertical, 7.0710678118654755, ([5, 8], [4, 1]), 13.341664064126334, ([14, 6], [1, 3])), + (holo_ellipse_angled, 8.54400374531753, ([1, 7], [9, 4]), 12.083045973594572, ([8, 12], [3, 1])), + # (curved_line, 5.656854249492381, ([1, 5], [5, 1]), 8.06225774829855, ([8, 8], [4, 1])), + (filled_circle, 10.0, ([1, 3], [11, 3]), 11.661903789690601, ([11, 9], [1, 3])), + (filled_ellipse_horizontal, 4.0, ([3, 4], [7, 4]), 10.198039027185569, ([6, 13], [4, 3])), + (filled_ellipse_vertical, 4.0, ([4, 7], [4, 3]), 10.198039027185569, ([13, 6], [3, 4])), + (filled_ellipse_angled, 5.385164807134504, ([8, 9], [3, 7]), 8.94427190999916, ([4, 11], [8, 3])), + ], +) +def test_get_feret_from_mask( + shape: npt.NDArray, + min_feret_distance_target: float, + min_feret_coord_target: list, + max_feret_distance_target: float, + max_feret_coord_target: list, +) -> None: + """Test calculation of min/max feret for a single masked object.""" + min_feret_distance, min_feret_coord, max_feret_distance, max_feret_coord = feret.get_feret_from_mask(shape) + assert min_feret_distance == min_feret_distance_target + assert min_feret_coord == min_feret_coord_target + assert max_feret_distance == max_feret_distance_target + assert max_feret_coord == max_feret_coord_target + + +# Concatenate images to have two labeled objects within them +holo_ellipse_angled2 = holo_ellipse_angled.copy() +holo_ellipse_angled2[holo_ellipse_angled2 == 1] = 2 +holo_image = np.concatenate((holo_circle, holo_ellipse_angled2)) +filled_ellipse_angled2 = filled_ellipse_angled.copy() +filled_ellipse_angled2[filled_ellipse_angled2 == 1] = 2 +filled_image = np.concatenate((filled_circle, filled_ellipse_angled2)) + + +@pytest.mark.parametrize( + ("shape", "target"), + [ + ( + holo_image, + { + 1: (9.899494936611665, ([1, 8], [8, 1]), 10.770329614269007, ([11, 8], [1, 4])), + 2: (8.54400374531753, ([15, 7], [23, 4]), 12.083045973594572, ([22, 12], [17, 1])), + }, + ), + ( + filled_image, + { + 1: (10.0, ([1, 3], [11, 3]), 11.661903789690601, ([11, 9], [1, 3])), + 2: (5.385164807134504, ([22, 9], [17, 7]), 8.94427190999916, ([18, 11], [22, 3])), + }, + ), + ], +) +def test_get_feret_from_labelim(shape: npt.NDArray, target) -> None: + """Test calculation of min/max feret for a labelled image with multiuple objects.""" + min_max_feret_size_coord = feret.get_feret_from_labelim(shape) + assert min_max_feret_size_coord == target diff --git a/topostats/measure/feret.py b/topostats/measure/feret.py new file mode 100644 index 0000000000..d1247ce6d4 --- /dev/null +++ b/topostats/measure/feret.py @@ -0,0 +1,184 @@ +"""Calculate feret distances for 2-D objects. + +This code comes from a gist written by @VolkerH under BSD-3 License + +https://gist.github.com/VolkerH/0d07d05d5cb189b56362e8ee41882abf + +During testing it was discovered that sorting points prior to derivation of upper and lower convex hulls was problematic +so this step was removed. +""" +from math import sqrt + +import numpy as np +import numpy.typing as npt +import skimage.morphology + + +def orientation(p: npt.NDArray, q: npt.NDArray, r: npt.NDArray) -> int: + """Determine the orientation of three points as either clockwise, counter-clock-wise or colinear. + + Parameters + ---------- + p: npt.NDArray + First point (assumed to have a length of 2). + q: npt.NDArray + Second point (assumed to have a length of 2). + r: npt.NDArray + Third point (assumed to have a length of 2). + + Returns + ------- + int: + Returns a positive value of p-q-r are clockwise, neg if counter-clock-wise, zero if colinear. + """ + return (q[1] - p[1]) * (r[0] - p[0]) - (q[0] - p[0]) * (r[1] - p[1]) + + +def hulls(points: npt.NDArray) -> tuple[list, list]: + """Graham scan to find upper and lower convex hulls of a set of 2-D points. + + Parameters + ---------- + points : npt.NDArray + 2-D Array of points for the outline of an object. + + Returns + ------- + Tuple[list, list] + Tuple of two Numpy arrays of the original co-ordinates split into upper and lower hulls. + """ + upper_hull = [] + lower_hull = [] + for p in points: + # Remove points if they are not in the correct hull + while len(upper_hull) > 1 and orientation(upper_hull[-2], upper_hull[-1], p) <= 0: + upper_hull.pop() + while len(lower_hull) > 1 and orientation(lower_hull[-2], lower_hull[-1], p) >= 0: + lower_hull.pop() + # Append point to each hull (removed from one in next pass) + upper_hull.append(list(p)) + lower_hull.append(list(p)) + return upper_hull, lower_hull + + +def all_pairs(points: npt.NDArray) -> list[tuple[list, list]]: + """Given a list of 2d points, finds all ways of sandwiching the points. + + Calculates the upper and lower convex hulls and then finds all pairwise combinations between each set of points. + + Parameters + ---------- + points: npt.NDArray + Numpy array of co-ordinates defining the outline of an object.mro + + Returns + ------- + List[Tuple[int, int]] + """ + upper_hull, lower_hull = hulls(points) + unique_combinations = {} + for upper in upper_hull: + for lower in lower_hull: + if upper != lower: + lowest = min(upper, lower) + highest = max(upper, lower) + unique_combinations[f"{str(lowest)}-{str(highest)}"] = (lowest, highest) + return list(unique_combinations.values()) + + +def rotating_calipers(points: npt.NDArray) -> list[tuple[list, list]]: + """Given a list of 2d points, finds all ways of sandwiching the points. + + Between two parallel lines that touch one point each, and yields the sequence + of pairs of points touched by each pair of lines. + """ + upper_hull, lower_hull = hulls(points) + i = 0 + j = len(lower_hull) - 1 + while i < len(upper_hull) or j > 0: + yield upper_hull[i], lower_hull[j] + # if all the way through one sid eof hull, advance the other side + # if i == len(upper_hull) - 1: + if i == len(upper_hull): + j -= 1 + elif j == 0: + i += 1 + # still points left on both lists, compare slopes of next hull edges + # being careful to avoid divide-by-zero in slope calculation + elif ((upper_hull[i + 1][1] - upper_hull[i][1]) * (lower_hull[j][0] - lower_hull[j - 1][0])) > ( + (lower_hull[j][1] - lower_hull[j - 1][1]) * (upper_hull[i + 1][0] - upper_hull[i][0]) + ): + i += 1 + else: + j -= 1 + + +def min_max_feret(points: npt.NDArray) -> tuple[float, tuple[int, int], float, tuple[int, int]]: + """Given a list of 2-D points, returns the minimum and maximum feret diameters. + + Parameters + ---------- + points: npt.NDArray + A 2-D array of points for the outline of an object. + + Returns + ------- + tuple + Tuple of the minimum feret distance and its co-ordinates and the maximum feret distance and its co-ordinates. + """ + squared_distance_per_pair = [ + ((p[0] - q[0]) ** 2 + (p[1] - q[1]) ** 2, (p, q)) for p, q in rotating_calipers(points) + ] + min_feret_sq, min_feret_coords = min(squared_distance_per_pair) + max_feret_sq, max_feret_coords = max(squared_distance_per_pair) + return sqrt(min_feret_sq), min_feret_coords, sqrt(max_feret_sq), max_feret_coords + + +def get_feret_from_mask(mask_im: npt.NDArray) -> tuple[float, tuple[int, int], float, tuple[int, int]]: + """Calculate the minimum and maximum feret diameter of the foreground object of a binary mask. + + The outline of the object is calculated and the pixel co-ordinates transformed to a list for calculation. + + Parameters + ---------- + mask_im: npt.NDArray + Binary Numpy array. + + Returns + ------- + Tuple[float, Tuple[int, int], float, Tuple[int, int]] + Returns a tuple of the minimum feret and its coordinates and the maximum feret and its coordinates. + """ + eroded = skimage.morphology.erosion(mask_im) + outline = mask_im ^ eroded + boundary_points = np.argwhere(outline > 0) + # convert numpy array to a list of (x,y) tuple points + boundary_point_list = list(map(list, list(boundary_points))) + return min_max_feret(boundary_point_list) + + +def get_feret_from_labelim(label_image: npt.NDArray, labels: None | list | set = None) -> dict: + """Calculate the minimum and maximum feret and co-ordinates of each connected component within a labelled image. + + If labels is None, all labels > 0 + will be analyzed. + + Parameters + ---------- + label_image: npt.NDArray + Numpy array with labelled connected components (integer) + labels: None | list + A list of labelled objects for which to calculate + + Returns + ------- + dict + Dictionary with labels as keys and values are a tuple of the minimum and maximum feret distances and + co-ordinates. + """ + if labels is None: + labels = set(np.unique(label_image)) - {0} + results = {} + for label in labels: + results[label] = get_feret_from_mask(label_image == label) + return results From ecebf27fefd4c988057fcc28b66c64a0cae1179c Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Mon, 11 Dec 2023 19:27:21 +0000 Subject: [PATCH 02/35] Import annotations from __future__ to support type hints --- topostats/measure/feret.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/topostats/measure/feret.py b/topostats/measure/feret.py index d1247ce6d4..a4e965cdb1 100644 --- a/topostats/measure/feret.py +++ b/topostats/measure/feret.py @@ -7,6 +7,8 @@ During testing it was discovered that sorting points prior to derivation of upper and lower convex hulls was problematic so this step was removed. """ +from __future__ import annotations + from math import sqrt import numpy as np From 65c9f2929e8dd8d195bd82d64f97d16f5ea48a62 Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Wed, 3 Jan 2024 10:56:42 +0000 Subject: [PATCH 03/35] Simplifies tests and adds additional smaller examples Reduces the size of test images making them easier to calculate/understand expected values. + `small_circle` : From 14x14 array with center at (6,6) with radius of 5 to 7x7 array with center at (3,3) and radius of 2. + `holo_ellipse_horizontal` : From 16x10 with center at (8, 5) and row radius 3, col radius 6 to 11x9 with center at (5, 4) row radius 4 col radius 3. Removed orientation option. + `holo_ellipse_vertical` : From 10x16 with center at (5, 8) and row radius 6, col radius 3 to 9x11 with center at (4, 5) row radius 3 col radius 4. Removed orientation option. + `holo_ellipse_angled` : From 12x14 with center at (6, 7) row radius 3, col radius 5 to 8x10 with center at (4, 5), row radius 1, col radius 3 + `filled_circle` : From 14x14 with center at (6, 6) and radius of 6 to 12x12 with center at (4,4) + `filled_ellipse_vertical` : From 16x10 with center at (8, 5) and row radius 4, col radius 6 to 9x7 with center at (4, 3), row radius 4, col radius 3. Removed rotation option + `filled_ellipse_horizontal` : From 10x16 with center at (5, 8) and row radius 6, column radius 3 to 7x9 with center at (3, 4) and row radius 3, column radius 4. Removed rotation option + `filled_ellipse_angled` : from 12x14 with center at (6, 7) row radius 3, column radius 5 to 9x11 with center at (4, 5) and row radius 3, column radius 5. + Updated combined integration test of overall method with multiple objects. + Adds in `tiny_triangle`, `tiny_square`, `tiny_rectangle` and `tiny_ellipse` to parametrised tests as these are super clear as to whether the min/max feret are correct or not. I think there are some problems with the Rotating Calliper algorithm as implemented as it fails for the `curved_line` and will be investigating that, fairly important as we have linear DNA molecules that will not be straight lines. --- tests/measure/test_feret.py | 685 +++++++++++++++++++++--------------- topostats/measure/feret.py | 5 +- 2 files changed, 405 insertions(+), 285 deletions(-) diff --git a/tests/measure/test_feret.py b/tests/measure/test_feret.py index 43a5bf90af..17d0047a90 100644 --- a/tests/measure/test_feret.py +++ b/tests/measure/test_feret.py @@ -21,50 +21,69 @@ rr, cc = draw.circle_perimeter(2, 2, 2) small_circle[rr, cc] = 1 -holo_circle = np.zeros((14, 14), dtype=np.uint8) -rr, cc = draw.circle_perimeter(6, 6, 5) +tiny_square = np.asarray([[0, 0, 0, 0], [0, 1, 1, 0], [0, 1, 1, 0], [0, 0, 0, 0]], dtype=np.uint8) + +tiny_triangle = np.asarray([[0, 0, 0, 0], [0, 1, 1, 0], [0, 1, 0, 0], [0, 0, 0, 0]], dtype=np.uint8) + +tiny_rectangle = np.asarray([[0, 0, 0, 0], [0, 1, 1, 0], [0, 1, 1, 0], [0, 1, 1, 0], [0, 0, 0, 0]], dtype=np.uint8) + +tiny_ellipse = np.asarray( + [ + [0, 0, 0, 0, 0], + [0, 0, 1, 0, 0], + [0, 1, 0, 1, 0], + [0, 1, 0, 1, 0], + [0, 1, 0, 1, 0], + [0, 0, 1, 0, 0], + [0, 0, 0, 0, 0], + ], + dtype=np.uint8, +) + +holo_circle = np.zeros((7, 7), dtype=np.uint8) +rr, cc = draw.circle_perimeter(3, 3, 2) holo_circle[rr, cc] = 1 -holo_ellipse_vertical = np.zeros((16, 10), dtype=np.uint8) -rr, cc = draw.ellipse_perimeter(8, 5, 3, 6, orientation=np.deg2rad(90)) +holo_ellipse_vertical = np.zeros((11, 9), dtype=np.uint8) +rr, cc = draw.ellipse_perimeter(5, 4, 4, 3) holo_ellipse_vertical[rr, cc] = 1 -holo_ellipse_horizontal = np.zeros((10, 16), dtype=np.uint8) -rr, cc = draw.ellipse_perimeter(5, 8, 6, 3, orientation=np.deg2rad(90)) +holo_ellipse_horizontal = np.zeros((9, 11), dtype=np.uint8) +rr, cc = draw.ellipse_perimeter(4, 5, 3, 4) holo_ellipse_horizontal[rr, cc] = 1 -holo_ellipse_angled = np.zeros((12, 14), dtype=np.uint8) -rr, cc = draw.ellipse_perimeter(6, 7, 3, 5, orientation=np.deg2rad(30)) +holo_ellipse_angled = np.zeros((8, 10), dtype=np.uint8) +rr, cc = draw.ellipse_perimeter(4, 5, 1, 3, orientation=np.deg2rad(30)) holo_ellipse_angled[rr, cc] = 1 curved_line = np.zeros((10, 10), dtype=np.uint8) rr, cc = draw.bezier_curve(1, 5, 5, -2, 8, 8, 2) curved_line[rr, cc] = 1 -filled_circle = np.zeros((14, 14), dtype=np.uint8) -rr, cc = draw.disk((6, 6), 6) +filled_circle = np.zeros((9, 9), dtype=np.uint8) +rr, cc = draw.disk((4, 4), 4) filled_circle[rr, cc] = 1 -filled_ellipse_vertical = np.zeros((16, 10), dtype=np.uint8) -rr, cc = draw.ellipse(8, 5, 3, 6, rotation=np.deg2rad(90)) +filled_ellipse_vertical = np.zeros((9, 7), dtype=np.uint8) +rr, cc = draw.ellipse(4, 3, 4, 3) filled_ellipse_vertical[rr, cc] = 1 -filled_ellipse_horizontal = np.zeros((10, 16), dtype=np.uint8) -rr, cc = draw.ellipse(5, 8, 6, 3, rotation=np.deg2rad(90)) +filled_ellipse_horizontal = np.zeros((7, 9), dtype=np.uint8) +rr, cc = draw.ellipse(3, 4, 3, 4) filled_ellipse_horizontal[rr, cc] = 1 -filled_ellipse_angled = np.zeros((12, 14), dtype=np.uint8) -rr, cc = draw.ellipse(6, 7, 3, 5, rotation=np.deg2rad(30)) +filled_ellipse_angled = np.zeros((9, 11), dtype=np.uint8) +rr, cc = draw.ellipse(4, 5, 3, 5, rotation=np.deg2rad(30)) filled_ellipse_angled[rr, cc] = 1 @pytest.mark.parametrize( ("point1", "point2", "point3", "target"), [ - (POINT3, POINT2, POINT1, 1), # Clockwise - (POINT1, POINT2, POINT3, -1), # Anti-clockwise - (POINT1, POINT2, POINT4, 0), # Vertical Line - (POINT1, POINT5, POINT6, 0), # Horizontal Line + pytest.param(POINT3, POINT2, POINT1, 1, id="clockwise"), + pytest.param(POINT1, POINT2, POINT3, -1, id="anti-clockwise"), + pytest.param(POINT1, POINT2, POINT4, 0, id="vertical-line"), + pytest.param(POINT1, POINT5, POINT6, 0, id="horizontal-line"), ], ) def test_orientation(point1: tuple, point2: tuple, point3: tuple, target: int) -> None: @@ -75,39 +94,53 @@ def test_orientation(point1: tuple, point2: tuple, point3: tuple, target: int) - @pytest.mark.parametrize( ("shape", "upper_target", "lower_target"), [ - (tiny_circle, [[0, 1], [1, 2], [2, 1]], [[0, 1], [1, 0], [2, 1]]), - (small_circle, [[0, 1], [0, 3], [1, 4], [3, 4], [4, 3]], [[0, 1], [1, 0], [3, 0], [4, 1], [4, 3]]), - ( + pytest.param(tiny_circle, [[0, 1], [1, 2], [2, 1]], [[0, 1], [1, 0], [2, 1]], id="tiny circle"), + pytest.param(tiny_square, [[1, 1], [1, 2], [2, 2]], [[1, 1], [2, 1], [2, 2]], id="tiny square"), + pytest.param(tiny_triangle, [[1, 1], [1, 2], [2, 1]], [[1, 1], [2, 1]], id="tiny triangle"), + pytest.param(tiny_rectangle, [[1, 1], [1, 2], [3, 2]], [[1, 1], [3, 1], [3, 2]], id="tiny rectangle"), + pytest.param( + tiny_ellipse, [[1, 2], [2, 3], [4, 3], [5, 2]], [[1, 2], [2, 1], [4, 1], [5, 2]], id="tiny ellipse" + ), + pytest.param( + small_circle, + [[0, 1], [0, 3], [1, 4], [3, 4], [4, 3]], + [[0, 1], [1, 0], [3, 0], [4, 1], [4, 3]], + id="small circle", + ), + pytest.param( holo_circle, - [[1, 4], [1, 8], [4, 11], [8, 11], [11, 8]], - [[1, 4], [4, 1], [8, 1], [11, 4], [11, 8]], + [[1, 2], [1, 4], [2, 5], [4, 5], [5, 4]], + [[1, 2], [2, 1], [4, 1], [5, 2], [5, 4]], + id="hol circle", ), - ( + pytest.param( holo_ellipse_horizontal, - [[1, 5], [1, 11], [2, 13], [3, 14], [5, 14], [7, 12], [8, 10]], - [[1, 5], [2, 3], [4, 1], [6, 1], [7, 2], [8, 4], [8, 10]], + [[1, 3], [1, 7], [3, 9], [5, 9], [7, 7]], + [[1, 3], [3, 1], [5, 1], [7, 3], [7, 7]], + id="holo ellipse horizontal", ), - ( + pytest.param( holo_ellipse_vertical, - [[1, 3], [1, 5], [3, 7], [5, 8], [11, 8], [13, 7], [14, 6]], - [[1, 3], [2, 2], [4, 1], [10, 1], [12, 2], [14, 4], [14, 6]], + [[1, 3], [1, 5], [3, 7], [7, 7], [9, 5]], + [[1, 3], [3, 1], [7, 1], [9, 3], [9, 5]], + id="holo ellipse vertical", ), - ( + pytest.param( holo_ellipse_angled, - [[1, 3], [1, 7], [2, 9], [4, 11], [6, 12], [8, 12], [10, 10]], - [[1, 3], [3, 1], [5, 1], [7, 2], [9, 4], [10, 6], [10, 10]], + [[1, 2], [1, 4], [5, 8], [6, 7]], + [[1, 2], [2, 1], [6, 5], [6, 7]], + id="holo ellipse angled", ), - ( + pytest.param( curved_line, [[1, 5], [8, 8]], [[1, 5], [2, 3], [4, 1], [5, 1], [6, 2], [7, 4], [8, 7], [8, 8]], + id="curved line", ), ], ) def test_hulls(shape: npt.NDArray, upper_target: list, lower_target: list) -> None: """Test construction of upper and lower hulls.""" - print(f"{holo_ellipse_angled=}") - print(f"{np.argwhere(shape == 1)=}") upper, lower = feret.hulls(np.argwhere(shape == 1)) np.testing.assert_array_equal(upper, upper_target) np.testing.assert_array_equal(lower, lower_target) @@ -116,7 +149,7 @@ def test_hulls(shape: npt.NDArray, upper_target: list, lower_target: list) -> No @pytest.mark.parametrize( ("shape", "points_target"), [ - ( + pytest.param( tiny_circle, [ ([0, 1], [1, 0]), @@ -126,8 +159,61 @@ def test_hulls(shape: npt.NDArray, upper_target: list, lower_target: list) -> No ([1, 2], [2, 1]), ([1, 0], [2, 1]), ], + id="tiny circle", + ), + pytest.param( + tiny_square, + [ + ([1, 1], [2, 1]), + ([1, 1], [2, 2]), + ([1, 1], [1, 2]), + ([1, 2], [2, 1]), + ([1, 2], [2, 2]), + ([2, 1], [2, 2]), + ], + id="tiny square", + ), + pytest.param( + tiny_triangle, + [ + ([1, 1], [2, 1]), + ([1, 1], [1, 2]), + ([1, 2], [2, 1]), + ], + id="tiny triangle", + ), + pytest.param( + tiny_rectangle, + [ + ([1, 1], [3, 1]), + ([1, 1], [3, 2]), + ([1, 1], [1, 2]), + ([1, 2], [3, 1]), + ([1, 2], [3, 2]), + ([3, 1], [3, 2]), + ], + id="tiny rectangle", + ), + pytest.param( + tiny_ellipse, + [ + ([1, 2], [2, 1]), + ([1, 2], [4, 1]), + ([1, 2], [5, 2]), + ([1, 2], [2, 3]), + ([2, 1], [2, 3]), + ([2, 3], [4, 1]), + ([2, 3], [5, 2]), + ([1, 2], [4, 3]), + ([2, 1], [4, 3]), + ([4, 1], [4, 3]), + ([4, 3], [5, 2]), + ([2, 1], [5, 2]), + ([4, 1], [5, 2]), + ], + id="tiny ellipse", ), - ( + pytest.param( small_circle, [ ([0, 1], [1, 0]), @@ -153,188 +239,112 @@ def test_hulls(shape: npt.NDArray, upper_target: list, lower_target: list) -> No ([3, 0], [4, 3]), ([4, 1], [4, 3]), ], + id="small circle", ), - ( + pytest.param( holo_circle, [ + ([1, 2], [2, 1]), + ([1, 2], [4, 1]), + ([1, 2], [5, 2]), + ([1, 2], [5, 4]), + ([1, 2], [1, 4]), + ([1, 4], [2, 1]), ([1, 4], [4, 1]), - ([1, 4], [8, 1]), - ([1, 4], [11, 4]), - ([1, 4], [11, 8]), - ([1, 4], [1, 8]), - ([1, 8], [4, 1]), - ([1, 8], [8, 1]), - ([1, 8], [11, 4]), - ([1, 8], [11, 8]), - ([1, 4], [4, 11]), - ([4, 1], [4, 11]), - ([4, 11], [8, 1]), - ([4, 11], [11, 4]), - ([4, 11], [11, 8]), - ([1, 4], [8, 11]), - ([4, 1], [8, 11]), - ([8, 1], [8, 11]), - ([8, 11], [11, 4]), - ([8, 11], [11, 8]), - ([4, 1], [11, 8]), - ([8, 1], [11, 8]), - ([11, 4], [11, 8]), + ([1, 4], [5, 2]), + ([1, 4], [5, 4]), + ([1, 2], [2, 5]), + ([2, 1], [2, 5]), + ([2, 5], [4, 1]), + ([2, 5], [5, 2]), + ([2, 5], [5, 4]), + ([1, 2], [4, 5]), + ([2, 1], [4, 5]), + ([4, 1], [4, 5]), + ([4, 5], [5, 2]), + ([4, 5], [5, 4]), + ([2, 1], [5, 4]), + ([4, 1], [5, 4]), + ([5, 2], [5, 4]), ], + id="holo circle", ), - ( + pytest.param( holo_ellipse_horizontal, [ - ([1, 5], [2, 3]), - ([1, 5], [4, 1]), - ([1, 5], [6, 1]), - ([1, 5], [7, 2]), - ([1, 5], [8, 4]), - ([1, 5], [8, 10]), - ([1, 5], [1, 11]), - ([1, 11], [2, 3]), - ([1, 11], [4, 1]), - ([1, 11], [6, 1]), - ([1, 11], [7, 2]), - ([1, 11], [8, 4]), - ([1, 11], [8, 10]), - ([1, 5], [2, 13]), - ([2, 3], [2, 13]), - ([2, 13], [4, 1]), - ([2, 13], [6, 1]), - ([2, 13], [7, 2]), - ([2, 13], [8, 4]), - ([2, 13], [8, 10]), - ([1, 5], [3, 14]), - ([2, 3], [3, 14]), - ([3, 14], [4, 1]), - ([3, 14], [6, 1]), - ([3, 14], [7, 2]), - ([3, 14], [8, 4]), - ([3, 14], [8, 10]), - ([1, 5], [5, 14]), - ([2, 3], [5, 14]), - ([4, 1], [5, 14]), - ([5, 14], [6, 1]), - ([5, 14], [7, 2]), - ([5, 14], [8, 4]), - ([5, 14], [8, 10]), - ([1, 5], [7, 12]), - ([2, 3], [7, 12]), - ([4, 1], [7, 12]), - ([6, 1], [7, 12]), - ([7, 2], [7, 12]), - ([7, 12], [8, 4]), - ([7, 12], [8, 10]), - ([2, 3], [8, 10]), - ([4, 1], [8, 10]), - ([6, 1], [8, 10]), - ([7, 2], [8, 10]), - ([8, 4], [8, 10]), + ([1, 3], [3, 1]), + ([1, 3], [5, 1]), + ([1, 3], [7, 3]), + ([1, 3], [7, 7]), + ([1, 3], [1, 7]), + ([1, 7], [3, 1]), + ([1, 7], [5, 1]), + ([1, 7], [7, 3]), + ([1, 7], [7, 7]), + ([1, 3], [3, 9]), + ([3, 1], [3, 9]), + ([3, 9], [5, 1]), + ([3, 9], [7, 3]), + ([3, 9], [7, 7]), + ([1, 3], [5, 9]), + ([3, 1], [5, 9]), + ([5, 1], [5, 9]), + ([5, 9], [7, 3]), + ([5, 9], [7, 7]), + ([3, 1], [7, 7]), + ([5, 1], [7, 7]), + ([7, 3], [7, 7]), ], + id="holo ellipse horizontal", ), - ( + pytest.param( holo_ellipse_vertical, [ - ([1, 3], [2, 2]), - ([1, 3], [4, 1]), - ([1, 3], [10, 1]), - ([1, 3], [12, 2]), - ([1, 3], [14, 4]), - ([1, 3], [14, 6]), + ([1, 3], [3, 1]), + ([1, 3], [7, 1]), + ([1, 3], [9, 3]), + ([1, 3], [9, 5]), ([1, 3], [1, 5]), - ([1, 5], [2, 2]), - ([1, 5], [4, 1]), - ([1, 5], [10, 1]), - ([1, 5], [12, 2]), - ([1, 5], [14, 4]), - ([1, 5], [14, 6]), + ([1, 5], [3, 1]), + ([1, 5], [7, 1]), + ([1, 5], [9, 3]), + ([1, 5], [9, 5]), ([1, 3], [3, 7]), - ([2, 2], [3, 7]), - ([3, 7], [4, 1]), - ([3, 7], [10, 1]), - ([3, 7], [12, 2]), - ([3, 7], [14, 4]), - ([3, 7], [14, 6]), - ([1, 3], [5, 8]), - ([2, 2], [5, 8]), - ([4, 1], [5, 8]), - ([5, 8], [10, 1]), - ([5, 8], [12, 2]), - ([5, 8], [14, 4]), - ([5, 8], [14, 6]), - ([1, 3], [11, 8]), - ([2, 2], [11, 8]), - ([4, 1], [11, 8]), - ([10, 1], [11, 8]), - ([11, 8], [12, 2]), - ([11, 8], [14, 4]), - ([11, 8], [14, 6]), - ([1, 3], [13, 7]), - ([2, 2], [13, 7]), - ([4, 1], [13, 7]), - ([10, 1], [13, 7]), - ([12, 2], [13, 7]), - ([13, 7], [14, 4]), - ([13, 7], [14, 6]), - ([2, 2], [14, 6]), - ([4, 1], [14, 6]), - ([10, 1], [14, 6]), - ([12, 2], [14, 6]), - ([14, 4], [14, 6]), + ([3, 1], [3, 7]), + ([3, 7], [7, 1]), + ([3, 7], [9, 3]), + ([3, 7], [9, 5]), + ([1, 3], [7, 7]), + ([3, 1], [7, 7]), + ([7, 1], [7, 7]), + ([7, 7], [9, 3]), + ([7, 7], [9, 5]), + ([3, 1], [9, 5]), + ([7, 1], [9, 5]), + ([9, 3], [9, 5]), ], + id="holo ellipse vertical", ), - ( + pytest.param( holo_ellipse_angled, [ - ([1, 3], [3, 1]), - ([1, 3], [5, 1]), - ([1, 3], [7, 2]), - ([1, 3], [9, 4]), - ([1, 3], [10, 6]), - ([1, 3], [10, 10]), - ([1, 3], [1, 7]), - ([1, 7], [3, 1]), - ([1, 7], [5, 1]), - ([1, 7], [7, 2]), - ([1, 7], [9, 4]), - ([1, 7], [10, 6]), - ([1, 7], [10, 10]), - ([1, 3], [2, 9]), - ([2, 9], [3, 1]), - ([2, 9], [5, 1]), - ([2, 9], [7, 2]), - ([2, 9], [9, 4]), - ([2, 9], [10, 6]), - ([2, 9], [10, 10]), - ([1, 3], [4, 11]), - ([3, 1], [4, 11]), - ([4, 11], [5, 1]), - ([4, 11], [7, 2]), - ([4, 11], [9, 4]), - ([4, 11], [10, 6]), - ([4, 11], [10, 10]), - ([1, 3], [6, 12]), - ([3, 1], [6, 12]), - ([5, 1], [6, 12]), - ([6, 12], [7, 2]), - ([6, 12], [9, 4]), - ([6, 12], [10, 6]), - ([6, 12], [10, 10]), - ([1, 3], [8, 12]), - ([3, 1], [8, 12]), - ([5, 1], [8, 12]), - ([7, 2], [8, 12]), - ([8, 12], [9, 4]), - ([8, 12], [10, 6]), - ([8, 12], [10, 10]), - ([3, 1], [10, 10]), - ([5, 1], [10, 10]), - ([7, 2], [10, 10]), - ([9, 4], [10, 10]), - ([10, 6], [10, 10]), + ([1, 2], [2, 1]), + ([1, 2], [6, 5]), + ([1, 2], [6, 7]), + ([1, 2], [1, 4]), + ([1, 4], [2, 1]), + ([1, 4], [6, 5]), + ([1, 4], [6, 7]), + ([1, 2], [5, 8]), + ([2, 1], [5, 8]), + ([5, 8], [6, 5]), + ([5, 8], [6, 7]), + ([2, 1], [6, 7]), + ([6, 5], [6, 7]), ], + id="holo ellipse angled", ), - ( + pytest.param( curved_line, [ ([1, 5], [2, 3]), @@ -351,6 +361,7 @@ def test_hulls(shape: npt.NDArray, upper_target: list, lower_target: list) -> No ([7, 4], [8, 8]), ([8, 7], [8, 8]), ], + id="curved line", ), ], ) @@ -363,8 +374,40 @@ def test_all_pairs(shape: npt.NDArray, points_target: list) -> None: @pytest.mark.parametrize( ("shape", "points_target"), [ - (tiny_circle, [([0, 1], [2, 1]), ([0, 1], [1, 0]), ([1, 2], [1, 0]), ([1, 2], [0, 1]), ([2, 1], [0, 1])]), - ( + pytest.param( + tiny_circle, + [([0, 1], [2, 1]), ([0, 1], [1, 0]), ([1, 2], [1, 0]), ([1, 2], [0, 1]), ([2, 1], [0, 1])], + id="tiny circle", + ), + pytest.param( + tiny_square, + [([1, 1], [2, 2]), ([1, 1], [2, 1]), ([1, 2], [2, 1]), ([1, 2], [1, 1]), ([2, 2], [1, 1])], + id="tiny square", + ), + pytest.param( + tiny_triangle, + [([1, 1], [2, 1]), ([1, 2], [2, 1]), ([1, 2], [1, 1]), ([2, 1], [1, 1])], + id="tiny triangle", + ), + pytest.param( + tiny_rectangle, + [([1, 1], [3, 2]), ([1, 1], [3, 1]), ([1, 2], [3, 1]), ([1, 2], [1, 1]), ([3, 2], [1, 1])], + id="tiny rectangle", + ), + pytest.param( + tiny_ellipse, + [ + ([1, 2], [5, 2]), + ([1, 2], [4, 1]), + ([2, 3], [4, 1]), + ([2, 3], [2, 1]), + ([4, 3], [2, 1]), + ([4, 3], [1, 2]), + ([5, 2], [1, 2]), + ], + id="tiny ellipse", + ), + pytest.param( small_circle, [ ([0, 1], [4, 3]), @@ -377,78 +420,80 @@ def test_all_pairs(shape: npt.NDArray, points_target: list) -> None: ([3, 4], [0, 1]), ([4, 3], [0, 1]), ], + id="small circle", ), - ( + pytest.param( holo_circle, [ - ([1, 4], [11, 8]), - ([1, 4], [11, 4]), - ([1, 8], [11, 4]), - ([1, 8], [8, 1]), - ([4, 11], [8, 1]), - ([4, 11], [4, 1]), - ([8, 11], [4, 1]), - ([8, 11], [1, 4]), - ([11, 8], [1, 4]), + ([1, 2], [5, 4]), + ([1, 2], [5, 2]), + ([1, 4], [5, 2]), + ([1, 4], [4, 1]), + ([2, 5], [4, 1]), + ([2, 5], [2, 1]), + ([4, 5], [2, 1]), + ([4, 5], [1, 2]), + ([5, 4], [1, 2]), ], + id="holo circle", ), - ( + pytest.param( holo_ellipse_horizontal, [ - ([1, 5], [8, 10]), - ([1, 5], [8, 4]), - ([1, 11], [8, 4]), - ([1, 11], [7, 2]), - ([2, 13], [7, 2]), - ([2, 13], [6, 1]), - ([3, 14], [6, 1]), - ([3, 14], [4, 1]), - ([5, 14], [4, 1]), - ([5, 14], [2, 3]), - ([7, 12], [2, 3]), - ([7, 12], [1, 5]), - ([8, 10], [1, 5]), + ([1, 3], [7, 7]), + ([1, 3], [7, 3]), + ([1, 7], [7, 3]), + ([1, 7], [5, 1]), + ([3, 9], [5, 1]), + ([3, 9], [3, 1]), + ([5, 9], [3, 1]), + ([5, 9], [1, 3]), + ([7, 7], [1, 3]), ], + id="holo ellipse horizontal", ), - ( + pytest.param( holo_ellipse_vertical, [ - ([1, 3], [14, 6]), - ([1, 3], [14, 4]), - ([1, 5], [14, 4]), - ([1, 5], [12, 2]), - ([3, 7], [12, 2]), - ([3, 7], [10, 1]), - ([5, 8], [10, 1]), - ([5, 8], [4, 1]), - ([11, 8], [4, 1]), - ([11, 8], [2, 2]), - ([13, 7], [2, 2]), - ([13, 7], [1, 3]), - ([14, 6], [1, 3]), + ([1, 3], [9, 5]), + ([1, 3], [9, 3]), + ([1, 5], [9, 3]), + ([1, 5], [7, 1]), + ([3, 7], [7, 1]), + ([3, 7], [3, 1]), + ([7, 7], [3, 1]), + ([7, 7], [1, 3]), + ([9, 5], [1, 3]), ], + id="holo ellipse vertical", ), - ( + pytest.param( holo_ellipse_angled, [ - ([1, 3], [10, 10]), - ([1, 3], [10, 6]), - ([1, 7], [10, 6]), - ([1, 7], [9, 4]), - ([2, 9], [9, 4]), - ([2, 9], [7, 2]), - ([4, 11], [7, 2]), - ([4, 11], [5, 1]), - ([6, 12], [5, 1]), - ([6, 12], [3, 1]), - ([8, 12], [3, 1]), - ([8, 12], [1, 3]), - ([10, 10], [1, 3]), + ([1, 2], [6, 7]), + ([1, 2], [6, 5]), + ([1, 4], [6, 5]), + ([1, 4], [2, 1]), + ([5, 8], [2, 1]), + ([5, 8], [1, 2]), + ([6, 7], [1, 2]), ], + id="holo ellipse angled", ), - # ( + # pytest.param( # curved_line, - # [], + # [ + # ([1, 5], [8, 8]), + # ([1, 5], [8, 7]), + # ([1, 5], [7, 4]), + # ([1, 5], [6, 2]), + # ([1, 5], [5, 1]), + # ([1, 5], [4, 1]), + # ([1, 5], [2, 3]), + # ([1, 5], [1, 5]), + # ([8, 8], [1, 5]), + # ], + # id="curved line", # ), ], ) @@ -467,13 +512,38 @@ def test_rotating_calipers(shape: npt.NDArray, points_target: list) -> None: "max_feret_coord_target", ), [ - (tiny_circle, 1.4142135623730951, ([0, 1], [1, 0]), 2, ([2, 1], [0, 1])), - (small_circle, 4.0, ([0, 1], [4, 1]), 4.47213595499958, ([4, 3], [0, 1])), - (holo_circle, 9.899494936611665, ([1, 8], [8, 1]), 10.770329614269007, ([11, 8], [1, 4])), - (holo_ellipse_horizontal, 7.0710678118654755, ([1, 5], [8, 4]), 13.341664064126334, ([3, 14], [6, 1])), - (holo_ellipse_vertical, 7.0710678118654755, ([5, 8], [4, 1]), 13.341664064126334, ([14, 6], [1, 3])), - (holo_ellipse_angled, 8.54400374531753, ([1, 7], [9, 4]), 12.083045973594572, ([8, 12], [3, 1])), - # (curved_line, 5.656854249492381, ([1, 5], [5, 1]), 8.06225774829855, ([8, 8], [4, 1])), + pytest.param(tiny_circle, 1.4142135623730951, ([0, 1], [1, 0]), 2, ([2, 1], [0, 1]), id="tiny circle"), + pytest.param(tiny_square, 1.0, ([1, 1], [2, 1]), 1.4142135623730951, ([2, 2], [1, 1]), id="tiny square"), + pytest.param(tiny_triangle, 1.0, ([1, 1], [2, 1]), 1.4142135623730951, ([1, 2], [2, 1]), id="tiny triangle"), + pytest.param(tiny_rectangle, 1.0, ([1, 2], [1, 1]), 2.23606797749979, ([3, 2], [1, 1]), id="tiny rectangle"), + pytest.param(tiny_ellipse, 2.0, ([2, 3], [2, 1]), 4.0, ([5, 2], [1, 2]), id="tiny ellipse"), + pytest.param(small_circle, 4.0, ([0, 1], [4, 1]), 4.47213595499958, ([4, 3], [0, 1]), id="small circle"), + pytest.param(holo_circle, 4.0, ([1, 2], [5, 2]), 4.47213595499958, ([5, 4], [1, 2]), id="holo circle"), + pytest.param( + holo_ellipse_horizontal, + 6.0, + ([1, 3], [7, 3]), + 8.246211251235321, + ([5, 9], [3, 1]), + id="holo ellipse horizontal", + ), + pytest.param( + holo_ellipse_vertical, + 6.0, + ([3, 7], [3, 1]), + 8.246211251235321, + ([9, 5], [1, 3]), + id="holo ellipse vertical", + ), + pytest.param( + holo_ellipse_angled, + 3.1622776601683795, + ([1, 4], [2, 1]), + 7.615773105863909, + ([5, 8], [2, 1]), + id="holo ellipse angled", + ), + # (curved_line, 5.656854249492381, ([1, 5], [5, 1]), 8.06225774829855, ([8, 8], [4, 1]), id="curved line"), ], ) def test_min_max_feret( @@ -502,17 +572,63 @@ def test_min_max_feret( "max_feret_coord_target", ), [ - (tiny_circle, 1.4142135623730951, ([0, 1], [1, 0]), 2, ([2, 1], [0, 1])), - (small_circle, 4.0, ([0, 1], [4, 1]), 4.47213595499958, ([4, 3], [0, 1])), - (holo_circle, 9.899494936611665, ([1, 8], [8, 1]), 10.770329614269007, ([11, 8], [1, 4])), - (holo_ellipse_horizontal, 7.0710678118654755, ([1, 5], [8, 4]), 13.341664064126334, ([3, 14], [6, 1])), - (holo_ellipse_vertical, 7.0710678118654755, ([5, 8], [4, 1]), 13.341664064126334, ([14, 6], [1, 3])), - (holo_ellipse_angled, 8.54400374531753, ([1, 7], [9, 4]), 12.083045973594572, ([8, 12], [3, 1])), - # (curved_line, 5.656854249492381, ([1, 5], [5, 1]), 8.06225774829855, ([8, 8], [4, 1])), - (filled_circle, 10.0, ([1, 3], [11, 3]), 11.661903789690601, ([11, 9], [1, 3])), - (filled_ellipse_horizontal, 4.0, ([3, 4], [7, 4]), 10.198039027185569, ([6, 13], [4, 3])), - (filled_ellipse_vertical, 4.0, ([4, 7], [4, 3]), 10.198039027185569, ([13, 6], [3, 4])), - (filled_ellipse_angled, 5.385164807134504, ([8, 9], [3, 7]), 8.94427190999916, ([4, 11], [8, 3])), + pytest.param(tiny_circle, 1.4142135623730951, ([0, 1], [1, 0]), 2, ([2, 1], [0, 1]), id="tiny circle"), + pytest.param(tiny_square, 1.0, ([1, 1], [2, 1]), 1.4142135623730951, ([2, 2], [1, 1]), id="tiny square"), + pytest.param(tiny_triangle, 1.0, ([1, 1], [2, 1]), 1.4142135623730951, ([1, 2], [2, 1]), id="tiny triangle"), + pytest.param(tiny_rectangle, 1.0, ([1, 2], [1, 1]), 2.23606797749979, ([3, 2], [1, 1]), id="tiny rectangle"), + pytest.param(tiny_ellipse, 2.0, ([2, 3], [2, 1]), 4.0, ([5, 2], [1, 2]), id="tiny ellipse"), + pytest.param(small_circle, 4.0, ([0, 1], [4, 1]), 4.47213595499958, ([4, 3], [0, 1]), id="small circle"), + pytest.param(holo_circle, 4.0, ([1, 2], [5, 2]), 4.47213595499958, ([5, 4], [1, 2]), id="holo circle"), + pytest.param( + holo_ellipse_horizontal, + 6.0, + ([1, 3], [7, 3]), + 8.246211251235321, + ([5, 9], [3, 1]), + id="holo ellipse horizontal", + ), + pytest.param( + holo_ellipse_vertical, + 6.0, + ([3, 7], [3, 1]), + 8.246211251235321, + ([9, 5], [1, 3]), + id="holo ellipse vertical", + ), + pytest.param( + holo_ellipse_angled, + 3.1622776601683795, + ([1, 4], [2, 1]), + 7.615773105863909, + ([5, 8], [2, 1]), + id="holo ellipse angled", + ), + # (curved_line, 5.656854249492381, ([1, 5], [5, 1]), 8.06225774829855, ([8, 8], [4, 1]), id="curved line"), + pytest.param(filled_circle, 6.0, ([1, 2], [7, 2]), 7.211102550927978, ([7, 6], [1, 2]), id="filled circle"), + pytest.param( + filled_ellipse_horizontal, + 4.0, + ([1, 2], [5, 2]), + 6.324555320336759, + ([4, 7], [2, 1]), + id="filled ellipse horizontal", + ), + pytest.param( + filled_ellipse_vertical, + 4.0, + ([2, 5], [2, 1]), + 6.324555320336759, + ([7, 4], [1, 2]), + id="filled ellipse vertical", + ), + pytest.param( + filled_ellipse_angled, + 5.385164807134504, + ([6, 7], [1, 5]), + 8.94427190999916, + ([2, 9], [6, 1]), + id="filled ellipse angled", + ), ], ) def test_get_feret_from_mask( @@ -533,28 +649,31 @@ def test_get_feret_from_mask( # Concatenate images to have two labeled objects within them holo_ellipse_angled2 = holo_ellipse_angled.copy() holo_ellipse_angled2[holo_ellipse_angled2 == 1] = 2 -holo_image = np.concatenate((holo_circle, holo_ellipse_angled2)) +# Need to pad the holo_circle +holo_image = np.concatenate((np.pad(holo_circle, pad_width=((0, 1), (0, 3))), holo_ellipse_angled2)) filled_ellipse_angled2 = filled_ellipse_angled.copy() filled_ellipse_angled2[filled_ellipse_angled2 == 1] = 2 -filled_image = np.concatenate((filled_circle, filled_ellipse_angled2)) +filled_image = np.concatenate((np.pad(filled_circle, pad_width=((0, 0), (0, 2))), filled_ellipse_angled2)) @pytest.mark.parametrize( ("shape", "target"), [ - ( + pytest.param( holo_image, { - 1: (9.899494936611665, ([1, 8], [8, 1]), 10.770329614269007, ([11, 8], [1, 4])), - 2: (8.54400374531753, ([15, 7], [23, 4]), 12.083045973594572, ([22, 12], [17, 1])), + 1: (4.0, ([1, 2], [5, 2]), 4.47213595499958, ([5, 4], [1, 2])), + 2: (3.1622776601683795, ([9, 4], [10, 1]), 7.615773105863909, ([13, 8], [10, 1])), }, + id="holo image", ), - ( + pytest.param( filled_image, { - 1: (10.0, ([1, 3], [11, 3]), 11.661903789690601, ([11, 9], [1, 3])), - 2: (5.385164807134504, ([22, 9], [17, 7]), 8.94427190999916, ([18, 11], [22, 3])), + 1: (6.0, ([1, 2], [7, 2]), 7.211102550927978, ([7, 6], [1, 2])), + 2: (5.385164807134504, ([15, 7], [10, 5]), 8.94427190999916, ([11, 9], [15, 1])), }, + id="filled image", ), ], ) diff --git a/topostats/measure/feret.py b/topostats/measure/feret.py index a4e965cdb1..73f98b1d04 100644 --- a/topostats/measure/feret.py +++ b/topostats/measure/feret.py @@ -93,14 +93,15 @@ def rotating_calipers(points: npt.NDArray) -> list[tuple[list, list]]: Between two parallel lines that touch one point each, and yields the sequence of pairs of points touched by each pair of lines. + + `Rotating Calipers _` """ upper_hull, lower_hull = hulls(points) i = 0 j = len(lower_hull) - 1 while i < len(upper_hull) or j > 0: yield upper_hull[i], lower_hull[j] - # if all the way through one sid eof hull, advance the other side - # if i == len(upper_hull) - 1: + # if all the way through one side of hull, advance the other side if i == len(upper_hull): j -= 1 elif j == 0: From 222ada21015c77b83a0f9fe011cd3b20a6591839 Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Thu, 4 Jan 2024 08:52:54 +0000 Subject: [PATCH 04/35] codespell corrections --- topostats/measure/feret.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/topostats/measure/feret.py b/topostats/measure/feret.py index 73f98b1d04..05945766b9 100644 --- a/topostats/measure/feret.py +++ b/topostats/measure/feret.py @@ -47,7 +47,7 @@ def hulls(points: npt.NDArray) -> tuple[list, list]: Returns ------- Tuple[list, list] - Tuple of two Numpy arrays of the original co-ordinates split into upper and lower hulls. + Tuple of two Numpy arrays of the original coordinates split into upper and lower hulls. """ upper_hull = [] lower_hull = [] @@ -71,7 +71,7 @@ def all_pairs(points: npt.NDArray) -> list[tuple[list, list]]: Parameters ---------- points: npt.NDArray - Numpy array of co-ordinates defining the outline of an object.mro + Numpy array of coordinates defining the outline of an object.mro Returns ------- @@ -127,7 +127,7 @@ def min_max_feret(points: npt.NDArray) -> tuple[float, tuple[int, int], float, t Returns ------- tuple - Tuple of the minimum feret distance and its co-ordinates and the maximum feret distance and its co-ordinates. + Tuple of the minimum feret distance and its coordinates and the maximum feret distance and its coordinates. """ squared_distance_per_pair = [ ((p[0] - q[0]) ** 2 + (p[1] - q[1]) ** 2, (p, q)) for p, q in rotating_calipers(points) @@ -140,7 +140,7 @@ def min_max_feret(points: npt.NDArray) -> tuple[float, tuple[int, int], float, t def get_feret_from_mask(mask_im: npt.NDArray) -> tuple[float, tuple[int, int], float, tuple[int, int]]: """Calculate the minimum and maximum feret diameter of the foreground object of a binary mask. - The outline of the object is calculated and the pixel co-ordinates transformed to a list for calculation. + The outline of the object is calculated and the pixel coordinates transformed to a list for calculation. Parameters ---------- @@ -161,7 +161,7 @@ def get_feret_from_mask(mask_im: npt.NDArray) -> tuple[float, tuple[int, int], f def get_feret_from_labelim(label_image: npt.NDArray, labels: None | list | set = None) -> dict: - """Calculate the minimum and maximum feret and co-ordinates of each connected component within a labelled image. + """Calculate the minimum and maximum feret and coordinates of each connected component within a labelled image. If labels is None, all labels > 0 will be analyzed. @@ -177,7 +177,7 @@ def get_feret_from_labelim(label_image: npt.NDArray, labels: None | list | set = ------- dict Dictionary with labels as keys and values are a tuple of the minimum and maximum feret distances and - co-ordinates. + coordinates. """ if labels is None: labels = set(np.unique(label_image)) - {0} From 83fee0fee353cc95c0ef883443310c2fedcb0863 Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Thu, 11 Jan 2024 12:17:16 +0000 Subject: [PATCH 05/35] Investigating why rotating calipers fail on linear --- tests/measure/test_feret.py | 234 ++++++++++++++++++------------------ topostats/measure/feret.py | 16 +++ 2 files changed, 133 insertions(+), 117 deletions(-) diff --git a/tests/measure/test_feret.py b/tests/measure/test_feret.py index 17d0047a90..308f6a953e 100644 --- a/tests/measure/test_feret.py +++ b/tests/measure/test_feret.py @@ -374,127 +374,127 @@ def test_all_pairs(shape: npt.NDArray, points_target: list) -> None: @pytest.mark.parametrize( ("shape", "points_target"), [ - pytest.param( - tiny_circle, - [([0, 1], [2, 1]), ([0, 1], [1, 0]), ([1, 2], [1, 0]), ([1, 2], [0, 1]), ([2, 1], [0, 1])], - id="tiny circle", - ), - pytest.param( - tiny_square, - [([1, 1], [2, 2]), ([1, 1], [2, 1]), ([1, 2], [2, 1]), ([1, 2], [1, 1]), ([2, 2], [1, 1])], - id="tiny square", - ), - pytest.param( - tiny_triangle, - [([1, 1], [2, 1]), ([1, 2], [2, 1]), ([1, 2], [1, 1]), ([2, 1], [1, 1])], - id="tiny triangle", - ), - pytest.param( - tiny_rectangle, - [([1, 1], [3, 2]), ([1, 1], [3, 1]), ([1, 2], [3, 1]), ([1, 2], [1, 1]), ([3, 2], [1, 1])], - id="tiny rectangle", - ), - pytest.param( - tiny_ellipse, - [ - ([1, 2], [5, 2]), - ([1, 2], [4, 1]), - ([2, 3], [4, 1]), - ([2, 3], [2, 1]), - ([4, 3], [2, 1]), - ([4, 3], [1, 2]), - ([5, 2], [1, 2]), - ], - id="tiny ellipse", - ), - pytest.param( - small_circle, - [ - ([0, 1], [4, 3]), - ([0, 1], [4, 1]), - ([0, 3], [4, 1]), - ([0, 3], [3, 0]), - ([1, 4], [3, 0]), - ([1, 4], [1, 0]), - ([3, 4], [1, 0]), - ([3, 4], [0, 1]), - ([4, 3], [0, 1]), - ], - id="small circle", - ), - pytest.param( - holo_circle, - [ - ([1, 2], [5, 4]), - ([1, 2], [5, 2]), - ([1, 4], [5, 2]), - ([1, 4], [4, 1]), - ([2, 5], [4, 1]), - ([2, 5], [2, 1]), - ([4, 5], [2, 1]), - ([4, 5], [1, 2]), - ([5, 4], [1, 2]), - ], - id="holo circle", - ), - pytest.param( - holo_ellipse_horizontal, - [ - ([1, 3], [7, 7]), - ([1, 3], [7, 3]), - ([1, 7], [7, 3]), - ([1, 7], [5, 1]), - ([3, 9], [5, 1]), - ([3, 9], [3, 1]), - ([5, 9], [3, 1]), - ([5, 9], [1, 3]), - ([7, 7], [1, 3]), - ], - id="holo ellipse horizontal", - ), - pytest.param( - holo_ellipse_vertical, - [ - ([1, 3], [9, 5]), - ([1, 3], [9, 3]), - ([1, 5], [9, 3]), - ([1, 5], [7, 1]), - ([3, 7], [7, 1]), - ([3, 7], [3, 1]), - ([7, 7], [3, 1]), - ([7, 7], [1, 3]), - ([9, 5], [1, 3]), - ], - id="holo ellipse vertical", - ), - pytest.param( - holo_ellipse_angled, - [ - ([1, 2], [6, 7]), - ([1, 2], [6, 5]), - ([1, 4], [6, 5]), - ([1, 4], [2, 1]), - ([5, 8], [2, 1]), - ([5, 8], [1, 2]), - ([6, 7], [1, 2]), - ], - id="holo ellipse angled", - ), # pytest.param( - # curved_line, + # tiny_circle, + # [([0, 1], [2, 1]), ([0, 1], [1, 0]), ([1, 2], [1, 0]), ([1, 2], [0, 1]), ([2, 1], [0, 1])], + # id="tiny circle", + # ), + # pytest.param( + # tiny_square, + # [([1, 1], [2, 2]), ([1, 1], [2, 1]), ([1, 2], [2, 1]), ([1, 2], [1, 1]), ([2, 2], [1, 1])], + # id="tiny square", + # ), + # pytest.param( + # tiny_triangle, + # [([1, 1], [2, 1]), ([1, 2], [2, 1]), ([1, 2], [1, 1]), ([2, 1], [1, 1])], + # id="tiny triangle", + # ), + # pytest.param( + # tiny_rectangle, + # [([1, 1], [3, 2]), ([1, 1], [3, 1]), ([1, 2], [3, 1]), ([1, 2], [1, 1]), ([3, 2], [1, 1])], + # id="tiny rectangle", + # ), + # pytest.param( + # tiny_ellipse, + # [ + # ([1, 2], [5, 2]), + # ([1, 2], [4, 1]), + # ([2, 3], [4, 1]), + # ([2, 3], [2, 1]), + # ([4, 3], [2, 1]), + # ([4, 3], [1, 2]), + # ([5, 2], [1, 2]), + # ], + # id="tiny ellipse", + # ), + # pytest.param( + # small_circle, + # [ + # ([0, 1], [4, 3]), + # ([0, 1], [4, 1]), + # ([0, 3], [4, 1]), + # ([0, 3], [3, 0]), + # ([1, 4], [3, 0]), + # ([1, 4], [1, 0]), + # ([3, 4], [1, 0]), + # ([3, 4], [0, 1]), + # ([4, 3], [0, 1]), + # ], + # id="small circle", + # ), + # pytest.param( + # holo_circle, + # [ + # ([1, 2], [5, 4]), + # ([1, 2], [5, 2]), + # ([1, 4], [5, 2]), + # ([1, 4], [4, 1]), + # ([2, 5], [4, 1]), + # ([2, 5], [2, 1]), + # ([4, 5], [2, 1]), + # ([4, 5], [1, 2]), + # ([5, 4], [1, 2]), + # ], + # id="holo circle", + # ), + # pytest.param( + # holo_ellipse_horizontal, + # [ + # ([1, 3], [7, 7]), + # ([1, 3], [7, 3]), + # ([1, 7], [7, 3]), + # ([1, 7], [5, 1]), + # ([3, 9], [5, 1]), + # ([3, 9], [3, 1]), + # ([5, 9], [3, 1]), + # ([5, 9], [1, 3]), + # ([7, 7], [1, 3]), + # ], + # id="holo ellipse horizontal", + # ), + # pytest.param( + # holo_ellipse_vertical, + # [ + # ([1, 3], [9, 5]), + # ([1, 3], [9, 3]), + # ([1, 5], [9, 3]), + # ([1, 5], [7, 1]), + # ([3, 7], [7, 1]), + # ([3, 7], [3, 1]), + # ([7, 7], [3, 1]), + # ([7, 7], [1, 3]), + # ([9, 5], [1, 3]), + # ], + # id="holo ellipse vertical", + # ), + # pytest.param( + # holo_ellipse_angled, # [ - # ([1, 5], [8, 8]), - # ([1, 5], [8, 7]), - # ([1, 5], [7, 4]), - # ([1, 5], [6, 2]), - # ([1, 5], [5, 1]), - # ([1, 5], [4, 1]), - # ([1, 5], [2, 3]), - # ([1, 5], [1, 5]), - # ([8, 8], [1, 5]), + # ([1, 2], [6, 7]), + # ([1, 2], [6, 5]), + # ([1, 4], [6, 5]), + # ([1, 4], [2, 1]), + # ([5, 8], [2, 1]), + # ([5, 8], [1, 2]), + # ([6, 7], [1, 2]), # ], - # id="curved line", + # id="holo ellipse angled", # ), + pytest.param( + curved_line, + [ + ([1, 5], [8, 8]), + ([1, 5], [8, 7]), + ([1, 5], [7, 4]), + ([1, 5], [6, 2]), + ([1, 5], [5, 1]), + ([1, 5], [4, 1]), + ([1, 5], [2, 3]), + ([1, 5], [1, 5]), + ([8, 8], [1, 5]), + ], + id="curved line", + ), ], ) def test_rotating_calipers(shape: npt.NDArray, points_target: list) -> None: diff --git a/topostats/measure/feret.py b/topostats/measure/feret.py index 05945766b9..1b8d29f40a 100644 --- a/topostats/measure/feret.py +++ b/topostats/measure/feret.py @@ -99,7 +99,22 @@ def rotating_calipers(points: npt.NDArray) -> list[tuple[list, list]]: upper_hull, lower_hull = hulls(points) i = 0 j = len(lower_hull) - 1 + counter = 0 + print(f"Used for i {len(upper_hull)=}") + print(f"Used for j {len(lower_hull)=}") while i < len(upper_hull) or j > 0: + print(f"\n{counter=}") + print(f"{i=}") + print(f"{j=}") + print(f"upper_hull i + 1 : {i + 1}") + print(f"lower_hull j - 1 : {j + 1}") + print(f"i == len(upper_hull) : {(i == len(upper_hull))=}") + print(f"j == 0 : {(j == 0)=}") + a = upper_hull[i + 1][1] - upper_hull[i][1] + b = lower_hull[j][0] - lower_hull[j - 1][0] + c = lower_hull[j][1] - lower_hull[j - 1][1] + d = upper_hull[i + 1][0] - upper_hull[i][0] + print(f"LONG : {((a * b) > (c * d))=}") yield upper_hull[i], lower_hull[j] # if all the way through one side of hull, advance the other side if i == len(upper_hull): @@ -114,6 +129,7 @@ def rotating_calipers(points: npt.NDArray) -> list[tuple[list, list]]: i += 1 else: j -= 1 + counter += 1 def min_max_feret(points: npt.NDArray) -> tuple[float, tuple[int, int], float, tuple[int, int]]: From 3f728f91be2bf50b9e8ed216370227cdbe8aa266 Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Fri, 12 Jan 2024 12:01:12 +0000 Subject: [PATCH 06/35] Restore cmap to config; simpler config of cmap/dpi/image format Closes #776 + Aligns command line and configuration field names with those in matplotlibrc files. + Restores the `cmap` configuration option to `default_config.yaml` and introduces `savefig_dpi` option. + Adds command line options for setting DPI (`--savefig-dpi`), Colormap (`--cmap`)and Output file format (`--savefig-format`). + Expands documentation on how to use custom configuration files or command line options to set the DPI/Colormap/Output format. + Updates the header to `topostats.mplstyle` to explain how to use it as typically users will have created a copy of the file (after the convenience function `topostats create-matplotlibrc` was introduced with #773). + To achieve this the dictionary `config["plotting"]` needed explicitly updating as the `update_config()` function doesn't update nested configurations (since this is the first PR that introduces command line options that modify any of the values in the nested dictionaries). + Updates options for `topostats toposum`` to align with `savefig_format` and adds flag to entry point so output format is consistent. + Updates and expands the configuration documentation explaining how to use these conveniences. As a consequence quite a few files are touched to ensure that validation and processing functions all have variables that align with those in the configuration. If users could test this it would be very much appreciated, if you use the Git installed version something like the following would switch branches and allow you test it. ``` conda create --name topostats-config # Create and activate a virtual env specific to this conda activate topostats-config cd ~/path/to/TopoStats git pull git checkout ns-rse/776-config-jigging pip install -e . topostats process --output-dir base topostats create-config test_config.yaml # Create test_config.yaml to try changing parameters topostats process --config test_config.yaml --output-dir test1 topostats process --output-dir test2 --savefig-dpi 10 --cmap rainbow --savefig-format svg topostats process --config test_config.yaml --output-dir test3 --savefig-dpi 80 --cmap viridis --savefig-format pdf ``` Each invocation of `topostats process` will save output to its own directory (either `base`, `test1`, `test2` and `test3`) for comparison. There should be differences between each `base` the values used in `test_config.yaml` and saved under `test1` and those under `test2` and `test3` should also differ. I would really appreciate feedback on the documentation as without clear documentation it is perhaps confusing how the components interact and work and can be modified and getting this as clear as possible will be really helpful. --- docs/configuration.md | 228 +++++++++++++++++++++-------- tests/test_plotting.py | 3 +- tests/test_plottingfuncs.py | 3 +- tests/test_processing.py | 5 +- topostats/default_config.yaml | 4 +- topostats/entry_point.py | 35 ++++- topostats/plotting.py | 10 +- topostats/plotting_dictionary.yaml | 68 ++++----- topostats/plottingfuncs.py | 29 ++-- topostats/processing.py | 6 +- topostats/run_topostats.py | 16 +- topostats/summary_config.yaml | 2 +- topostats/topostats.mplstyle | 23 +-- topostats/utils.py | 1 + topostats/validation.py | 90 +++++++----- 15 files changed, 349 insertions(+), 174 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index 4e28f4347f..97c266c307 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -54,55 +54,58 @@ above: Aside from the comments in YAML file itself the fields are described below. -| Section | Sub-Section | Data Type | Default | Description | -| :-------------- | :-------------------------------- | :--------- | :-------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `base_dir` | | string | `./` | Directory to recursively search for files within.[^1] | -| `output_dir` | | string | `./output` | Directory that output should be saved to.[^1] | -| `log_level` | | string | `info` | Verbosity of logging, options are (in increasing order) `warning`, `error`, `info`, `debug`. | -| `cores` | | integer | `2` | Number of cores to run parallel processes on. | -| `file_ext` | | string | `.spm` | File extensions to search for. | -| `loading` | `channel` | string | `Height` | The channel of data to be processed, what this is will depend on the file-format you are processing and the channel you wish to process. | -| `filter` | `run` | boolean | `true` | Whether to run the filtering stage, without this other stages won't run so leave as `true`. | -| | `threshold_method` | str | `std_dev` | Threshold method for filtering, options are `ostu`, `std_dev` or `absolute`. | -| | `otsu_threshold_multiplier` | float | `1.0` | Factor by which the derived Otsu Threshold should be scaled. | -| | `threshold_std_dev` | dictionary | `10.0, 1.0` | A pair of values that scale the standard deviation, after scaling the standard deviation `below` is subtracted from the image mean to give the below/lower threshold and the `above` is added to the image mean to give the above/upper threshold. These values should _always_ be positive. | -| | `threshold_absolute` | dictionary | `-1.0, 1.0` | Below (first) and above (second) absolute threshold for separating data from the image background. | -| | `gaussian_size` | float | `0.5` | The number of standard deviations to build the Gaussian kernel and thus affects the degree of blurring. See [skimage.filters.gaussian](https://scikit-image.org/docs/dev/api/skimage.filters.html#skimage.filters.gaussian) and `sigma` for more information. | -| | `gaussian_mode` | string | `nearest` | | -| `grains` | `run` | boolean | `true` | Whether to run grain finding. Options `true`, `false` | -| | `row_alignment_quantile` | float | `0.5` | Quantile (0.0 to 1.0) to be used to determine the average background for the image. below values may improve flattening of large features. | -| | `smallest_grain_size_nm2` | int | `100` | The smallest size of grains to be included (in nm^2), anything smaller than this is considered noise and removed. **NB** must be `> 0.0`. | -| | `threshold_method` | float | `std_dev` | Threshold method for grain finding. Options : `otsu`, `std_dev`, `absolute` | -| | `otsu_threshold_multiplier` | | `1.0` | Factor by which the derived Otsu Threshold should be scaled. | -| | `threshold_std_dev` | dictionary | `10.0, 1.0` | A pair of values that scale the standard deviation, after scaling the standard deviation `below` is subtracted from the image mean to give the below/lower threshold and the `above` is added to the image mean to give the above/upper threshold. These values should _always_ be positive. | -| | `threshold_absolute` | dictionary | `-1.0, 1.0` | Below (first), above (second) absolute threshold for separating grains from the image background. | -| | `direction` | | `above` | Defines whether to look for grains above or below thresholds or both. Options: `above`, `below`, `both` | -| | `smallest_grain_size` | int | `50` | Catch-all value for the minimum size of grains. Measured in nanometres squared. All grains with area below than this value are removed. | -| | `absolute_area_threshold` | dictionary | `[300, 3000], [null, null]` | Area thresholds for above the image background (first) and below the image background (second), which grain sizes are permitted, measured in nanometres squared. All grains outside this area range are removed. | -| | `remove_edge_intersecting_grains` | boolean | `true` | Whether to remove grains that intersect the image border. _Do not change this unless you know what you are doing_. This will ruin any statistics relating to grain size, shape and DNA traces. | -| `grainstats` | `run` | boolean | `true` | Whether to calculate grain statistics. Options : `true`, `false` | -| | `cropped_size` | float | `40.0` | Force cropping of grains to this length (in nm) of square cropped images (can take `-1` for grain-sized box) | -| | `edge_detection_method` | str | `binary_erosion` | Type of edge detection method to use when determining the edges of grain masks before calculating statistics on them. Options : `binary_erosion`, `canny`. | -| `dnatracing` | `run` | boolean | `true` | Whether to run DNA Tracing. Options : true, false | -| | `min_skeleton_size` | int | `10` | The minimum number of pixels a skeleton should be for statistics to be calculated on it. Anything smaller than this is dropped but grain statistics are retained. | -| | `skeletonisation_method` | str | `topostats` | Skeletonisation method to use, possible options are `zhang`, `lee`, `thin` (from [Scikit-image Morphology module](https://scikit-image.org/docs/stable/api/skimage.morphology.html)) or the original bespoke TopoStas method `topostats`. | -| | `spline_step_size` | float | `7.0e-9` | The sampling rate of the spline in metres. This is the frequency at which points are sampled from fitted traces to act as guide points for the splining process using scipy's splprep. | -| | `spline_linear_smoothing` | float | `5.0` | The amount of smoothing to apply to splines of linear molecule traces. | -| | `spline_circular_smoothing` | float | `0.0` | The amount of smoothing to apply to splines of circular molecule traces. | -| | `pad_width` | int | 10 | Padding for individual grains when tracing. This is sometimes required if the bounding box around grains is too tight and they touch the edge of the image. | -| | `cores` | int | 1 | Number of cores to use for tracing. **NB** Currently this is NOT used and should be left commented in the YAML file. | -| `plotting` | `run` | boolean | `true` | Whether to run plotting. Options : `true`, `false` | -| | `style` | str | `topostats.mplstyle` | The default loads a custom [matplotlibrc param file](https://matplotlib.org/stable/users/explain/customizing.html#the-matplotlibrc-file) that comes with TopoStats. Users can specify the path to their own style file as an alternative. | -| | `save_format` | string | `png` | Format to save images in, see [matplotlib.pyplot.savefig](https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.savefig.html) | -| | `pixel_interpolation` | string | null | Interpolation method for image plots. Recommended default 'null' prevents banding that occurs in some images. If interpolation is needed, we recommend `gaussian`. See [matplotlib imshow interpolations documentation](https://matplotlib.org/stable/gallery/images_contours_and_fields/interpolation_methods.html) for details. | -| | `image_set` | string | `all` | Which images to plot. Options : `all`, `core` | -| | `zrange` | list | `[0, 3]` | Low (first number) and high (second number) height range for core images (can take [null, null]). **NB** `low <= high` otherwise you will see a `ValueError: minvalue must be less than or equal to maxvalue` error. | -| | `colorbar` | boolean | `true` | Whether to include the colorbar scale in plots. Options `true`, `false` | -| | `axes` | boolean | `true` | Whether to include the axes in the produced plots. | -| | `num_ticks` | null / int | `null` | Number of ticks to have along the x and y axes. Options : `null` (auto) or an integer >1 | -| | `histogram_log_axis` | boolean | `false` | Whether to plot hisograms using a logarithmic scale or not. Options: `true`, `false`. | -| `summary_stats` | `run` | boolean | `true` | Whether to generate summary statistical plots of the distribution of different metrics grouped by the image that has been processed. | -| | `config` | str | `null` | Path to a summary config YAML file that configures/controls how plotting is done. If one is not specified either the command line argument `--summary_config` value will be used or if that option is not invoked the default `topostats/summary_config.yaml` will be used. | +| Section | Sub-Section | Data Type | Default | Description | +| :-------------- | :-------------------------------- | :------------- | :-------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `base_dir` | | string | `./` | Directory to recursively search for files within.[^1] | +| `output_dir` | | string | `./output` | Directory that output should be saved to.[^1] | +| `log_level` | | string | `info` | Verbosity of logging, options are (in increasing order) `warning`, `error`, `info`, `debug`. | +| `cores` | | integer | `2` | Number of cores to run parallel processes on. | +| `file_ext` | | string | `.spm` | File extensions to search for. | +| `loading` | `channel` | string | `Height` | The channel of data to be processed, what this is will depend on the file-format you are processing and the channel you wish to process. | +| `filter` | `run` | boolean | `true` | Whether to run the filtering stage, without this other stages won't run so leave as `true`. | +| | `threshold_method` | str | `std_dev` | Threshold method for filtering, options are `ostu`, `std_dev` or `absolute`. | +| | `otsu_threshold_multiplier` | float | `1.0` | Factor by which the derived Otsu Threshold should be scaled. | +| | `threshold_std_dev` | dictionary | `10.0, 1.0` | A pair of values that scale the standard deviation, after scaling the standard deviation `below` is subtracted from the image mean to give the below/lower threshold and the `above` is added to the image mean to give the above/upper threshold. These values should _always_ be positive. | +| | `threshold_absolute` | dictionary | `-1.0, 1.0` | Below (first) and above (second) absolute threshold for separating data from the image background. | +| | `gaussian_size` | float | `0.5` | The number of standard deviations to build the Gaussian kernel and thus affects the degree of blurring. See [skimage.filters.gaussian](https://scikit-image.org/docs/dev/api/skimage.filters.html#skimage.filters.gaussian) and `sigma` for more information. | +| | `gaussian_mode` | string | `nearest` | | +| `grains` | `run` | boolean | `true` | Whether to run grain finding. Options `true`, `false` | +| | `row_alignment_quantile` | float | `0.5` | Quantile (0.0 to 1.0) to be used to determine the average background for the image. below values may improve flattening of large features. | +| | `smallest_grain_size_nm2` | int | `100` | The smallest size of grains to be included (in nm^2), anything smaller than this is considered noise and removed. **NB** must be `> 0.0`. | +| | `threshold_method` | float | `std_dev` | Threshold method for grain finding. Options : `otsu`, `std_dev`, `absolute` | +| | `otsu_threshold_multiplier` | | `1.0` | Factor by which the derived Otsu Threshold should be scaled. | +| | `threshold_std_dev` | dictionary | `10.0, 1.0` | A pair of values that scale the standard deviation, after scaling the standard deviation `below` is subtracted from the image mean to give the below/lower threshold and the `above` is added to the image mean to give the above/upper threshold. These values should _always_ be positive. | +| | `threshold_absolute` | dictionary | `-1.0, 1.0` | Below (first), above (second) absolute threshold for separating grains from the image background. | +| | `direction` | | `above` | Defines whether to look for grains above or below thresholds or both. Options: `above`, `below`, `both` | +| | `smallest_grain_size` | int | `50` | Catch-all value for the minimum size of grains. Measured in nanometres squared. All grains with area below than this value are removed. | +| | `absolute_area_threshold` | dictionary | `[300, 3000], [null, null]` | Area thresholds for above the image background (first) and below the image background (second), which grain sizes are permitted, measured in nanometres squared. All grains outside this area range are removed. | +| | `remove_edge_intersecting_grains` | boolean | `true` | Whether to remove grains that intersect the image border. _Do not change this unless you know what you are doing_. This will ruin any statistics relating to grain size, shape and DNA traces. | +| `grainstats` | `run` | boolean | `true` | Whether to calculate grain statistics. Options : `true`, `false` | +| | `cropped_size` | float | `40.0` | Force cropping of grains to this length (in nm) of square cropped images (can take `-1` for grain-sized box) | +| | `edge_detection_method` | str | `binary_erosion` | Type of edge detection method to use when determining the edges of grain masks before calculating statistics on them. Options : `binary_erosion`, `canny`. | +| `dnatracing` | `run` | boolean | `true` | Whether to run DNA Tracing. Options : true, false | +| | `min_skeleton_size` | int | `10` | The minimum number of pixels a skeleton should be for statistics to be calculated on it. Anything smaller than this is dropped but grain statistics are retained. | +| | `skeletonisation_method` | str | `topostats` | Skeletonisation method to use, possible options are `zhang`, `lee`, `thin` (from [Scikit-image Morphology module](https://scikit-image.org/docs/stable/api/skimage.morphology.html)) or the original bespoke TopoStas method `topostats`. | +| | `spline_step_size` | float | `7.0e-9` | The sampling rate of the spline in metres. This is the frequency at which points are sampled from fitted traces to act as guide points for the splining process using scipy's splprep. | +| | `spline_linear_smoothing` | float | `5.0` | The amount of smoothing to apply to splines of linear molecule traces. | +| | `spline_circular_smoothing` | float | `0.0` | The amount of smoothing to apply to splines of circular molecule traces. | +| | `pad_width` | int | 10 | Padding for individual grains when tracing. This is sometimes required if the bounding box around grains is too tight and they touch the edge of the image. | +| | `cores` | int | 1 | Number of cores to use for tracing. **NB** Currently this is NOT used and should be left commented in the YAML file. | +| `plotting` | `run` | boolean | `true` | Whether to run plotting. Options : `true`, `false` | +| | `style` | str | `topostats.mplstyle` | The default loads a custom [matplotlibrc param file](https://matplotlib.org/stable/users/explain/customizing.html#the-matplotlibrc-file) that comes with TopoStats. Users can specify the path to their own style file as an alternative. | +| | `save_format` | string | `null` | Format to save images in, `null` defaults to `png` see [matplotlib.pyplot.savefig](https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.savefig.html) | +| | `savefig_dpi` | string / float | `null` | Dots Per Inch (DPI), if `null` then the value `figure` is used, for other values (typically integers) see [#further-customisation] and [Matplotlib](https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.savefig.html). | +| | `pixel_interpolation` | string | `null` | Interpolation method for image plots. Recommended default 'null' prevents banding that occurs in some images. If interpolation is needed, we recommend `gaussian`. See [matplotlib imshow interpolations documentation](https://matplotlib.org/stable/gallery/images_contours_and_fields/interpolation_methods.html) for details. | +| | `image_set` | string | `all` | Which images to plot. Options : `all`, `core` | +| | `zrange` | list | `[0, 3]` | Low (first number) and high (second number) height range for core images (can take [null, null]). **NB** `low <= high` otherwise you will see a `ValueError: minvalue must be less than or equal to maxvalue` error. | +| | `colorbar` | boolean | `true` | Whether to include the colorbar scale in plots. Options `true`, `false` | +| | `axes` | boolean | `true` | Whether to include the axes in the produced plots. | +| | `num_ticks` | null / int | `null` | Number of ticks to have along the x and y axes. Options : `null` (auto) or an integer >1 | +| | `cmap` | string | `null` | Colormap/colourmap to use (defaults to 'nanoscope' if null (defined in `topostats/topostats.mplstyle`). Other options are 'afmhot', 'viridis' etc., see [Matplotlib : Choosing Colormaps](https://matplotlib.org/stable/users/explain/colors/colormaps.html). | +| | `mask_cmap` | string | `blu` | Color used when masking regions. Options `blu`, `jet_r` or any valid Matplotlib colour. | +| | `histogram_log_axis` | boolean | `false` | Whether to plot hisograms using a logarithmic scale or not. Options: `true`, `false`. | +| `summary_stats` | `run` | boolean | `true` | Whether to generate summary statistical plots of the distribution of different metrics grouped by the image that has been processed. | +| | `config` | str | `null` | Path to a summary config YAML file that configures/controls how plotting is done. If one is not specified either the command line argument `--summary_config` value will be used or if that option is not invoked the default `topostats/summary_config.yaml` will be used. | ## Summary Configuration @@ -140,8 +143,8 @@ TopoStats generates a number of images of the scans at various steps in the proc Python library [Matplotlib](matplotlib.org/stable/). A custom [`matplotlibrc`](https://matplotlib.org/stable/users/explain/customizing.html#the-matplotlibrc-file) file is included in TopoStats which defines the default parameters for generating images. This covers _all_ aspects of a plot that can be -customised, for example we define custom colour maps `nanoscope` and `afmhot` and by default the former is configured to -be used in this file. Other parameters that are customised are the `font.size` which affects axis labels and titles. +customised, for example we define custom colour maps `nanoscope` and `afmhot`. By default the former is configured to +be used. Other parameters that are customised are the `font.size` which affects axis labels and titles. If you wish to modify the look of all images that are output you can generate a copy of the default configuration using `topostats create-matplotlibrc` command which will write the output to `topostats.mplstyle` by default (**NB** there are @@ -165,28 +168,131 @@ through the basics. ### Further customisation -Whilst the broad overall look of images is controlled in this manner there is one additional file that controls how +Whilst the overall look of images is controlled in this manner there is one additional file that controls how images are plotted in terms of filenames, titles and image types and whether an image is part of the `core` subset that are always generated or not. -During development it was found that setting high DPI took a long time to generate and save some of the images which -slowed down the overall processing time. The solution we have implemented is a file `topostats/plotting_dictionary.yaml` -which sets these parameters on a per-image basis and these over-ride settings defined in default `topostats.mplstyle` or -any user generated document. +This is the `topostats/plotting_dictionary.yaml` which for each image stage defines whether it is a component of the +`core` subset of images that are always generated, sets the `filename`, the `title` on the plot, the `image_type` +(whether it is a binary image), the `savefig_dpi` which controls the Dots Per Inch (essentially the resolution). Each +image has the following structure. -If you have to change these, for example if there is a particular image not included in the `core` set that you always -want produced or you wish to change the DPI (Dots Per Inch) of a particular image you will have to locate this file and -manually edit it. Where this is depends on how you have installed TopoStats, if it is from a clone of the Git repository -then it can be found in `TopoStats/topostats/plotting_dictionary.yaml`. If you have installed from PyPI using `pip -install topostats` then it will be under the virtual environment you have created +```yaml +z_threshed: + title: "Height Thresholded" + image_type: "non-binary" + savefig_dpi: 100 + core_set: true +``` + +The following section describes how to override the DPI settings defined in this file and change the global `cmap` +(colormap/colourmap) used in plotting and output format. + +#### DPI + +During development it was found that setting high DPI globally for all images had a detrimental impact on processing +speeds, slowing down the overall processing time. The solution we have implemented is to use the +`topostats/plotting_dictionary.yaml` file and set the `savefig_dpi` parameter on a per-image basis. + +If you wish to change the DPI there are two options, you can change the value for _all_ images by modifying the setting +in your a [custom configuration](#generating-a-configuration) by modifying the `savefig_dpi` from `null` to your desired +value. The example below shows a section of the configuration file you can generate and setting this value to `400`. + +```yaml +plotting: + run: true # Options : true, false + style: topostats.mplstyle # Options : topostats.mplstyle or path to a matplotlibrc params file + savefig_format: null # Options : null (defaults to png) or see https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.savefig.html + savefig_dpi: 400 # Options : null (defaults to format) see https://afm-spm.github.io/TopoStats/main/configuration.html#further-customisation and https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.savefig.html +``` + +The value in the configuration file (or the default if none is specified) can also be configured at run-time +using the `--savefig-dpi ###` option to the `topostats process`. This will over-ride both the default or any value +specified in a custom configuration you may have set. The following sets this to `400` + +```bash +topostats process --savefig-dpi 400 +``` + +**NB** Changing the DPI in this manner will apply to _all_ images and may significantly reduce processing speed as it +takes longer to write images with high DPI to disk. + +If you wish to have fine grained control over the DPI on a per-image basis when batch processing then your only recourse +is to change the values in `topostats/plotting_dictionary.yaml`. Where this is depends on how you have installed +TopoStats, if it is from a clone of the Git repository then it can be found in +`TopoStats/topostats/plotting_dictionary.yaml`. If you have installed from PyPI using `pip install topostats` then it +will be under the virtual environment you have created e.g. `~/.virtualenvs/topostats/lib/python3.11/site-packages/topostats/topostats/plotting_dictionary.yaml` if you are using plain virtual environments or `~/miniconda3/envs/topostats/lib/python3.11/site-packages/topostats/topostats/plotting_dictionary.yaml` if you are using Conda environments and chose `~/miniconda3` as the base directory when installing Conda. +If you have installed TopoStats from the cloned Git repository the file will be under +`TopoStats/topostats/plotting_dictionary.yaml`. + **NB** The exact location will be highly specific to your system so the above are just guides as to where to find things. +#### Colormap + +The colormap used to plot images is set globally in `topostats/default_config.yaml`. TopoStats includes two custom +colormaps `nanoscope` and `afmhot` but any colormap recognised by Matplotlib can be used (see the [Matplotlib Colormap +reference](https://matplotlib.org/stable/gallery/color/colormap_reference.html) for choices). + +If you want to modify the colormap that is used you have two options. Firstly you can [generate a +configuration](generating-a-configuration) file and modify the field `cmap` to your choice. The example below shows +changing this from `null` (which defaults to `nanoscope` as defined in `topostats.mplstyle`) to `rainbow`. + +```yaml +plotting: + ... + cmap: rainbow # Colormap/colourmap to use (default is 'nanoscope' which is used if null, other options are 'afmhot', 'viridis' etc.) +``` + +Alternatively it is possible to specify the colormap that is used on the command line using the `--cmap` option to +`topostats process`. This will over-ride both the default or any value specified in a custom configuration you may have +set. The following sets this to `rainbow`. + +```bash +topostats process --cmap rainbow +``` + +#### Saved Image format + +Matplotlib, and by extension TopoStats, supports saving images in a range of different formats including `png` +([Portable Network Graphic](https://en.wikipedia.org/wiki/PNG)), `svg` ([Scalable Vector +Graphics](https://en.wikipedia.org/wiki/SVG)) and `pdf` ([Portable Document +Format](https://en.wikipedia.org/wiki/PDF)). The default is `png` but, as with both DPI and Colormap, these can be +easily changed via a custom configuration file or command line options to change these without having to edit +the [Matplotlib Style file](matplotlib-style). + +If you want to modify the output file format that is used you have two options. Firstly you can [generate a +configuration](generating-a-configuration) file and modify the field `savefig_format` to your choice. The example below +shows changing this from `null` (which defaults to `png` as defined in `topostats.mplstyle`) to `svg`. + +```yaml +plotting: + ... + savefig_format: svg # Options : null (defaults to png) or see https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.savefig.html +``` + +Alternatively it is possible to specify the output image format that is used on the command line using the +`--savefig-format` option to `topostats process`. This will over-ride both the default or any value specified in a +custom configuration you may have set. The following sets this to `svg`. + +```bash +topostats process --savefig-format svg +``` + +**NB** Note that these options are not mutually exclusive and can therefore be combined along with any of the other +options available to `topostats process`. The following would use a DPI of `400`, set the colormap to `rainbow` and the +output format to `svg` when running Topostats and would over-ride options in any custom configuration file or matplotlib +style file. + +```bash +topostats process --savefig-dpi 400 --cmap rainbow --savefig-format svg +``` + [^1] When writing file paths you can use absolute or relative paths. On Windows systems absolute paths start with the drive letter (e.g. `c:/`) on Linux and OSX systems they start with `/`. Relative paths are started either with a `./` which denotes the current directory or one or more `../` which means the higher level directory from the current diff --git a/tests/test_plotting.py b/tests/test_plotting.py index 8cfe848b18..e3174419f1 100644 --- a/tests/test_plotting.py +++ b/tests/test_plotting.py @@ -1,4 +1,5 @@ """Tests for the plotting module.""" + import importlib.resources as pkg_resources from pathlib import Path @@ -58,7 +59,7 @@ def test_toposum_class(toposum_object_multiple_directories: TopoSum) -> None: assert isinstance(toposum_object_multiple_directories.image_id, str) assert isinstance(toposum_object_multiple_directories.hist, bool) assert isinstance(toposum_object_multiple_directories.kde, bool) - assert isinstance(toposum_object_multiple_directories.file_ext, str) + assert isinstance(toposum_object_multiple_directories.savefig_format, str) assert isinstance(toposum_object_multiple_directories.output_dir, Path) assert isinstance(toposum_object_multiple_directories.var_to_label, dict) diff --git a/tests/test_plottingfuncs.py b/tests/test_plottingfuncs.py index 696da0f8ff..7150f5bca0 100644 --- a/tests/test_plottingfuncs.py +++ b/tests/test_plottingfuncs.py @@ -1,4 +1,5 @@ """Tests of plotting functions.""" + from pathlib import Path import matplotlib as mpl @@ -282,7 +283,7 @@ def test_mask_cmap(plotting_config: dict, tmp_path: Path) -> None: @pytest.mark.mpl_image_compare(baseline_dir="resources/img/", savefig_kwargs={"dpi": DPI}) def test_high_dpi(minicircle_grain_gaussian_filter: Grains, plotting_config: dict, tmp_path: Path) -> None: """Test plotting with high DPI.""" - plotting_config["dpi"] = DPI + plotting_config["savefig_dpi"] = DPI fig, _ = Images( data=minicircle_grain_gaussian_filter.images["gaussian_filtered"], output_dir=tmp_path, diff --git a/tests/test_processing.py b/tests/test_processing.py index 0acc0f129e..f639c3d92e 100644 --- a/tests/test_processing.py +++ b/tests/test_processing.py @@ -1,4 +1,5 @@ """Test end-to-end running of topostats.""" + from pathlib import Path import filetype @@ -108,7 +109,7 @@ def test_save_cropped_grains( """Tests if cropped grains are saved only when image set is 'all' rather than 'core'.""" process_scan_config["plotting"]["image_set"] = image_set process_scan_config["plotting"] = update_plotting_config(process_scan_config["plotting"]) - process_scan_config["plotting"]["dpi"] = 50 + process_scan_config["plotting"]["savefig_dpi"] = 50 img_dic = load_scan_data.img_dict _, _, _ = process_scan( @@ -152,7 +153,7 @@ def test_save_cropped_grains( def test_save_format(process_scan_config: dict, load_scan_data: LoadScans, tmp_path: Path, extension: str): """Tests if save format applied to cropped images.""" process_scan_config["plotting"]["image_set"] = "all" - process_scan_config["plotting"]["save_format"] = extension + process_scan_config["plotting"]["savefig_format"] = extension process_scan_config["plotting"] = update_plotting_config(process_scan_config["plotting"]) img_dic = load_scan_data.img_dict diff --git a/topostats/default_config.yaml b/topostats/default_config.yaml index 8dc19d1528..d66a531adc 100644 --- a/topostats/default_config.yaml +++ b/topostats/default_config.yaml @@ -61,13 +61,15 @@ dnatracing: plotting: run: true # Options : true, false style: topostats.mplstyle # Options : topostats.mplstyle or path to a matplotlibrc params file - save_format: png # Options : see https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.savefig.html + savefig_format: null # Options : null (defaults to png) or see https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.savefig.html + savefig_dpi: null # Options : null (defaults to format) see https://afm-spm.github.io/TopoStats/main/configuration.html#further-customisation and https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.savefig.html pixel_interpolation: null # Options : https://matplotlib.org/stable/gallery/images_contours_and_fields/interpolation_methods.html image_set: core # Options : all, core zrange: [null, null] # low and high height range for core images (can take [null, null]). low <= high colorbar: true # Options : true, false axes: true # Options : true, false (due to off being a bool when parsed) num_ticks: [null, null] # Number of ticks to have along the x and y axes. Options : null (auto) or integer > 1 + cmap: null # Colormap/colourmap to use (default is 'nanoscope' which is used if null, other options are 'afmhot', 'viridis' etc.) mask_cmap: blu # Options : blu, jet_r and any in matplotlib histogram_log_axis: false # Options : true, false summary_stats: diff --git a/topostats/entry_point.py b/topostats/entry_point.py index a6ccea5c6b..453fc937e9 100644 --- a/topostats/entry_point.py +++ b/topostats/entry_point.py @@ -2,6 +2,7 @@ Parses command-line arguments and passes input on to the relevant functions / modules. """ + import argparse as arg import sys @@ -10,6 +11,8 @@ from topostats.plotting import run_toposum from topostats.run_topostats import run_topostats +# pylint: disable=too-many-statements + def create_parser() -> arg.ArgumentParser: """Create a parser for reading options.""" @@ -29,8 +32,8 @@ def create_parser() -> arg.ArgumentParser: # Create a sub-parsers for different stages of processing and tasks process_parser = subparsers.add_parser( "process", - description="Process AFM images. Additional arguments over-ride those in the configuration file.", - help="Process AFM images. Additional arguments over-ride those in the configuration file.", + description="Process AFM images. Additional arguments over-ride defaults or those in the configuration file.", + help="Process AFM images. Additional arguments over-ride defaults or those in the configuration file.", ) process_parser.add_argument( "-c", @@ -106,6 +109,27 @@ def create_parser() -> arg.ArgumentParser: required=False, help="Whether to save plots.", ) + process_parser.add_argument( + "--savefig-format", + dest="savefig_format", + type=str, + required=False, + help="Format for saving figures to, options are 'png', 'svg', or other valid Matplotlib supported formats.", + ) + process_parser.add_argument( + "--savefig-dpi", + dest="savefig_dpi", + type=int, + required=False, + help="Dots Per Inch for plots, should be integer for dots per inch.", + ) + process_parser.add_argument( + "--cmap", + dest="cmap", + type=str, + required=False, + help="Colormap to use, options include 'nanoscope', 'afmhot' and any valid Matplotlib colormap.", + ) process_parser.add_argument("-m", "--mask", dest="mask", type=bool, required=False, help="Mask the image.") process_parser.add_argument( "-w", @@ -151,6 +175,13 @@ def create_parser() -> arg.ArgumentParser: required=False, help="Filename to write a sample YAML label file to (should end in '.yaml').", ) + toposum_parser.add_argument( + "--savefig-format", + dest="savefig_format", + type=str, + required=False, + help="Format for saving figures to, options are 'png', 'svg', or other valid Matplotlib supported formats.", + ) toposum_parser.set_defaults(func=run_toposum) load_parser = subparsers.add_parser( diff --git a/topostats/plotting.py b/topostats/plotting.py index b65ba7f9b8..6a5746b835 100644 --- a/topostats/plotting.py +++ b/topostats/plotting.py @@ -1,4 +1,5 @@ """Plotting and summary of TopoStats output statistics.""" + from collections import defaultdict import importlib.resources as pkg_resources @@ -43,7 +44,7 @@ def __init__( figsize: tuple = (16, 9), alpha: float = 0.5, palette: str = "deep", - file_ext: str = "png", + savefig_format: str = "png", output_dir: Union[str, Path] = ".", var_to_label: dict = None, hue: str = "basename", @@ -105,7 +106,7 @@ def __init__( self.figsize = figsize self.alpha = alpha self.palette = palette - self.file_ext = file_ext + self.savefig_format = savefig_format self.output_dir = Path(output_dir) self.output_dir.mkdir(parents=True, exist_ok=True) self.var_to_label = var_to_label @@ -264,9 +265,10 @@ def save_plot(self, outfile: Path) -> None: outfile: str Output file name to save figure to. """ - plt.savefig(self.output_dir / f"{outfile}.{self.file_ext}") + plt.savefig(self.output_dir / f"{outfile}.{self.savefig_format}") LOGGER.info( - f"[plotting] Plotted {self.stat_to_sum} to : " f"{str(self.output_dir / f'{outfile}.{self.file_ext}')}" + f"[plotting] Plotted {self.stat_to_sum} to : " + f"{str(self.output_dir / f'{outfile}.{self.savefig_format}')}" ) def _set_label(self, var: str): diff --git a/topostats/plotting_dictionary.yaml b/topostats/plotting_dictionary.yaml index b88e6ff072..e7b0211880 100644 --- a/topostats/plotting_dictionary.yaml +++ b/topostats/plotting_dictionary.yaml @@ -9,192 +9,192 @@ # | filename | String | Filename (minus extension) to which image is saved. | # | title | String | Title for the plot | # | image_type | String | Whether the plot includes the height (non-binary) or the outline (binary) | -# | dpi | int | Dots Per Inch for plotting | +# | savefig_dpi | int | Dots Per Inch for plotting | # | core_set | Boolean | Whether a plot is considered part of the core set of images that are plotted.| extracted_channel: filename: "00-raw_heightmap" title: "Raw Height" image_type: "non-binary" - dpi: 100 + savefig_dpi: 100 core_set: false pixels: filename: "01-pixels" title: "Pixels" image_type: "non-binary" - dpi: 100 + savefig_dpi: 100 core_set: false initial_median_flatten: filename: "02-initial_median_flatten_unmasked" title: "Initial Alignment (Unmasked)" image_type: "non-binary" - dpi: 100 + savefig_dpi: 100 core_set: false initial_tilt_removal: filename: "03-initial_tilt_removal_unmasked" title: "Initial Tilt Removal (Unmasked)" image_type: "non-binary" - dpi: 100 + savefig_dpi: 100 core_set: false initial_quadratic_removal: filename: "04-initial_quadratic_removal_unmasked" title: "Initial Quadratic Removal (Unmasked)" image_type: "non-binary" - dpi: 100 + savefig_dpi: 100 core_set: false initial_nonlinear_polynomial_removal: filename: "05-nonlinear_polynomial_removal_unmasked" title: "Nonlinear polynomial removal (Unmasked)" image_type: "non-binary" - dpi: 100 + savefig_dpi: 100 core_set: false initial_scar_removal: filename: "06-initial_scar_removal" title: "Scar removal" image_type: "non-binary" - dpi: 100 + savefig_dpi: 100 core_set: false initial_zero_average_background: filename: "7-initial_zero_average_background" title: "Initial Zero Averaged Background" image_type: "non-binary" - dpi: 100 + savefig_dpi: 100 core_set: false mask: filename: "08-binary_mask" title: "Binary Mask" image_type: "binary" - dpi: 100 + savefig_dpi: 100 core_set: false masked_median_flatten: filename: "09-secondary_align_masked" title: "Secondary Alignment (Masked)" image_type: "non-binary" - dpi: 100 + savefig_dpi: 100 core_set: false masked_tilt_removal: filename: "10-secondary_tilt_removal_masked" title: "Secondary Tilt Removal (Masked)" image_type: "non-binary" - dpi: 100 + savefig_dpi: 100 core_set: false masked_quadratic_removal: filename: "11-quadratic_removal_masked" title: "Secondary Quadratic Removal" image_type: "non-binary" - dpi: 100 + savefig_dpi: 100 core_set: false masked_nonlinear_polynomial_removal: filename: "12-nonlinear_polynomial_removal_masked" title: "Nonlinear polynomial removal masked" image_type: "non-binary" - dpi: 100 + savefig_dpi: 100 core_set: false secondary_scar_removal: filename: "13-scar_removal" title: "Secondary scar removal" image_type: "non-binary" - dpi: 100 + savefig_dpi: 100 core_set: false scar_mask: filename: "14-scar_mask" title: "Scar mask" image_type: "binary" - dpi: 100 + savefig_dpi: 100 core_set: false final_zero_average_background: filename: "15-final_zero_average_background" title: "Final Zero Averaged Background" image_type: "non-binary" - dpi: 100 + savefig_dpi: 100 core_set: false gaussian_filtered: filename: "16-gaussian_filtered" title: "Gaussian Filtered" image_type: "non-binary" - dpi: 100 + savefig_dpi: 100 core_set: false z_threshed: title: "Height Thresholded" image_type: "non-binary" - dpi: 100 + savefig_dpi: 100 core_set: true mask_grains: filename: "17-mask_grains" title: "Mask for Grains" image_type: "binary" - dpi: 100 + savefig_dpi: 100 core_set: false labelled_regions_01: filename: "18-labelled_regions" title: "Labelled Regions" image_type: "binary" - dpi: 100 + savefig_dpi: 100 core_set: false tidied_border: filename: "19-tidy_borders" title: "Tidied Borders" image_type: "binary" - dpi: 100 + savefig_dpi: 100 core_set: false removed_noise: filename: "20-noise_removed" title: "Noise removed" image_type: "binary" - dpi: 100 + savefig_dpi: 100 core_set: false removed_small_objects: filename: "21-small_objects_removed" title: "Small Objects Removed" image_type: "binary" - dpi: 100 + savefig_dpi: 100 core_set: false mask_overlay: title: "Masked Objects" image_type: "non-binary" - dpi: 100 + savefig_dpi: 100 core_set: true labelled_regions_02: filename: "22-labelled_regions" title: "Labelled Regions" image_type: "binary" - dpi: 100 + savefig_dpi: 100 core_set: false coloured_regions: filename: "23-coloured_regions" title: "Coloured Regions" image_type: "binary" - dpi: 100 + savefig_dpi: 100 core_set: false bounding_boxes: filename: "24-bounding_boxes" title: "Bounding Boxes" image_type: "binary" - dpi: 100 + savefig_dpi: 100 core_set: false coloured_boxes: filename: "25-labelled_image_bboxes" title: "Labelled Image with Bounding Boxes" image_type: "binary" - dpi: 100 + savefig_dpi: 100 core_set: false all_molecule_traces: title: "Molecule Traces" image_type: "non-binary" - dpi: 800 + savefig_dpi: 800 core_set: true grain_image: image_type: "non-binary" - dpi: 100 + savefig_dpi: 100 core_set: false grain_mask: image_type: "binary" - dpi: 100 + savefig_dpi: 100 core_set: false grain_mask_image: image_type: "non-binary" - dpi: 100 + savefig_dpi: 100 core_set: false single_molecule_trace: image_type: "non-binary" - dpi: 100 + savefig_dpi: 100 core_set: false diff --git a/topostats/plottingfuncs.py b/topostats/plottingfuncs.py index c585b5c124..c4773701bb 100644 --- a/topostats/plottingfuncs.py +++ b/topostats/plottingfuncs.py @@ -1,4 +1,5 @@ """Plotting data.""" + from __future__ import annotations import importlib.resources as pkg_resources @@ -119,10 +120,10 @@ def __init__( axes: bool = True, num_ticks: list[int | None, int | None] = (None, None), save: bool = True, - save_format: str = None, + savefig_format: str | None = None, histogram_log_axis: bool = True, histogram_bins: int | None = None, - dpi: str | float | None = None, + savefig_dpi: str | float | None = None, ) -> None: """ Initialise the class. @@ -173,7 +174,7 @@ def __init__( Optionally use a logarithmic y axis for the histogram plots. histogram_bin: int Number of bins for histograms to use. - dpi: Union[str, float] + savefig_dpi: Union[str, float] The resolution of the saved plot (default 'figure'). """ if style is None: @@ -200,10 +201,10 @@ def __init__( self.axes = axes self.num_ticks = num_ticks self.save = save - self.save_format = mpl.rcParams["savefig.format"] if save_format is None else save_format + self.savefig_format = mpl.rcParams["savefig.format"] if savefig_format is None else savefig_format self.histogram_log_axis = histogram_log_axis self.histogram_bins = mpl.rcParams["hist.bins"] if histogram_bins is None else histogram_bins - self.dpi = mpl.rcParams["savefig.dpi"] if dpi is None else dpi + self.savefig_dpi = mpl.rcParams["savefig.dpi"] if savefig_dpi is None else savefig_dpi def plot_histogram_and_save(self): """ @@ -227,10 +228,10 @@ def plot_histogram_and_save(self): ax.set_ylabel("frequency in image") plt.title(self.title) plt.savefig( - (self.output_dir / f"{self.filename}_histogram.{self.save_format}"), + (self.output_dir / f"{self.filename}_histogram.{self.savefig_format}"), bbox_inches="tight", pad_inches=0.5, - dpi=self.dpi, + dpi=self.savefig_dpi, ) plt.close() @@ -259,8 +260,8 @@ def plot_and_save(self): else: self.save_array_figure() LOGGER.info( - f"[{self.filename}] : Image saved to : {str(self.output_dir / self.filename)}.{self.save_format}\ - | DPI: {self.dpi}" + f"[{self.filename}] : Image saved to : {str(self.output_dir / self.filename)}.{self.savefig_format}\ + | DPI: {self.savefig_dpi}" ) return fig, ax @@ -325,13 +326,13 @@ def save_figure(self): plt.title("") fig.frameon = False plt.savefig( - (self.output_dir / f"{self.filename}.{self.save_format}"), + (self.output_dir / f"{self.filename}.{self.savefig_format}"), bbox_inches="tight", pad_inches=0, - dpi=self.dpi, + dpi=self.savefig_dpi, ) else: - plt.savefig((self.output_dir / f"{self.filename}.{self.save_format}"), dpi=self.dpi) + plt.savefig((self.output_dir / f"{self.filename}.{self.savefig_format}"), dpi=self.savefig_dpi) else: plt.xlabel("Nanometres") plt.ylabel("Nanometres") @@ -347,12 +348,12 @@ def save_figure(self): def save_array_figure(self) -> None: """Save the image array as an image using plt.imsave().""" plt.imsave( - (self.output_dir / f"{self.filename}.{self.save_format}"), + (self.output_dir / f"{self.filename}.{self.savefig_format}"), self.data, cmap=self.cmap, vmin=self.zrange[0], vmax=self.zrange[1], - format=self.save_format, + format=self.savefig_format, ) plt.close() diff --git a/topostats/processing.py b/topostats/processing.py index 1cf82c7403..434a94626e 100644 --- a/topostats/processing.py +++ b/topostats/processing.py @@ -1,4 +1,5 @@ """Functions for processing data.""" + from __future__ import annotations from collections import defaultdict @@ -718,9 +719,12 @@ def completion_message(config: dict, img_files: list, summary_config: dict, imag f" File Extension : {config['file_ext']}\n" f" Files Found : {len(img_files)}\n" f" Successfully Processed^1 : {images_processed} ({(images_processed * 100) / len(img_files)}%)\n" - f" Configuration : {config['output_dir']}/config.yaml\n" f" All statistics : {str(config['output_dir'])}/all_statistics.csv\n" f" Distribution Plots : {distribution_plots_message}\n\n" + f" Configuration : {config['output_dir']}/config.yaml\n" + f" DPI : {config['plotting']['savefig_dpi']}\n" + f" Output image format : {config['plotting']['savefig_format']}\n" + f" Colormap : {config['plotting']['cmap']}\n\n" f" Email : topostats@sheffield.ac.uk\n" f" Documentation : https://afm-spm.github.io/topostats/\n" f" Source Code : https://github.com/AFM-SPM/TopoStats/\n" diff --git a/topostats/run_topostats.py b/topostats/run_topostats.py index c5ade451c5..ecb5d6cbe1 100644 --- a/topostats/run_topostats.py +++ b/topostats/run_topostats.py @@ -2,6 +2,7 @@ This provides an entry point for running TopoStats as a command line programme. """ + import importlib.resources as pkg_resources import logging import sys @@ -67,12 +68,13 @@ def run_topostats(args=None): # noqa: C901 # Create base output directory config["output_dir"].mkdir(parents=True, exist_ok=True) - # Load plotting_dictionary and validate + # Load plotting_dictionary and validate then update with command line options plotting_dictionary = pkg_resources.open_text(__package__, "plotting_dictionary.yaml") config["plotting"]["plot_dict"] = yaml.safe_load(plotting_dictionary.read()) validate_config( config["plotting"]["plot_dict"], schema=PLOTTING_SCHEMA, config_type="YAML plotting configuration file" ) + config["plotting"] = update_config(config["plotting"], args) # Check earlier stages of processing are enabled for later. check_run_steps( @@ -81,8 +83,9 @@ def run_topostats(args=None): # noqa: C901 grainstats_run=config["grainstats"]["run"], dnatracing_run=config["dnatracing"]["run"], ) - # Update the config["plotting"]["plot_dict"] with plotting options + # Ensures each image has all plotting options which are passed as **kwargs config["plotting"] = update_plotting_config(config["plotting"]) + LOGGER.debug(f"Plotting configuration after update :\n{pformat(config['plotting'], indent=4)}") LOGGER.info(f"Configuration file loaded from : {args.config_file}") LOGGER.info(f"Scanning for images in : {config['base_dir']}") @@ -94,8 +97,11 @@ def run_topostats(args=None): # noqa: C901 LOGGER.error(f"No images with extension {config['file_ext']} in {config['base_dir']}") LOGGER.error("Please check your configuration and directories.") sys.exit() - LOGGER.info(f'Thresholding method (Filtering) : {config["filter"]["threshold_method"]}') - LOGGER.info(f'Thresholding method (Grains) : {config["grains"]["threshold_method"]}') + LOGGER.info(f"Thresholding method (Filtering) : {config['filter']['threshold_method']}") + LOGGER.info(f"Thresholding method (Grains) : {config['grains']['threshold_method']}") + LOGGER.info(f"DPI : {config['plotting']['savefig_dpi']}") + LOGGER.info(f"Output image format : {config['plotting']['savefig_format']}") + LOGGER.info(f"Colormap : {config['plotting']['cmap']}") LOGGER.debug(f"Configuration after update : \n{pformat(config, indent=4)}") # noqa : T203 processing_function = partial( @@ -161,7 +167,7 @@ def run_topostats(args=None): # noqa: C901 summary_config = yaml.safe_load(summary_yaml.read()) # Do not pass command line arguments to toposum as they clash with process command line arguments - summary_config = update_config(summary_config, {}) + summary_config = update_config(summary_config, config["plotting"]) validate_config(summary_config, SUMMARY_SCHEMA, config_type="YAML summarisation config") # We never want to load data from CSV as we are using the data that has just been processed. diff --git a/topostats/summary_config.yaml b/topostats/summary_config.yaml index 0ac5d9601f..03bd538954 100644 --- a/topostats/summary_config.yaml +++ b/topostats/summary_config.yaml @@ -1,7 +1,7 @@ base_dir: ./ # Directory from which all files and directories are relative to ("./" is the default current directory) output_dir: ./output/summary_distributions csv_file: ./all_statistics.csv -file_ext: png +savefig_format: png pickle_plots: True # Save plots to a Python pickle var_to_label: null # Optional YAML file that maps variable names to labels, uses topostats/var_to_label.yaml if null molecule_id: molecule_number diff --git a/topostats/topostats.mplstyle b/topostats/topostats.mplstyle index cb89bc1b69..c14f45baa4 100644 --- a/topostats/topostats.mplstyle +++ b/topostats/topostats.mplstyle @@ -1,21 +1,22 @@ #### MATPLOTLIBRC FORMAT -## NOTE FOR END USERS: DO NOT EDIT THIS FILE! +## This is a Matplotlib configuration file for TopoStats. ## -## This is the Matplotlib configuration file for TopoStats - you can find a copy -## of it on your system in site-packages/TopoStats/topostats/images.mplstyle -## (relative to your Python installation location). -## DO NOT EDIT IT! +## You have probably made a copy of this using 'topostats create-matplotlibrc' +## or a variant there of. If so you are free to edit this file, if you haven't +## done this please do so and edit the copy you create. For options on creating +## copies of this file see +## +## topostats create-matplotlibrc --help ## ## Fields that have been customised for TopoStats are uncommented, others are the ## default Matplotlib values. ## -## If you wish to change your default style, copy this file to your work directory -## you MUST rename it to something _other_ than topostats.mplstyle. Edit fields as -## required and include it by either editing the style field in config.yaml to point -## to the desired file or with the command line option --matplotlibrc -## +## Once you have saved changes to your copy you can run topostats with it using +## the --matplotlibrc option. If for example your copy is 'my_custom.mplstyle' +## you would use it with the following ## +## topostats process --matplotlibrc my_custom.mplstyle ## ## See https://matplotlib.org/stable/users/explain/customizing.html#customizing-with-matplotlibrc-files ## for more details on the paths which are checked for the configuration file. @@ -603,7 +604,7 @@ figure.figsize: 8.0, 8.0 # figure size in inches ## *************************************************************************** #image.aspect: equal # {equal, auto} or a number #image.interpolation: antialiased # see help(imshow) for options -image.cmap: nanoscope # A colormap name (nanoscope, afmhot, viridis etc.) +image.cmap: nanoscope # A colormap name (nanoscope, afmhot, viridis etc.) #image.lut: 256 # the size of the colormap lookup table #image.origin: upper # {lower, upper} #image.resample: True diff --git a/topostats/utils.py b/topostats/utils.py index b1726e2aac..964f2a9667 100644 --- a/topostats/utils.py +++ b/topostats/utils.py @@ -1,4 +1,5 @@ """Utilities.""" + from __future__ import annotations import logging diff --git a/topostats/validation.py b/topostats/validation.py index 80e5953299..73810e032b 100644 --- a/topostats/validation.py +++ b/topostats/validation.py @@ -1,4 +1,5 @@ """Validation of configuration.""" + import logging import os from pathlib import Path @@ -229,7 +230,17 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: error="Invalid value in config for 'plotting.style', valid values are 'topostats.mplstyle' or None", ), ), - "save_format": str, + "savefig_format": Or( + None, + str, + error="Invalid value in config for plotting.savefig_format" "must be a value supported by Matplotlib.", + ), + "savefig_dpi": Or( + None, + "figure", + int, + error="Invalid value in config for plotting.savefig_dpi, valid" "values are 'figure' or integers", + ), "image_set": Or( "all", "core", @@ -271,6 +282,13 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: [None, And(int, lambda n: n > 1)], error="Invalid value in config plotting.for 'num_ticks', valid values are 'null' or integers > 1", ), + "cmap": Or( + None, + "afmhot", + "nanoscope", + "gwyddion", + error="Invalid value in config for 'plotting.cmap', valid values are 'afmhot', 'nanoscope' or 'gwyddion'", + ), "mask_cmap": str, "histogram_log_axis": Or( True, @@ -314,7 +332,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: ), ), "core_set": bool, - "dpi": Or( + "savefig_dpi": Or( lambda n: n > 0, "figure", error="Invalid value in config for 'dpi', valid values are 'figure' or > 0.", @@ -329,7 +347,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: error="Invalid value in config 'pixels.image_type', valid values are 'binary' or 'non-binary'", ), "core_set": bool, - "dpi": Or( + "savefig_dpi": Or( lambda n: n > 0, "figure", error="Invalid value in config for 'dpi', valid values are 'figure' or > 0.", @@ -347,7 +365,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: ), ), "core_set": bool, - "dpi": Or( + "savefig_dpi": Or( lambda n: n > 0, "figure", error="Invalid value in config for 'dpi', valid values are 'figure' or > 0.", @@ -365,7 +383,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: ), ), "core_set": bool, - "dpi": Or( + "savefig_dpi": Or( lambda n: n > 0, "figure", error="Invalid value in config for 'dpi', valid values are 'figure' or > 0.", @@ -383,7 +401,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: ), ), "core_set": bool, - "dpi": Or( + "savefig_dpi": Or( lambda n: n > 0, "figure", error="Invalid value in config for 'dpi', valid values are 'figure' or > 0.", @@ -401,7 +419,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: ), ), "core_set": bool, - "dpi": Or( + "savefig_dpi": Or( lambda n: n > 0, "figure", error="Invalid value in config for 'dpi', valid values are 'figure' or > 0.", @@ -419,7 +437,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: ), ), "core_set": bool, - "dpi": Or( + "savefig_dpi": Or( lambda n: n > 0, "figure", error="Invalid value in config for 'dpi', valid values are 'figure' or > 0.", @@ -437,7 +455,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: ), ), "core_set": bool, - "dpi": Or( + "savefig_dpi": Or( lambda n: n > 0, "figure", error="Invalid value in config for 'dpi', valid values are 'figure' or > 0.", @@ -452,7 +470,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: error="Invalid value in config 'mask.image_type', valid values are 'binary' or 'non-binary'", ), "core_set": bool, - "dpi": Or( + "savefig_dpi": Or( lambda n: n > 0, "figure", error="Invalid value in config for 'dpi', valid values are 'figure' or > 0.", @@ -470,7 +488,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: ), ), "core_set": bool, - "dpi": Or( + "savefig_dpi": Or( lambda n: n > 0, "figure", error="Invalid value in config for 'dpi', valid values are 'figure' or > 0.", @@ -488,7 +506,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: ), ), "core_set": bool, - "dpi": Or( + "savefig_dpi": Or( lambda n: n > 0, "figure", error="Invalid value in config for 'dpi', valid values are 'figure' or > 0.", @@ -506,7 +524,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: ), ), "core_set": bool, - "dpi": Or( + "savefig_dpi": Or( lambda n: n > 0, "figure", error="Invalid value in config for 'dpi', valid values are 'figure' or > 0.", @@ -524,7 +542,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: ), ), "core_set": bool, - "dpi": Or( + "savefig_dpi": Or( lambda n: n > 0, "figure", error="Invalid value in config for 'dpi', valid values are 'figure' or > 0.", @@ -542,7 +560,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: ), ), "core_set": bool, - "dpi": Or( + "savefig_dpi": Or( lambda n: n > 0, "figure", error="Invalid value in config for 'dpi', valid values are 'figure' or > 0.", @@ -560,7 +578,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: ), ), "core_set": bool, - "dpi": Or( + "savefig_dpi": Or( lambda n: n > 0, "figure", error="Invalid value in config for 'dpi', valid values are 'figure' or > 0.", @@ -578,7 +596,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: ), ), "core_set": bool, - "dpi": Or( + "savefig_dpi": Or( lambda n: n > 0, "figure", error="Invalid value in config for 'dpi', valid values are 'figure' or > 0.", @@ -596,7 +614,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: ), ), "core_set": bool, - "dpi": Or( + "savefig_dpi": Or( lambda n: n > 0, "figure", error="Invalid value in config for 'dpi', valid values are 'figure' or > 0.", @@ -612,7 +630,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: ), ), "core_set": True, - "dpi": Or( + "savefig_dpi": Or( lambda n: n > 0, "figure", error="Invalid value in config for 'dpi', valid values are 'figure' or > 0.", @@ -629,7 +647,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: ), ), "core_set": bool, - "dpi": Or( + "savefig_dpi": Or( lambda n: n > 0, "figure", error="Invalid value in config for 'dpi', valid values are 'figure' or > 0.", @@ -647,7 +665,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: ), ), "core_set": bool, - "dpi": Or( + "savefig_dpi": Or( lambda n: n > 0, "figure", error="Invalid value in config for 'dpi', valid values are 'figure' or > 0.", @@ -664,7 +682,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: ), ), "core_set": bool, - "dpi": Or( + "savefig_dpi": Or( lambda n: n > 0, "figure", error="Invalid value in config for 'dpi', valid values are 'figure' or > 0.", @@ -681,7 +699,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: ), ), "core_set": bool, - "dpi": Or( + "savefig_dpi": Or( lambda n: n > 0, "figure", error="Invalid value in config for 'dpi', valid values are 'figure' or > 0.", @@ -699,7 +717,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: ), ), "core_set": bool, - "dpi": Or( + "savefig_dpi": Or( lambda n: n > 0, "figure", error="Invalid value in config for 'dpi', valid values are 'figure' or > 0.", @@ -715,7 +733,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: ), ), "core_set": True, - "dpi": Or( + "savefig_dpi": Or( lambda n: n > 0, "figure", error="Invalid value in config for 'dpi', valid values are 'figure' or > 0.", @@ -733,7 +751,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: ), ), "core_set": bool, - "dpi": Or( + "savefig_dpi": Or( lambda n: n > 0, "figure", error="Invalid value in config for 'dpi', valid values are 'figure' or > 0.", @@ -751,7 +769,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: ), ), "core_set": bool, - "dpi": Or( + "savefig_dpi": Or( lambda n: n > 0, "figure", error="Invalid value in config for 'dpi', valid values are 'figure' or > 0.", @@ -768,7 +786,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: ), ), "core_set": bool, - "dpi": Or( + "savefig_dpi": Or( lambda n: n > 0, "figure", error="Invalid value in config for 'dpi', valid values are 'figure' or > 0.", @@ -785,7 +803,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: ), ), "core_set": bool, - "dpi": Or( + "savefig_dpi": Or( lambda n: n > 0, "figure", error="Invalid value in config for 'dpi', valid values are 'figure' or > 0.", @@ -802,7 +820,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: ), ), "core_set": bool, - "dpi": Or( + "savefig_dpi": Or( lambda n: n > 0, "figure", error="Invalid value in config for 'dpi', valid values are 'figure' or > 0.", @@ -817,7 +835,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: ), ), "core_set": False, - "dpi": Or( + "savefig_dpi": Or( lambda n: n > 0, "figure", error="Invalid value in config for 'dpi', valid values are 'figure' or > 0.", @@ -830,7 +848,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: error=("Invalid value in config 'grain_mask.image_type', valid values " "are 'binary' or 'non-binary'"), ), "core_set": bool, - "dpi": Or( + "savefig_dpi": Or( lambda n: n > 0, "figure", error="Invalid value in config for 'dpi', valid values are 'figure' or > 0.", @@ -846,7 +864,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: ), ), "core_set": bool, - "dpi": Or( + "savefig_dpi": Or( lambda n: n > 0, "figure", error="Invalid value in config for 'dpi', valid values are 'figure' or > 0.", @@ -862,7 +880,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: ), ), "core_set": bool, - "dpi": Or( + "savefig_dpi": Or( lambda n: n > 0, "figure", error="Invalid value in config for 'dpi', valid values are 'figure' or > 0.", @@ -876,11 +894,11 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: "base_dir": Path, "output_dir": Path, "csv_file": str, - "file_ext": Or( + "savefig_format": Or( "png", "pdf", "svg", - error=("Invalid value in config 'file_ext', valid values are 'png', 'pdf' or 'svg' "), + error=("Invalid value in config 'savefig_format', valid values are 'png', 'pdf' or 'svg' "), ), "pickle_plots": Or( True, From e7db2c46fd717252263e9d18a38c649bc95f6b5c Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Fri, 12 Jan 2024 12:01:12 +0000 Subject: [PATCH 07/35] Restore cmap to config; simpler config of cmap/dpi/image format Closes #776 + Aligns command line and configuration field names with those in matplotlibrc files. + Restores the `cmap` configuration option to `default_config.yaml` and introduces `savefig_dpi` option. + Adds command line options for setting DPI (`--savefig-dpi`), Colormap (`--cmap`)and Output file format (`--savefig-format`). + Expands documentation on how to use custom configuration files or command line options to set the DPI/Colormap/Output format. + Updates the header to `topostats.mplstyle` to explain how to use it as typically users will have created a copy of the file (after the convenience function `topostats create-matplotlibrc` was introduced with #773). + To achieve this the dictionary `config["plotting"]` needed explicitly updating as the `update_config()` function doesn't update nested configurations (since this is the first PR that introduces command line options that modify any of the values in the nested dictionaries). + Updates options for `topostats toposum`` to align with `savefig_format` and adds flag to entry point so output format is consistent. + Updates and expands the configuration documentation explaining how to use these conveniences. As a consequence quite a few files are touched to ensure that validation and processing functions all have variables that align with those in the configuration. If users could test this it would be very much appreciated, if you use the Git installed version something like the following would switch branches and allow you test it. ``` conda create --name topostats-config # Create and activate a virtual env specific to this conda activate topostats-config cd ~/path/to/TopoStats git pull git checkout ns-rse/776-config-jigging pip install -e . topostats process --output-dir base topostats create-config test_config.yaml # Create test_config.yaml to try changing parameters topostats process --config test_config.yaml --output-dir test1 topostats process --output-dir test2 --savefig-dpi 10 --cmap rainbow --savefig-format svg topostats process --config test_config.yaml --output-dir test3 --savefig-dpi 80 --cmap viridis --savefig-format pdf ``` Each invocation of `topostats process` will save output to its own directory (either `base`, `test1`, `test2` and `test3`) for comparison. There should be differences between each `base` the values used in `test_config.yaml` and saved under `test1` and those under `test2` and `test3` should also differ. I would really appreciate feedback on the documentation as without clear documentation it is perhaps confusing how the components interact and work and can be modified and getting this as clear as possible will be really helpful. --- docs/configuration.md | 2 ++ topostats/default_config.yaml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/configuration.md b/docs/configuration.md index 97c266c307..fd6abbd06f 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -185,6 +185,8 @@ z_threshed: core_set: true ``` +Whilst it is possible to edit this file it is not recommended to do so. + The following section describes how to override the DPI settings defined in this file and change the global `cmap` (colormap/colourmap) used in plotting and output format. diff --git a/topostats/default_config.yaml b/topostats/default_config.yaml index d66a531adc..0a078da044 100644 --- a/topostats/default_config.yaml +++ b/topostats/default_config.yaml @@ -62,7 +62,7 @@ plotting: run: true # Options : true, false style: topostats.mplstyle # Options : topostats.mplstyle or path to a matplotlibrc params file savefig_format: null # Options : null (defaults to png) or see https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.savefig.html - savefig_dpi: null # Options : null (defaults to format) see https://afm-spm.github.io/TopoStats/main/configuration.html#further-customisation and https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.savefig.html + savefig_dpi: null # Options : null (defaults to figure) see https://afm-spm.github.io/TopoStats/main/configuration.html#further-customisation and https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.savefig.html pixel_interpolation: null # Options : https://matplotlib.org/stable/gallery/images_contours_and_fields/interpolation_methods.html image_set: core # Options : all, core zrange: [null, null] # low and high height range for core images (can take [null, null]). low <= high From dd64f6ea4329324be529fe7228c3fdd6145a2e46 Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Mon, 22 Jan 2024 11:52:17 +0000 Subject: [PATCH 08/35] Update docs/configuration.md Co-authored-by: Max Gamill <91465918+MaxGamill-Sheffield@users.noreply.github.com> --- docs/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configuration.md b/docs/configuration.md index fd6abbd06f..21287a900b 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -94,7 +94,7 @@ Aside from the comments in YAML file itself the fields are described below. | `plotting` | `run` | boolean | `true` | Whether to run plotting. Options : `true`, `false` | | | `style` | str | `topostats.mplstyle` | The default loads a custom [matplotlibrc param file](https://matplotlib.org/stable/users/explain/customizing.html#the-matplotlibrc-file) that comes with TopoStats. Users can specify the path to their own style file as an alternative. | | | `save_format` | string | `null` | Format to save images in, `null` defaults to `png` see [matplotlib.pyplot.savefig](https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.savefig.html) | -| | `savefig_dpi` | string / float | `null` | Dots Per Inch (DPI), if `null` then the value `figure` is used, for other values (typically integers) see [#further-customisation] and [Matplotlib](https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.savefig.html). | +| | `savefig_dpi` | string / float | `null` | Dots Per Inch (DPI), if `null` then the value `figure` is used, for other values (typically integers) see [#further-customisation] and [Matplotlib](https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.savefig.html). Low DPI's improve processing time but can reduce the plotted trace (but not the actual trace) accuracy. | | | `pixel_interpolation` | string | `null` | Interpolation method for image plots. Recommended default 'null' prevents banding that occurs in some images. If interpolation is needed, we recommend `gaussian`. See [matplotlib imshow interpolations documentation](https://matplotlib.org/stable/gallery/images_contours_and_fields/interpolation_methods.html) for details. | | | `image_set` | string | `all` | Which images to plot. Options : `all`, `core` | | | `zrange` | list | `[0, 3]` | Low (first number) and high (second number) height range for core images (can take [null, null]). **NB** `low <= high` otherwise you will see a `ValueError: minvalue must be less than or equal to maxvalue` error. | From c3dea4579e604f2eb0995ec9d5ff56bab0878f2a Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Mon, 22 Jan 2024 11:52:33 +0000 Subject: [PATCH 09/35] Update topostats/validation.py Co-authored-by: Max Gamill <91465918+MaxGamill-Sheffield@users.noreply.github.com> --- topostats/validation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/topostats/validation.py b/topostats/validation.py index 73810e032b..bf2a6e8bc9 100644 --- a/topostats/validation.py +++ b/topostats/validation.py @@ -238,7 +238,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: "savefig_dpi": Or( None, "figure", - int, + lambda n: n > 0, error="Invalid value in config for plotting.savefig_dpi, valid" "values are 'figure' or integers", ), "image_set": Or( From e6259d52ca9a0dd4711b4a47c736e161aba44464 Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Mon, 22 Jan 2024 11:52:49 +0000 Subject: [PATCH 10/35] Update topostats/topostats.mplstyle Co-authored-by: Max Gamill <91465918+MaxGamill-Sheffield@users.noreply.github.com> --- topostats/topostats.mplstyle | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/topostats/topostats.mplstyle b/topostats/topostats.mplstyle index c14f45baa4..81bf60010a 100644 --- a/topostats/topostats.mplstyle +++ b/topostats/topostats.mplstyle @@ -13,8 +13,9 @@ ## default Matplotlib values. ## ## Once you have saved changes to your copy you can run topostats with it using -## the --matplotlibrc option. If for example your copy is 'my_custom.mplstyle' -## you would use it with the following +## the --matplotlibrc option or updating the sytle sheet path in the plotting section +## of the configuration file. If for example your copy is 'my_custom.mplstyle' you +## would use it with the following ## ## topostats process --matplotlibrc my_custom.mplstyle ## From e843ea45a202e30531271a11cf3984da5bdb402b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 22 Jan 2024 11:53:13 +0000 Subject: [PATCH 11/35] [pre-commit.ci] Fixing issues with pre-commit --- docs/configuration.md | 104 +++++++++++++++++++++--------------------- 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index 21287a900b..4adf202858 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -54,58 +54,58 @@ above: Aside from the comments in YAML file itself the fields are described below. -| Section | Sub-Section | Data Type | Default | Description | -| :-------------- | :-------------------------------- | :------------- | :-------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `base_dir` | | string | `./` | Directory to recursively search for files within.[^1] | -| `output_dir` | | string | `./output` | Directory that output should be saved to.[^1] | -| `log_level` | | string | `info` | Verbosity of logging, options are (in increasing order) `warning`, `error`, `info`, `debug`. | -| `cores` | | integer | `2` | Number of cores to run parallel processes on. | -| `file_ext` | | string | `.spm` | File extensions to search for. | -| `loading` | `channel` | string | `Height` | The channel of data to be processed, what this is will depend on the file-format you are processing and the channel you wish to process. | -| `filter` | `run` | boolean | `true` | Whether to run the filtering stage, without this other stages won't run so leave as `true`. | -| | `threshold_method` | str | `std_dev` | Threshold method for filtering, options are `ostu`, `std_dev` or `absolute`. | -| | `otsu_threshold_multiplier` | float | `1.0` | Factor by which the derived Otsu Threshold should be scaled. | -| | `threshold_std_dev` | dictionary | `10.0, 1.0` | A pair of values that scale the standard deviation, after scaling the standard deviation `below` is subtracted from the image mean to give the below/lower threshold and the `above` is added to the image mean to give the above/upper threshold. These values should _always_ be positive. | -| | `threshold_absolute` | dictionary | `-1.0, 1.0` | Below (first) and above (second) absolute threshold for separating data from the image background. | -| | `gaussian_size` | float | `0.5` | The number of standard deviations to build the Gaussian kernel and thus affects the degree of blurring. See [skimage.filters.gaussian](https://scikit-image.org/docs/dev/api/skimage.filters.html#skimage.filters.gaussian) and `sigma` for more information. | -| | `gaussian_mode` | string | `nearest` | | -| `grains` | `run` | boolean | `true` | Whether to run grain finding. Options `true`, `false` | -| | `row_alignment_quantile` | float | `0.5` | Quantile (0.0 to 1.0) to be used to determine the average background for the image. below values may improve flattening of large features. | -| | `smallest_grain_size_nm2` | int | `100` | The smallest size of grains to be included (in nm^2), anything smaller than this is considered noise and removed. **NB** must be `> 0.0`. | -| | `threshold_method` | float | `std_dev` | Threshold method for grain finding. Options : `otsu`, `std_dev`, `absolute` | -| | `otsu_threshold_multiplier` | | `1.0` | Factor by which the derived Otsu Threshold should be scaled. | -| | `threshold_std_dev` | dictionary | `10.0, 1.0` | A pair of values that scale the standard deviation, after scaling the standard deviation `below` is subtracted from the image mean to give the below/lower threshold and the `above` is added to the image mean to give the above/upper threshold. These values should _always_ be positive. | -| | `threshold_absolute` | dictionary | `-1.0, 1.0` | Below (first), above (second) absolute threshold for separating grains from the image background. | -| | `direction` | | `above` | Defines whether to look for grains above or below thresholds or both. Options: `above`, `below`, `both` | -| | `smallest_grain_size` | int | `50` | Catch-all value for the minimum size of grains. Measured in nanometres squared. All grains with area below than this value are removed. | -| | `absolute_area_threshold` | dictionary | `[300, 3000], [null, null]` | Area thresholds for above the image background (first) and below the image background (second), which grain sizes are permitted, measured in nanometres squared. All grains outside this area range are removed. | -| | `remove_edge_intersecting_grains` | boolean | `true` | Whether to remove grains that intersect the image border. _Do not change this unless you know what you are doing_. This will ruin any statistics relating to grain size, shape and DNA traces. | -| `grainstats` | `run` | boolean | `true` | Whether to calculate grain statistics. Options : `true`, `false` | -| | `cropped_size` | float | `40.0` | Force cropping of grains to this length (in nm) of square cropped images (can take `-1` for grain-sized box) | -| | `edge_detection_method` | str | `binary_erosion` | Type of edge detection method to use when determining the edges of grain masks before calculating statistics on them. Options : `binary_erosion`, `canny`. | -| `dnatracing` | `run` | boolean | `true` | Whether to run DNA Tracing. Options : true, false | -| | `min_skeleton_size` | int | `10` | The minimum number of pixels a skeleton should be for statistics to be calculated on it. Anything smaller than this is dropped but grain statistics are retained. | -| | `skeletonisation_method` | str | `topostats` | Skeletonisation method to use, possible options are `zhang`, `lee`, `thin` (from [Scikit-image Morphology module](https://scikit-image.org/docs/stable/api/skimage.morphology.html)) or the original bespoke TopoStas method `topostats`. | -| | `spline_step_size` | float | `7.0e-9` | The sampling rate of the spline in metres. This is the frequency at which points are sampled from fitted traces to act as guide points for the splining process using scipy's splprep. | -| | `spline_linear_smoothing` | float | `5.0` | The amount of smoothing to apply to splines of linear molecule traces. | -| | `spline_circular_smoothing` | float | `0.0` | The amount of smoothing to apply to splines of circular molecule traces. | -| | `pad_width` | int | 10 | Padding for individual grains when tracing. This is sometimes required if the bounding box around grains is too tight and they touch the edge of the image. | -| | `cores` | int | 1 | Number of cores to use for tracing. **NB** Currently this is NOT used and should be left commented in the YAML file. | -| `plotting` | `run` | boolean | `true` | Whether to run plotting. Options : `true`, `false` | -| | `style` | str | `topostats.mplstyle` | The default loads a custom [matplotlibrc param file](https://matplotlib.org/stable/users/explain/customizing.html#the-matplotlibrc-file) that comes with TopoStats. Users can specify the path to their own style file as an alternative. | -| | `save_format` | string | `null` | Format to save images in, `null` defaults to `png` see [matplotlib.pyplot.savefig](https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.savefig.html) | -| | `savefig_dpi` | string / float | `null` | Dots Per Inch (DPI), if `null` then the value `figure` is used, for other values (typically integers) see [#further-customisation] and [Matplotlib](https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.savefig.html). Low DPI's improve processing time but can reduce the plotted trace (but not the actual trace) accuracy. | -| | `pixel_interpolation` | string | `null` | Interpolation method for image plots. Recommended default 'null' prevents banding that occurs in some images. If interpolation is needed, we recommend `gaussian`. See [matplotlib imshow interpolations documentation](https://matplotlib.org/stable/gallery/images_contours_and_fields/interpolation_methods.html) for details. | -| | `image_set` | string | `all` | Which images to plot. Options : `all`, `core` | -| | `zrange` | list | `[0, 3]` | Low (first number) and high (second number) height range for core images (can take [null, null]). **NB** `low <= high` otherwise you will see a `ValueError: minvalue must be less than or equal to maxvalue` error. | -| | `colorbar` | boolean | `true` | Whether to include the colorbar scale in plots. Options `true`, `false` | -| | `axes` | boolean | `true` | Whether to include the axes in the produced plots. | -| | `num_ticks` | null / int | `null` | Number of ticks to have along the x and y axes. Options : `null` (auto) or an integer >1 | -| | `cmap` | string | `null` | Colormap/colourmap to use (defaults to 'nanoscope' if null (defined in `topostats/topostats.mplstyle`). Other options are 'afmhot', 'viridis' etc., see [Matplotlib : Choosing Colormaps](https://matplotlib.org/stable/users/explain/colors/colormaps.html). | -| | `mask_cmap` | string | `blu` | Color used when masking regions. Options `blu`, `jet_r` or any valid Matplotlib colour. | -| | `histogram_log_axis` | boolean | `false` | Whether to plot hisograms using a logarithmic scale or not. Options: `true`, `false`. | -| `summary_stats` | `run` | boolean | `true` | Whether to generate summary statistical plots of the distribution of different metrics grouped by the image that has been processed. | -| | `config` | str | `null` | Path to a summary config YAML file that configures/controls how plotting is done. If one is not specified either the command line argument `--summary_config` value will be used or if that option is not invoked the default `topostats/summary_config.yaml` will be used. | +| Section | Sub-Section | Data Type | Default | Description | +| :-------------- | :-------------------------------- | :------------- | :-------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `base_dir` | | string | `./` | Directory to recursively search for files within.[^1] | +| `output_dir` | | string | `./output` | Directory that output should be saved to.[^1] | +| `log_level` | | string | `info` | Verbosity of logging, options are (in increasing order) `warning`, `error`, `info`, `debug`. | +| `cores` | | integer | `2` | Number of cores to run parallel processes on. | +| `file_ext` | | string | `.spm` | File extensions to search for. | +| `loading` | `channel` | string | `Height` | The channel of data to be processed, what this is will depend on the file-format you are processing and the channel you wish to process. | +| `filter` | `run` | boolean | `true` | Whether to run the filtering stage, without this other stages won't run so leave as `true`. | +| | `threshold_method` | str | `std_dev` | Threshold method for filtering, options are `ostu`, `std_dev` or `absolute`. | +| | `otsu_threshold_multiplier` | float | `1.0` | Factor by which the derived Otsu Threshold should be scaled. | +| | `threshold_std_dev` | dictionary | `10.0, 1.0` | A pair of values that scale the standard deviation, after scaling the standard deviation `below` is subtracted from the image mean to give the below/lower threshold and the `above` is added to the image mean to give the above/upper threshold. These values should _always_ be positive. | +| | `threshold_absolute` | dictionary | `-1.0, 1.0` | Below (first) and above (second) absolute threshold for separating data from the image background. | +| | `gaussian_size` | float | `0.5` | The number of standard deviations to build the Gaussian kernel and thus affects the degree of blurring. See [skimage.filters.gaussian](https://scikit-image.org/docs/dev/api/skimage.filters.html#skimage.filters.gaussian) and `sigma` for more information. | +| | `gaussian_mode` | string | `nearest` | | +| `grains` | `run` | boolean | `true` | Whether to run grain finding. Options `true`, `false` | +| | `row_alignment_quantile` | float | `0.5` | Quantile (0.0 to 1.0) to be used to determine the average background for the image. below values may improve flattening of large features. | +| | `smallest_grain_size_nm2` | int | `100` | The smallest size of grains to be included (in nm^2), anything smaller than this is considered noise and removed. **NB** must be `> 0.0`. | +| | `threshold_method` | float | `std_dev` | Threshold method for grain finding. Options : `otsu`, `std_dev`, `absolute` | +| | `otsu_threshold_multiplier` | | `1.0` | Factor by which the derived Otsu Threshold should be scaled. | +| | `threshold_std_dev` | dictionary | `10.0, 1.0` | A pair of values that scale the standard deviation, after scaling the standard deviation `below` is subtracted from the image mean to give the below/lower threshold and the `above` is added to the image mean to give the above/upper threshold. These values should _always_ be positive. | +| | `threshold_absolute` | dictionary | `-1.0, 1.0` | Below (first), above (second) absolute threshold for separating grains from the image background. | +| | `direction` | | `above` | Defines whether to look for grains above or below thresholds or both. Options: `above`, `below`, `both` | +| | `smallest_grain_size` | int | `50` | Catch-all value for the minimum size of grains. Measured in nanometres squared. All grains with area below than this value are removed. | +| | `absolute_area_threshold` | dictionary | `[300, 3000], [null, null]` | Area thresholds for above the image background (first) and below the image background (second), which grain sizes are permitted, measured in nanometres squared. All grains outside this area range are removed. | +| | `remove_edge_intersecting_grains` | boolean | `true` | Whether to remove grains that intersect the image border. _Do not change this unless you know what you are doing_. This will ruin any statistics relating to grain size, shape and DNA traces. | +| `grainstats` | `run` | boolean | `true` | Whether to calculate grain statistics. Options : `true`, `false` | +| | `cropped_size` | float | `40.0` | Force cropping of grains to this length (in nm) of square cropped images (can take `-1` for grain-sized box) | +| | `edge_detection_method` | str | `binary_erosion` | Type of edge detection method to use when determining the edges of grain masks before calculating statistics on them. Options : `binary_erosion`, `canny`. | +| `dnatracing` | `run` | boolean | `true` | Whether to run DNA Tracing. Options : true, false | +| | `min_skeleton_size` | int | `10` | The minimum number of pixels a skeleton should be for statistics to be calculated on it. Anything smaller than this is dropped but grain statistics are retained. | +| | `skeletonisation_method` | str | `topostats` | Skeletonisation method to use, possible options are `zhang`, `lee`, `thin` (from [Scikit-image Morphology module](https://scikit-image.org/docs/stable/api/skimage.morphology.html)) or the original bespoke TopoStas method `topostats`. | +| | `spline_step_size` | float | `7.0e-9` | The sampling rate of the spline in metres. This is the frequency at which points are sampled from fitted traces to act as guide points for the splining process using scipy's splprep. | +| | `spline_linear_smoothing` | float | `5.0` | The amount of smoothing to apply to splines of linear molecule traces. | +| | `spline_circular_smoothing` | float | `0.0` | The amount of smoothing to apply to splines of circular molecule traces. | +| | `pad_width` | int | 10 | Padding for individual grains when tracing. This is sometimes required if the bounding box around grains is too tight and they touch the edge of the image. | +| | `cores` | int | 1 | Number of cores to use for tracing. **NB** Currently this is NOT used and should be left commented in the YAML file. | +| `plotting` | `run` | boolean | `true` | Whether to run plotting. Options : `true`, `false` | +| | `style` | str | `topostats.mplstyle` | The default loads a custom [matplotlibrc param file](https://matplotlib.org/stable/users/explain/customizing.html#the-matplotlibrc-file) that comes with TopoStats. Users can specify the path to their own style file as an alternative. | +| | `save_format` | string | `null` | Format to save images in, `null` defaults to `png` see [matplotlib.pyplot.savefig](https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.savefig.html) | +| | `savefig_dpi` | string / float | `null` | Dots Per Inch (DPI), if `null` then the value `figure` is used, for other values (typically integers) see [#further-customisation] and [Matplotlib](https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.savefig.html). Low DPI's improve processing time but can reduce the plotted trace (but not the actual trace) accuracy. | +| | `pixel_interpolation` | string | `null` | Interpolation method for image plots. Recommended default 'null' prevents banding that occurs in some images. If interpolation is needed, we recommend `gaussian`. See [matplotlib imshow interpolations documentation](https://matplotlib.org/stable/gallery/images_contours_and_fields/interpolation_methods.html) for details. | +| | `image_set` | string | `all` | Which images to plot. Options : `all`, `core` | +| | `zrange` | list | `[0, 3]` | Low (first number) and high (second number) height range for core images (can take [null, null]). **NB** `low <= high` otherwise you will see a `ValueError: minvalue must be less than or equal to maxvalue` error. | +| | `colorbar` | boolean | `true` | Whether to include the colorbar scale in plots. Options `true`, `false` | +| | `axes` | boolean | `true` | Whether to include the axes in the produced plots. | +| | `num_ticks` | null / int | `null` | Number of ticks to have along the x and y axes. Options : `null` (auto) or an integer >1 | +| | `cmap` | string | `null` | Colormap/colourmap to use (defaults to 'nanoscope' if null (defined in `topostats/topostats.mplstyle`). Other options are 'afmhot', 'viridis' etc., see [Matplotlib : Choosing Colormaps](https://matplotlib.org/stable/users/explain/colors/colormaps.html). | +| | `mask_cmap` | string | `blu` | Color used when masking regions. Options `blu`, `jet_r` or any valid Matplotlib colour. | +| | `histogram_log_axis` | boolean | `false` | Whether to plot hisograms using a logarithmic scale or not. Options: `true`, `false`. | +| `summary_stats` | `run` | boolean | `true` | Whether to generate summary statistical plots of the distribution of different metrics grouped by the image that has been processed. | +| | `config` | str | `null` | Path to a summary config YAML file that configures/controls how plotting is done. If one is not specified either the command line argument `--summary_config` value will be used or if that option is not invoked the default `topostats/summary_config.yaml` will be used. | ## Summary Configuration From 407bf1bced3bce46792c7c884d1ec2f07383e443 Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Mon, 22 Jan 2024 12:03:17 +0000 Subject: [PATCH 12/35] PR Feedback Thanks for the feedback @MaxGamil-Sheffield this commit... + Loosens validation of `cmap` so that any Matplotlib color map can be used. + Removes reporting of DPI/output format/cmap from early logging stages and output of `completion_message()`. I hadn't thought about `None` being listed in the `completion_message()` for DPI/Output Format/cmap and appreciate this would be confusing so thanks for highlighting that. The solution I've gone for (removing the additions that reported these) is different from that suggested (update the `config` dictionary with parameters from `mpl.rcParams` early in processing). My reasoning being... + Previously we didn't report these, no one has ever asked to see them in the logging output. + We write configuration options to YAML file via `write_yaml()` at the end of processing. Its a verbatim copy of that which was used (either user specified or `default_config.yaml`)and it contains the settings used. If a user didn't specify DPI/cmap/format I'm not sure we should alter this. It could be argued it is useful to provide them but then that would also require writing _all_ other configuration/plotting options to be consistent should the default values ever change in the future. Currently only a handful of parameters are read from `topostats.mplstyle` and this is conditional on whether any of these are being over-ridden or not when instantiating the `Images()` class. Currently we ``` plottingfuncs.Images() > load_mplstyle() > Set DPI/cmap/format based on arguments to Images() ``` It is certainly possible to change this process as suggested and.. ``` load_mplstyle() > Update DPI/cmap/format > plottingfuncs.Images() ``` ...but that is a larger amount of work to undertake and introduces scope drift to this PR. If it is desirable to report this information in logging and/or ensure the configuration file that is written contains the default parameters from `topostats.mplstyle` then we can address that as a separate issue. --- topostats/processing.py | 5 +---- topostats/run_topostats.py | 4 +--- topostats/validation.py | 7 +++---- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/topostats/processing.py b/topostats/processing.py index 434a94626e..f6d0401337 100644 --- a/topostats/processing.py +++ b/topostats/processing.py @@ -721,10 +721,7 @@ def completion_message(config: dict, img_files: list, summary_config: dict, imag f" Successfully Processed^1 : {images_processed} ({(images_processed * 100) / len(img_files)}%)\n" f" All statistics : {str(config['output_dir'])}/all_statistics.csv\n" f" Distribution Plots : {distribution_plots_message}\n\n" - f" Configuration : {config['output_dir']}/config.yaml\n" - f" DPI : {config['plotting']['savefig_dpi']}\n" - f" Output image format : {config['plotting']['savefig_format']}\n" - f" Colormap : {config['plotting']['cmap']}\n\n" + f" Configuration : {config['output_dir']}/config.yaml\n\n" f" Email : topostats@sheffield.ac.uk\n" f" Documentation : https://afm-spm.github.io/topostats/\n" f" Source Code : https://github.com/AFM-SPM/TopoStats/\n" diff --git a/topostats/run_topostats.py b/topostats/run_topostats.py index ecb5d6cbe1..fa0b6a6cac 100644 --- a/topostats/run_topostats.py +++ b/topostats/run_topostats.py @@ -99,9 +99,6 @@ def run_topostats(args=None): # noqa: C901 sys.exit() LOGGER.info(f"Thresholding method (Filtering) : {config['filter']['threshold_method']}") LOGGER.info(f"Thresholding method (Grains) : {config['grains']['threshold_method']}") - LOGGER.info(f"DPI : {config['plotting']['savefig_dpi']}") - LOGGER.info(f"Output image format : {config['plotting']['savefig_format']}") - LOGGER.info(f"Colormap : {config['plotting']['cmap']}") LOGGER.debug(f"Configuration after update : \n{pformat(config, indent=4)}") # noqa : T203 processing_function = partial( @@ -223,4 +220,5 @@ def run_topostats(args=None): # noqa: C901 config["plotting"].pop("plot_dict") write_yaml(config, output_dir=config["output_dir"]) LOGGER.debug(f"Images processed : {images_processed}") + # Update config with plotting defaults for printing completion_message(config, img_files, summary_config, images_processed) diff --git a/topostats/validation.py b/topostats/validation.py index bf2a6e8bc9..8df8fdfdbd 100644 --- a/topostats/validation.py +++ b/topostats/validation.py @@ -284,10 +284,9 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: ), "cmap": Or( None, - "afmhot", - "nanoscope", - "gwyddion", - error="Invalid value in config for 'plotting.cmap', valid values are 'afmhot', 'nanoscope' or 'gwyddion'", + str, + error="Invalid value in config for 'plotting.cmap', valid values are 'afmhot', 'nanoscope', " + "'gwyddion' or values supported by Matplotlib", ), "mask_cmap": str, "histogram_log_axis": Or( From 6336f35131c14aa66619d9f7d01823b19f76eea4 Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Wed, 24 Jan 2024 14:19:21 +0000 Subject: [PATCH 13/35] Addressing further PR feedback. + Correctly details in validation the values for `figure` in plotting. + Details what the `core` set outputs. I've not added the request to add links in validation output to Matplotlib cmap as links already exist in the documentation and I would expect if someone wishes to use a particular colormap here they would already be aware of what the options are. --- docs/configuration.md | 6 +++--- topostats/validation.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index 4adf202858..2089819ce7 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -96,7 +96,7 @@ Aside from the comments in YAML file itself the fields are described below. | | `save_format` | string | `null` | Format to save images in, `null` defaults to `png` see [matplotlib.pyplot.savefig](https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.savefig.html) | | | `savefig_dpi` | string / float | `null` | Dots Per Inch (DPI), if `null` then the value `figure` is used, for other values (typically integers) see [#further-customisation] and [Matplotlib](https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.savefig.html). Low DPI's improve processing time but can reduce the plotted trace (but not the actual trace) accuracy. | | | `pixel_interpolation` | string | `null` | Interpolation method for image plots. Recommended default 'null' prevents banding that occurs in some images. If interpolation is needed, we recommend `gaussian`. See [matplotlib imshow interpolations documentation](https://matplotlib.org/stable/gallery/images_contours_and_fields/interpolation_methods.html) for details. | -| | `image_set` | string | `all` | Which images to plot. Options : `all`, `core` | +| | `image_set` | string | `all` | Which images to plot. Options : `all`, `core` (flattened image, grain mask overlay and trace overlay only). | | | `zrange` | list | `[0, 3]` | Low (first number) and high (second number) height range for core images (can take [null, null]). **NB** `low <= high` otherwise you will see a `ValueError: minvalue must be less than or equal to maxvalue` error. | | | `colorbar` | boolean | `true` | Whether to include the colorbar scale in plots. Options `true`, `false` | | | `axes` | boolean | `true` | Whether to include the axes in the produced plots. | @@ -169,8 +169,8 @@ through the basics. ### Further customisation Whilst the overall look of images is controlled in this manner there is one additional file that controls how -images are plotted in terms of filenames, titles and image types and whether an image is part of the `core` subset that -are always generated or not. +images are plotted in terms of filenames, titles and image types and whether an image is part of the `core` subset +(flattened image, grain mask overlay and trace overlay) that are always generated or not. This is the `topostats/plotting_dictionary.yaml` which for each image stage defines whether it is a component of the `core` subset of images that are always generated, sets the `filename`, the `title` on the plot, the `image_type` diff --git a/topostats/validation.py b/topostats/validation.py index 8df8fdfdbd..2b7aecf897 100644 --- a/topostats/validation.py +++ b/topostats/validation.py @@ -239,7 +239,7 @@ def validate_config(config: dict, schema: Schema, config_type: str) -> None: None, "figure", lambda n: n > 0, - error="Invalid value in config for plotting.savefig_dpi, valid" "values are 'figure' or integers", + error="Invalid value in config for plotting.savefig_dpi, valid" "values are 'figure' or floats", ), "image_set": Or( "all", From bfc25514c3bd9de263abb0dd8988b5e678eb21ac Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Mon, 29 Jan 2024 14:38:54 +0000 Subject: [PATCH 14/35] pytest<8.0.0 Temporary fix for #787 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ab60834665..1825c0d3b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ dependencies = [ [project.optional-dependencies] tests = [ - "pytest", + "pytest<8.0.0", "pytest-cov", "pytest-github-actions-annotate-failures", "pytest-lazy-fixture", From 143884b6a0726cc5ca93bb16e0a3011a24b88ec0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 20:37:42 +0000 Subject: [PATCH 15/35] [pre-commit.ci] pre-commit-autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/DavidAnson/markdownlint-cli2: v0.11.0 → v0.12.1](https://github.com/DavidAnson/markdownlint-cli2/compare/v0.11.0...v0.12.1) - [github.com/astral-sh/ruff-pre-commit: v0.1.9 → v0.2.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.9...v0.2.0) - [github.com/psf/black-pre-commit-mirror: 23.12.1 → 24.1.1](https://github.com/psf/black-pre-commit-mirror/compare/23.12.1...24.1.1) - [github.com/kynan/nbstripout: 0.6.1 → 0.7.1](https://github.com/kynan/nbstripout/compare/0.6.1...0.7.1) --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8f3da6cf12..a75d788d0e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,7 +19,7 @@ repos: types: [python, yaml, markdown] - repo: https://github.com/DavidAnson/markdownlint-cli2 - rev: v0.11.0 + rev: v0.12.1 hooks: - id: markdownlint-cli2 args: [] @@ -32,13 +32,13 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.1.9 + rev: v0.2.0 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix, --show-fixes] - repo: https://github.com/psf/black-pre-commit-mirror - rev: 23.12.1 + rev: 24.1.1 hooks: - id: black types: [python] @@ -64,7 +64,7 @@ repos: - id: prettier - repo: https://github.com/kynan/nbstripout - rev: 0.6.1 + rev: 0.7.1 hooks: - id: nbstripout From c2e6223c88b3c89c393965b69ba217775a1ea91c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 20:38:32 +0000 Subject: [PATCH 16/35] [pre-commit.ci] Fixing issues with pre-commit --- notebooks/00-Walkthrough-minicircle.ipynb | 108 +++++++++--------- .../02-Summary-statistics-and-plots.ipynb | 76 ++++++------ notebooks/03-Plotting-scans.ipynb | 70 ++++++------ tests/conftest.py | 57 ++++----- tests/test_filters.py | 1 + tests/test_filters_minicircle.py | 1 + tests/test_grains.py | 1 + tests/test_grains_minicircle.py | 1 + tests/test_grainstats.py | 1 + tests/test_grainstats_minicircle.py | 1 + tests/test_io.py | 1 + tests/test_logs.py | 1 + tests/test_run_topostats.py | 1 + tests/test_scars.py | 1 + tests/test_thresholds.py | 1 + tests/test_utils.py | 1 + tests/test_validation.py | 1 + tests/tracing/test_dnacurvature.py | 1 + tests/tracing/test_dnatracing_methods.py | 1 + tests/tracing/test_dnatracing_multigrain.py | 1 + tests/tracing/test_dnatracing_single_grain.py | 1 + tests/tracing/test_skeletonize.py | 1 + topostats/__init__.py | 1 + topostats/__main__.py | 1 + topostats/filters.py | 1 + topostats/grains.py | 1 + topostats/grainstats.py | 1 + topostats/io.py | 1 + topostats/logs/logs.py | 1 + topostats/scars.py | 1 + topostats/theme.py | 1 + topostats/thresholds.py | 1 + topostats/tracing/dnacurvature.py | 1 + topostats/tracing/dnatracing.py | 1 + topostats/tracing/skeletonize.py | 1 + topostats/tracing/tracingfuncs.py | 1 - 36 files changed, 187 insertions(+), 156 deletions(-) diff --git a/notebooks/00-Walkthrough-minicircle.ipynb b/notebooks/00-Walkthrough-minicircle.ipynb index 8417482da2..34cab85cc6 100644 --- a/notebooks/00-Walkthrough-minicircle.ipynb +++ b/notebooks/00-Walkthrough-minicircle.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "dc681ed4-087e-45a1-9f55-91d23bcd42de", + "id": "0", "metadata": {}, "source": [ "# TopoStats - Minicircle Walk-Through\n", @@ -12,7 +12,7 @@ }, { "cell_type": "markdown", - "id": "2b595bc8-ac74-4182-8ff4-3a8df0a384c7", + "id": "1", "metadata": {}, "source": [ "## Installing TopoStats\n", @@ -31,7 +31,7 @@ }, { "cell_type": "markdown", - "id": "c67d027d-4fee-4dba-85e0-624d99850ed6", + "id": "2", "metadata": {}, "source": [ "## Getting Started\n" @@ -39,7 +39,7 @@ }, { "cell_type": "markdown", - "id": "9fe935a6-591d-45fb-a65b-83087e320842", + "id": "3", "metadata": {}, "source": [ "### Loading Libraries and Modules\n", @@ -51,7 +51,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ec97eb28-ac26-449b-b419-fa89873e0ef7", + "id": "4", "metadata": {}, "outputs": [], "source": [ @@ -74,7 +74,7 @@ }, { "cell_type": "markdown", - "id": "457ad967-c73f-4ddf-9ca7-c1dfa5c5c258", + "id": "5", "metadata": {}, "source": [ "## Finding Files\n", @@ -89,7 +89,7 @@ { "cell_type": "code", "execution_count": null, - "id": "735af109-2885-44d4-9064-01b4dd93cd40", + "id": "6", "metadata": {}, "outputs": [], "source": [ @@ -105,7 +105,7 @@ }, { "cell_type": "markdown", - "id": "090aa036-2792-441b-914c-038073ee616a", + "id": "7", "metadata": {}, "source": [ "`image_files` is a list of images that match and we can look at that list." @@ -114,7 +114,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fbc024de-7cdc-4fe6-8863-c855a7d3a658", + "id": "8", "metadata": {}, "outputs": [], "source": [ @@ -124,7 +124,7 @@ { "attachments": {}, "cell_type": "markdown", - "id": "9702d05e-31bd-4321-904f-af7642739c26", + "id": "9", "metadata": {}, "source": [ "## Loading a Configuration\n", @@ -223,7 +223,7 @@ { "cell_type": "code", "execution_count": null, - "id": "138ab1a0-888f-4631-92cd-4e026182b8d7", + "id": "10", "metadata": {}, "outputs": [], "source": [ @@ -236,7 +236,7 @@ }, { "cell_type": "markdown", - "id": "2d65ca8b-6abe-48ef-8b01-c098fee42f2a", + "id": "11", "metadata": {}, "source": [ "You can look at all of the options using the `json` package to \"pretty\" print the dictionary which makes it easier to\n", @@ -247,7 +247,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5cc7d226-1c55-4922-8629-8d011dceb36a", + "id": "12", "metadata": {}, "outputs": [], "source": [ @@ -256,7 +256,7 @@ }, { "cell_type": "markdown", - "id": "c4244a01-43c9-440f-a497-27485806a65e", + "id": "13", "metadata": {}, "source": [ "We will use the configuration options we have loaded in processing the `minicircle.spm` image. For convenience we save\n", @@ -269,7 +269,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2ef8e6f7-cee9-4e1e-a99d-7a431d8419bb", + "id": "14", "metadata": {}, "outputs": [], "source": [ @@ -289,7 +289,7 @@ }, { "cell_type": "markdown", - "id": "936bc985-0c5b-45ca-89bc-6937145c09d2", + "id": "15", "metadata": {}, "source": [ "## Load Scans\n", @@ -304,7 +304,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a3adfe6f-2d36-40eb-a9ef-71492c74d04a", + "id": "16", "metadata": {}, "outputs": [], "source": [ @@ -319,7 +319,7 @@ }, { "cell_type": "markdown", - "id": "9f8a8b94-aaf0-4943-990c-801bd05aeb49", + "id": "17", "metadata": {}, "source": [ "Now that we have loaded the data we can start to process it. The first step is filtering the image." @@ -327,7 +327,7 @@ }, { "cell_type": "markdown", - "id": "df6cf4a8-771d-4176-9d4a-9133c5c35cad", + "id": "18", "metadata": {}, "source": [ "## Filter Image\n", @@ -350,7 +350,7 @@ { "cell_type": "code", "execution_count": null, - "id": "079d63e6-de86-47f9-afee-5cb85cef67e7", + "id": "19", "metadata": {}, "outputs": [], "source": [ @@ -384,7 +384,7 @@ }, { "cell_type": "markdown", - "id": "03e5ca8f-2e28-4ada-9209-6c3786abc9ec", + "id": "20", "metadata": {}, "source": [ "The `filtered_image` now has a a number of NumPy arrays saved in the `.images` dictionary that can be accessed and plotted. To view\n", @@ -394,7 +394,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b7b50fdf-befc-44af-906a-89c2facc6f90", + "id": "21", "metadata": {}, "outputs": [], "source": [ @@ -403,7 +403,7 @@ }, { "cell_type": "markdown", - "id": "f0df4544-db43-410f-8e93-ba1f1038c9d1", + "id": "22", "metadata": {}, "source": [ "To plot the raw extracted pixels you can use the built-in NumPy method `imshow()`.\n" @@ -412,7 +412,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0ade9111-82ff-49cf-a653-114801461f73", + "id": "23", "metadata": {}, "outputs": [], "source": [ @@ -423,7 +423,7 @@ }, { "cell_type": "markdown", - "id": "4d615afe-8b85-4a49-a309-6247077b8881", + "id": "24", "metadata": {}, "source": [ "TopoStats includes a custom plotting class `Images` which formats plots in a more familiar manner.\n", @@ -443,7 +443,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d37dc807-4422-4d33-8f18-6c4f228bf83f", + "id": "25", "metadata": {}, "outputs": [], "source": [ @@ -459,7 +459,7 @@ }, { "cell_type": "markdown", - "id": "17aec3b3-b6b7-464d-8f8f-bafe98b5d2bb", + "id": "26", "metadata": {}, "source": [ "Here we plot the image after processing and zero-averaging the background but with the `viridis` palette and\n", @@ -469,7 +469,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0d32f5ef-b92e-4496-8f98-20739ff49eff", + "id": "27", "metadata": {}, "outputs": [], "source": [ @@ -495,7 +495,7 @@ }, { "cell_type": "markdown", - "id": "dcd4a5d0-9eef-42e4-9b3c-e9a30679d932", + "id": "28", "metadata": {}, "source": [ "## Finding Grains\n", @@ -518,7 +518,7 @@ { "cell_type": "code", "execution_count": null, - "id": "78f9c783-7862-4bd1-b5d7-0d8264589be1", + "id": "29", "metadata": {}, "outputs": [], "source": [ @@ -546,7 +546,7 @@ { "attachments": {}, "cell_type": "markdown", - "id": "eeb5d238-0315-4e02-8db8-ac49ee141447", + "id": "30", "metadata": {}, "source": [ "The `grains` object now also contains a series of images that we can plot, however, because both `below` and\n", @@ -556,7 +556,7 @@ { "cell_type": "code", "execution_count": null, - "id": "877afd6c-e8aa-437a-8478-c57548faecdc", + "id": "31", "metadata": {}, "outputs": [], "source": [ @@ -567,7 +567,7 @@ }, { "cell_type": "markdown", - "id": "4980c59e-fcdd-44b6-9d7f-97cd84b9d953", + "id": "32", "metadata": {}, "source": [ "And we can again use the `plot_and_save()` function to plot these." @@ -576,7 +576,7 @@ { "cell_type": "code", "execution_count": null, - "id": "71ca9811-bf58-4fa3-8015-5c6be61f969e", + "id": "33", "metadata": {}, "outputs": [], "source": [ @@ -595,7 +595,7 @@ { "attachments": {}, "cell_type": "markdown", - "id": "16e29698-4bd1-44ad-bd3b-dbc6d3744e08", + "id": "34", "metadata": {}, "source": [ "### Thresholds\n", @@ -625,7 +625,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3db1923c-97fb-4e08-b682-9b69d76345a1", + "id": "35", "metadata": {}, "outputs": [], "source": [ @@ -649,7 +649,7 @@ }, { "cell_type": "markdown", - "id": "7e8f2f83-f99c-4e9e-a6b2-4c2292cda3e9", + "id": "36", "metadata": {}, "source": [ "This is important because you need to know where the resulting images are stored within the `Grains.direction`\n", @@ -659,7 +659,7 @@ { "cell_type": "code", "execution_count": null, - "id": "77fd8ac7-067c-4989-a41f-dfea8470f429", + "id": "37", "metadata": {}, "outputs": [], "source": [ @@ -669,7 +669,7 @@ }, { "cell_type": "markdown", - "id": "08fee325-0ad2-48a7-a332-7974890994d6", + "id": "38", "metadata": {}, "source": [ "Each `direction` dictionary is a series of NumPy arrays representing the cleaned images and these can be plotted." @@ -677,7 +677,7 @@ }, { "cell_type": "markdown", - "id": "71ea42bd-234a-4e62-af19-d9900c1680aa", + "id": "39", "metadata": {}, "source": [ "## Grain Statistics\n", @@ -699,7 +699,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b1de4c2c-b6df-4c0a-b829-d70111d31693", + "id": "40", "metadata": {}, "outputs": [], "source": [ @@ -718,7 +718,7 @@ }, { "cell_type": "markdown", - "id": "893a3891-dbb9-45e5-9c7a-a3ee7160744d", + "id": "41", "metadata": {}, "source": [ "The `statistics` is a [Pandas\n", @@ -729,7 +729,7 @@ { "cell_type": "code", "execution_count": null, - "id": "21a003a3-49ca-401c-9173-2c60ea56f329", + "id": "42", "metadata": {}, "outputs": [], "source": [ @@ -738,7 +738,7 @@ }, { "cell_type": "markdown", - "id": "f2ebf89b-4e1e-4a8c-b1b7-bb9343f2c6ea", + "id": "43", "metadata": {}, "source": [ "Further we can summarise the dataframe or a subset of variables." @@ -747,7 +747,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ee090ac5-6023-4fdd-835a-e58ee184316a", + "id": "44", "metadata": {}, "outputs": [], "source": [ @@ -756,7 +756,7 @@ }, { "cell_type": "markdown", - "id": "c2ce88ce-9382-45a4-af4e-924aa28d9540", + "id": "45", "metadata": {}, "source": [ "### Plotting Individual Grains\n", @@ -775,7 +775,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1b0dcaf3-9e9b-468d-8596-2e613fda874b", + "id": "46", "metadata": {}, "outputs": [], "source": [ @@ -791,7 +791,7 @@ }, { "cell_type": "markdown", - "id": "b38127f7-9a6f-4970-b60e-0db2087e848f", + "id": "47", "metadata": {}, "source": [ "## DNA Tracing\n", @@ -802,7 +802,7 @@ { "cell_type": "code", "execution_count": null, - "id": "777e48e3-908c-46a9-8795-c9ca13234609", + "id": "48", "metadata": {}, "outputs": [], "source": [ @@ -817,7 +817,7 @@ }, { "cell_type": "markdown", - "id": "10e14df4-54a5-4e4b-807a-cdefd4563aa4", + "id": "49", "metadata": {}, "source": [ "The results are a dictionary, and the statistics are stored under the `\"statistics\"` key:" @@ -826,7 +826,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ec57f0f5-24a3-419d-9f49-a29749124767", + "id": "50", "metadata": {}, "outputs": [], "source": [ @@ -837,7 +837,7 @@ }, { "cell_type": "markdown", - "id": "7811717b-aa0e-4c03-b4b5-74223849b062", + "id": "51", "metadata": {}, "source": [ "### Merge GrainStats and TracingStats\n", @@ -850,7 +850,7 @@ { "cell_type": "code", "execution_count": null, - "id": "00804e17", + "id": "52", "metadata": {}, "outputs": [], "source": [ @@ -860,7 +860,7 @@ }, { "cell_type": "markdown", - "id": "04fe3e9d-45c9-4171-92d1-699a72888b5a", + "id": "53", "metadata": {}, "source": [ "These statistics can now be plotted to show the distribution of the different metrics. Please see the Jupyter Notebook\n", diff --git a/notebooks/02-Summary-statistics-and-plots.ipynb b/notebooks/02-Summary-statistics-and-plots.ipynb index 1f09ce8d30..698daa823e 100644 --- a/notebooks/02-Summary-statistics-and-plots.ipynb +++ b/notebooks/02-Summary-statistics-and-plots.ipynb @@ -3,7 +3,7 @@ { "attachments": {}, "cell_type": "markdown", - "id": "c4ed3f2e-ded8-4614-9b6e-026051f06d40", + "id": "0", "metadata": {}, "source": [ "# Summarising and Plotting Statistics\n", @@ -38,7 +38,7 @@ { "attachments": {}, "cell_type": "markdown", - "id": "e9925511-9e30-4c69-86cf-531cda8fea10", + "id": "1", "metadata": {}, "source": [ "## Load Libraries" @@ -47,7 +47,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b95d8fd7-44dd-42b2-af15-12302221e59a", + "id": "2", "metadata": {}, "outputs": [], "source": [ @@ -63,7 +63,7 @@ { "attachments": {}, "cell_type": "markdown", - "id": "46f8ee5e-428e-4b91-972a-45d478728f18", + "id": "3", "metadata": {}, "source": [ "## Load `all_statistics.csv`\n", @@ -79,7 +79,7 @@ { "cell_type": "code", "execution_count": null, - "id": "096b8ef4-08d9-4ed6-8009-a72328133720", + "id": "4", "metadata": {}, "outputs": [], "source": [ @@ -90,7 +90,7 @@ { "attachments": {}, "cell_type": "markdown", - "id": "1902070d-4016-4105-8712-1719bff4c8fb", + "id": "5", "metadata": {}, "source": [ "## Data Manipulation\n", @@ -103,7 +103,7 @@ { "attachments": {}, "cell_type": "markdown", - "id": "3aa4c9f8-adf1-4952-9ff5-a2fe009e99fc", + "id": "6", "metadata": {}, "source": [ "### Splitting `basename`\n", @@ -119,7 +119,7 @@ { "cell_type": "code", "execution_count": null, - "id": "94177aff-5790-460d-9fe4-876a6f1fd20c", + "id": "7", "metadata": {}, "outputs": [], "source": [ @@ -131,7 +131,7 @@ { "attachments": {}, "cell_type": "markdown", - "id": "20cb9687-dedf-4cbf-8b2c-cf1e9dd7cf19", + "id": "8", "metadata": {}, "source": [ "You can now select which elements of `basename_components_df` to merge back into the original `df`. To just include both\n", @@ -141,7 +141,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e5e19c55-61c4-4264-88e9-d345ded08e6e", + "id": "9", "metadata": {}, "outputs": [], "source": [ @@ -154,7 +154,7 @@ { "attachments": {}, "cell_type": "markdown", - "id": "451a88c5-46eb-4dbe-862d-b6aee2948376", + "id": "10", "metadata": {}, "source": [ "## Plotting with Pandas" @@ -163,7 +163,7 @@ { "attachments": {}, "cell_type": "markdown", - "id": "91585e8a-8653-4328-b78c-9da32ade4fd2", + "id": "11", "metadata": {}, "source": [ "### Plotting Contour Lengths" @@ -172,7 +172,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ab89b50a-ce17-4dc1-8139-5402b8298efb", + "id": "12", "metadata": {}, "outputs": [], "source": [ @@ -182,7 +182,7 @@ { "attachments": {}, "cell_type": "markdown", - "id": "4239d57b-6840-4261-a98a-a1c25a8dec1d", + "id": "13", "metadata": {}, "source": [ "### Plotting End to End Distance of non-Circular grains\n", @@ -193,7 +193,7 @@ { "cell_type": "code", "execution_count": null, - "id": "cf4d92f0-b624-452c-9f51-52fe70dfde88", + "id": "14", "metadata": {}, "outputs": [], "source": [ @@ -205,7 +205,7 @@ { "attachments": {}, "cell_type": "markdown", - "id": "94270659-cc2a-4606-9fa9-80ed5fac82d2", + "id": "15", "metadata": {}, "source": [ "### Multiple Images\n", @@ -219,7 +219,7 @@ { "cell_type": "code", "execution_count": null, - "id": "529aedb3-2d4e-4703-86a0-bcba99caee57", + "id": "16", "metadata": {}, "outputs": [], "source": [ @@ -256,7 +256,7 @@ { "attachments": {}, "cell_type": "markdown", - "id": "6a57eb1a-3093-4ca6-8411-e62ea2614730", + "id": "17", "metadata": {}, "source": [ "### Contour Length from Three Processed Images" @@ -265,7 +265,7 @@ { "cell_type": "code", "execution_count": null, - "id": "afd797d8-9775-4f62-8da9-d135eaa34b49", + "id": "18", "metadata": {}, "outputs": [], "source": [ @@ -280,7 +280,7 @@ { "attachments": {}, "cell_type": "markdown", - "id": "b362e9af-8577-4c44-8afb-199ef2535607", + "id": "19", "metadata": {}, "source": [ "The bin width in above figure varies for each \"image\" (`smaller`, `larger` and `minicircle`). This is because each\n", @@ -294,7 +294,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9820d259-680e-49fd-a1eb-e14d200a0b7a", + "id": "20", "metadata": {}, "outputs": [], "source": [ @@ -314,7 +314,7 @@ { "attachments": {}, "cell_type": "markdown", - "id": "c502a69c-79ec-467c-964a-81b3f3b87913", + "id": "21", "metadata": {}, "source": [ "### Ignoring Image\n", @@ -328,7 +328,7 @@ { "cell_type": "code", "execution_count": null, - "id": "19197e7c-0abf-4f9a-b89c-2847c2c2b6d6", + "id": "22", "metadata": {}, "outputs": [], "source": [ @@ -339,7 +339,7 @@ { "attachments": {}, "cell_type": "markdown", - "id": "e1bdba05-e0a6-42cc-bddd-ed59fe3d45f5", + "id": "23", "metadata": {}, "source": [ "### Violin Plot of `max_feret` using Seaborn\n", @@ -351,7 +351,7 @@ { "cell_type": "code", "execution_count": null, - "id": "68aa386c-fa7a-4ee3-8310-83e4b62d67a9", + "id": "24", "metadata": {}, "outputs": [], "source": [ @@ -382,7 +382,7 @@ { "attachments": {}, "cell_type": "markdown", - "id": "8f56b8fa-8c55-47a5-9d32-d461a1c639b6", + "id": "25", "metadata": {}, "source": [ "### Joint Plot\n", @@ -392,7 +392,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6aa28c57-66fb-4857-b0df-9ac8f2725173", + "id": "26", "metadata": {}, "outputs": [], "source": [ @@ -403,7 +403,7 @@ { "attachments": {}, "cell_type": "markdown", - "id": "300632da-8be7-4017-a958-f3ebbec01c1d", + "id": "27", "metadata": {}, "source": [ "# Loading Pickles\n", @@ -423,7 +423,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fded1124-b8f3-44b8-b73e-331079ebdce0", + "id": "28", "metadata": {}, "outputs": [], "source": [ @@ -440,7 +440,7 @@ { "attachments": {}, "cell_type": "markdown", - "id": "313521d1-a033-4402-bb12-f495f4c76abd", + "id": "29", "metadata": {}, "source": [ "The object `my_plots` is a nested dictionary where the \"keys\" to the dictionary are the names of the statistic that have been\n", @@ -451,7 +451,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1bf65589-e598-4176-913b-3924ee334c95", + "id": "30", "metadata": {}, "outputs": [], "source": [ @@ -461,7 +461,7 @@ { "attachments": {}, "cell_type": "markdown", - "id": "246fd31c-2b13-404b-9ef2-74e87ce5b0e7", + "id": "31", "metadata": {}, "source": [ "We see that the `area`, `area_cartesian_bbox` and `contour_length`, `end_to_end_distance` and `volume` statistics are\n", @@ -473,7 +473,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c8db9278-128d-48c1-9041-02eccd59f363", + "id": "32", "metadata": {}, "outputs": [], "source": [ @@ -483,7 +483,7 @@ { "attachments": {}, "cell_type": "markdown", - "id": "1d0d2ebe-081d-40a7-b7c0-4e72178937ec", + "id": "33", "metadata": {}, "source": [ "We see that both `dist` and `violin` plots were generated. To extract these to objects we unpack the values of the\n", @@ -494,7 +494,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b76c70eb-ef8e-4a26-8170-702b0b2bd809", + "id": "34", "metadata": {}, "outputs": [], "source": [ @@ -506,7 +506,7 @@ { "attachments": {}, "cell_type": "markdown", - "id": "fb3ac863-85ba-4d9b-b366-369463c194a5", + "id": "35", "metadata": {}, "source": [ "We can now look at the figure and modify these as we would like, for example to change the `title` and `xlabel` values." @@ -515,7 +515,7 @@ { "cell_type": "code", "execution_count": null, - "id": "869984ae-0927-42d1-b6cc-bd127afcc747", + "id": "36", "metadata": {}, "outputs": [], "source": [ @@ -525,7 +525,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fc8bc1ad-c388-4817-9b3f-651cc26291a7", + "id": "37", "metadata": {}, "outputs": [], "source": [ diff --git a/notebooks/03-Plotting-scans.ipynb b/notebooks/03-Plotting-scans.ipynb index f6268526cc..5863a08d3c 100644 --- a/notebooks/03-Plotting-scans.ipynb +++ b/notebooks/03-Plotting-scans.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "a2f00ebf-d6b2-449d-8b16-f29c5b447540", + "id": "0", "metadata": {}, "source": [ "# Plotting Scans\n", @@ -25,7 +25,7 @@ }, { "cell_type": "markdown", - "id": "5f4a00d6-93ed-469d-8323-cf49f68ef266", + "id": "1", "metadata": {}, "source": [ "# Setup\n", @@ -46,7 +46,7 @@ { "cell_type": "code", "execution_count": null, - "id": "187769c3-cec9-4fd4-8414-fae834b20405", + "id": "2", "metadata": {}, "outputs": [], "source": [ @@ -79,7 +79,7 @@ }, { "cell_type": "markdown", - "id": "35320ff3-57f4-4e0b-a337-7286cc8289cf", + "id": "3", "metadata": {}, "source": [ "# Load\n", @@ -92,7 +92,7 @@ { "cell_type": "code", "execution_count": null, - "id": "15b07e85-6471-4e7f-812c-3ac24b157baf", + "id": "4", "metadata": {}, "outputs": [], "source": [ @@ -102,7 +102,7 @@ }, { "cell_type": "markdown", - "id": "6ad1c755-0bc6-421b-85d9-a867a939ee4f", + "id": "5", "metadata": {}, "source": [ "## Configuration\n", @@ -123,7 +123,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9e380fde-d3e2-4f1c-8156-4f23550cc956", + "id": "6", "metadata": {}, "outputs": [], "source": [ @@ -148,7 +148,7 @@ }, { "cell_type": "markdown", - "id": "92002ab0-c8f9-4cbf-981b-c9e1617c2395", + "id": "7", "metadata": {}, "source": [ "# Plotting with TopoStats\n", @@ -170,7 +170,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e87ae43c-4159-45bb-a6b6-d31f695a4561", + "id": "8", "metadata": {}, "outputs": [], "source": [ @@ -179,7 +179,7 @@ }, { "cell_type": "markdown", - "id": "274386f9-da5a-414e-a97b-c52532a99f04", + "id": "9", "metadata": {}, "source": [ "Classes such as `Image` have \"methods\" associated with them, these are what does the hard work and produces output. This\n", @@ -195,7 +195,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b89355a7-47ee-4807-9153-a06896e7903d", + "id": "10", "metadata": {}, "outputs": [], "source": [ @@ -205,7 +205,7 @@ }, { "cell_type": "markdown", - "id": "fed79730-2116-45b4-83ef-ed32f2e05868", + "id": "11", "metadata": {}, "source": [ "### Changing Properties\n", @@ -219,7 +219,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1cc757d6-f207-4a53-b608-9bfc4c9e15ce", + "id": "12", "metadata": {}, "outputs": [], "source": [ @@ -232,7 +232,7 @@ }, { "cell_type": "markdown", - "id": "f0f6a175-60ae-4ffb-9481-82ca174483b5", + "id": "13", "metadata": {}, "source": [ "### Colormaps\n", @@ -244,7 +244,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ec990a96-755d-4757-84a9-b2eb1053e042", + "id": "14", "metadata": {}, "outputs": [], "source": [ @@ -257,7 +257,7 @@ }, { "cell_type": "markdown", - "id": "87ae1a2f-06e1-439e-927a-48890cce98cd", + "id": "15", "metadata": {}, "source": [ "Internally `Image()` is using the colormap palette defined in the `topostats.theme.Colormap` class that has been\n", @@ -267,7 +267,7 @@ }, { "cell_type": "markdown", - "id": "d4a9d212-d9f7-4664-acbf-1603e3c2730b", + "id": "16", "metadata": {}, "source": [ "## Plotting a Region\n", @@ -285,7 +285,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5d33941b-65ea-488c-9478-c6a76c633e78", + "id": "17", "metadata": {}, "outputs": [], "source": [ @@ -294,7 +294,7 @@ }, { "cell_type": "markdown", - "id": "e74e68d9-5964-4082-acfe-6f5907a3fa84", + "id": "18", "metadata": {}, "source": [ "However, we want to plot a range of rows and columns corresponding to the bottom right hand corner, we can refer to a\n", @@ -306,7 +306,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c683b6c2-def9-4509-82bd-77f341305aa4", + "id": "19", "metadata": {}, "outputs": [], "source": [ @@ -315,7 +315,7 @@ }, { "cell_type": "markdown", - "id": "6836f33c-3512-4df8-aa11-475e65728e39", + "id": "20", "metadata": {}, "source": [ "We can now plot the subset by instantiating a new object which we call `small_plot` of the class `Images`. Instead of\n", @@ -326,7 +326,7 @@ { "cell_type": "code", "execution_count": null, - "id": "bac7133a-b260-4404-aa45-7fa0e8cb6122", + "id": "21", "metadata": {}, "outputs": [], "source": [ @@ -337,7 +337,7 @@ }, { "cell_type": "markdown", - "id": "b31e0e98-b7ad-433f-abc7-d88deeda4ed8", + "id": "22", "metadata": {}, "source": [ "You may notice the colours are brighter in this cropped image than the region as it appears in the full image plot. Read\n", @@ -346,7 +346,7 @@ }, { "cell_type": "markdown", - "id": "1e7f4563-75d4-4891-bb50-ac164a342092", + "id": "23", "metadata": {}, "source": [ "## Plot just the image\n", @@ -361,7 +361,7 @@ { "cell_type": "code", "execution_count": null, - "id": "bb43d976-e487-4335-a4bb-d62d7f804ff0", + "id": "24", "metadata": {}, "outputs": [], "source": [ @@ -371,7 +371,7 @@ }, { "cell_type": "markdown", - "id": "3c33794e-6afc-480c-91c3-9bfa24e39f79", + "id": "25", "metadata": {}, "source": [ "If you want to save the image then use `plt.imsave()` with the same arguments, but give a filename as the first argument." @@ -380,7 +380,7 @@ { "cell_type": "code", "execution_count": null, - "id": "88c311c9-8635-4190-b7b1-7bef69282a49", + "id": "26", "metadata": {}, "outputs": [], "source": [ @@ -389,7 +389,7 @@ }, { "cell_type": "markdown", - "id": "675678f4-0526-4725-ac44-c79cfa2e3e29", + "id": "27", "metadata": {}, "source": [ "## Images and Regions \n", @@ -404,7 +404,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7a749048-8013-4241-84b4-49efdd346f0f", + "id": "28", "metadata": {}, "outputs": [], "source": [ @@ -420,7 +420,7 @@ }, { "cell_type": "markdown", - "id": "52f0079c-19b7-4ec0-9e05-d1b9b9ae1ed8", + "id": "29", "metadata": {}, "source": [ "You may notice that the colormap is _not_ the same across the two images, in the _Cropped Region_ the heights are now\n", @@ -433,7 +433,7 @@ { "cell_type": "code", "execution_count": null, - "id": "821e33a1-301d-449c-b379-2a29d66095d2", + "id": "30", "metadata": {}, "outputs": [], "source": [ @@ -455,7 +455,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fdc017bb-8216-4a59-a8dd-807e55e02ee9", + "id": "31", "metadata": {}, "outputs": [], "source": [ @@ -474,7 +474,7 @@ }, { "cell_type": "markdown", - "id": "5790b98f-eda9-4fb4-9f2d-161564658157", + "id": "32", "metadata": {}, "source": [ "And of course you can extend this to plot more regions, here we set up a 2x2 grid by virtue of `nrows=2` and\n", @@ -488,7 +488,7 @@ { "cell_type": "code", "execution_count": null, - "id": "39c98143-7a37-4943-8a10-6ac93d24020b", + "id": "33", "metadata": {}, "outputs": [], "source": [ @@ -516,7 +516,7 @@ }, { "cell_type": "markdown", - "id": "00a75811-cc97-4b52-a23b-2649f9c864ce", + "id": "34", "metadata": {}, "source": [ "# Going Further\n", diff --git a/tests/conftest.py b/tests/conftest.py index 564ecbd8ea..a82e6f4352 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,5 @@ """Fixtures for testing.""" + import importlib.resources as pkg_resources from pathlib import Path @@ -428,10 +429,10 @@ def minicircle_initial_tilt_removal(minicircle_initial_median_flatten: Filters) @pytest.fixture() def minicircle_initial_quadratic_removal(minicircle_initial_tilt_removal: Filters) -> Filters: """Initial quadratic removal on unmasked data.""" - minicircle_initial_tilt_removal.images[ - "initial_quadratic_removal" - ] = minicircle_initial_tilt_removal.remove_quadratic( - minicircle_initial_tilt_removal.images["initial_tilt_removal"], mask=None + minicircle_initial_tilt_removal.images["initial_quadratic_removal"] = ( + minicircle_initial_tilt_removal.remove_quadratic( + minicircle_initial_tilt_removal.images["initial_tilt_removal"], mask=None + ) ) return minicircle_initial_tilt_removal @@ -511,10 +512,10 @@ def minicircle_masked_quadratic_removal(minicircle_masked_tilt_removal: Filters) @pytest.fixture() def minicircle_grain_gaussian_filter(minicircle_masked_quadratic_removal: Filters) -> Filters: """Apply Gaussian filter.""" - minicircle_masked_quadratic_removal.images[ - "gaussian_filtered" - ] = minicircle_masked_quadratic_removal.gaussian_filter( - image=minicircle_masked_quadratic_removal.images["masked_quadratic_removal"] + minicircle_masked_quadratic_removal.images["gaussian_filtered"] = ( + minicircle_masked_quadratic_removal.gaussian_filter( + image=minicircle_masked_quadratic_removal.images["masked_quadratic_removal"] + ) ) return minicircle_masked_quadratic_removal @@ -603,9 +604,9 @@ def minicircle_grain_remove_noise(minicircle_grain_clear_border: Grains) -> Grai @pytest.fixture() def minicircle_grain_labelled_all(minicircle_grain_remove_noise: Grains) -> Grains: """Labelled regions.""" - minicircle_grain_remove_noise.directions["above"][ - "labelled_regions_01" - ] = minicircle_grain_remove_noise.label_regions(minicircle_grain_remove_noise.directions["above"]["removed_noise"]) + minicircle_grain_remove_noise.directions["above"]["labelled_regions_01"] = ( + minicircle_grain_remove_noise.label_regions(minicircle_grain_remove_noise.directions["above"]["removed_noise"]) + ) return minicircle_grain_remove_noise @@ -621,10 +622,10 @@ def minicircle_minimum_grain_size(minicircle_grain_labelled_all: Grains) -> Grai @pytest.fixture() def minicircle_small_objects_removed(minicircle_minimum_grain_size: Grains) -> Grains: """Small objects removed.""" - minicircle_minimum_grain_size.directions["above"][ - "removed_small_objects" - ] = minicircle_minimum_grain_size.remove_small_objects( - minicircle_minimum_grain_size.directions["above"]["labelled_regions_01"] + minicircle_minimum_grain_size.directions["above"]["removed_small_objects"] = ( + minicircle_minimum_grain_size.remove_small_objects( + minicircle_minimum_grain_size.directions["above"]["labelled_regions_01"] + ) ) return minicircle_minimum_grain_size @@ -633,11 +634,11 @@ def minicircle_small_objects_removed(minicircle_minimum_grain_size: Grains) -> G def minicircle_area_thresholding(minicircle_grain_labelled_all: Grains) -> Grains: """Small objects removed.""" absolute_area_thresholds = [30, 2000] - minicircle_grain_labelled_all.directions["above"][ - "removed_small_objects" - ] = minicircle_grain_labelled_all.area_thresholding( - image=minicircle_grain_labelled_all.directions["above"]["labelled_regions_01"], - area_thresholds=absolute_area_thresholds, + minicircle_grain_labelled_all.directions["above"]["removed_small_objects"] = ( + minicircle_grain_labelled_all.area_thresholding( + image=minicircle_grain_labelled_all.directions["above"]["labelled_regions_01"], + area_thresholds=absolute_area_thresholds, + ) ) return minicircle_grain_labelled_all @@ -645,10 +646,10 @@ def minicircle_area_thresholding(minicircle_grain_labelled_all: Grains) -> Grain @pytest.fixture() def minicircle_grain_labelled_post_removal(minicircle_small_objects_removed: np.array) -> Grains: """Labelled regions.""" - minicircle_small_objects_removed.directions["above"][ - "labelled_regions_02" - ] = minicircle_small_objects_removed.label_regions( - minicircle_small_objects_removed.directions["above"]["removed_small_objects"] + minicircle_small_objects_removed.directions["above"]["labelled_regions_02"] = ( + minicircle_small_objects_removed.label_regions( + minicircle_small_objects_removed.directions["above"]["removed_small_objects"] + ) ) return minicircle_small_objects_removed @@ -666,10 +667,10 @@ def minicircle_grain_region_properties_post_removal( @pytest.fixture() def minicircle_grain_coloured(minicircle_grain_labelled_post_removal: np.array) -> Grains: """Coloured regions.""" - minicircle_grain_labelled_post_removal.directions["above"][ - "coloured_regions" - ] = minicircle_grain_labelled_post_removal.colour_regions( - minicircle_grain_labelled_post_removal.directions["above"]["labelled_regions_02"] + minicircle_grain_labelled_post_removal.directions["above"]["coloured_regions"] = ( + minicircle_grain_labelled_post_removal.colour_regions( + minicircle_grain_labelled_post_removal.directions["above"]["labelled_regions_02"] + ) ) return minicircle_grain_labelled_post_removal diff --git a/tests/test_filters.py b/tests/test_filters.py index 0ed9156c51..ba3f02b555 100644 --- a/tests/test_filters.py +++ b/tests/test_filters.py @@ -1,4 +1,5 @@ """Tests of the filters module.""" + from pathlib import Path import numpy as np diff --git a/tests/test_filters_minicircle.py b/tests/test_filters_minicircle.py index be13e59135..02d7f66eb5 100644 --- a/tests/test_filters_minicircle.py +++ b/tests/test_filters_minicircle.py @@ -1,4 +1,5 @@ """Tests of the filters module.""" + # + pylint: disable=invalid-name import numpy as np import pytest diff --git a/tests/test_grains.py b/tests/test_grains.py index a621f1927f..84c7b4dd73 100644 --- a/tests/test_grains.py +++ b/tests/test_grains.py @@ -1,4 +1,5 @@ """Test finding of grains.""" + import logging import numpy as np diff --git a/tests/test_grains_minicircle.py b/tests/test_grains_minicircle.py index b356eb0ccd..d26fac4caa 100644 --- a/tests/test_grains_minicircle.py +++ b/tests/test_grains_minicircle.py @@ -1,4 +1,5 @@ """Tests for Find Grains.""" + import numpy as np import pytest from skimage.measure._regionprops import RegionProperties diff --git a/tests/test_grainstats.py b/tests/test_grainstats.py index bc0c3bfcf2..118907f366 100644 --- a/tests/test_grainstats.py +++ b/tests/test_grainstats.py @@ -1,4 +1,5 @@ """Testing of grainstats class.""" + import logging from pathlib import Path diff --git a/tests/test_grainstats_minicircle.py b/tests/test_grainstats_minicircle.py index ac3eb2bbe6..2e3a1703d8 100644 --- a/tests/test_grainstats_minicircle.py +++ b/tests/test_grainstats_minicircle.py @@ -1,4 +1,5 @@ """Tests for the grainstats module.""" + from pathlib import Path import numpy as np diff --git a/tests/test_io.py b/tests/test_io.py index 79f2aa6075..271e7b5119 100644 --- a/tests/test_io.py +++ b/tests/test_io.py @@ -1,4 +1,5 @@ """Tests of IO.""" + import argparse from datetime import datetime from pathlib import Path diff --git a/tests/test_logs.py b/tests/test_logs.py index c61d2ada25..69c751a2c7 100644 --- a/tests/test_logs.py +++ b/tests/test_logs.py @@ -1,4 +1,5 @@ """Tests for logging.""" + import logging import pytest diff --git a/tests/test_run_topostats.py b/tests/test_run_topostats.py index f9946e6c24..0a23dae549 100644 --- a/tests/test_run_topostats.py +++ b/tests/test_run_topostats.py @@ -1,4 +1,5 @@ """Test end-to-end running of topostats.""" + import logging from pathlib import Path diff --git a/tests/test_scars.py b/tests/test_scars.py index acfa06d443..ff91a490ff 100644 --- a/tests/test_scars.py +++ b/tests/test_scars.py @@ -1,4 +1,5 @@ """Tests for the scars module.""" + from pathlib import Path import numpy as np diff --git a/tests/test_thresholds.py b/tests/test_thresholds.py index 698b467d7d..ae2db9adee 100644 --- a/tests/test_thresholds.py +++ b/tests/test_thresholds.py @@ -1,4 +1,5 @@ """Test of thresholds.""" + # pylint: disable=no-name-in-module import numpy as np import pytest diff --git a/tests/test_utils.py b/tests/test_utils.py index d9642d1ac6..3289a3c98c 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -1,4 +1,5 @@ """Test utils.""" + from pathlib import Path import numpy as np diff --git a/tests/test_validation.py b/tests/test_validation.py index 4b4b508c1d..a7c11a08df 100644 --- a/tests/test_validation.py +++ b/tests/test_validation.py @@ -1,4 +1,5 @@ """Test validation function.""" + from contextlib import nullcontext as does_not_raise from pathlib import Path diff --git a/tests/tracing/test_dnacurvature.py b/tests/tracing/test_dnacurvature.py index 29fe9d128f..6d028354e5 100644 --- a/tests/tracing/test_dnacurvature.py +++ b/tests/tracing/test_dnacurvature.py @@ -1,4 +1,5 @@ """Tests of the dnacurvature module.""" + import pytest import math diff --git a/tests/tracing/test_dnatracing_methods.py b/tests/tracing/test_dnatracing_methods.py index 9201e5d73a..a46fc5e99f 100644 --- a/tests/tracing/test_dnatracing_methods.py +++ b/tests/tracing/test_dnatracing_methods.py @@ -1,4 +1,5 @@ """Additional tests of dnaTracing methods.""" + from pathlib import Path import numpy as np diff --git a/tests/tracing/test_dnatracing_multigrain.py b/tests/tracing/test_dnatracing_multigrain.py index 94b5107b8a..652614b41b 100644 --- a/tests/tracing/test_dnatracing_multigrain.py +++ b/tests/tracing/test_dnatracing_multigrain.py @@ -1,4 +1,5 @@ """Tests for tracing images with multiple (2) grains.""" + from pathlib import Path import numpy as np diff --git a/tests/tracing/test_dnatracing_single_grain.py b/tests/tracing/test_dnatracing_single_grain.py index 3f37f7080d..3cdd1bcc02 100644 --- a/tests/tracing/test_dnatracing_single_grain.py +++ b/tests/tracing/test_dnatracing_single_grain.py @@ -1,4 +1,5 @@ """Tests for tracing single molecules.""" + from pathlib import Path import numpy as np diff --git a/tests/tracing/test_skeletonize.py b/tests/tracing/test_skeletonize.py index f66249e2b8..d7512b60ac 100644 --- a/tests/tracing/test_skeletonize.py +++ b/tests/tracing/test_skeletonize.py @@ -1,4 +1,5 @@ """Test the skeletonize module.""" + import numpy as np import pytest diff --git a/topostats/__init__.py b/topostats/__init__.py index cc22745019..4a81e9ba9d 100644 --- a/topostats/__init__.py +++ b/topostats/__init__.py @@ -1,4 +1,5 @@ """Topostats.""" + from importlib.metadata import version import matplotlib.pyplot as plt diff --git a/topostats/__main__.py b/topostats/__main__.py index 56f057f9b0..e6c6b629b9 100644 --- a/topostats/__main__.py +++ b/topostats/__main__.py @@ -1,4 +1,5 @@ """Main Module.""" + import topostats.topotracing as topotracing topotracing.main() diff --git a/topostats/filters.py b/topostats/filters.py index cf075213da..48c1a4f356 100644 --- a/topostats/filters.py +++ b/topostats/filters.py @@ -1,4 +1,5 @@ """Module for filtering 2D Numpy arrays.""" + from __future__ import annotations import logging diff --git a/topostats/grains.py b/topostats/grains.py index 77d5185b17..76575fe5d3 100644 --- a/topostats/grains.py +++ b/topostats/grains.py @@ -1,4 +1,5 @@ """Find grains in an image.""" + # pylint: disable=no-name-in-module import logging from collections import defaultdict diff --git a/topostats/grainstats.py b/topostats/grainstats.py index 09ab6dc587..84f9b042f0 100644 --- a/topostats/grainstats.py +++ b/topostats/grainstats.py @@ -1,4 +1,5 @@ """Contains class for calculating the statistics of grains - 2d raster images.""" + from __future__ import annotations import logging diff --git a/topostats/io.py b/topostats/io.py index 90db0ac00f..fa6ed67850 100644 --- a/topostats/io.py +++ b/topostats/io.py @@ -1,4 +1,5 @@ """Functions for reading and writing data.""" + from __future__ import annotations import importlib.resources as pkg_resources diff --git a/topostats/logs/logs.py b/topostats/logs/logs.py index f841afbe13..0a1a29754d 100644 --- a/topostats/logs/logs.py +++ b/topostats/logs/logs.py @@ -1,4 +1,5 @@ """Standardise logging.""" + import logging import sys from datetime import datetime diff --git a/topostats/scars.py b/topostats/scars.py index 1a56616842..ddaf242fcf 100644 --- a/topostats/scars.py +++ b/topostats/scars.py @@ -1,4 +1,5 @@ """Image artefact correction functions that interpolates values filling the space of any detected scars.""" + import logging import numpy as np diff --git a/topostats/theme.py b/topostats/theme.py index a00c7494ad..2e03e854f9 100644 --- a/topostats/theme.py +++ b/topostats/theme.py @@ -1,4 +1,5 @@ """Custom Bruker Nanoscope colorscale.""" + import logging import matplotlib as mpl diff --git a/topostats/thresholds.py b/topostats/thresholds.py index 2f283ca823..4060760ee4 100644 --- a/topostats/thresholds.py +++ b/topostats/thresholds.py @@ -1,4 +1,5 @@ """Functions for calculating thresholds.""" + # pylint: disable=no-name-in-module import logging from collections.abc import Callable diff --git a/topostats/tracing/dnacurvature.py b/topostats/tracing/dnacurvature.py index 36e1da0fbb..bd9a932637 100644 --- a/topostats/tracing/dnacurvature.py +++ b/topostats/tracing/dnacurvature.py @@ -1,4 +1,5 @@ """Module for calculating curvature statistics.""" + import logging # from pathlib import Path diff --git a/topostats/tracing/dnatracing.py b/topostats/tracing/dnatracing.py index a285b8dce9..4c24edbe82 100644 --- a/topostats/tracing/dnatracing.py +++ b/topostats/tracing/dnatracing.py @@ -1,4 +1,5 @@ """Perform DNA Tracing""" + from collections import OrderedDict from functools import partial from itertools import repeat diff --git a/topostats/tracing/skeletonize.py b/topostats/tracing/skeletonize.py index a225a05222..4d1828115d 100644 --- a/topostats/tracing/skeletonize.py +++ b/topostats/tracing/skeletonize.py @@ -1,4 +1,5 @@ """Skeletonize molecules.""" + import logging from collections.abc import Callable diff --git a/topostats/tracing/tracingfuncs.py b/topostats/tracing/tracingfuncs.py index 3a438ae4f7..255dcb47e0 100644 --- a/topostats/tracing/tracingfuncs.py +++ b/topostats/tracing/tracingfuncs.py @@ -4,7 +4,6 @@ class getSkeleton: - """Skeltonisation algorithm based on the paper "A Fast Parallel Algorithm for Thinning Digital Patterns" by Zhang et al., 1984""" From 78050b31b53b27ab6426a46f979a52dc5d867174 Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Tue, 6 Feb 2024 20:56:41 +0000 Subject: [PATCH 17/35] Explicitly disable ruff S403; disable ruff preview rules See #792 for further details. --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1825c0d3b0..285d1dd087 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -215,6 +215,7 @@ lint.ignore = [ "B905", "E501", "S101", + "S403", ] # Allow autofix for all enabled rules (when `--fix`) is provided. lint.fixable = [ @@ -238,7 +239,7 @@ lint.unfixable = [] # Numpy2 deprecation checks lint.extend-select = ["NPY201"] -preview = true +preview = false [tool.ruff.lint.flake8-quotes] docstring-quotes = "double" From f86fbdd8048f87d8d6dabda3acaab398d11ea45d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 6 Feb 2024 21:17:50 +0000 Subject: [PATCH 18/35] [pre-commit.ci] Fixing issues with pre-commit --- tests/measure/test_feret.py | 1 + topostats/measure/feret.py | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/measure/test_feret.py b/tests/measure/test_feret.py index 308f6a953e..90c0844ca3 100644 --- a/tests/measure/test_feret.py +++ b/tests/measure/test_feret.py @@ -1,4 +1,5 @@ """Tests for feret functions.""" + import numpy as np import numpy.typing as npt import pytest diff --git a/topostats/measure/feret.py b/topostats/measure/feret.py index 1b8d29f40a..5022ebbda6 100644 --- a/topostats/measure/feret.py +++ b/topostats/measure/feret.py @@ -7,6 +7,7 @@ During testing it was discovered that sorting points prior to derivation of upper and lower convex hulls was problematic so this step was removed. """ + from __future__ import annotations from math import sqrt From d6d542d1fd8c1b6313ffc11abbfda293392497bb Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Tue, 23 Jan 2024 14:33:17 +0000 Subject: [PATCH 19/35] Adds sort_coords function and updates some tests --- tests/measure/test_feret.py | 124 +++++++++++++++++++----------------- topostats/measure/feret.py | 48 ++++++++------ 2 files changed, 93 insertions(+), 79 deletions(-) diff --git a/tests/measure/test_feret.py b/tests/measure/test_feret.py index 90c0844ca3..d922c040ea 100644 --- a/tests/measure/test_feret.py +++ b/tests/measure/test_feret.py @@ -95,47 +95,47 @@ def test_orientation(point1: tuple, point2: tuple, point3: tuple, target: int) - @pytest.mark.parametrize( ("shape", "upper_target", "lower_target"), [ - pytest.param(tiny_circle, [[0, 1], [1, 2], [2, 1]], [[0, 1], [1, 0], [2, 1]], id="tiny circle"), + pytest.param(tiny_circle, [[1, 0], [0, 1], [1, 2]], [[1, 0], [2, 1], [1, 2]], id="tiny circle"), pytest.param(tiny_square, [[1, 1], [1, 2], [2, 2]], [[1, 1], [2, 1], [2, 2]], id="tiny square"), - pytest.param(tiny_triangle, [[1, 1], [1, 2], [2, 1]], [[1, 1], [2, 1]], id="tiny triangle"), + pytest.param(tiny_triangle, [[1, 1], [1, 2]], [[1, 1], [2, 1], [1, 2]], id="tiny triangle"), pytest.param(tiny_rectangle, [[1, 1], [1, 2], [3, 2]], [[1, 1], [3, 1], [3, 2]], id="tiny rectangle"), pytest.param( - tiny_ellipse, [[1, 2], [2, 3], [4, 3], [5, 2]], [[1, 2], [2, 1], [4, 1], [5, 2]], id="tiny ellipse" + tiny_ellipse, [[2, 1], [1, 2], [2, 3], [4, 3]], [[2, 1], [4, 1], [5, 2], [4, 3]], id="tiny ellipse" ), pytest.param( small_circle, - [[0, 1], [0, 3], [1, 4], [3, 4], [4, 3]], - [[0, 1], [1, 0], [3, 0], [4, 1], [4, 3]], + [[1, 0], [0, 1], [0, 3], [1, 4], [3, 4]], + [[1, 0], [3, 0], [4, 1], [4, 3], [3, 4]], id="small circle", ), pytest.param( holo_circle, - [[1, 2], [1, 4], [2, 5], [4, 5], [5, 4]], - [[1, 2], [2, 1], [4, 1], [5, 2], [5, 4]], + [[2, 1], [1, 2], [1, 4], [2, 5], [4, 5]], + [[2, 1], [4, 1], [5, 2], [5, 4], [4, 5]], id="hol circle", ), pytest.param( holo_ellipse_horizontal, - [[1, 3], [1, 7], [3, 9], [5, 9], [7, 7]], - [[1, 3], [3, 1], [5, 1], [7, 3], [7, 7]], + [[3, 1], [1, 3], [1, 7], [3, 9], [5, 9]], + [[3, 1], [5, 1], [7, 3], [7, 7], [5, 9]], id="holo ellipse horizontal", ), pytest.param( holo_ellipse_vertical, - [[1, 3], [1, 5], [3, 7], [7, 7], [9, 5]], - [[1, 3], [3, 1], [7, 1], [9, 3], [9, 5]], + [[3, 1], [1, 3], [1, 5], [3, 7], [7, 7]], + [[3, 1], [7, 1], [9, 3], [9, 5], [7, 7]], id="holo ellipse vertical", ), pytest.param( holo_ellipse_angled, - [[1, 2], [1, 4], [5, 8], [6, 7]], - [[1, 2], [2, 1], [6, 5], [6, 7]], + [[2, 1], [1, 2], [1, 4], [5, 8]], + [[2, 1], [6, 5], [6, 7], [5, 8]], id="holo ellipse angled", ), pytest.param( curved_line, - [[1, 5], [8, 8]], - [[1, 5], [2, 3], [4, 1], [5, 1], [6, 2], [7, 4], [8, 7], [8, 8]], + [[4, 1], [2, 3], [1, 5], [8, 8]], + [[4, 1], [5, 1], [6, 2], [7, 4], [8, 7], [8, 8]], id="curved line", ), ], @@ -153,12 +153,12 @@ def test_hulls(shape: npt.NDArray, upper_target: list, lower_target: list) -> No pytest.param( tiny_circle, [ + ([1, 0], [2, 1]), + ([1, 0], [1, 2]), ([0, 1], [1, 0]), ([0, 1], [2, 1]), ([0, 1], [1, 2]), - ([1, 0], [1, 2]), ([1, 2], [2, 1]), - ([1, 0], [2, 1]), ], id="tiny circle", ), @@ -198,165 +198,173 @@ def test_hulls(shape: npt.NDArray, upper_target: list, lower_target: list) -> No pytest.param( tiny_ellipse, [ + ([2, 1], [4, 1]), + ([2, 1], [5, 2]), + ([2, 1], [4, 3]), ([1, 2], [2, 1]), ([1, 2], [4, 1]), ([1, 2], [5, 2]), - ([1, 2], [2, 3]), + ([1, 2], [4, 3]), ([2, 1], [2, 3]), ([2, 3], [4, 1]), ([2, 3], [5, 2]), - ([1, 2], [4, 3]), - ([2, 1], [4, 3]), + ([2, 3], [4, 3]), ([4, 1], [4, 3]), ([4, 3], [5, 2]), - ([2, 1], [5, 2]), - ([4, 1], [5, 2]), ], id="tiny ellipse", ), pytest.param( small_circle, [ + ([1, 0], [3, 0]), + ([1, 0], [4, 1]), + ([1, 0], [4, 3]), + ([1, 0], [3, 4]), ([0, 1], [1, 0]), ([0, 1], [3, 0]), ([0, 1], [4, 1]), ([0, 1], [4, 3]), - ([0, 1], [0, 3]), + ([0, 1], [3, 4]), ([0, 3], [1, 0]), ([0, 3], [3, 0]), ([0, 3], [4, 1]), ([0, 3], [4, 3]), - ([0, 1], [1, 4]), + ([0, 3], [3, 4]), ([1, 0], [1, 4]), ([1, 4], [3, 0]), ([1, 4], [4, 1]), ([1, 4], [4, 3]), - ([0, 1], [3, 4]), - ([1, 0], [3, 4]), + ([1, 4], [3, 4]), ([3, 0], [3, 4]), ([3, 4], [4, 1]), ([3, 4], [4, 3]), - ([1, 0], [4, 3]), - ([3, 0], [4, 3]), - ([4, 1], [4, 3]), ], id="small circle", ), pytest.param( holo_circle, [ + ([2, 1], [4, 1]), + ([2, 1], [5, 2]), + ([2, 1], [5, 4]), + ([2, 1], [4, 5]), ([1, 2], [2, 1]), ([1, 2], [4, 1]), ([1, 2], [5, 2]), ([1, 2], [5, 4]), - ([1, 2], [1, 4]), + ([1, 2], [4, 5]), ([1, 4], [2, 1]), ([1, 4], [4, 1]), ([1, 4], [5, 2]), ([1, 4], [5, 4]), - ([1, 2], [2, 5]), + ([1, 4], [4, 5]), ([2, 1], [2, 5]), ([2, 5], [4, 1]), ([2, 5], [5, 2]), ([2, 5], [5, 4]), - ([1, 2], [4, 5]), - ([2, 1], [4, 5]), + ([2, 5], [4, 5]), ([4, 1], [4, 5]), ([4, 5], [5, 2]), ([4, 5], [5, 4]), - ([2, 1], [5, 4]), - ([4, 1], [5, 4]), - ([5, 2], [5, 4]), ], id="holo circle", ), pytest.param( holo_ellipse_horizontal, [ + ([3, 1], [5, 1]), + ([3, 1], [7, 3]), + ([3, 1], [7, 7]), + ([3, 1], [5, 9]), ([1, 3], [3, 1]), ([1, 3], [5, 1]), ([1, 3], [7, 3]), ([1, 3], [7, 7]), - ([1, 3], [1, 7]), + ([1, 3], [5, 9]), ([1, 7], [3, 1]), ([1, 7], [5, 1]), ([1, 7], [7, 3]), ([1, 7], [7, 7]), - ([1, 3], [3, 9]), + ([1, 7], [5, 9]), ([3, 1], [3, 9]), ([3, 9], [5, 1]), ([3, 9], [7, 3]), ([3, 9], [7, 7]), - ([1, 3], [5, 9]), - ([3, 1], [5, 9]), + ([3, 9], [5, 9]), ([5, 1], [5, 9]), ([5, 9], [7, 3]), ([5, 9], [7, 7]), - ([3, 1], [7, 7]), - ([5, 1], [7, 7]), - ([7, 3], [7, 7]), ], id="holo ellipse horizontal", ), pytest.param( holo_ellipse_vertical, [ + ([3, 1], [7, 1]), + ([3, 1], [9, 3]), + ([3, 1], [9, 5]), + ([3, 1], [7, 7]), ([1, 3], [3, 1]), ([1, 3], [7, 1]), ([1, 3], [9, 3]), ([1, 3], [9, 5]), - ([1, 3], [1, 5]), + ([1, 3], [7, 7]), ([1, 5], [3, 1]), ([1, 5], [7, 1]), ([1, 5], [9, 3]), ([1, 5], [9, 5]), - ([1, 3], [3, 7]), + ([1, 5], [7, 7]), ([3, 1], [3, 7]), ([3, 7], [7, 1]), ([3, 7], [9, 3]), ([3, 7], [9, 5]), - ([1, 3], [7, 7]), - ([3, 1], [7, 7]), + ([3, 7], [7, 7]), ([7, 1], [7, 7]), ([7, 7], [9, 3]), ([7, 7], [9, 5]), - ([3, 1], [9, 5]), - ([7, 1], [9, 5]), - ([9, 3], [9, 5]), ], id="holo ellipse vertical", ), pytest.param( holo_ellipse_angled, [ + ([2, 1], [6, 5]), + ([2, 1], [6, 7]), + ([2, 1], [5, 8]), ([1, 2], [2, 1]), ([1, 2], [6, 5]), ([1, 2], [6, 7]), - ([1, 2], [1, 4]), + ([1, 2], [5, 8]), ([1, 4], [2, 1]), ([1, 4], [6, 5]), ([1, 4], [6, 7]), - ([1, 2], [5, 8]), - ([2, 1], [5, 8]), + ([1, 4], [5, 8]), ([5, 8], [6, 5]), ([5, 8], [6, 7]), - ([2, 1], [6, 7]), - ([6, 5], [6, 7]), ], id="holo ellipse angled", ), pytest.param( curved_line, [ - ([1, 5], [2, 3]), + ([4, 1], [5, 1]), + ([4, 1], [6, 2]), + ([4, 1], [7, 4]), + ([4, 1], [8, 7]), + ([4, 1], [8, 8]), + ([2, 3], [4, 1]), + ([2, 3], [5, 1]), + ([2, 3], [6, 2]), + ([2, 3], [7, 4]), + ([2, 3], [8, 7]), + ([2, 3], [8, 8]), ([1, 5], [4, 1]), ([1, 5], [5, 1]), ([1, 5], [6, 2]), ([1, 5], [7, 4]), ([1, 5], [8, 7]), ([1, 5], [8, 8]), - ([2, 3], [8, 8]), - ([4, 1], [8, 8]), ([5, 1], [8, 8]), ([6, 2], [8, 8]), ([7, 4], [8, 8]), diff --git a/topostats/measure/feret.py b/topostats/measure/feret.py index 5022ebbda6..244160ccb3 100644 --- a/topostats/measure/feret.py +++ b/topostats/measure/feret.py @@ -32,13 +32,34 @@ def orientation(p: npt.NDArray, q: npt.NDArray, r: npt.NDArray) -> int: Returns ------- int: - Returns a positive value of p-q-r are clockwise, neg if counter-clock-wise, zero if colinear. + Returns a positive value if p-q-r are clockwise, neg if counter-clock-wise, zero if colinear. """ return (q[1] - p[1]) * (r[0] - p[0]) - (q[0] - p[0]) * (r[1] - p[1]) +def sort_coords(points: npt.NDArray) -> npt.NDArray: + """ + Sort the coordinates. + + Parameters + ---------- + points: npt.NDArray + Array of coordinates + + Returns + ------- + npt.NDArray + Array sorted by row then column. + """ + order = np.lexsort((points[:, 0], points[:, 1])) + return points[order] + + def hulls(points: npt.NDArray) -> tuple[list, list]: - """Graham scan to find upper and lower convex hulls of a set of 2-D points. + """ + Graham scan to find upper and lower convex hulls of a set of 2-D points. + + Points should be sorted in asecnding order first. Parameters ---------- @@ -52,7 +73,7 @@ def hulls(points: npt.NDArray) -> tuple[list, list]: """ upper_hull = [] lower_hull = [] - for p in points: + for p in sort_coords(points): # Remove points if they are not in the correct hull while len(upper_hull) > 1 and orientation(upper_hull[-2], upper_hull[-1], p) <= 0: upper_hull.pop() @@ -61,6 +82,7 @@ def hulls(points: npt.NDArray) -> tuple[list, list]: # Append point to each hull (removed from one in next pass) upper_hull.append(list(p)) lower_hull.append(list(p)) + return upper_hull, lower_hull @@ -100,24 +122,9 @@ def rotating_calipers(points: npt.NDArray) -> list[tuple[list, list]]: upper_hull, lower_hull = hulls(points) i = 0 j = len(lower_hull) - 1 - counter = 0 - print(f"Used for i {len(upper_hull)=}") - print(f"Used for j {len(lower_hull)=}") - while i < len(upper_hull) or j > 0: - print(f"\n{counter=}") - print(f"{i=}") - print(f"{j=}") - print(f"upper_hull i + 1 : {i + 1}") - print(f"lower_hull j - 1 : {j + 1}") - print(f"i == len(upper_hull) : {(i == len(upper_hull))=}") - print(f"j == 0 : {(j == 0)=}") - a = upper_hull[i + 1][1] - upper_hull[i][1] - b = lower_hull[j][0] - lower_hull[j - 1][0] - c = lower_hull[j][1] - lower_hull[j - 1][1] - d = upper_hull[i + 1][0] - upper_hull[i][0] - print(f"LONG : {((a * b) > (c * d))=}") + while i < len(upper_hull) - 1 or j > 0: yield upper_hull[i], lower_hull[j] - # if all the way through one side of hull, advance the other side + # If all the way through one side of hull, advance the other side if i == len(upper_hull): j -= 1 elif j == 0: @@ -130,7 +137,6 @@ def rotating_calipers(points: npt.NDArray) -> list[tuple[list, list]]: i += 1 else: j -= 1 - counter += 1 def min_max_feret(points: npt.NDArray) -> tuple[float, tuple[int, int], float, tuple[int, int]]: From 035c5228efcdda7598fa1cea88a4801befce5da0 Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Wed, 24 Jan 2024 14:00:29 +0000 Subject: [PATCH 20/35] Fixes errors with rotating calipers Made some mistakes in the rotating calipers algorithm and spent considerable time with pen and paper working through examples. + The `curved_line` tests now pass. + Added another simple polygon to the test suite `tiny_quadrilateral`. + Found that the ordering of points makes a considerable difference when constructing the convex hulls and their halves and in so doing added a `sort_coords()` function to test this. As a consequence sorting can be done on either axis (0/rows or 1/columns). Ultimately the same min and max feret are calculated though. --- tests/measure/test_feret.py | 551 ++++++++++++++++++++++++------------ topostats/measure/feret.py | 85 ++++-- 2 files changed, 434 insertions(+), 202 deletions(-) diff --git a/tests/measure/test_feret.py b/tests/measure/test_feret.py index d922c040ea..f0262ad07a 100644 --- a/tests/measure/test_feret.py +++ b/tests/measure/test_feret.py @@ -22,6 +22,19 @@ rr, cc = draw.circle_perimeter(2, 2, 2) small_circle[rr, cc] = 1 +tiny_quadrilateral = np.asarray( + [ + [0, 0, 0, 0, 0, 0], + [0, 0, 1, 0, 0, 0], + [0, 1, 0, 0, 1, 0], + [0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0], + [0, 0, 1, 0, 0, 0], + [0, 0, 0, 0, 0, 0], + ], + dtype=np.uint8, +) + tiny_square = np.asarray([[0, 0, 0, 0], [0, 1, 1, 0], [0, 1, 1, 0], [0, 0, 0, 0]], dtype=np.uint8) tiny_triangle = np.asarray([[0, 0, 0, 0], [0, 1, 1, 0], [0, 1, 0, 0], [0, 0, 0, 0]], dtype=np.uint8) @@ -93,56 +106,160 @@ def test_orientation(point1: tuple, point2: tuple, point3: tuple, target: int) - @pytest.mark.parametrize( - ("shape", "upper_target", "lower_target"), + ("shape", "axis", "target"), + [ + pytest.param(tiny_circle, 1, [[1, 0], [0, 1], [2, 1], [1, 2]], id="tiny circle sorted on axis 1"), + pytest.param(tiny_circle, 0, [[0, 1], [1, 0], [1, 2], [2, 1]], id="tiny circle sorted on axis 0"), + pytest.param(tiny_square, 1, [[1, 1], [2, 1], [1, 2], [2, 2]], id="tiny square sorted on axis 1"), + pytest.param(tiny_square, 0, [[1, 1], [1, 2], [2, 1], [2, 2]], id="tiny square sorted on axis 0"), + pytest.param(tiny_quadrilateral, 1, [[2, 1], [1, 2], [5, 2], [2, 4]], id="tiny quadrilateral sorted on axis 1"), + pytest.param(tiny_quadrilateral, 0, [[1, 2], [2, 1], [2, 4], [5, 2]], id="tiny quadrilateral sorted on axis 0"), + ], +) +def test_sort_coords(shape: npt.NDArray, axis: str, target: npt.NDArray) -> None: + """Test sorting of coordinates.""" + sorted_coords = feret.sort_coords(np.argwhere(shape == 1), axis) + np.testing.assert_array_equal(sorted_coords, target) + + +@pytest.mark.parametrize( + ("shape", "axis", "upper_target", "lower_target"), [ - pytest.param(tiny_circle, [[1, 0], [0, 1], [1, 2]], [[1, 0], [2, 1], [1, 2]], id="tiny circle"), - pytest.param(tiny_square, [[1, 1], [1, 2], [2, 2]], [[1, 1], [2, 1], [2, 2]], id="tiny square"), - pytest.param(tiny_triangle, [[1, 1], [1, 2]], [[1, 1], [2, 1], [1, 2]], id="tiny triangle"), - pytest.param(tiny_rectangle, [[1, 1], [1, 2], [3, 2]], [[1, 1], [3, 1], [3, 2]], id="tiny rectangle"), pytest.param( - tiny_ellipse, [[2, 1], [1, 2], [2, 3], [4, 3]], [[2, 1], [4, 1], [5, 2], [4, 3]], id="tiny ellipse" + tiny_circle, 0, [[0, 1], [1, 2], [2, 1]], [[0, 1], [1, 0], [2, 1]], id="tiny circle sorted on axis 0" + ), + pytest.param(tiny_circle, 1, [[1, 0], [0, 1], [1, 2]], [[1, 0], [2, 1], [1, 2]], id="tiny circle on axis 1"), + pytest.param( + tiny_square, 0, [[1, 1], [1, 2], [2, 2]], [[1, 1], [2, 1], [2, 2]], id="tiny square sorted on axis 0" + ), + pytest.param( + tiny_square, 1, [[1, 1], [1, 2], [2, 2]], [[1, 1], [2, 1], [2, 2]], id="tiny square sorted on axis 1" + ), + pytest.param(tiny_triangle, 0, [[1, 1], [1, 2], [2, 1]], [[1, 1], [2, 1]], id="tiny triangle sorted on axis 0"), + pytest.param(tiny_triangle, 1, [[1, 1], [1, 2]], [[1, 1], [2, 1], [1, 2]], id="tiny triangle sorted on axis 1"), + pytest.param( + tiny_rectangle, 0, [[1, 1], [1, 2], [3, 2]], [[1, 1], [3, 1], [3, 2]], id="tiny rectangle sorted on axis 0" + ), + pytest.param( + tiny_rectangle, 1, [[1, 1], [1, 2], [3, 2]], [[1, 1], [3, 1], [3, 2]], id="tiny rectangle sorted on axis 1" + ), + pytest.param( + tiny_ellipse, + 0, + [[1, 2], [2, 3], [4, 3], [5, 2]], + [[1, 2], [2, 1], [4, 1], [5, 2]], + id="tiny ellipse sorted on axis 0", + ), + pytest.param( + tiny_ellipse, + 1, + [[2, 1], [1, 2], [2, 3], [4, 3]], + [[2, 1], [4, 1], [5, 2], [4, 3]], + id="tiny ellipse sorted on axis 1", + ), + pytest.param( + tiny_quadrilateral, + 0, + [[1, 2], [2, 4], [5, 2]], + [[1, 2], [2, 1], [5, 2]], + id="tiny quadrialteral sorted on axis 0", + ), + pytest.param( + tiny_quadrilateral, + 1, + [[2, 1], [1, 2], [2, 4]], + [[2, 1], [5, 2], [2, 4]], + id="tiny quadrialteral sorted on axis 1", ), pytest.param( small_circle, + 0, + [[0, 1], [0, 3], [1, 4], [3, 4], [4, 3]], + [[0, 1], [1, 0], [3, 0], [4, 1], [4, 3]], + id="small circle sorted on axis 0", + ), + pytest.param( + small_circle, + 1, [[1, 0], [0, 1], [0, 3], [1, 4], [3, 4]], [[1, 0], [3, 0], [4, 1], [4, 3], [3, 4]], - id="small circle", + id="small circle sorted on axis 1", ), pytest.param( holo_circle, + 0, + [[1, 2], [1, 4], [2, 5], [4, 5], [5, 4]], + [[1, 2], [2, 1], [4, 1], [5, 2], [5, 4]], + id="holo circle sorted on axis 0", + ), + pytest.param( + holo_circle, + 1, [[2, 1], [1, 2], [1, 4], [2, 5], [4, 5]], [[2, 1], [4, 1], [5, 2], [5, 4], [4, 5]], - id="hol circle", + id="holo circle sorted on axis 1", + ), + pytest.param( + holo_ellipse_horizontal, + 0, + [[1, 3], [1, 7], [3, 9], [5, 9], [7, 7]], + [[1, 3], [3, 1], [5, 1], [7, 3], [7, 7]], + id="holo ellipse horizontal sorted on axis 0", ), pytest.param( holo_ellipse_horizontal, + 1, [[3, 1], [1, 3], [1, 7], [3, 9], [5, 9]], [[3, 1], [5, 1], [7, 3], [7, 7], [5, 9]], - id="holo ellipse horizontal", + id="holo ellipse horizontal sorted on axis 1", ), pytest.param( holo_ellipse_vertical, + 0, + [[1, 3], [1, 5], [3, 7], [7, 7], [9, 5]], + [[1, 3], [3, 1], [7, 1], [9, 3], [9, 5]], + id="holo ellipse vertical sorted on axis 0", + ), + pytest.param( + holo_ellipse_vertical, + 1, [[3, 1], [1, 3], [1, 5], [3, 7], [7, 7]], [[3, 1], [7, 1], [9, 3], [9, 5], [7, 7]], - id="holo ellipse vertical", + id="holo ellipse vertical sorted on axis 1", ), pytest.param( holo_ellipse_angled, + 0, + [[1, 2], [1, 4], [5, 8], [6, 7]], + [[1, 2], [2, 1], [6, 5], [6, 7]], + id="holo ellipse angled sorted on axis 0", + ), + pytest.param( + holo_ellipse_angled, + 1, [[2, 1], [1, 2], [1, 4], [5, 8]], [[2, 1], [6, 5], [6, 7], [5, 8]], - id="holo ellipse angled", + id="holo ellipse angled sorted on axis 1", + ), + pytest.param( + curved_line, + 0, + [[1, 5], [8, 8]], + [[1, 5], [2, 3], [4, 1], [5, 1], [6, 2], [7, 4], [8, 7], [8, 8]], + id="curved line sorted on axis 0", ), pytest.param( curved_line, + 1, [[4, 1], [2, 3], [1, 5], [8, 8]], [[4, 1], [5, 1], [6, 2], [7, 4], [8, 7], [8, 8]], - id="curved line", + id="curved line sorted on axis 1", ), ], ) -def test_hulls(shape: npt.NDArray, upper_target: list, lower_target: list) -> None: +def test_hulls(shape: npt.NDArray, axis: bool, upper_target: list, lower_target: list) -> None: """Test construction of upper and lower hulls.""" - upper, lower = feret.hulls(np.argwhere(shape == 1)) + upper, lower = feret.hulls(np.argwhere(shape == 1), axis) np.testing.assert_array_equal(upper, upper_target) np.testing.assert_array_equal(lower, lower_target) @@ -381,182 +498,271 @@ def test_all_pairs(shape: npt.NDArray, points_target: list) -> None: @pytest.mark.parametrize( - ("shape", "points_target"), + ("shape", "axis", "points_target"), [ - # pytest.param( - # tiny_circle, - # [([0, 1], [2, 1]), ([0, 1], [1, 0]), ([1, 2], [1, 0]), ([1, 2], [0, 1]), ([2, 1], [0, 1])], - # id="tiny circle", - # ), - # pytest.param( - # tiny_square, - # [([1, 1], [2, 2]), ([1, 1], [2, 1]), ([1, 2], [2, 1]), ([1, 2], [1, 1]), ([2, 2], [1, 1])], - # id="tiny square", - # ), - # pytest.param( - # tiny_triangle, - # [([1, 1], [2, 1]), ([1, 2], [2, 1]), ([1, 2], [1, 1]), ([2, 1], [1, 1])], - # id="tiny triangle", - # ), - # pytest.param( - # tiny_rectangle, - # [([1, 1], [3, 2]), ([1, 1], [3, 1]), ([1, 2], [3, 1]), ([1, 2], [1, 1]), ([3, 2], [1, 1])], - # id="tiny rectangle", - # ), - # pytest.param( - # tiny_ellipse, - # [ - # ([1, 2], [5, 2]), - # ([1, 2], [4, 1]), - # ([2, 3], [4, 1]), - # ([2, 3], [2, 1]), - # ([4, 3], [2, 1]), - # ([4, 3], [1, 2]), - # ([5, 2], [1, 2]), - # ], - # id="tiny ellipse", - # ), - # pytest.param( - # small_circle, - # [ - # ([0, 1], [4, 3]), - # ([0, 1], [4, 1]), - # ([0, 3], [4, 1]), - # ([0, 3], [3, 0]), - # ([1, 4], [3, 0]), - # ([1, 4], [1, 0]), - # ([3, 4], [1, 0]), - # ([3, 4], [0, 1]), - # ([4, 3], [0, 1]), - # ], - # id="small circle", - # ), - # pytest.param( - # holo_circle, - # [ - # ([1, 2], [5, 4]), - # ([1, 2], [5, 2]), - # ([1, 4], [5, 2]), - # ([1, 4], [4, 1]), - # ([2, 5], [4, 1]), - # ([2, 5], [2, 1]), - # ([4, 5], [2, 1]), - # ([4, 5], [1, 2]), - # ([5, 4], [1, 2]), - # ], - # id="holo circle", - # ), - # pytest.param( - # holo_ellipse_horizontal, - # [ - # ([1, 3], [7, 7]), - # ([1, 3], [7, 3]), - # ([1, 7], [7, 3]), - # ([1, 7], [5, 1]), - # ([3, 9], [5, 1]), - # ([3, 9], [3, 1]), - # ([5, 9], [3, 1]), - # ([5, 9], [1, 3]), - # ([7, 7], [1, 3]), - # ], - # id="holo ellipse horizontal", - # ), - # pytest.param( - # holo_ellipse_vertical, - # [ - # ([1, 3], [9, 5]), - # ([1, 3], [9, 3]), - # ([1, 5], [9, 3]), - # ([1, 5], [7, 1]), - # ([3, 7], [7, 1]), - # ([3, 7], [3, 1]), - # ([7, 7], [3, 1]), - # ([7, 7], [1, 3]), - # ([9, 5], [1, 3]), - # ], - # id="holo ellipse vertical", - # ), - # pytest.param( - # holo_ellipse_angled, - # [ - # ([1, 2], [6, 7]), - # ([1, 2], [6, 5]), - # ([1, 4], [6, 5]), - # ([1, 4], [2, 1]), - # ([5, 8], [2, 1]), - # ([5, 8], [1, 2]), - # ([6, 7], [1, 2]), - # ], - # id="holo ellipse angled", - # ), + pytest.param( + tiny_circle, + 0, + [([0, 1], [2, 1]), ([0, 1], [1, 0]), ([1, 2], [1, 0]), ([1, 2], [0, 1])], + id="tiny circle sorted by axis 0", + ), + pytest.param( + tiny_quadrilateral, + 0, + [([1, 2], [5, 2]), ([2, 4], [5, 2]), ([2, 4], [2, 1]), ([5, 2], [2, 1])], + id="tiny quadrilateral sorted by axis 0", + ), + pytest.param( + tiny_square, + 0, + [([1, 1], [2, 2]), ([1, 1], [2, 1]), ([1, 2], [2, 1]), ([1, 2], [1, 1])], + id="tiny square sorted by axis 0", + ), + pytest.param( + tiny_triangle, + 0, + [([1, 1], [2, 1]), ([1, 2], [2, 1]), ([1, 2], [1, 1])], + id="tiny triangle sorted by axis 0", + ), + pytest.param( + tiny_rectangle, + 0, + [([1, 1], [3, 2]), ([1, 1], [3, 1]), ([1, 2], [3, 1]), ([1, 2], [1, 1])], + id="tiny rectangle sorted by axis 0", + ), + pytest.param( + tiny_ellipse, + 0, + [ + ([1, 2], [5, 2]), + ([1, 2], [4, 1]), + ([2, 3], [4, 1]), + ([2, 3], [2, 1]), + ([4, 3], [2, 1]), + ([4, 3], [1, 2]), + ], + id="tiny ellipse sorted by axis 0", + ), + pytest.param( + small_circle, + 0, + [ + ([0, 1], [4, 3]), + ([0, 1], [4, 1]), + ([0, 3], [4, 1]), + ([0, 3], [3, 0]), + ([1, 4], [3, 0]), + ([1, 4], [1, 0]), + ([3, 4], [1, 0]), + ([3, 4], [0, 1]), + ], + id="small circle sorted by axis 0", + ), + pytest.param( + holo_circle, + 0, + [ + ([1, 2], [5, 4]), + ([1, 2], [5, 2]), + ([1, 4], [5, 2]), + ([1, 4], [4, 1]), + ([2, 5], [4, 1]), + ([2, 5], [2, 1]), + ([4, 5], [2, 1]), + ([4, 5], [1, 2]), + ], + id="holo circle sorted by axis 0", + ), + pytest.param( + holo_ellipse_horizontal, + 0, + [ + ([1, 3], [7, 7]), + ([1, 3], [7, 3]), + ([1, 7], [7, 3]), + ([1, 7], [5, 1]), + ([3, 9], [5, 1]), + ([3, 9], [3, 1]), + ([5, 9], [3, 1]), + ([5, 9], [1, 3]), + ], + id="holo ellipse horizontal sorted by axis 0", + ), + pytest.param( + holo_ellipse_vertical, + 0, + [ + ([1, 3], [9, 5]), + ([1, 3], [9, 3]), + ([1, 5], [9, 3]), + ([1, 5], [7, 1]), + ([3, 7], [7, 1]), + ([3, 7], [3, 1]), + ([7, 7], [3, 1]), + ([7, 7], [1, 3]), + ], + id="holo ellipse vertical sorted by axis 0", + ), + pytest.param( + holo_ellipse_angled, + 0, + [ + ([1, 2], [6, 7]), + ([1, 2], [6, 5]), + ([1, 4], [6, 5]), + ([1, 4], [2, 1]), + ([5, 8], [2, 1]), + ([5, 8], [1, 2]), + ], + id="holo ellipse angled sorted by axis 0", + ), pytest.param( curved_line, + 0, [ ([1, 5], [8, 8]), ([1, 5], [8, 7]), ([1, 5], [7, 4]), ([1, 5], [6, 2]), ([1, 5], [5, 1]), - ([1, 5], [4, 1]), - ([1, 5], [2, 3]), - ([1, 5], [1, 5]), - ([8, 8], [1, 5]), + ([8, 8], [5, 1]), + ([8, 8], [4, 1]), + ([8, 8], [2, 3]), ], - id="curved line", + id="curved line sorted by axis 0", ), ], ) -def test_rotating_calipers(shape: npt.NDArray, points_target: list) -> None: +def test_rotating_calipers(shape: npt.NDArray, axis: int, points_target: list) -> None: """Test calculation of rotating caliper pairs.""" - points = feret.rotating_calipers(np.argwhere(shape == 1)) + points = feret.rotating_calipers(np.argwhere(shape == 1), axis) np.testing.assert_array_equal(list(points), points_target) @pytest.mark.parametrize( ( "shape", + "axis", "min_feret_distance_target", "min_feret_coord_target", "max_feret_distance_target", "max_feret_coord_target", ), [ - pytest.param(tiny_circle, 1.4142135623730951, ([0, 1], [1, 0]), 2, ([2, 1], [0, 1]), id="tiny circle"), - pytest.param(tiny_square, 1.0, ([1, 1], [2, 1]), 1.4142135623730951, ([2, 2], [1, 1]), id="tiny square"), - pytest.param(tiny_triangle, 1.0, ([1, 1], [2, 1]), 1.4142135623730951, ([1, 2], [2, 1]), id="tiny triangle"), - pytest.param(tiny_rectangle, 1.0, ([1, 2], [1, 1]), 2.23606797749979, ([3, 2], [1, 1]), id="tiny rectangle"), - pytest.param(tiny_ellipse, 2.0, ([2, 3], [2, 1]), 4.0, ([5, 2], [1, 2]), id="tiny ellipse"), - pytest.param(small_circle, 4.0, ([0, 1], [4, 1]), 4.47213595499958, ([4, 3], [0, 1]), id="small circle"), - pytest.param(holo_circle, 4.0, ([1, 2], [5, 2]), 4.47213595499958, ([5, 4], [1, 2]), id="holo circle"), + pytest.param( + tiny_circle, 0, 1.4142135623730951, ([0, 1], [1, 0]), 2, ([1, 2], [1, 0]), id="tiny circle sorted on axis 0" + ), + pytest.param( + tiny_circle, 1, 1.4142135623730951, ([0, 1], [1, 0]), 2, ([1, 0], [1, 2]), id="tiny circle sorted on axis 1" + ), + pytest.param( + tiny_square, + 0, + 1.0, + ([1, 1], [2, 1]), + 1.4142135623730951, + ([1, 2], [2, 1]), + id="tiny square sorted on axis 0", + ), + pytest.param( + tiny_quadrilateral, + 0, + 3.0, + ([2, 4], [2, 1]), + 4.0, + ([1, 2], [5, 2]), + id="tiny square sorted on axis 0", + ), + pytest.param( + tiny_quadrilateral, + 1, + 3.0, + ([2, 1], [2, 4]), + 4.0, + ([1, 2], [5, 2]), + id="tiny square sorted on axis 1", + ), + pytest.param( + tiny_triangle, + 0, + 1.0, + ([1, 1], [2, 1]), + 1.4142135623730951, + ([1, 2], [2, 1]), + id="tiny triangle sorted on axis 0", + ), + pytest.param( + tiny_rectangle, + 0, + 1.0, + ([1, 2], [1, 1]), + 2.23606797749979, + ([1, 2], [3, 1]), + id="tiny rectangle sorted on axis 0", + ), + pytest.param(tiny_ellipse, 0, 2.0, ([2, 3], [2, 1]), 4.0, ([1, 2], [5, 2]), id="tiny ellipse sorted on axis 0"), + pytest.param( + small_circle, + 1, + 4.0, + ([0, 1], [4, 1]), + 4.47213595499958, + ([1, 4], [3, 0]), + id="small circle sorted on axis 0", + ), + pytest.param( + holo_circle, 0, 4.0, ([1, 2], [5, 2]), 4.47213595499958, ([4, 5], [2, 1]), id="holo circle sorted on axis 0" + ), pytest.param( holo_ellipse_horizontal, + 0, 6.0, ([1, 3], [7, 3]), 8.246211251235321, ([5, 9], [3, 1]), - id="holo ellipse horizontal", + id="holo ellipse horizontal on axis 0", ), pytest.param( holo_ellipse_vertical, + 0, 6.0, ([3, 7], [3, 1]), 8.246211251235321, - ([9, 5], [1, 3]), - id="holo ellipse vertical", + ([1, 5], [9, 3]), + id="holo ellipse vertical on axis 0", ), pytest.param( holo_ellipse_angled, + 0, 3.1622776601683795, ([1, 4], [2, 1]), 7.615773105863909, ([5, 8], [2, 1]), - id="holo ellipse angled", + id="holo ellipse angled on axis 0", + ), + pytest.param( + curved_line, + 0, + 5.656854249492381, + ([1, 5], [5, 1]), + 8.06225774829855, + ([8, 8], [4, 1]), + id="curved line sorted on axis 0", + ), + pytest.param( + curved_line, + 1, + 5.656854249492381, + ([1, 5], [5, 1]), + 8.06225774829855, + ([4, 1], [8, 8]), + id="curved line sorted on axis 1", ), - # (curved_line, 5.656854249492381, ([1, 5], [5, 1]), 8.06225774829855, ([8, 8], [4, 1]), id="curved line"), ], ) def test_min_max_feret( shape: npt.NDArray, + axis: int, min_feret_distance_target: float, min_feret_coord_target: list, max_feret_distance_target: float, @@ -564,7 +770,7 @@ def test_min_max_feret( ) -> None: """Test calculation of min/max feret.""" min_feret_distance, min_feret_coord, max_feret_distance, max_feret_coord = feret.min_max_feret( - np.argwhere(shape == 1) + np.argwhere(shape == 1), axis ) assert min_feret_distance == min_feret_distance_target assert min_feret_coord == min_feret_coord_target @@ -575,80 +781,61 @@ def test_min_max_feret( @pytest.mark.parametrize( ( "shape", + "axis", "min_feret_distance_target", "min_feret_coord_target", "max_feret_distance_target", "max_feret_coord_target", ), [ - pytest.param(tiny_circle, 1.4142135623730951, ([0, 1], [1, 0]), 2, ([2, 1], [0, 1]), id="tiny circle"), - pytest.param(tiny_square, 1.0, ([1, 1], [2, 1]), 1.4142135623730951, ([2, 2], [1, 1]), id="tiny square"), - pytest.param(tiny_triangle, 1.0, ([1, 1], [2, 1]), 1.4142135623730951, ([1, 2], [2, 1]), id="tiny triangle"), - pytest.param(tiny_rectangle, 1.0, ([1, 2], [1, 1]), 2.23606797749979, ([3, 2], [1, 1]), id="tiny rectangle"), - pytest.param(tiny_ellipse, 2.0, ([2, 3], [2, 1]), 4.0, ([5, 2], [1, 2]), id="tiny ellipse"), - pytest.param(small_circle, 4.0, ([0, 1], [4, 1]), 4.47213595499958, ([4, 3], [0, 1]), id="small circle"), - pytest.param(holo_circle, 4.0, ([1, 2], [5, 2]), 4.47213595499958, ([5, 4], [1, 2]), id="holo circle"), pytest.param( - holo_ellipse_horizontal, - 6.0, - ([1, 3], [7, 3]), - 8.246211251235321, - ([5, 9], [3, 1]), - id="holo ellipse horizontal", - ), - pytest.param( - holo_ellipse_vertical, + filled_circle, + 0, 6.0, - ([3, 7], [3, 1]), - 8.246211251235321, - ([9, 5], [1, 3]), - id="holo ellipse vertical", - ), - pytest.param( - holo_ellipse_angled, - 3.1622776601683795, - ([1, 4], [2, 1]), - 7.615773105863909, - ([5, 8], [2, 1]), - id="holo ellipse angled", + ([1, 2], [7, 2]), + 7.211102550927978, + ([6, 7], [2, 1]), + id="filled circle sorted on axis 0", ), - # (curved_line, 5.656854249492381, ([1, 5], [5, 1]), 8.06225774829855, ([8, 8], [4, 1]), id="curved line"), - pytest.param(filled_circle, 6.0, ([1, 2], [7, 2]), 7.211102550927978, ([7, 6], [1, 2]), id="filled circle"), pytest.param( filled_ellipse_horizontal, + 0, 4.0, ([1, 2], [5, 2]), 6.324555320336759, ([4, 7], [2, 1]), - id="filled ellipse horizontal", + id="filled ellipse horizontal sorted on axis 0", ), pytest.param( filled_ellipse_vertical, + 0, 4.0, ([2, 5], [2, 1]), 6.324555320336759, - ([7, 4], [1, 2]), - id="filled ellipse vertical", + ([1, 4], [7, 2]), + id="filled ellipse vertical sorted on axis 0", ), pytest.param( filled_ellipse_angled, + 0, 5.385164807134504, ([6, 7], [1, 5]), 8.94427190999916, ([2, 9], [6, 1]), - id="filled ellipse angled", + id="filled ellipse angled sorted on axis 0", ), ], ) def test_get_feret_from_mask( shape: npt.NDArray, + axis: int, min_feret_distance_target: float, min_feret_coord_target: list, max_feret_distance_target: float, max_feret_coord_target: list, ) -> None: """Test calculation of min/max feret for a single masked object.""" - min_feret_distance, min_feret_coord, max_feret_distance, max_feret_coord = feret.get_feret_from_mask(shape) + min_feret_distance, min_feret_coord, max_feret_distance, max_feret_coord = feret.get_feret_from_mask(shape, axis) assert min_feret_distance == min_feret_distance_target assert min_feret_coord == min_feret_coord_target assert max_feret_distance == max_feret_distance_target @@ -666,27 +853,29 @@ def test_get_feret_from_mask( @pytest.mark.parametrize( - ("shape", "target"), + ("shape", "axis", "target"), [ pytest.param( holo_image, + 0, { - 1: (4.0, ([1, 2], [5, 2]), 4.47213595499958, ([5, 4], [1, 2])), + 1: (4.0, ([1, 2], [5, 2]), 4.47213595499958, ([4, 5], [2, 1])), 2: (3.1622776601683795, ([9, 4], [10, 1]), 7.615773105863909, ([13, 8], [10, 1])), }, id="holo image", ), pytest.param( filled_image, + 0, { - 1: (6.0, ([1, 2], [7, 2]), 7.211102550927978, ([7, 6], [1, 2])), + 1: (6.0, ([1, 2], [7, 2]), 7.211102550927978, ([6, 7], [2, 1])), 2: (5.385164807134504, ([15, 7], [10, 5]), 8.94427190999916, ([11, 9], [15, 1])), }, id="filled image", ), ], ) -def test_get_feret_from_labelim(shape: npt.NDArray, target) -> None: +def test_get_feret_from_labelim(shape: npt.NDArray, axis: int, target: dict) -> None: """Test calculation of min/max feret for a labelled image with multiuple objects.""" - min_max_feret_size_coord = feret.get_feret_from_labelim(shape) + min_max_feret_size_coord = feret.get_feret_from_labelim(shape, axis=axis) assert min_max_feret_size_coord == target diff --git a/topostats/measure/feret.py b/topostats/measure/feret.py index 244160ccb3..84e6e37fec 100644 --- a/topostats/measure/feret.py +++ b/topostats/measure/feret.py @@ -10,12 +10,18 @@ from __future__ import annotations +import logging +from collections.abc import Generator from math import sqrt import numpy as np import numpy.typing as npt import skimage.morphology +from topostats.logs.logs import LOGGER_NAME + +LOGGER = logging.getLogger(LOGGER_NAME) + def orientation(p: npt.NDArray, q: npt.NDArray, r: npt.NDArray) -> int: """Determine the orientation of three points as either clockwise, counter-clock-wise or colinear. @@ -37,7 +43,7 @@ def orientation(p: npt.NDArray, q: npt.NDArray, r: npt.NDArray) -> int: return (q[1] - p[1]) * (r[0] - p[0]) - (q[0] - p[0]) * (r[1] - p[1]) -def sort_coords(points: npt.NDArray) -> npt.NDArray: +def sort_coords(points: npt.NDArray, axis: int = 1) -> npt.NDArray: """ Sort the coordinates. @@ -45,35 +51,48 @@ def sort_coords(points: npt.NDArray) -> npt.NDArray: ---------- points: npt.NDArray Array of coordinates + axis : int + Which axis to axis coordinates on 0 for row; 1 for columns (default). Returns ------- npt.NDArray Array sorted by row then column. """ - order = np.lexsort((points[:, 0], points[:, 1])) + if axis == 1: + order = np.lexsort((points[:, 0], points[:, 1])) + elif axis == 0: + order = np.lexsort((points[:, 1], points[:, 0])) + else: + raise ValueError("Invalid axis provided for sorting, only 0 and 1 permitted.") return points[order] -def hulls(points: npt.NDArray) -> tuple[list, list]: +def hulls(points: npt.NDArray, axis: int = 1) -> tuple[list, list]: """ Graham scan to find upper and lower convex hulls of a set of 2-D points. Points should be sorted in asecnding order first. + `Graham scan ` + Parameters ---------- points : npt.NDArray 2-D Array of points for the outline of an object. + axis : int + Which axis to sort coordinates on 0 for row; 1 for columns (default). Returns ------- Tuple[list, list] Tuple of two Numpy arrays of the original coordinates split into upper and lower hulls. """ - upper_hull = [] - lower_hull = [] - for p in sort_coords(points): + upper_hull: list = [] + lower_hull: list = [] + if axis: + points = sort_coords(points, axis) + for p in points: # Remove points if they are not in the correct hull while len(upper_hull) > 1 and orientation(upper_hull[-2], upper_hull[-1], p) <= 0: upper_hull.pop() @@ -111,41 +130,62 @@ def all_pairs(points: npt.NDArray) -> list[tuple[list, list]]: return list(unique_combinations.values()) -def rotating_calipers(points: npt.NDArray) -> list[tuple[list, list]]: - """Given a list of 2d points, finds all ways of sandwiching the points. +def rotating_calipers(points: npt.NDArray, axis: int = 0) -> Generator: + """Given a list of 2d points, finds all ways of sandwiching the points between two parallel lines. - Between two parallel lines that touch one point each, and yields the sequence - of pairs of points touched by each pair of lines. + This yields the sequence of pairs of points touched by each pair of lines across all points around the hull of a + polygon. `Rotating Calipers _` + + Parameters + ---------- + points: npt.NDArray + Numpy array of coordinates defining the outline of an object. + axis : int + Which axis to sort coordinates on, 0 for row (default); 1 for columns. + + Returns + ------- + Generator + Numpy array of pairs of points """ - upper_hull, lower_hull = hulls(points) + upper_hull, lower_hull = hulls(points, axis) + upper_hull = sort_coords(np.asarray(upper_hull), axis) + lower_hull = sort_coords(np.asarray(lower_hull), axis) i = 0 j = len(lower_hull) - 1 + + counter = 0 while i < len(upper_hull) - 1 or j > 0: yield upper_hull[i], lower_hull[j] # If all the way through one side of hull, advance the other side - if i == len(upper_hull): + if i == len(upper_hull) - 1: j -= 1 elif j == 0: i += 1 # still points left on both lists, compare slopes of next hull edges - # being careful to avoid divide-by-zero in slope calculation + # being careful to avoid ZeroDivisionError in slope calculation elif ((upper_hull[i + 1][1] - upper_hull[i][1]) * (lower_hull[j][0] - lower_hull[j - 1][0])) > ( (lower_hull[j][1] - lower_hull[j - 1][1]) * (upper_hull[i + 1][0] - upper_hull[i][0]) ): i += 1 else: j -= 1 + counter += 1 -def min_max_feret(points: npt.NDArray) -> tuple[float, tuple[int, int], float, tuple[int, int]]: +def min_max_feret(points: npt.NDArray, axis: int = 0) -> tuple[float, tuple[int, int], float, tuple[int, int]]: """Given a list of 2-D points, returns the minimum and maximum feret diameters. + `Feret diameter ` + Parameters ---------- points: npt.NDArray A 2-D array of points for the outline of an object. + axis: int + Which axis to sort coordinates on, 0 for row (default); 1 for columns. Returns ------- @@ -153,14 +193,14 @@ def min_max_feret(points: npt.NDArray) -> tuple[float, tuple[int, int], float, t Tuple of the minimum feret distance and its coordinates and the maximum feret distance and its coordinates. """ squared_distance_per_pair = [ - ((p[0] - q[0]) ** 2 + (p[1] - q[1]) ** 2, (p, q)) for p, q in rotating_calipers(points) + ((p[0] - q[0]) ** 2 + (p[1] - q[1]) ** 2, (list(p), list(q))) for p, q in rotating_calipers(points, axis) ] min_feret_sq, min_feret_coords = min(squared_distance_per_pair) max_feret_sq, max_feret_coords = max(squared_distance_per_pair) return sqrt(min_feret_sq), min_feret_coords, sqrt(max_feret_sq), max_feret_coords -def get_feret_from_mask(mask_im: npt.NDArray) -> tuple[float, tuple[int, int], float, tuple[int, int]]: +def get_feret_from_mask(mask_im: npt.NDArray, axis: int = 0) -> tuple[float, tuple[int, int], float, tuple[int, int]]: """Calculate the minimum and maximum feret diameter of the foreground object of a binary mask. The outline of the object is calculated and the pixel coordinates transformed to a list for calculation. @@ -169,6 +209,8 @@ def get_feret_from_mask(mask_im: npt.NDArray) -> tuple[float, tuple[int, int], f ---------- mask_im: npt.NDArray Binary Numpy array. + axis: int + Which axis to sort coordinates on, 0 for row (default); 1 for columns. Returns ------- @@ -180,14 +222,13 @@ def get_feret_from_mask(mask_im: npt.NDArray) -> tuple[float, tuple[int, int], f boundary_points = np.argwhere(outline > 0) # convert numpy array to a list of (x,y) tuple points boundary_point_list = list(map(list, list(boundary_points))) - return min_max_feret(boundary_point_list) + return min_max_feret(boundary_point_list, axis) -def get_feret_from_labelim(label_image: npt.NDArray, labels: None | list | set = None) -> dict: +def get_feret_from_labelim(label_image: npt.NDArray, labels: None | list | set = None, axis: int = 0) -> dict: """Calculate the minimum and maximum feret and coordinates of each connected component within a labelled image. - If labels is None, all labels > 0 - will be analyzed. + If labels is None, all labels > 0 will be analyzed. Parameters ---------- @@ -195,6 +236,8 @@ def get_feret_from_labelim(label_image: npt.NDArray, labels: None | list | set = Numpy array with labelled connected components (integer) labels: None | list A list of labelled objects for which to calculate + axis: int + Which axis to sort coordinates on, 0 for row (default); 1 for columns. Returns ------- @@ -206,5 +249,5 @@ def get_feret_from_labelim(label_image: npt.NDArray, labels: None | list | set = labels = set(np.unique(label_image)) - {0} results = {} for label in labels: - results[label] = get_feret_from_mask(label_image == label) + results[label] = get_feret_from_mask(label_image == label, axis) return results From 0f1f1abad455a4bacd5a08a25b00ec5959b1af71 Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Wed, 24 Jan 2024 14:00:29 +0000 Subject: [PATCH 21/35] Fixes errors with rotating calipers Made some mistakes in the rotating calipers algorithm and spent considerable time with pen and paper working through examples. + `curved_line` tests now pass. + Added another simple polygon to the test suite `tiny_quadrilateral`. + Found that the ordering of points makes a considerable difference when constructing the convex hulls and their halves and in so doing added a `sort_coords()` function to test this. As a consequence sorting can be done on either axis (0/rows or 1/columns). Ultimately the same min and max feret _are_ calculated though. + The suggested method of rotating calipers to find minimum feret distance is off, a better method is the triangle formed between the caliper pair and the next point on one of the convex hulls (wish I had read @SylivaWhittle code more closely in the first instance, sorry!) + Now use the Graham Scan, implemented as a generator, to return the minimum feret distance and rotating caliper pairs. The maximum feret distance is then calculated from the feret pairs via list comprehension. + Comprehensive, but not perfect, tests, breaks everything out of `GrainStats` into a sub-module. Ultimately need to improve coverage and then replace GrainStats calculations with these. ToDo + Currently the minimum feret co-ordinates are incorrect, I was too focused on solving the problem for the tiny_triangle scenario which doesn't generalise as it only works for isosceles triangles and that will rarely be the case. Thanks to @SylviaWhittle again who has made a suggestion of how to correct this I will be addressing this in a subsequent PR. + Tests need completing after this switch and coverage is only indicated to be ~60%, need to improve on that. --- tests/measure/test_feret.py | 589 +++++++++++++++++++++++------------- tests/test_grainstats.py | 71 ++++- topostats/grainstats.py | 2 - topostats/measure/feret.py | 175 +++++++++-- 4 files changed, 596 insertions(+), 241 deletions(-) diff --git a/tests/measure/test_feret.py b/tests/measure/test_feret.py index f0262ad07a..40a6db3633 100644 --- a/tests/measure/test_feret.py +++ b/tests/measure/test_feret.py @@ -7,6 +7,10 @@ from topostats.measure import feret +# pylint: disable=protected-access +# pylint: disable=too-many-lines +# pylint: disable=fixme + POINT1 = (0, 0) POINT2 = (1, 0) POINT3 = (1, 1) @@ -498,145 +502,293 @@ def test_all_pairs(shape: npt.NDArray, points_target: list) -> None: @pytest.mark.parametrize( - ("shape", "axis", "points_target"), + ("base1", "base2", "apex", "target_height"), + [ + pytest.param([0, 0], [1, 0], [0, 1], 1.0, id="tiny triangle (vertical is base)"), + pytest.param([0, 0], [0, 1], [1, 0], 1.0, id="tiny triangle (horizontal is base)"), + pytest.param([0, 1], [1, 0], [0, 0], 0.7071067811865475, id="tiny triangle (hypotenuse is base)"), + pytest.param([4, 0], [4, 3], [0, 0], 4.0, id="3, 4, 5 triangle"), + pytest.param([4, 0], [4, 6], [0, 3], 4.0, id="equilateral triangle"), + pytest.param( + np.asarray([4, 0]), np.asarray([4, 6]), np.asarray([0, 3]), 4.0, id="equilateral triangle (numpy arrays)" + ), + pytest.param([4, 3], [4, 6], [0, 0], 4.0, id="offset"), + pytest.param([4, 3], [3, 6], [0, 0], 4.743416490252569, id="offset"), + ], +) +def test_triangle_heights( + base1: npt.NDArray | list, base2: npt.NDArray | list, apex: npt.NDArray | list, target_height: float +) -> None: + """Test calculation of minimum feret (height of triangle).""" + height = feret.triangle_height(base1, base2, apex) + np.testing.assert_almost_equal(height, target_height) + + +# TODO : Remove ultimately redundant its not the mid-point that is required +@pytest.mark.parametrize( + ("base1", "base2", "apex", "opposite_target"), + [ + pytest.param([1, 0], [0, 1], [0, 0], [1, 1], id="tiny triangle (apex top left)"), + pytest.param([1, 0], [0, 1], [1, 1], [0, 0], id="tiny triangle (apex top right)"), + pytest.param([0, 0], [1, 1], [1, 0], [0, 1], id="tiny triangle (apex bottom left)"), + pytest.param([0, 0], [1, 1], [0, 1], [1, 0], id="tiny triangle (apex bottom right)"), + pytest.param([1, 2], [2, 1], [1, 1], [2, 2], id="tiny triangle (from tests)"), + ], +) +def test_mid_point( + base1: npt.NDArray | list, base2: npt.NDArray | list, apex: npt.NDArray | list, opposite_target: float +) -> None: + """Test calculation of mid_point of the triangle formed by rotating caliper and next point on convex hull.""" + opposite = feret._mid_point(base1, base2, apex) + assert opposite == opposite_target + + +# pylint: disable=unused-argument +@pytest.mark.parametrize( + ("shape", "axis", "calipers_target", "min_ferets_target", "min_feret_coords_target"), [ pytest.param( tiny_circle, 0, - [([0, 1], [2, 1]), ([0, 1], [1, 0]), ([1, 2], [1, 0]), ([1, 2], [0, 1])], + (([2, 1], [0, 1]), ([1, 0], [0, 1]), ([1, 0], [1, 2]), ([0, 1], [1, 2])), + (1.414213562373095, 1.414213562373095, 1.414213562373095, 1.414213562373095), + (([2, 0], [0, 1]), ([0, 2], [1, 0]), ([0, 0], [1, 2]), ([2, 2], [0, 1])), id="tiny circle sorted by axis 0", ), pytest.param( tiny_quadrilateral, 0, - [([1, 2], [5, 2]), ([2, 4], [5, 2]), ([2, 4], [2, 1]), ([5, 2], [2, 1])], + (([5, 2], [1, 2]), ([5, 2], [2, 4]), ([2, 1], [2, 4]), ([2, 1], [5, 2])), + (3.5777087639996634, 2.846049894151541, 2.4961508830135313, 2.82842712474619), + (([1, 3], [5, 2]), ([4, 1], [2, 4]), ([2, 1], [2, 4]), ([2, 1], [5, 2])), id="tiny quadrilateral sorted by axis 0", ), pytest.param( tiny_square, 0, - [([1, 1], [2, 2]), ([1, 1], [2, 1]), ([1, 2], [2, 1]), ([1, 2], [1, 1])], + (([2, 2], [1, 1]), ([2, 1], [1, 1]), ([2, 1], [1, 2]), ([1, 1], [1, 2])), + (1.0, 1.0, 1.0, 1.0), + (([2, 2], [1, 1]), ([1, 2], [2, 1]), ([2, 1], [1, 2]), ([2, 2], [1, 1])), id="tiny square sorted by axis 0", ), pytest.param( tiny_triangle, 0, - [([1, 1], [2, 1]), ([1, 2], [2, 1]), ([1, 2], [1, 1])], + (([2, 1], [1, 1]), ([2, 1], [1, 2]), ([1, 1], [1, 2])), + (1.0, 1.0, 0.7071067811865475), + (([1, 2], [2, 1]), ([2, 1], [1, 2]), ([2, 2], [1, 1])), id="tiny triangle sorted by axis 0", ), pytest.param( tiny_rectangle, 0, - [([1, 1], [3, 2]), ([1, 1], [3, 1]), ([1, 2], [3, 1]), ([1, 2], [1, 1])], + (([3, 2], [1, 1]), ([3, 1], [1, 1]), ([3, 1], [1, 2]), ([1, 1], [1, 2])), + (2.0, 2.0, 1.0, 1.0), + (([3, 2], [1, 1]), ([1, 2], [3, 1]), ([2, 1], [1, 2]), ([2, 2], [1, 1])), id="tiny rectangle sorted by axis 0", ), pytest.param( tiny_ellipse, 0, - [ - ([1, 2], [5, 2]), - ([1, 2], [4, 1]), - ([2, 3], [4, 1]), - ([2, 3], [2, 1]), - ([4, 3], [2, 1]), - ([4, 3], [1, 2]), - ], + ( + ([5, 2], [1, 2]), + ([4, 1], [1, 2]), + ([4, 1], [2, 3]), + ([2, 1], [2, 3]), + ([2, 1], [4, 3]), + ([1, 2], [4, 3]), + ), + (2.82842712474619, 2.82842712474619, 2.0, 2.0, 2.82842712474619, 2.82842712474619), + ( + ([5, 2], [1, 2]), + ([4, 1], [1, 2]), + ([4, 1], [2, 3]), + ([2, 1], [2, 3]), + ([2, 1], [4, 3]), + ([1, 2], [4, 3]), + ), id="tiny ellipse sorted by axis 0", ), pytest.param( small_circle, 0, - [ - ([0, 1], [4, 3]), - ([0, 1], [4, 1]), - ([0, 3], [4, 1]), - ([0, 3], [3, 0]), - ([1, 4], [3, 0]), - ([1, 4], [1, 0]), - ([3, 4], [1, 0]), - ([3, 4], [0, 1]), - ], + ( + ([4, 3], [0, 1]), + ([4, 1], [0, 1]), + ([4, 1], [0, 3]), + ([3, 0], [0, 3]), + ([3, 0], [1, 4]), + ([1, 0], [1, 4]), + ([1, 0], [3, 4]), + ([0, 1], [3, 4]), + ), + (4.0, 4.0, 4.242640687119285, 4.242640687119285, 4.0, 4.0, 4.242640687119285, 4.242640687119285), + ( + ([4, 3], [0, 1]), + ([4, 1], [0, 1]), + ([4, 1], [0, 3]), + ([3, 0], [0, 3]), + ([3, 0], [1, 4]), + ([1, 0], [1, 4]), + ([1, 0], [3, 4]), + ([0, 1], [3, 4]), + ), id="small circle sorted by axis 0", ), pytest.param( holo_circle, 0, - [ - ([1, 2], [5, 4]), - ([1, 2], [5, 2]), - ([1, 4], [5, 2]), - ([1, 4], [4, 1]), - ([2, 5], [4, 1]), - ([2, 5], [2, 1]), - ([4, 5], [2, 1]), - ([4, 5], [1, 2]), - ], + ( + ([5, 4], [1, 2]), + ([5, 2], [1, 2]), + ([5, 2], [1, 4]), + ([4, 1], [1, 4]), + ([4, 1], [2, 5]), + ([2, 1], [2, 5]), + ([2, 1], [4, 5]), + ([1, 2], [4, 5]), + ), + (4.0, 4.0, 4.242640687119285, 4.242640687119285, 4.0, 4.0, 4.242640687119285, 4.242640687119285), + ( + ([5, 4], [1, 2]), + ([5, 2], [1, 2]), + ([5, 2], [1, 4]), + ([4, 1], [1, 4]), + ([4, 1], [2, 5]), + ([2, 1], [2, 5]), + ([2, 1], [4, 5]), + ([1, 2], [4, 5]), + ), id="holo circle sorted by axis 0", ), pytest.param( holo_ellipse_horizontal, 0, - [ - ([1, 3], [7, 7]), - ([1, 3], [7, 3]), - ([1, 7], [7, 3]), - ([1, 7], [5, 1]), - ([3, 9], [5, 1]), - ([3, 9], [3, 1]), - ([5, 9], [3, 1]), - ([5, 9], [1, 3]), - ], + ( + ([7, 7], [1, 3]), + ([7, 3], [1, 3]), + ([7, 3], [1, 7]), + ([5, 1], [1, 7]), + ([5, 1], [3, 9]), + ([3, 1], [3, 9]), + ([3, 1], [5, 9]), + ([1, 3], [5, 9]), + ), + (6.0, 6.0, 7.071067811865475, 7.071067811865475, 8.0, 8.0, 7.071067811865475, 7.071067811865475), + ( + ([7, 7], [1, 3]), + ([7, 3], [1, 3]), + ([7, 3], [1, 7]), + ([5, 1], [1, 7]), + ([5, 1], [3, 9]), + ([3, 1], [3, 9]), + ([3, 1], [5, 9]), + ([1, 3], [5, 9]), + ), id="holo ellipse horizontal sorted by axis 0", ), pytest.param( holo_ellipse_vertical, 0, - [ - ([1, 3], [9, 5]), - ([1, 3], [9, 3]), - ([1, 5], [9, 3]), - ([1, 5], [7, 1]), - ([3, 7], [7, 1]), - ([3, 7], [3, 1]), - ([7, 7], [3, 1]), - ([7, 7], [1, 3]), - ], + ( + ([9, 5], [1, 3]), + ([9, 3], [1, 3]), + ([9, 3], [1, 5]), + ([7, 1], [1, 5]), + ([7, 1], [3, 7]), + ([3, 1], [3, 7]), + ([3, 1], [7, 7]), + ([1, 3], [7, 7]), + ), + (8.0, 8.0, 7.071067811865475, 7.071067811865475, 6.0, 6.0, 7.071067811865475, 7.071067811865475), + ( + ([9, 5], [1, 3]), + ([9, 3], [1, 3]), + ([9, 3], [1, 5]), + ([7, 1], [1, 5]), + ([7, 1], [3, 7]), + ([3, 1], [3, 7]), + ([3, 1], [7, 7]), + ([1, 3], [7, 7]), + ), id="holo ellipse vertical sorted by axis 0", ), pytest.param( holo_ellipse_angled, 0, - [ - ([1, 2], [6, 7]), - ([1, 2], [6, 5]), - ([1, 4], [6, 5]), - ([1, 4], [2, 1]), - ([5, 8], [2, 1]), - ([5, 8], [1, 2]), - ], + ( + ([6, 7], [1, 2]), + ([6, 5], [1, 2]), + ([6, 5], [1, 4]), + ([2, 1], [1, 4]), + ([2, 1], [5, 8]), + ([1, 2], [5, 8]), + ), + (5.0, 5.0, 2.82842712474619, 2.82842712474619, 7.071067811865475, 7.071067811865475), + ( + ([6, 7], [1, 2]), + ([6, 5], [1, 2]), + ([6, 5], [1, 4]), + ([2, 1], [1, 4]), + ([2, 1], [5, 8]), + ([1, 2], [5, 8]), + ), id="holo ellipse angled sorted by axis 0", ), pytest.param( curved_line, 0, - [ - ([1, 5], [8, 8]), - ([1, 5], [8, 7]), - ([1, 5], [7, 4]), - ([1, 5], [6, 2]), - ([1, 5], [5, 1]), - ([8, 8], [5, 1]), - ([8, 8], [4, 1]), - ([8, 8], [2, 3]), - ], + ( + ([8, 8], [1, 5]), + ([8, 7], [1, 5]), + ([7, 4], [1, 5]), + ([6, 2], [1, 5]), + ([5, 1], [1, 5]), + ([5, 1], [8, 8]), + ([4, 1], [8, 8]), + ([2, 3], [8, 8]), + ), + ( + 7.0, + 6.00832755431992, + 5.813776741499453, + 5.65685424949238, + 5.252257314388902, + 7.0, + 7.7781745930520225, + 7.602631123499284, + ), + ( + ([8, 8], [1, 5]), + ([8, 7], [1, 5]), + ([7, 4], [1, 5]), + ([6, 2], [1, 5]), + ([5, 1], [1, 5]), + ([5, 1], [8, 8]), + ([4, 1], [8, 8]), + ([2, 3], [8, 8]), + ), id="curved line sorted by axis 0", ), ], ) -def test_rotating_calipers(shape: npt.NDArray, axis: int, points_target: list) -> None: +def test_rotating_calipers( + shape: npt.NDArray, axis: int, calipers_target: tuple, min_ferets_target: tuple, min_feret_coords_target: tuple +) -> None: """Test calculation of rotating caliper pairs.""" - points = feret.rotating_calipers(np.argwhere(shape == 1), axis) - np.testing.assert_array_equal(list(points), points_target) + caliper_min_feret = feret.rotating_calipers(np.argwhere(shape == 1), axis) + # TODO : Use this once we have correct min feret coordinates + # min_ferets, calipers, min_feret_coords = zip(*caliper_min_feret) + min_ferets, calipers, _ = zip(*caliper_min_feret) + # print(f"{min_ferets=}") + # print(f"{calipers=}") + # print(f"{calipers_target=}") + # print(f"{min_feret_coords=}") + # print(f"{min_feret_coords_target=}") + np.testing.assert_array_equal(calipers, calipers_target) + np.testing.assert_array_equal(min_ferets, min_ferets_target) + # TODO : Test min_feret_coords once correctly calculated + # np.testing.assert_array_equal(min_feret_coords, min_feret_coords_target) @pytest.mark.parametrize( @@ -650,112 +802,124 @@ def test_rotating_calipers(shape: npt.NDArray, axis: int, points_target: list) - ), [ pytest.param( - tiny_circle, 0, 1.4142135623730951, ([0, 1], [1, 0]), 2, ([1, 2], [1, 0]), id="tiny circle sorted on axis 0" + tiny_circle, + 0, + 1.4142135623730951, + ([0, 1], [1, 2]), + 2.0, + ([2, 1], [0, 1]), + id="tiny circle sorted on axis 0", ), pytest.param( - tiny_circle, 1, 1.4142135623730951, ([0, 1], [1, 0]), 2, ([1, 0], [1, 2]), id="tiny circle sorted on axis 1" + tiny_circle, + 1, + 1.4142135623730951, + ([1, 0], [0, 1]), + 2.0, + ([2, 1], [0, 1]), + id="tiny circle sorted on axis 1", ), pytest.param( tiny_square, 0, 1.0, - ([1, 1], [2, 1]), + ([1, 1], [1, 2]), 1.4142135623730951, - ([1, 2], [2, 1]), + ([2, 2], [1, 1]), id="tiny square sorted on axis 0", ), pytest.param( tiny_quadrilateral, 0, - 3.0, - ([2, 4], [2, 1]), + 2.4961508830135313, + ([2, 1], [2, 4]), 4.0, - ([1, 2], [5, 2]), - id="tiny square sorted on axis 0", + ([5, 2], [1, 2]), + id="tiny quadrilateral sorted on axis 0", ), pytest.param( tiny_quadrilateral, 1, - 3.0, - ([2, 1], [2, 4]), + 2.4961508830135313, + ([2, 4], [2, 1]), 4.0, - ([1, 2], [5, 2]), - id="tiny square sorted on axis 1", + ([5, 2], [1, 2]), + id="tiny quadrilateral sorted on axis 1", ), pytest.param( tiny_triangle, 0, - 1.0, - ([1, 1], [2, 1]), + 0.7071067811865475, + ([1, 1], [1, 2]), # NB - NOT the actual min feret coordinates, yet! 1.4142135623730951, - ([1, 2], [2, 1]), + ([2, 1], [1, 2]), id="tiny triangle sorted on axis 0", ), pytest.param( tiny_rectangle, 0, 1.0, - ([1, 2], [1, 1]), + ([1, 1], [1, 2]), 2.23606797749979, - ([1, 2], [3, 1]), + ([3, 2], [1, 1]), id="tiny rectangle sorted on axis 0", ), - pytest.param(tiny_ellipse, 0, 2.0, ([2, 3], [2, 1]), 4.0, ([1, 2], [5, 2]), id="tiny ellipse sorted on axis 0"), + pytest.param(tiny_ellipse, 0, 2.0, ([2, 1], [2, 3]), 4.0, ([5, 2], [1, 2]), id="tiny ellipse sorted on axis 0"), pytest.param( small_circle, 1, 4.0, - ([0, 1], [4, 1]), + ([1, 0], [1, 4]), 4.47213595499958, - ([1, 4], [3, 0]), + ([4, 3], [0, 1]), id="small circle sorted on axis 0", ), pytest.param( - holo_circle, 0, 4.0, ([1, 2], [5, 2]), 4.47213595499958, ([4, 5], [2, 1]), id="holo circle sorted on axis 0" + holo_circle, 0, 4.0, ([2, 1], [2, 5]), 4.47213595499958, ([5, 4], [1, 2]), id="holo circle sorted on axis 0" ), pytest.param( holo_ellipse_horizontal, 0, 6.0, - ([1, 3], [7, 3]), + ([7, 3], [1, 3]), 8.246211251235321, - ([5, 9], [3, 1]), + ([5, 1], [3, 9]), id="holo ellipse horizontal on axis 0", ), pytest.param( holo_ellipse_vertical, 0, 6.0, - ([3, 7], [3, 1]), + ([3, 1], [3, 7]), 8.246211251235321, - ([1, 5], [9, 3]), + ([9, 5], [1, 3]), id="holo ellipse vertical on axis 0", ), pytest.param( holo_ellipse_angled, 0, - 3.1622776601683795, - ([1, 4], [2, 1]), + 2.82842712474619, + ([2, 1], [1, 4]), 7.615773105863909, - ([5, 8], [2, 1]), + ([2, 1], [5, 8]), id="holo ellipse angled on axis 0", ), pytest.param( curved_line, 0, - 5.656854249492381, - ([1, 5], [5, 1]), + 5.252257314388902, + ([5, 1], [1, 5]), 8.06225774829855, - ([8, 8], [4, 1]), + ([4, 1], [8, 8]), id="curved line sorted on axis 0", ), pytest.param( curved_line, 1, - 5.656854249492381, - ([1, 5], [5, 1]), + 5.252257314388902, + ([5, 1], [1, 5]), 8.06225774829855, - ([4, 1], [8, 8]), + ([8, 8], [4, 1]), id="curved line sorted on axis 1", ), ], @@ -772,110 +936,115 @@ def test_min_max_feret( min_feret_distance, min_feret_coord, max_feret_distance, max_feret_coord = feret.min_max_feret( np.argwhere(shape == 1), axis ) - assert min_feret_distance == min_feret_distance_target - assert min_feret_coord == min_feret_coord_target - assert max_feret_distance == max_feret_distance_target - assert max_feret_coord == max_feret_coord_target + # print(f"{min_feret_distance=}") + # print(f"{min_feret_coord=}") + # print(f"{max_feret_distance=}") + # print(f"{max_feret_coord=}") + np.testing.assert_approx_equal(min_feret_distance, min_feret_distance_target) + np.testing.assert_array_equal(min_feret_coord, min_feret_coord_target) + np.testing.assert_approx_equal(max_feret_distance, max_feret_distance_target) + np.testing.assert_array_equal(max_feret_coord, max_feret_coord_target) -@pytest.mark.parametrize( - ( - "shape", - "axis", - "min_feret_distance_target", - "min_feret_coord_target", - "max_feret_distance_target", - "max_feret_coord_target", - ), - [ - pytest.param( - filled_circle, - 0, - 6.0, - ([1, 2], [7, 2]), - 7.211102550927978, - ([6, 7], [2, 1]), - id="filled circle sorted on axis 0", - ), - pytest.param( - filled_ellipse_horizontal, - 0, - 4.0, - ([1, 2], [5, 2]), - 6.324555320336759, - ([4, 7], [2, 1]), - id="filled ellipse horizontal sorted on axis 0", - ), - pytest.param( - filled_ellipse_vertical, - 0, - 4.0, - ([2, 5], [2, 1]), - 6.324555320336759, - ([1, 4], [7, 2]), - id="filled ellipse vertical sorted on axis 0", - ), - pytest.param( - filled_ellipse_angled, - 0, - 5.385164807134504, - ([6, 7], [1, 5]), - 8.94427190999916, - ([2, 9], [6, 1]), - id="filled ellipse angled sorted on axis 0", - ), - ], -) -def test_get_feret_from_mask( - shape: npt.NDArray, - axis: int, - min_feret_distance_target: float, - min_feret_coord_target: list, - max_feret_distance_target: float, - max_feret_coord_target: list, -) -> None: - """Test calculation of min/max feret for a single masked object.""" - min_feret_distance, min_feret_coord, max_feret_distance, max_feret_coord = feret.get_feret_from_mask(shape, axis) - assert min_feret_distance == min_feret_distance_target - assert min_feret_coord == min_feret_coord_target - assert max_feret_distance == max_feret_distance_target - assert max_feret_coord == max_feret_coord_target +# ToDO : Enable and correct tests once correct coordinates are calculated +# @pytest.mark.parametrize( +# ( +# "shape", +# "axis", +# "min_feret_distance_target", +# "min_feret_coord_target", +# "max_feret_distance_target", +# "max_feret_coord_target", +# ), +# [ +# pytest.param( +# filled_circle, +# 0, +# 6.0, +# ([2, 1], [2, 7]), +# 7.211102550927978, +# ([6, 7], [2, 1]), +# id="filled circle sorted on axis 0", +# ), +# pytest.param( +# filled_ellipse_horizontal, +# 0, +# 4.0, +# ([5, 2], [1, 2]), +# 6.324555320336759, +# ([4, 7], [2, 1]), +# id="filled ellipse horizontal sorted on axis 0", +# ), +# pytest.param( +# filled_ellipse_vertical, +# 0, +# 4.0, +# ([2, 5], [2, 1]), +# 6.324555320336759, +# ([1, 4], [7, 2]), +# id="filled ellipse vertical sorted on axis 0", +# ), +# pytest.param( +# filled_ellipse_angled, +# 0, +# 5.385164807134504, +# ([6, 7], [1, 5]), +# 8.94427190999916, +# ([2, 9], [6, 1]), +# id="filled ellipse angled sorted on axis 0", +# ), +# ], +# ) +# def test_get_feret_from_mask( +# shape: npt.NDArray, +# axis: int, +# min_feret_distance_target: float, +# min_feret_coord_target: list, +# max_feret_distance_target: float, +# max_feret_coord_target: list, +# ) -> None: +# """Test calculation of min/max feret for a single masked object.""" +# min_feret_distance, min_feret_coord, max_feret_distance, max_feret_coord = feret.get_feret_from_mask(shape, axis) +# np.testing.assert_approx_equal(min_feret_distance, min_feret_distance_target) +# np.testing.assert_array_equal(min_feret_coord, min_feret_coord_target) +# np.testing.assert_approx_equal(max_feret_distance, max_feret_distance_target) +# np.testing.assert_array_equal(max_feret_coord, max_feret_coord_target) -# Concatenate images to have two labeled objects within them -holo_ellipse_angled2 = holo_ellipse_angled.copy() -holo_ellipse_angled2[holo_ellipse_angled2 == 1] = 2 -# Need to pad the holo_circle -holo_image = np.concatenate((np.pad(holo_circle, pad_width=((0, 1), (0, 3))), holo_ellipse_angled2)) -filled_ellipse_angled2 = filled_ellipse_angled.copy() -filled_ellipse_angled2[filled_ellipse_angled2 == 1] = 2 -filled_image = np.concatenate((np.pad(filled_circle, pad_width=((0, 0), (0, 2))), filled_ellipse_angled2)) +# # Concatenate images to have two labeled objects within them +# holo_ellipse_angled2 = holo_ellipse_angled.copy() +# holo_ellipse_angled2[holo_ellipse_angled2 == 1] = 2 +# # Need to pad the holo_circle +# holo_image = np.concatenate((np.pad(holo_circle, pad_width=((0, 1), (0, 3))), holo_ellipse_angled2)) +# filled_ellipse_angled2 = filled_ellipse_angled.copy() +# filled_ellipse_angled2[filled_ellipse_angled2 == 1] = 2 +# filled_image = np.concatenate((np.pad(filled_circle, pad_width=((0, 0), (0, 2))), filled_ellipse_angled2)) -@pytest.mark.parametrize( - ("shape", "axis", "target"), - [ - pytest.param( - holo_image, - 0, - { - 1: (4.0, ([1, 2], [5, 2]), 4.47213595499958, ([4, 5], [2, 1])), - 2: (3.1622776601683795, ([9, 4], [10, 1]), 7.615773105863909, ([13, 8], [10, 1])), - }, - id="holo image", - ), - pytest.param( - filled_image, - 0, - { - 1: (6.0, ([1, 2], [7, 2]), 7.211102550927978, ([6, 7], [2, 1])), - 2: (5.385164807134504, ([15, 7], [10, 5]), 8.94427190999916, ([11, 9], [15, 1])), - }, - id="filled image", - ), - ], -) -def test_get_feret_from_labelim(shape: npt.NDArray, axis: int, target: dict) -> None: - """Test calculation of min/max feret for a labelled image with multiuple objects.""" - min_max_feret_size_coord = feret.get_feret_from_labelim(shape, axis=axis) - assert min_max_feret_size_coord == target +# @pytest.mark.parametrize( +# ("shape", "axis", "target"), +# [ +# pytest.param( +# holo_image, +# 0, +# { +# 1: (4.0, ([1, 2], [5, 2]), 4.47213595499958, ([4, 5], [2, 1])), +# 2: (3.1622776601683795, ([9, 4], [10, 1]), 7.615773105863909, ([13, 8], [10, 1])), +# }, +# id="holo image", +# ), +# pytest.param( +# filled_image, +# 0, +# { +# 1: (6.0, ([1, 2], [7, 2]), 7.211102550927978, ([6, 7], [2, 1])), +# 2: (5.385164807134504, ([15, 7], [10, 5]), 8.94427190999916, ([11, 9], [15, 1])), +# }, +# id="filled image", +# ), +# ], +# ) +# def test_get_feret_from_labelim(shape: npt.NDArray, axis: int, target: dict) -> None: +# """Test calculation of min/max feret for a labelled image with multiuple objects.""" +# min_max_feret_size_coord = feret.get_feret_from_labelim(shape, axis=axis) +# assert min_max_feret_size_coord == target diff --git a/tests/test_grainstats.py b/tests/test_grainstats.py index 118907f366..8485bc142a 100644 --- a/tests/test_grainstats.py +++ b/tests/test_grainstats.py @@ -300,7 +300,72 @@ def test_grainstats_get_triangle_height(base_point_1, base_point_2, top_point, e assert GrainStats.get_triangle_height(base_point_1, base_point_2, top_point) == expected -@pytest.mark.parametrize(("edge_points", "expected"), [([[0, 0], [0, 1], [1, 0], [1, 1]], (1.0, 1.4142135623730951))]) -def test_get_min_max_ferets(edge_points, expected) -> None: +@pytest.mark.parametrize( + ("edge_points", "min_expected", "max_expected"), + [ + pytest.param([[0, 0], [0, 1], [1, 0], [1, 1]], 1.0, 1.4142135623730951, id="square"), + pytest.param([[1, 1], [1, 2], [2, 1]], 0.7071067811865476, 1.4142135623730951, id="triangle"), + pytest.param([[0, 0], [1, 0], [0, 2]], 0.7071067811865476, 1.4142135623730951, id="triangle"), + pytest.param([[0, 1], [1, 0], [1, 2], [2, 1]], 1.4142135623730951, 2.0, id="circle"), + pytest.param([[1, 2], [2, 1], [2, 4], [5, 2]], 2.4961508830135313, 4, id="quadrilateral"), + pytest.param( + [ + [1, 3], + [1, 4], + [1, 5], + [1, 6], + [1, 7], + [2, 2], + [2, 8], + [3, 1], + [3, 9], + [4, 1], + [4, 9], + [5, 1], + [5, 9], + [6, 2], + [6, 8], + [7, 3], + [7, 4], + [7, 5], + [7, 6], + [7, 7], + ], + 6.0, + 8.246211251235321, + id="horizontal ellipse", + ), + pytest.param( + [ + [1, 2], + [1, 3], + [1, 4], + [2, 1], + [2, 5], + [3, 2], + [3, 6], + [4, 3], + [4, 7], + [5, 4], + [5, 8], + [6, 5], + [6, 6], + [6, 7], + ], + 2.82842712474619, + 7.615773105863909, + id="angled ellipse", + ), + pytest.param( + [[1, 5], [2, 3], [2, 4], [3, 2], [4, 1], [5, 1], [6, 2], [6, 3], [7, 4], [7, 5], [7, 6], [8, 7], [8, 8]], + 5.252257314388902, + 8.06225774829855, + id="curved line", + ), + ], +) +def test_get_min_max_ferets(edge_points, min_expected, max_expected) -> None: """Tests the GrainStats.get_min_max_ferets method.""" - assert GrainStats.get_max_min_ferets(edge_points) == expected + min_feret, max_feret = GrainStats.get_max_min_ferets(edge_points) + np.testing.assert_almost_equal(min_feret, min_expected) + np.testing.assert_almost_equal(max_feret, max_expected) diff --git a/topostats/grainstats.py b/topostats/grainstats.py index 84f9b042f0..c711cfed4f 100644 --- a/topostats/grainstats.py +++ b/topostats/grainstats.py @@ -1019,7 +1019,6 @@ def get_max_min_ferets(edge_points: list): # noqa: C901 upper_hull = np.array(upper_hull) lower_hull = np.array(lower_hull) - # Create list of contact vertices for calipers on the antipodal hulls contact_points = [] upper_index = 0 @@ -1081,7 +1080,6 @@ def get_max_min_ferets(edge_points: list): # noqa: C901 min_feret = small_feret contact_points = np.array(contact_points) - # Find the minimum and maximum distance in the contact points max_feret = None for point_pair in contact_points: diff --git a/topostats/measure/feret.py b/topostats/measure/feret.py index 84e6e37fec..a6f0899ac1 100644 --- a/topostats/measure/feret.py +++ b/topostats/measure/feret.py @@ -22,6 +22,8 @@ LOGGER = logging.getLogger(LOGGER_NAME) +# pylint: disable=fixme + def orientation(p: npt.NDArray, q: npt.NDArray, r: npt.NDArray) -> int: """Determine the orientation of three points as either clockwise, counter-clock-wise or colinear. @@ -85,7 +87,7 @@ def hulls(points: npt.NDArray, axis: int = 1) -> tuple[list, list]: Returns ------- - Tuple[list, list] + tuple[list, list] Tuple of two Numpy arrays of the original coordinates split into upper and lower hulls. """ upper_hull: list = [] @@ -117,7 +119,7 @@ def all_pairs(points: npt.NDArray) -> list[tuple[list, list]]: Returns ------- - List[Tuple[int, int]] + List[tuple[int, int]] """ upper_hull, lower_hull = hulls(points) unique_combinations = {} @@ -130,6 +132,10 @@ def all_pairs(points: npt.NDArray) -> list[tuple[list, list]]: return list(unique_combinations.values()) +# snoop.install(enabled=True) + + +# @snoop def rotating_calipers(points: npt.NDArray, axis: int = 0) -> Generator: """Given a list of 2d points, finds all ways of sandwiching the points between two parallel lines. @@ -151,30 +157,137 @@ def rotating_calipers(points: npt.NDArray, axis: int = 0) -> Generator: Numpy array of pairs of points """ upper_hull, lower_hull = hulls(points, axis) - upper_hull = sort_coords(np.asarray(upper_hull), axis) - lower_hull = sort_coords(np.asarray(lower_hull), axis) - i = 0 - j = len(lower_hull) - 1 - - counter = 0 - while i < len(upper_hull) - 1 or j > 0: - yield upper_hull[i], lower_hull[j] - # If all the way through one side of hull, advance the other side - if i == len(upper_hull) - 1: - j -= 1 - elif j == 0: - i += 1 + upper_index = 0 + lower_index = len(lower_hull) - 1 + while upper_index < len(upper_hull) - 1 or lower_index > 0: + # yield upper_hull[upper_index], lower_hull[lower_index] + calipers = (lower_hull[lower_index], upper_hull[upper_index]) + if upper_index == len(upper_hull) - 1: + lower_index -= 1 + base1 = lower_hull[lower_index + 1] # original lower caliper + base2 = lower_hull[lower_index] # previous point on lower hull + apex = upper_hull[upper_index] # original upper caliper + elif lower_index == 0: + upper_index += 1 + base1 = upper_hull[upper_index - 1] # original upper caliper + base2 = upper_hull[upper_index] # next point on upper hull + apex = lower_hull[lower_index] # original lower caliper # still points left on both lists, compare slopes of next hull edges # being careful to avoid ZeroDivisionError in slope calculation - elif ((upper_hull[i + 1][1] - upper_hull[i][1]) * (lower_hull[j][0] - lower_hull[j - 1][0])) > ( - (lower_hull[j][1] - lower_hull[j - 1][1]) * (upper_hull[i + 1][0] - upper_hull[i][0]) + elif ( + (upper_hull[upper_index + 1][1] - upper_hull[upper_index][1]) + * (lower_hull[lower_index][0] - lower_hull[lower_index - 1][0]) + ) > ( + (lower_hull[lower_index][1] - lower_hull[lower_index - 1][1]) + * (upper_hull[upper_index + 1][0] - upper_hull[upper_index][0]) ): - i += 1 + upper_index += 1 + base1 = upper_hull[upper_index - 1] # original upper caliper + base2 = upper_hull[upper_index] # next point on upper hull + apex = lower_hull[lower_index] # original lower caliper else: - j -= 1 - counter += 1 + lower_index -= 1 + base1 = lower_hull[lower_index + 1] # original lower caliper + base2 = lower_hull[lower_index] # previous point on lower hull + apex = upper_hull[upper_index] # original upper caliper + yield triangle_height(base1, base2, apex), calipers, [list(_mid_point(base1, base2, apex)), apex] + + +# @snoop +def triangle_height( + base1: npt.NDArray | list, base2: npt.NDArray | list, apex: npt.NDArray | list +) -> tuple[float, list]: + """Calculate the height of triangle formed by three points. + + Parameters + ---------- + base1 : int + Coordinate of first base point of triangle. + base2 : int + Coordinate of second base point of triangle. + apex : int + Coordinate of the apex of the triangle. + + Returns + ------- + tuple + Height of the triangle. + + Examples + -------- + >>> min_feret([4, 0], [4, 3], [0,0]) + 4.0 + """ + a_b = np.asarray(base1) - np.asarray(base2) + a_c = np.asarray(base1) - np.asarray(apex) + return np.linalg.norm(np.cross(a_b, a_c)) / np.linalg.norm(a_b) + + +# TODO : Remove, ultimately redundant its not the mid-point that is required. +def _mid_point(point1: npt.NDArray | list, point2: npt.NDArray | list, apex: npt.NDArray | list) -> list: + """Return the closest integer to the mid-point between two adjacent calliper points. + + When using triangles to calculate the minimum feret the height of the triangle formed by antipodal points and the + next point on the convex hull is the minimum feret. In order to trake a profile the position at which the height + touches the line between adjacent convex hulls is required. This is half the linear distance between these two + points, but because we are dealing with arrays this needs rounding so that we have a coordinate in the `x,y` point + of the array. Whether the floor or ceiling is taken depends on where the point is relative to the apex. + Example 1 Example 2 + 1 1 0 1 + 1 0 1 1 + + In both these examples the minimum feret is between the apex and the baseline formed by the points [[1, 0], [0, 1]] + which in Example 1 is [0, 0] in Example 2 its [1, 1]. The minimum feret distance is sqrt(2) / 2 (i.e. 0.707106) and + formed by the coordinates [[1, 1], [0.5, 0.5]] but the later point is not a valid point in a Numpy array where + indices are integers and so we have to find the next point "outwards" for which to obtain the opposite feret + coordinates. For Example 1 this would be the ceiling (i.e. rounding up) of both points, whilst for Example 2 it + would be the floor (i.e. rounding down) of both points. + + Parameters + ---------- + point1: npt.NDArray | list + Position of the first point on the convex hull. + point2: npt.NDArray | list + Position of the second point on the convex hull. + apex: npt.NDArray | list + Position of the apex of the triangle on the convex hull. + + Returns + ------- + list + coordinate of the nearest point to the mid-point. + """ + mid_x = (point1[0] + point2[0]) / 2 + mid_y = (point1[1] + point2[1]) / 2 + mid_x = np.ceil(mid_x) if mid_x > apex[0] else np.floor(mid_x) + mid_y = np.ceil(mid_y) if mid_y > apex[1] else np.floor(mid_y) + return [int(mid_x), int(mid_y)] + + +def _min_feret_coord(base1: list, base2: list, apex: list): + """ + Calculate the coordinate opposite the apex that is prependicular to the base of the triangle. + + Code courtesy of @SylviaWhittle. + """ + # Find the perpendicular gradient to bc + grad_base = (base2[1] - base1[1]) / (base2[0] - base1[0]) + grad_ad = -1 / grad_base + # Find the intercept + intercept_ad = base1[1] - grad_ad * base1[0] + intercept_bc = base1[1] - grad_base * base1[0] + # Find the intersection + x = (intercept_bc - intercept_ad) / (grad_ad - grad_base) + y = grad_ad * x + intercept_ad + # Round up/down base on position relative to apex + x = np.ceil(x) if x > apex[0] else np.floor(x) + y = np.ceil(y) if y > apex[1] else np.floor(y) + return [int(x), int(y)] + + +# @snoop def min_max_feret(points: npt.NDArray, axis: int = 0) -> tuple[float, tuple[int, int], float, tuple[int, int]]: """Given a list of 2-D points, returns the minimum and maximum feret diameters. @@ -182,9 +295,9 @@ def min_max_feret(points: npt.NDArray, axis: int = 0) -> tuple[float, tuple[int, Parameters ---------- - points: npt.NDArray + points : npt.NDArray A 2-D array of points for the outline of an object. - axis: int + axis : int Which axis to sort coordinates on, 0 for row (default); 1 for columns. Returns @@ -192,12 +305,22 @@ def min_max_feret(points: npt.NDArray, axis: int = 0) -> tuple[float, tuple[int, tuple Tuple of the minimum feret distance and its coordinates and the maximum feret distance and its coordinates. """ + caliper_min_feret = list(rotating_calipers(points, axis)) + # TODO : Use this instead once we are using the min_feret_coords + # min_ferets, calipers, min_feret_coords = zip(*caliper_min_feret) + min_ferets, calipers, _ = zip(*caliper_min_feret) + # Calculate the squared distance between caliper pairs for max feret + calipers = np.asarray(calipers) + caliper1 = calipers[:, 0] + caliper2 = calipers[:, 1] squared_distance_per_pair = [ - ((p[0] - q[0]) ** 2 + (p[1] - q[1]) ** 2, (list(p), list(q))) for p, q in rotating_calipers(points, axis) + ((p[0] - q[0]) ** 2 + (p[1] - q[1]) ** 2, (list(p), list(q))) for p, q in zip(caliper1, caliper2) ] - min_feret_sq, min_feret_coords = min(squared_distance_per_pair) - max_feret_sq, max_feret_coords = max(squared_distance_per_pair) - return sqrt(min_feret_sq), min_feret_coords, sqrt(max_feret_sq), max_feret_coords + # TODO : replace calipers with min_feret_coords once correctly calculated + caliper_min_feret = [[x, (list(map(list, y)))] for x, y in zip(min_ferets, calipers)] + min_feret, min_feret_coord = min(caliper_min_feret) + max_feret_sq, max_feret_coord = max(squared_distance_per_pair) + return min_feret, min_feret_coord, sqrt(max_feret_sq), max_feret_coord def get_feret_from_mask(mask_im: npt.NDArray, axis: int = 0) -> tuple[float, tuple[int, int], float, tuple[int, int]]: From 6ddf1f08e23079ea8a64cc758549bd18e0f677f7 Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Wed, 24 Jan 2024 14:00:29 +0000 Subject: [PATCH 22/35] Fixes errors with rotating calipers Made some mistakes in the rotating calipers algorithm and spent considerable time with pen and paper working through examples. + `curved_line` tests now pass. + Added another simple polygon to the test suite `tiny_quadrilateral`. + Found that the ordering of points makes a considerable difference when constructing the convex hulls and their halves and in so doing added a `sort_coords()` function to test this. As a consequence sorting can be done on either axis (0/rows or 1/columns). Ultimately the same min and max feret _are_ calculated though. + The suggested method of rotating calipers to find minimum feret distance is off, a better method is the triangle formed between the caliper pair and the next point on one of the convex hulls (wish I had read @SylivaWhittle code more closely in the first instance, sorry!) + Now use the Graham Scan, implemented as a generator, to return the minimum feret distance and rotating caliper pairs. The maximum feret distance is then calculated from the feret pairs via list comprehension. + Comprehensive, but not perfect, tests, breaks everything out of `GrainStats` into a sub-module. Ultimately need to improve coverage and then replace GrainStats calculations with these. ToDo + Currently the minimum feret co-ordinates are incorrect, I was too focused on solving the problem for the tiny_triangle scenario which doesn't generalise as it only works for isosceles triangles and that will rarely be the case. Thanks to @SylviaWhittle again who has made a suggestion of how to correct this I will be addressing this in a subsequent PR. + Tests need completing after this switch and coverage is only indicated to be ~60%, need to improve on that. --- tests/measure/test_feret.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/measure/test_feret.py b/tests/measure/test_feret.py index 40a6db3633..74f4cfcbd9 100644 --- a/tests/measure/test_feret.py +++ b/tests/measure/test_feret.py @@ -1,5 +1,7 @@ """Tests for feret functions.""" +from __future__ import annotations + import numpy as np import numpy.typing as npt import pytest From 00e9da6791fbb8df60be9673a689a917ffae89bc Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Wed, 24 Jan 2024 14:00:29 +0000 Subject: [PATCH 23/35] Fixes errors with rotating calipers Made some mistakes in the rotating calipers algorithm and spent considerable time with pen and paper working through examples. + `curved_line` tests now pass. + Added another simple polygon to the test suite `tiny_quadrilateral`. + Found that the ordering of points makes a considerable difference when constructing the convex hulls and their halves and in so doing added a `sort_coords()` function to test this. As a consequence sorting can be done on either axis (0/rows or 1/columns). Ultimately the same min and max feret _are_ calculated though. + The suggested method of rotating calipers to find minimum feret distance is off, a better method is the triangle formed between the caliper pair and the next point on one of the convex hulls (wish I had read @SylivaWhittle code more closely in the first instance, sorry!) + Now use the Graham Scan, implemented as a generator, to return the minimum feret distance and rotating caliper pairs. The maximum feret distance is then calculated from the feret pairs via list comprehension. + Comprehensive, but not perfect, tests, breaks everything out of `GrainStats` into a sub-module. Ultimately need to improve coverage and then replace GrainStats calculations with these. ToDo + Currently the minimum feret co-ordinates are incorrect, I was too focused on solving the problem for the tiny_triangle scenario which doesn't generalise as it only works for isosceles triangles and that will rarely be the case. Thanks to @SylviaWhittle again who has made a suggestion of how to correct this I will be addressing this in a subsequent PR. + Tests need completing after this switch and coverage is only indicated to be ~60%, need to improve on that. --- tests/test_grainstats.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_grainstats.py b/tests/test_grainstats.py index 8485bc142a..2928de9085 100644 --- a/tests/test_grainstats.py +++ b/tests/test_grainstats.py @@ -304,8 +304,8 @@ def test_grainstats_get_triangle_height(base_point_1, base_point_2, top_point, e ("edge_points", "min_expected", "max_expected"), [ pytest.param([[0, 0], [0, 1], [1, 0], [1, 1]], 1.0, 1.4142135623730951, id="square"), - pytest.param([[1, 1], [1, 2], [2, 1]], 0.7071067811865476, 1.4142135623730951, id="triangle"), - pytest.param([[0, 0], [1, 0], [0, 2]], 0.7071067811865476, 1.4142135623730951, id="triangle"), + pytest.param([[1, 1], [1, 2], [2, 1]], 0.7071067811865476, 1.4142135623730951, id="triangle (isosceles)"), + pytest.param([[0, 0], [1, 0], [0, 2]], 0.8944271909999159, 2.23606797749979, id="triangle"), pytest.param([[0, 1], [1, 0], [1, 2], [2, 1]], 1.4142135623730951, 2.0, id="circle"), pytest.param([[1, 2], [2, 1], [2, 4], [5, 2]], 2.4961508830135313, 4, id="quadrilateral"), pytest.param( From 2c1dfaa3d551d1c92d9a4853666b02ff506412a6 Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Wed, 14 Feb 2024 14:56:42 +0000 Subject: [PATCH 24/35] Test ValueError raised when axis is incorrectly specified --- tests/measure/test_feret.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/measure/test_feret.py b/tests/measure/test_feret.py index 74f4cfcbd9..84a9658c44 100644 --- a/tests/measure/test_feret.py +++ b/tests/measure/test_feret.py @@ -128,6 +128,19 @@ def test_sort_coords(shape: npt.NDArray, axis: str, target: npt.NDArray) -> None np.testing.assert_array_equal(sorted_coords, target) +@pytest.mark.parametrize( + ("shape", "axis"), + [ + pytest.param(tiny_triangle, 2, id="integer not 0 or 1"), + pytest.param(tiny_triangle, "row", id="string"), + ], +) +def test_sort_coords_invalid_axis(shape: npt.NDArray, axis: int | str) -> None: + """Test ValueError raised when axis is not 0 or 1.""" + with pytest.raises(ValueError): # noqa: PT011 + feret.sort_coords(np.argwhere(shape == 1), axis) + + @pytest.mark.parametrize( ("shape", "axis", "upper_target", "lower_target"), [ From 68beb684b32a4f422c2c965f8f369d0b9c6e3a17 Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Fri, 16 Feb 2024 14:08:39 +0000 Subject: [PATCH 25/35] Calculate and test finding mid-point on base of feret triangles Thanks @SylivaWhittle for the sharing code. --- tests/measure/test_feret.py | 38 +++++++++++----- topostats/measure/feret.py | 87 ++++++++++++++----------------------- 2 files changed, 58 insertions(+), 67 deletions(-) diff --git a/tests/measure/test_feret.py b/tests/measure/test_feret.py index 84a9658c44..777012a1f7 100644 --- a/tests/measure/test_feret.py +++ b/tests/measure/test_feret.py @@ -539,23 +539,37 @@ def test_triangle_heights( np.testing.assert_almost_equal(height, target_height) -# TODO : Remove ultimately redundant its not the mid-point that is required @pytest.mark.parametrize( - ("base1", "base2", "apex", "opposite_target"), + ("base1", "base2", "apex", "round_coord", "opposite_target"), [ - pytest.param([1, 0], [0, 1], [0, 0], [1, 1], id="tiny triangle (apex top left)"), - pytest.param([1, 0], [0, 1], [1, 1], [0, 0], id="tiny triangle (apex top right)"), - pytest.param([0, 0], [1, 1], [1, 0], [0, 1], id="tiny triangle (apex bottom left)"), - pytest.param([0, 0], [1, 1], [0, 1], [1, 0], id="tiny triangle (apex bottom right)"), - pytest.param([1, 2], [2, 1], [1, 1], [2, 2], id="tiny triangle (from tests)"), + pytest.param([1, 0], [0, 1], [0, 0], True, np.asarray([1, 1]), id="tiny triangle (apex top left, rounding)"), + pytest.param([1, 0], [0, 1], [1, 1], True, np.asarray([0, 0]), id="tiny triangle (apex top right, rounding)"), + pytest.param([0, 0], [1, 1], [1, 0], True, np.asarray([0, 1]), id="tiny triangle (apex bottom left, rounding)"), + pytest.param( + [0, 0], [1, 1], [0, 1], True, np.asarray([1, 0]), id="tiny triangle (apex bottom right, rounding)" + ), + pytest.param([1, 2], [2, 1], [1, 1], True, np.asarray([2, 2]), id="tiny triangle (from tests, rounding)"), + pytest.param([2, 1], [8, 2], [5, 4], True, np.asarray([6, 1]), id="another triangle (rounding)"), + pytest.param( + [2, 1], + [8, 2], + [5, 4], + False, + np.asarray([5.405405405405405, 1.5675675675675649]), + id="another triangle (no rounding)", + ), ], ) -def test_mid_point( - base1: npt.NDArray | list, base2: npt.NDArray | list, apex: npt.NDArray | list, opposite_target: float +def test_min_feret_coord( + base1: npt.NDArray | list, + base2: npt.NDArray | list, + apex: npt.NDArray | list, + round_coord: bool, + opposite_target: float, ) -> None: """Test calculation of mid_point of the triangle formed by rotating caliper and next point on convex hull.""" - opposite = feret._mid_point(base1, base2, apex) - assert opposite == opposite_target + opposite = feret._min_feret_coord(base1, base2, apex, round_coord) + np.testing.assert_array_equal(opposite, opposite_target) # pylint: disable=unused-argument @@ -840,7 +854,7 @@ def test_rotating_calipers( 1.0, ([1, 1], [1, 2]), 1.4142135623730951, - ([2, 2], [1, 1]), + ([2, 2], [1, 1]), ### WRONG!!! id="tiny square sorted on axis 0", ), pytest.param( diff --git a/topostats/measure/feret.py b/topostats/measure/feret.py index a6f0899ac1..bae5b9f3dc 100644 --- a/topostats/measure/feret.py +++ b/topostats/measure/feret.py @@ -190,13 +190,11 @@ def rotating_calipers(points: npt.NDArray, axis: int = 0) -> Generator: base1 = lower_hull[lower_index + 1] # original lower caliper base2 = lower_hull[lower_index] # previous point on lower hull apex = upper_hull[upper_index] # original upper caliper - yield triangle_height(base1, base2, apex), calipers, [list(_mid_point(base1, base2, apex)), apex] + yield triangle_height(base1, base2, apex), calipers, [list(_min_feret_coord(base1, base2, apex)), apex] # @snoop -def triangle_height( - base1: npt.NDArray | list, base2: npt.NDArray | list, apex: npt.NDArray | list -) -> tuple[float, list]: +def triangle_height(base1: npt.NDArray | list, base2: npt.NDArray | list, apex: npt.NDArray | list) -> float: """Calculate the height of triangle formed by three points. Parameters @@ -210,7 +208,7 @@ def triangle_height( Returns ------- - tuple + float Height of the triangle. Examples @@ -223,68 +221,47 @@ def triangle_height( return np.linalg.norm(np.cross(a_b, a_c)) / np.linalg.norm(a_b) -# TODO : Remove, ultimately redundant its not the mid-point that is required. -def _mid_point(point1: npt.NDArray | list, point2: npt.NDArray | list, apex: npt.NDArray | list) -> list: - """Return the closest integer to the mid-point between two adjacent calliper points. - - When using triangles to calculate the minimum feret the height of the triangle formed by antipodal points and the - next point on the convex hull is the minimum feret. In order to trake a profile the position at which the height - touches the line between adjacent convex hulls is required. This is half the linear distance between these two - points, but because we are dealing with arrays this needs rounding so that we have a coordinate in the `x,y` point - of the array. Whether the floor or ceiling is taken depends on where the point is relative to the apex. - - Example 1 Example 2 - - 1 1 0 1 - 1 0 1 1 +def _min_feret_coord( + base1: npt.NDArray, base2: npt.NDArray, apex: npt.NDArray, round_coord: bool = False +) -> npt.NDArray: + """Calculate the coordinate opposite the apex that is prependicular to the base of the triangle. - In both these examples the minimum feret is between the apex and the baseline formed by the points [[1, 0], [0, 1]] - which in Example 1 is [0, 0] in Example 2 its [1, 1]. The minimum feret distance is sqrt(2) / 2 (i.e. 0.707106) and - formed by the coordinates [[1, 1], [0.5, 0.5]] but the later point is not a valid point in a Numpy array where - indices are integers and so we have to find the next point "outwards" for which to obtain the opposite feret - coordinates. For Example 1 this would be the ceiling (i.e. rounding up) of both points, whilst for Example 2 it - would be the floor (i.e. rounding down) of both points. + Code courtesy of @SylviaWhittle. Parameters ---------- - point1: npt.NDArray | list - Position of the first point on the convex hull. - point2: npt.NDArray | list - Position of the second point on the convex hull. - apex: npt.NDArray | list - Position of the apex of the triangle on the convex hull. + base1 : list + Coordinates of one point on base of triangle, these are on the same side of the hull. + base2 : list + Coordinates of second point on base of triangle, these are on the same side of the hull. + apex : list + Coordinate of the apex of the triangle, this is on the opposite hull. + round_coord : bool + Whether to round the point to the nearest NumPy index relative to the apex's position (i.e. either floor or + ceiling). Returns ------- - list - coordinate of the nearest point to the mid-point. - """ - mid_x = (point1[0] + point2[0]) / 2 - mid_y = (point1[1] + point2[1]) / 2 - mid_x = np.ceil(mid_x) if mid_x > apex[0] else np.floor(mid_x) - mid_y = np.ceil(mid_y) if mid_y > apex[1] else np.floor(mid_y) - return [int(mid_x), int(mid_y)] - - -def _min_feret_coord(base1: list, base2: list, apex: list): - """ - Calculate the coordinate opposite the apex that is prependicular to the base of the triangle. - - Code courtesy of @SylviaWhittle. + npt.NDArray + Coordinates of the point perpendicular to the base line that is opposite the apex, this line is the minimum + feret distance for acute triangles (but not scalene triangles). """ # Find the perpendicular gradient to bc grad_base = (base2[1] - base1[1]) / (base2[0] - base1[0]) - grad_ad = -1 / grad_base + grad_apex_base = -1 / grad_base # Find the intercept - intercept_ad = base1[1] - grad_ad * base1[0] + intercept_ad = apex[1] - grad_apex_base * apex[0] intercept_bc = base1[1] - grad_base * base1[0] # Find the intersection - x = (intercept_bc - intercept_ad) / (grad_ad - grad_base) - y = grad_ad * x + intercept_ad - # Round up/down base on position relative to apex - x = np.ceil(x) if x > apex[0] else np.floor(x) - y = np.ceil(y) if y > apex[1] else np.floor(y) - return [int(x), int(y)] + x = (intercept_bc - intercept_ad) / (grad_apex_base - grad_base) + y = grad_apex_base * x + intercept_ad + + if round_coord: + # Round up/down base on position relative to apex to get an actual cell + x = np.ceil(x) if x > apex[0] else np.floor(x) + y = np.ceil(y) if y > apex[1] else np.floor(y) + return np.asarray([int(x), int(y)]) + return np.asarray([x, y]) # @snoop @@ -308,7 +285,7 @@ def min_max_feret(points: npt.NDArray, axis: int = 0) -> tuple[float, tuple[int, caliper_min_feret = list(rotating_calipers(points, axis)) # TODO : Use this instead once we are using the min_feret_coords # min_ferets, calipers, min_feret_coords = zip(*caliper_min_feret) - min_ferets, calipers, _ = zip(*caliper_min_feret) + min_ferets, calipers, triangle_heights = zip(*caliper_min_feret) # Calculate the squared distance between caliper pairs for max feret calipers = np.asarray(calipers) caliper1 = calipers[:, 0] From 68b3736a3c4e9c90ad271a06048a9b2c1d9f8a01 Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Fri, 16 Feb 2024 14:59:27 +0000 Subject: [PATCH 26/35] Updates tests of min feret coordinates; adds function to plot Use the correct co-ordinates for min feret. Adds a utility function for plotting points, useful for debugging. ToDo : + Get some division by zero for gradients, need to fix these. + Some triangle heights have weird co-ordinates outside of the hull. --- tests/measure/test_feret.py | 340 +++++++++++++++++++----------------- topostats/measure/feret.py | 125 ++++++++++++- 2 files changed, 301 insertions(+), 164 deletions(-) diff --git a/tests/measure/test_feret.py b/tests/measure/test_feret.py index 777012a1f7..25fb989438 100644 --- a/tests/measure/test_feret.py +++ b/tests/measure/test_feret.py @@ -581,7 +581,7 @@ def test_min_feret_coord( 0, (([2, 1], [0, 1]), ([1, 0], [0, 1]), ([1, 0], [1, 2]), ([0, 1], [1, 2])), (1.414213562373095, 1.414213562373095, 1.414213562373095, 1.414213562373095), - (([2, 0], [0, 1]), ([0, 2], [1, 0]), ([0, 0], [1, 2]), ([2, 2], [0, 1])), + ([[1.0, 0.0], [0, 1]], [[-0.0, 1.0], [1, 0]], [[0.0, 1.0], [1, 2]], [[1.0, 2.0], [0, 1]]), id="tiny circle sorted by axis 0", ), pytest.param( @@ -589,7 +589,12 @@ def test_min_feret_coord( 0, (([5, 2], [1, 2]), ([5, 2], [2, 4]), ([2, 1], [2, 4]), ([2, 1], [5, 2])), (3.5777087639996634, 2.846049894151541, 2.4961508830135313, 2.82842712474619), - (([1, 3], [5, 2]), ([4, 1], [2, 4]), ([2, 1], [2, 4]), ([2, 1], [5, 2])), + ( + [[1.8, 3.6], [5, 2]], + [[2.9, 1.3000000000000007], [2, 4]], + [[3.3846153846153846, 3.0769230769230766], [2, 1]], + [[3.0, 0.0], [5, 2]], + ), id="tiny quadrilateral sorted by axis 0", ), pytest.param( @@ -597,7 +602,12 @@ def test_min_feret_coord( 0, (([2, 2], [1, 1]), ([2, 1], [1, 1]), ([2, 1], [1, 2]), ([1, 1], [1, 2])), (1.0, 1.0, 1.0, 1.0), - (([2, 2], [1, 1]), ([1, 2], [2, 1]), ([2, 1], [1, 2]), ([2, 2], [1, 1])), + ( + [[np.nan, np.nan], [1, 1]], + [[np.nan, np.nan], [2, 1]], + [[np.nan, np.nan], [1, 2]], + [[np.nan, np.nan], [1, 1]], + ), id="tiny square sorted by axis 0", ), pytest.param( @@ -605,7 +615,7 @@ def test_min_feret_coord( 0, (([2, 1], [1, 1]), ([2, 1], [1, 2]), ([1, 1], [1, 2])), (1.0, 1.0, 0.7071067811865475), - (([1, 2], [2, 1]), ([2, 1], [1, 2]), ([2, 2], [1, 1])), + ([[np.nan, np.nan], [2, 1]], [[np.nan, np.nan], [1, 2]], [[1.5, 1.5], [1, 1]]), id="tiny triangle sorted by axis 0", ), pytest.param( @@ -613,7 +623,12 @@ def test_min_feret_coord( 0, (([3, 2], [1, 1]), ([3, 1], [1, 1]), ([3, 1], [1, 2]), ([1, 1], [1, 2])), (2.0, 2.0, 1.0, 1.0), - (([3, 2], [1, 1]), ([1, 2], [3, 1]), ([2, 1], [1, 2]), ([2, 2], [1, 1])), + ( + [[np.nan, np.nan], [1, 1]], + [[np.nan, np.nan], [3, 1]], + [[np.nan, np.nan], [1, 2]], + [[np.nan, np.nan], [1, 1]], + ), id="tiny rectangle sorted by axis 0", ), pytest.param( @@ -629,12 +644,12 @@ def test_min_feret_coord( ), (2.82842712474619, 2.82842712474619, 2.0, 2.0, 2.82842712474619, 2.82842712474619), ( - ([5, 2], [1, 2]), - ([4, 1], [1, 2]), - ([4, 1], [2, 3]), - ([2, 1], [2, 3]), - ([2, 1], [4, 3]), - ([1, 2], [4, 3]), + [[3.0, 0.0], [1, 2]], + [[2.0, 3.0], [4, 1]], + [[np.nan, np.nan], [2, 3]], + [[np.nan, np.nan], [2, 1]], + [[2.0, 1.0], [4, 3]], + [[3.0, 4.0], [1, 2]], ), id="tiny ellipse sorted by axis 0", ), @@ -653,14 +668,14 @@ def test_min_feret_coord( ), (4.0, 4.0, 4.242640687119285, 4.242640687119285, 4.0, 4.0, 4.242640687119285, 4.242640687119285), ( - ([4, 3], [0, 1]), - ([4, 1], [0, 1]), - ([4, 1], [0, 3]), - ([3, 0], [0, 3]), - ([3, 0], [1, 4]), - ([1, 0], [1, 4]), - ([1, 0], [3, 4]), - ([0, 1], [3, 4]), + [[np.nan, np.nan], [0, 1]], + [[np.nan, np.nan], [4, 1]], + [[3.0, 0.0], [0, 3]], + [[-0.0, 3.0], [3, 0]], + [[np.nan, np.nan], [1, 4]], + [[np.nan, np.nan], [1, 0]], + [[0.0, 1.0], [3, 4]], + [[3.0, 4.0], [0, 1]], ), id="small circle sorted by axis 0", ), @@ -679,14 +694,14 @@ def test_min_feret_coord( ), (4.0, 4.0, 4.242640687119285, 4.242640687119285, 4.0, 4.0, 4.242640687119285, 4.242640687119285), ( - ([5, 4], [1, 2]), - ([5, 2], [1, 2]), - ([5, 2], [1, 4]), - ([4, 1], [1, 4]), - ([4, 1], [2, 5]), - ([2, 1], [2, 5]), - ([2, 1], [4, 5]), - ([1, 2], [4, 5]), + [[np.nan, np.nan], [1, 2]], + [[np.nan, np.nan], [5, 2]], + [[4.0, 1.0], [1, 4]], + [[1.0, 4.0], [4, 1]], + [[np.nan, np.nan], [2, 5]], + [[np.nan, np.nan], [2, 1]], + [[1.0, 2.0], [4, 5]], + [[4.0, 5.0], [1, 2]], ), id="holo circle sorted by axis 0", ), @@ -705,14 +720,14 @@ def test_min_feret_coord( ), (6.0, 6.0, 7.071067811865475, 7.071067811865475, 8.0, 8.0, 7.071067811865475, 7.071067811865475), ( - ([7, 7], [1, 3]), - ([7, 3], [1, 3]), - ([7, 3], [1, 7]), - ([5, 1], [1, 7]), - ([5, 1], [3, 9]), - ([3, 1], [3, 9]), - ([3, 1], [5, 9]), - ([1, 3], [5, 9]), + [[np.nan, np.nan], [1, 3]], + [[np.nan, np.nan], [7, 3]], + [[6.0, 2.0], [1, 7]], + [[-0.0, 6.0], [5, 1]], + [[np.nan, np.nan], [3, 9]], + [[np.nan, np.nan], [3, 1]], + [[0.0, 4.0], [5, 9]], + [[6.0, 8.0], [1, 3]], ), id="holo ellipse horizontal sorted by axis 0", ), @@ -731,14 +746,14 @@ def test_min_feret_coord( ), (8.0, 8.0, 7.071067811865475, 7.071067811865475, 6.0, 6.0, 7.071067811865475, 7.071067811865475), ( - ([9, 5], [1, 3]), - ([9, 3], [1, 3]), - ([9, 3], [1, 5]), - ([7, 1], [1, 5]), - ([7, 1], [3, 7]), - ([3, 1], [3, 7]), - ([3, 1], [7, 7]), - ([1, 3], [7, 7]), + [[np.nan, np.nan], [1, 3]], + [[np.nan, np.nan], [9, 3]], + [[6.0, 0.0], [1, 5]], + [[2.0, 6.0], [7, 1]], + [[np.nan, np.nan], [3, 7]], + [[np.nan, np.nan], [3, 1]], + [[2.0, 2.0], [7, 7]], + [[6.0, 8.0], [1, 3]], ), id="holo ellipse vertical sorted by axis 0", ), @@ -755,12 +770,12 @@ def test_min_feret_coord( ), (5.0, 5.0, 2.82842712474619, 2.82842712474619, 7.071067811865475, 7.071067811865475), ( - ([6, 7], [1, 2]), - ([6, 5], [1, 2]), - ([6, 5], [1, 4]), - ([2, 1], [1, 4]), - ([2, 1], [5, 8]), - ([1, 2], [5, 8]), + [[np.nan, np.nan], [1, 2]], + [[np.nan, np.nan], [6, 5]], + [[3.0, 2.0], [1, 4]], + [[-0.0, 3.0], [2, 1]], + [[0.0, 3.0], [5, 8]], + [[6.0, 7.0], [1, 2]], ), id="holo ellipse angled sorted by axis 0", ), @@ -788,14 +803,14 @@ def test_min_feret_coord( 7.602631123499284, ), ( - ([8, 8], [1, 5]), - ([8, 7], [1, 5]), - ([7, 4], [1, 5]), - ([6, 2], [1, 5]), - ([5, 1], [1, 5]), - ([5, 1], [8, 8]), - ([4, 1], [8, 8]), - ([2, 3], [8, 8]), + [[np.nan, np.nan], [1, 5]], + [[6.699999999999999, 3.1], [1, 5]], + [[6.2, 2.4], [1, 5]], + [[5.0, 1.0], [1, 5]], + [[2.9310344827586214, 5.827586206896551], [5, 1]], + [[np.nan, np.nan], [8, 8]], + [[2.5, 2.5], [8, 8]], + [[1.2, 4.6], [8, 8]], ), id="curved line sorted by axis 0", ), @@ -806,9 +821,7 @@ def test_rotating_calipers( ) -> None: """Test calculation of rotating caliper pairs.""" caliper_min_feret = feret.rotating_calipers(np.argwhere(shape == 1), axis) - # TODO : Use this once we have correct min feret coordinates - # min_ferets, calipers, min_feret_coords = zip(*caliper_min_feret) - min_ferets, calipers, _ = zip(*caliper_min_feret) + min_ferets, calipers, min_feret_coords = zip(*caliper_min_feret) # print(f"{min_ferets=}") # print(f"{calipers=}") # print(f"{calipers_target=}") @@ -816,8 +829,8 @@ def test_rotating_calipers( # print(f"{min_feret_coords_target=}") np.testing.assert_array_equal(calipers, calipers_target) np.testing.assert_array_equal(min_ferets, min_ferets_target) - # TODO : Test min_feret_coords once correctly calculated - # np.testing.assert_array_equal(min_feret_coords, min_feret_coords_target) + # TODO : Sort of zero division errors + np.testing.assert_array_equal(min_feret_coords, min_feret_coords_target) @pytest.mark.parametrize( @@ -975,105 +988,112 @@ def test_min_max_feret( np.testing.assert_array_equal(max_feret_coord, max_feret_coord_target) -# ToDO : Enable and correct tests once correct coordinates are calculated -# @pytest.mark.parametrize( -# ( -# "shape", -# "axis", -# "min_feret_distance_target", -# "min_feret_coord_target", -# "max_feret_distance_target", -# "max_feret_coord_target", -# ), -# [ -# pytest.param( -# filled_circle, -# 0, -# 6.0, -# ([2, 1], [2, 7]), -# 7.211102550927978, -# ([6, 7], [2, 1]), -# id="filled circle sorted on axis 0", -# ), -# pytest.param( -# filled_ellipse_horizontal, -# 0, -# 4.0, -# ([5, 2], [1, 2]), -# 6.324555320336759, -# ([4, 7], [2, 1]), -# id="filled ellipse horizontal sorted on axis 0", -# ), -# pytest.param( -# filled_ellipse_vertical, -# 0, -# 4.0, -# ([2, 5], [2, 1]), -# 6.324555320336759, -# ([1, 4], [7, 2]), -# id="filled ellipse vertical sorted on axis 0", -# ), -# pytest.param( -# filled_ellipse_angled, -# 0, -# 5.385164807134504, -# ([6, 7], [1, 5]), -# 8.94427190999916, -# ([2, 9], [6, 1]), -# id="filled ellipse angled sorted on axis 0", -# ), -# ], -# ) -# def test_get_feret_from_mask( -# shape: npt.NDArray, -# axis: int, -# min_feret_distance_target: float, -# min_feret_coord_target: list, -# max_feret_distance_target: float, -# max_feret_coord_target: list, -# ) -> None: -# """Test calculation of min/max feret for a single masked object.""" -# min_feret_distance, min_feret_coord, max_feret_distance, max_feret_coord = feret.get_feret_from_mask(shape, axis) -# np.testing.assert_approx_equal(min_feret_distance, min_feret_distance_target) -# np.testing.assert_array_equal(min_feret_coord, min_feret_coord_target) -# np.testing.assert_approx_equal(max_feret_distance, max_feret_distance_target) -# np.testing.assert_array_equal(max_feret_coord, max_feret_coord_target) +@pytest.mark.parametrize( + ( + "shape", + "axis", + "min_feret_distance_target", + "min_feret_coord_target", + "max_feret_distance_target", + "max_feret_coord_target", + ), + [ + pytest.param( + filled_circle, + 0, + 6.0, + [[np.nan, np.nan], [1, 2]], + 7.211102550927978, + ([7, 6], [1, 2]), + id="filled circle sorted on axis 0", + ), + pytest.param( + filled_ellipse_horizontal, + 0, + 4.0, + [[np.nan, np.nan], [1, 2]], + 6.324555320336759, + ([4, 1], [2, 7]), + id="filled ellipse horizontal sorted on axis 0", + ), + pytest.param( + filled_ellipse_vertical, + 0, + 4.0, + ([np.nan, np.nan], [2, 5]), + 6.324555320336759, + ([7, 4], [1, 2]), + id="filled ellipse vertical sorted on axis 0", + ), + pytest.param( + filled_ellipse_angled, + 0, + 5.366563145999495, + ([1.2, 4.6], [6, 7]), + 8.94427190999916, + ([6, 1], [2, 9]), + id="filled ellipse angled sorted on axis 0", + ), + ], +) +def test_get_feret_from_mask( + shape: npt.NDArray, + axis: int, + min_feret_distance_target: float, + min_feret_coord_target: list, + max_feret_distance_target: float, + max_feret_coord_target: list, +) -> None: + """Test calculation of min/max feret for a single masked object.""" + min_feret_distance, min_feret_coord, max_feret_distance, max_feret_coord = feret.get_feret_from_mask(shape, axis) + np.testing.assert_approx_equal(min_feret_distance, min_feret_distance_target) + np.testing.assert_array_equal(min_feret_coord, min_feret_coord_target) + np.testing.assert_approx_equal(max_feret_distance, max_feret_distance_target) + np.testing.assert_array_equal(max_feret_coord, max_feret_coord_target) -# # Concatenate images to have two labeled objects within them -# holo_ellipse_angled2 = holo_ellipse_angled.copy() -# holo_ellipse_angled2[holo_ellipse_angled2 == 1] = 2 -# # Need to pad the holo_circle -# holo_image = np.concatenate((np.pad(holo_circle, pad_width=((0, 1), (0, 3))), holo_ellipse_angled2)) -# filled_ellipse_angled2 = filled_ellipse_angled.copy() -# filled_ellipse_angled2[filled_ellipse_angled2 == 1] = 2 -# filled_image = np.concatenate((np.pad(filled_circle, pad_width=((0, 0), (0, 2))), filled_ellipse_angled2)) +# Concatenate images to have two labeled objects within them +holo_ellipse_angled2 = holo_ellipse_angled.copy() +holo_ellipse_angled2[holo_ellipse_angled2 == 1] = 2 +# Need to pad the holo_circle +holo_image = np.concatenate((np.pad(holo_circle, pad_width=((0, 1), (0, 3))), holo_ellipse_angled2)) +filled_ellipse_angled2 = filled_ellipse_angled.copy() +filled_ellipse_angled2[filled_ellipse_angled2 == 1] = 2 +filled_image = np.concatenate((np.pad(filled_circle, pad_width=((0, 0), (0, 2))), filled_ellipse_angled2)) -# @pytest.mark.parametrize( -# ("shape", "axis", "target"), -# [ -# pytest.param( -# holo_image, -# 0, -# { -# 1: (4.0, ([1, 2], [5, 2]), 4.47213595499958, ([4, 5], [2, 1])), -# 2: (3.1622776601683795, ([9, 4], [10, 1]), 7.615773105863909, ([13, 8], [10, 1])), -# }, -# id="holo image", -# ), -# pytest.param( -# filled_image, -# 0, -# { -# 1: (6.0, ([1, 2], [7, 2]), 7.211102550927978, ([6, 7], [2, 1])), -# 2: (5.385164807134504, ([15, 7], [10, 5]), 8.94427190999916, ([11, 9], [15, 1])), -# }, -# id="filled image", -# ), -# ], -# ) -# def test_get_feret_from_labelim(shape: npt.NDArray, axis: int, target: dict) -> None: -# """Test calculation of min/max feret for a labelled image with multiuple objects.""" -# min_max_feret_size_coord = feret.get_feret_from_labelim(shape, axis=axis) -# assert min_max_feret_size_coord == target +@pytest.mark.parametrize( + ("shape", "axis", "target"), + [ + pytest.param( + holo_image, + 0, + { + 1: (4.0, [[np.nan, np.nan], [1, 2]], 4.47213595499958, ([5, 4], [1, 2])), + 2: (2.82842712474619, [[8.0, 3.0], [10, 1]], 7.615773105863909, ([10, 1], [13, 8])), + }, + id="holo image", + ), + pytest.param( + filled_image, + 0, + { + 1: (6.0, [[np.nan, np.nan], [1, 2]], 7.211102550927978, ([7, 6], [1, 2])), + 2: (5.366563145999495, [[10.2, 4.6], [15, 7]], 8.94427190999916, ([15, 1], [11, 9])), + }, + id="filled image", + ), + ], +) +def test_get_feret_from_labelim(shape: npt.NDArray, axis: int, target: dict) -> None: + """Test calculation of min/max feret for a labelled image with multiuple objects.""" + min_max_feret_size_coord = feret.get_feret_from_labelim(shape, axis=axis) + for key, value in min_max_feret_size_coord.items(): + # Min Feret + np.testing.assert_equal(value[0], target[key][0]) + # Min Feret coordinates + np.testing.assert_array_equal(value[1], target[key][1]) + # Max Feret + np.testing.assert_equal(value[2], target[key][2]) + # Max Feret coordinates + np.testing.assert_array_equal(value[3], target[key][3]) diff --git a/topostats/measure/feret.py b/topostats/measure/feret.py index bae5b9f3dc..d812b3ccb0 100644 --- a/topostats/measure/feret.py +++ b/topostats/measure/feret.py @@ -14,6 +14,7 @@ from collections.abc import Generator from math import sqrt +import matplotlib.pyplot as plt import numpy as np import numpy.typing as npt import skimage.morphology @@ -284,8 +285,8 @@ def min_max_feret(points: npt.NDArray, axis: int = 0) -> tuple[float, tuple[int, """ caliper_min_feret = list(rotating_calipers(points, axis)) # TODO : Use this instead once we are using the min_feret_coords - # min_ferets, calipers, min_feret_coords = zip(*caliper_min_feret) - min_ferets, calipers, triangle_heights = zip(*caliper_min_feret) + min_ferets, calipers, min_feret_coords = zip(*caliper_min_feret) + # min_ferets, calipers, _ = zip(*caliper_min_feret) # Calculate the squared distance between caliper pairs for max feret calipers = np.asarray(calipers) caliper1 = calipers[:, 0] @@ -294,8 +295,10 @@ def min_max_feret(points: npt.NDArray, axis: int = 0) -> tuple[float, tuple[int, ((p[0] - q[0]) ** 2 + (p[1] - q[1]) ** 2, (list(p), list(q))) for p, q in zip(caliper1, caliper2) ] # TODO : replace calipers with min_feret_coords once correctly calculated - caliper_min_feret = [[x, (list(map(list, y)))] for x, y in zip(min_ferets, calipers)] - min_feret, min_feret_coord = min(caliper_min_feret) + # caliper_min_feret = [[x, (list(map(list, y)))] for x, y in zip(min_ferets, calipers)] + # min_feret, min_feret_coord = min(caliper_min_feret) + triangle_min_feret = [[x, (list(map(list, y)))] for x, y in zip(min_ferets, min_feret_coords)] + min_feret, min_feret_coord = min(triangle_min_feret) max_feret_sq, max_feret_coord = max(squared_distance_per_pair) return min_feret, min_feret_coord, sqrt(max_feret_sq), max_feret_coord @@ -351,3 +354,117 @@ def get_feret_from_labelim(label_image: npt.NDArray, labels: None | list | set = for label in labels: results[label] = get_feret_from_mask(label_image == label, axis) return results + + +def plot_feret( # pylint: disable=too-many-arguments,too-many-locals + points: npt.NDArray, + axis: int = 0, + plot_points: str = "k", + plot_hulls: tuple = ("g-", "r-"), + plot_calipers: str = "y-", + plot_triangle_heights: str = "b:", + plot_min_feret: str = "m--", + plot_max_feret: str = "m--", +) -> None: + """Plot upper and lower convex hulls with rotating calipers and optionally the minimum feret distances. + + Plot varying levels of details in constructing convex hulls and deriving the minimum and maximum feret. + + For format strings see the Notes section of `matplotlib.pyplot.plot + `. + + Parameters + ---------- + points : npt.NDArray + Points to be plotted which form the shape of interest. + axis : int + Which axis to sort coordinates on, 0 for row (default); 1 for columns. (Should give the same results!). + plot_points : str + Format string for plotting points. If 'None' points are not plotted. + plot_hulls : tuple + Tuple of length 2 of format strings for plotting the convex hull, these should differe to allow distinction + between hulls. If 'None' hulls are not plotted. + plot_calipers : str + Format string for plotting calipers. If 'None' calipers are not plotted. + plot_triangle_heights : str + Format string for plotting the triangle heights used in calulcating the minimum feret. These should cross the + opposite edge perpendicularly. If 'None' triangle heights are not plotted. + plot_min_feret : str + Format string for plotting the minimum feret. If 'None' the minimum feret is not plotted. + plot_max_feret : str + Format string for plotting the maximum feret. If 'None' the maximum feret is not plotted. + + Examples + -------- + >>> from skimage import draw + >>> from topostats.measure import feret + + >>> tiny_quadrilateral = np.asarray( + [ + [0, 0, 0, 0, 0, 0], + [0, 0, 1, 0, 0, 0], + [0, 1, 0, 0, 1, 0], + [0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0], + [0, 0, 1, 0, 0, 0], + [0, 0, 0, 0, 0, 0], + ], + dtype=np.uint8) + + >>> feret.plot_feret(np.argwhere(tiny_quadrilateral == 1)) + + >>> holo_ellipse_angled = np.zeros((8, 10), dtype=np.uint8) + rr, cc = draw.ellipse_perimeter(4, 5, 1, 3, orientation=np.deg2rad(30)) + holo_ellipse_angled[rr, cc] = 1 + + >>> feret.plot_feret(np.argwhere(holo_ellipse_angled == 1), plot_heights = None) + + >>> another_triangle = np.asarray([[5, 4], [2, 1], [8,2]]) + + >>> feret.plot_feret(another_triangle) + """ + upper_hull, lower_hull = hulls(points) + upper_hull = np.asarray(upper_hull) + lower_hull = np.asarray(lower_hull) + min_feret_calipers_base = list(rotating_calipers(points, axis)) + _, calipers, triangle_coords = zip(*min_feret_calipers_base) + calipers = np.asarray(calipers) + triangle_coords = np.asarray(triangle_coords) + min_feret_distance, min_feret_coords, max_feret_distance, max_feret_coords = min_max_feret(points, axis) + min_feret_coords = np.asarray(min_feret_coords) + max_feret_coords = np.asarray(max_feret_coords) + + if plot_points is not None: + plt.scatter(points[:, 0], points[:, 1], c=plot_points) + if plot_hulls is not None: + plt.plot(upper_hull[:, 0], upper_hull[:, 1], plot_hulls[0], label="Upper Hull") + plt.scatter(upper_hull[:, 0], upper_hull[:, 1], c=plot_hulls[0][0]) + plt.plot(lower_hull[:, 0], lower_hull[:, 1], plot_hulls[1], label="Lower Hull") + plt.scatter(lower_hull[:, 0], lower_hull[:, 1], c=plot_hulls[1][0]) + if plot_calipers is not None: + for caliper in calipers: + plt.plot(caliper[:, 0], caliper[:, 1], plot_calipers) + if plot_triangle_heights is not None: + for triangle_h in triangle_coords: + plt.plot(triangle_h[:, 0], triangle_h[:, 1], plot_triangle_heights) + if plot_min_feret is not None: + # for min_feret in min_feret_coords: + plt.plot( + min_feret_coords[:, 0], + min_feret_coords[:, 1], + plot_min_feret, + label=f"Minimum Feret ({min_feret_distance:.3f})", + ) + if plot_max_feret is not None: + # for max_feret in max_feret_coords: + plt.plot( + max_feret_coords[:, 0], + max_feret_coords[:, 1], + plot_min_feret, + label=f"Maximum Feret ({max_feret_distance:.3f})", + ) + plt.title("Upper and Lower Convex Hulls") + plt.axis("equal") + plt.legend() + plt.grid(True) + plt.show() From 6566ea9ec9f50191b208b56ea605a0b7bb84e882 Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Mon, 19 Feb 2024 18:33:57 +0000 Subject: [PATCH 27/35] Switch to vector projection method for triangle heights The inverse gradient results in `ZeroDivisionError` when the base of the triangle is horizontal so switching methods (thanks for the comprehensive suggestions of both @SylviaWhittle). In order to check everything I wrote a plotting function (see previous commit) and whilst many of the minimum feret distances are correct there are still instances where the triangle height is calculated _outside_ of the convex hull which is baffling. For the most part not an issue but in the `holo_ellipse_angled` this **is** an issue. Figures below show the problem. The same Graham Scan algorithm is used for the rotating caliper pairs as in GrainStats so unsure if this is an issue there and can't check as co-ordinates aren't currently returned (possibly bounding box may be informative as I think I saw that was calculated for the feret distances, but inclined to solve this in current code base). --- tests/measure/test_feret.py | 368 ++++++++++++++++++++---------------- topostats/measure/feret.py | 50 ++--- 2 files changed, 227 insertions(+), 191 deletions(-) diff --git a/tests/measure/test_feret.py b/tests/measure/test_feret.py index 25fb989438..571032abc5 100644 --- a/tests/measure/test_feret.py +++ b/tests/measure/test_feret.py @@ -558,6 +558,30 @@ def test_triangle_heights( np.asarray([5.405405405405405, 1.5675675675675649]), id="another triangle (no rounding)", ), + pytest.param( + [1, 0], + [1, 1], + [0, 0], + False, + np.asarray([1, 0]), + id="tiny triangle with base gradient zero, apex gradient 1 (no rounding)", + ), + pytest.param( + [1, 0], + [1, 1], + [0, 0], + True, + np.asarray([1, 1]), + id="tiny triangle with base gradient zero, apex gradient 1 (rounding)", + ), + pytest.param( + [1, 0], + [1, 2], + [0, 1], + False, + np.asarray([1, 1]), + id="tiny triangle with base gradient zero, apex gradient 0.5 (rounding)", + ), ], ) def test_min_feret_coord( @@ -568,11 +592,10 @@ def test_min_feret_coord( opposite_target: float, ) -> None: """Test calculation of mid_point of the triangle formed by rotating caliper and next point on convex hull.""" - opposite = feret._min_feret_coord(base1, base2, apex, round_coord) - np.testing.assert_array_equal(opposite, opposite_target) + opposite = feret._min_feret_coord(np.asarray(base1), np.asarray(base2), np.asarray(apex), round_coord) + np.testing.assert_array_almost_equal(opposite, opposite_target) -# pylint: disable=unused-argument @pytest.mark.parametrize( ("shape", "axis", "calipers_target", "min_ferets_target", "min_feret_coords_target"), [ @@ -603,10 +626,10 @@ def test_min_feret_coord( (([2, 2], [1, 1]), ([2, 1], [1, 1]), ([2, 1], [1, 2]), ([1, 1], [1, 2])), (1.0, 1.0, 1.0, 1.0), ( - [[np.nan, np.nan], [1, 1]], - [[np.nan, np.nan], [2, 1]], - [[np.nan, np.nan], [1, 2]], - [[np.nan, np.nan], [1, 1]], + [[2.0, 1.0], [1, 1]], + [[1.0, 1.0], [2, 1]], + [[1.0, 1.0], [1, 2]], + [[1.0, 2.0], [1, 1]], ), id="tiny square sorted by axis 0", ), @@ -615,7 +638,7 @@ def test_min_feret_coord( 0, (([2, 1], [1, 1]), ([2, 1], [1, 2]), ([1, 1], [1, 2])), (1.0, 1.0, 0.7071067811865475), - ([[np.nan, np.nan], [2, 1]], [[np.nan, np.nan], [1, 2]], [[1.5, 1.5], [1, 1]]), + ([[1.0, 1.0], [2, 1]], [[1.0, 1.0], [1, 2]], [[1.5, 1.5], [1, 1]]), id="tiny triangle sorted by axis 0", ), pytest.param( @@ -624,10 +647,10 @@ def test_min_feret_coord( (([3, 2], [1, 1]), ([3, 1], [1, 1]), ([3, 1], [1, 2]), ([1, 1], [1, 2])), (2.0, 2.0, 1.0, 1.0), ( - [[np.nan, np.nan], [1, 1]], - [[np.nan, np.nan], [3, 1]], - [[np.nan, np.nan], [1, 2]], - [[np.nan, np.nan], [1, 1]], + [[3.0, 1.0], [1, 1]], + [[1.0, 1.0], [3, 1]], + [[1.0, 1.0], [1, 2]], + [[1.0, 2.0], [1, 1]], ), id="tiny rectangle sorted by axis 0", ), @@ -646,8 +669,8 @@ def test_min_feret_coord( ( [[3.0, 0.0], [1, 2]], [[2.0, 3.0], [4, 1]], - [[np.nan, np.nan], [2, 3]], - [[np.nan, np.nan], [2, 1]], + [[2.0, 1.0], [2, 3]], + [[2.0, 3.0], [2, 1]], [[2.0, 1.0], [4, 3]], [[3.0, 4.0], [1, 2]], ), @@ -668,12 +691,12 @@ def test_min_feret_coord( ), (4.0, 4.0, 4.242640687119285, 4.242640687119285, 4.0, 4.0, 4.242640687119285, 4.242640687119285), ( - [[np.nan, np.nan], [0, 1]], - [[np.nan, np.nan], [4, 1]], + [[4.0, 1.0], [0, 1]], + [[0.0, 1.0], [4, 1]], [[3.0, 0.0], [0, 3]], - [[-0.0, 3.0], [3, 0]], - [[np.nan, np.nan], [1, 4]], - [[np.nan, np.nan], [1, 0]], + [[0.0, 3.0], [3, 0]], + [[1.0, 0.0], [1, 4]], + [[1.0, 4.0], [1, 0]], [[0.0, 1.0], [3, 4]], [[3.0, 4.0], [0, 1]], ), @@ -694,12 +717,12 @@ def test_min_feret_coord( ), (4.0, 4.0, 4.242640687119285, 4.242640687119285, 4.0, 4.0, 4.242640687119285, 4.242640687119285), ( - [[np.nan, np.nan], [1, 2]], - [[np.nan, np.nan], [5, 2]], + [[5.0, 2.0], [1, 2]], + [[1.0, 2.0], [5, 2]], [[4.0, 1.0], [1, 4]], [[1.0, 4.0], [4, 1]], - [[np.nan, np.nan], [2, 5]], - [[np.nan, np.nan], [2, 1]], + [[2.0, 1.0], [2, 5]], + [[2.0, 5.0], [2, 1]], [[1.0, 2.0], [4, 5]], [[4.0, 5.0], [1, 2]], ), @@ -720,12 +743,12 @@ def test_min_feret_coord( ), (6.0, 6.0, 7.071067811865475, 7.071067811865475, 8.0, 8.0, 7.071067811865475, 7.071067811865475), ( - [[np.nan, np.nan], [1, 3]], - [[np.nan, np.nan], [7, 3]], + [[7.0, 3.0], [1, 3]], + [[1.0, 3.0], [7, 3]], [[6.0, 2.0], [1, 7]], - [[-0.0, 6.0], [5, 1]], - [[np.nan, np.nan], [3, 9]], - [[np.nan, np.nan], [3, 1]], + [[0.0, 6.0], [5, 1]], + [[3.0, 1.0], [3, 9]], + [[3.0, 9.0], [3, 1]], [[0.0, 4.0], [5, 9]], [[6.0, 8.0], [1, 3]], ), @@ -746,12 +769,12 @@ def test_min_feret_coord( ), (8.0, 8.0, 7.071067811865475, 7.071067811865475, 6.0, 6.0, 7.071067811865475, 7.071067811865475), ( - [[np.nan, np.nan], [1, 3]], - [[np.nan, np.nan], [9, 3]], + [[9.0, 3.0], [1, 3]], + [[1.0, 3.0], [9, 3]], [[6.0, 0.0], [1, 5]], [[2.0, 6.0], [7, 1]], - [[np.nan, np.nan], [3, 7]], - [[np.nan, np.nan], [3, 1]], + [[3.0, 1.0], [3, 7]], + [[3.0, 7.0], [3, 1]], [[2.0, 2.0], [7, 7]], [[6.0, 8.0], [1, 3]], ), @@ -770,10 +793,10 @@ def test_min_feret_coord( ), (5.0, 5.0, 2.82842712474619, 2.82842712474619, 7.071067811865475, 7.071067811865475), ( - [[np.nan, np.nan], [1, 2]], - [[np.nan, np.nan], [6, 5]], + [[6.0, 2.0], [1, 2]], + [[1.0, 5.0], [6, 5]], [[3.0, 2.0], [1, 4]], - [[-0.0, 3.0], [2, 1]], + [[0.0, 3.0], [2, 1]], [[0.0, 3.0], [5, 8]], [[6.0, 7.0], [1, 2]], ), @@ -803,12 +826,12 @@ def test_min_feret_coord( 7.602631123499284, ), ( - [[np.nan, np.nan], [1, 5]], - [[6.699999999999999, 3.1], [1, 5]], + [[8.0, 5.0], [1, 5]], + [[6.7, 3.1], [1, 5]], [[6.2, 2.4], [1, 5]], [[5.0, 1.0], [1, 5]], [[2.9310344827586214, 5.827586206896551], [5, 1]], - [[np.nan, np.nan], [8, 8]], + [[8.0, 1.0], [8, 8]], [[2.5, 2.5], [8, 8]], [[1.2, 4.6], [8, 8]], ), @@ -827,10 +850,10 @@ def test_rotating_calipers( # print(f"{calipers_target=}") # print(f"{min_feret_coords=}") # print(f"{min_feret_coords_target=}") - np.testing.assert_array_equal(calipers, calipers_target) - np.testing.assert_array_equal(min_ferets, min_ferets_target) + np.testing.assert_array_almost_equal(calipers, calipers_target) + np.testing.assert_array_almost_equal(min_ferets, min_ferets_target) # TODO : Sort of zero division errors - np.testing.assert_array_equal(min_feret_coords, min_feret_coords_target) + np.testing.assert_array_almost_equal(min_feret_coords, min_feret_coords_target) @pytest.mark.parametrize( @@ -847,7 +870,7 @@ def test_rotating_calipers( tiny_circle, 0, 1.4142135623730951, - ([0, 1], [1, 2]), + ([0, 1], [1, 0]), 2.0, ([2, 1], [0, 1]), id="tiny circle sorted on axis 0", @@ -856,7 +879,7 @@ def test_rotating_calipers( tiny_circle, 1, 1.4142135623730951, - ([1, 0], [0, 1]), + ([0, 1], [1, 0]), 2.0, ([2, 1], [0, 1]), id="tiny circle sorted on axis 1", @@ -867,14 +890,14 @@ def test_rotating_calipers( 1.0, ([1, 1], [1, 2]), 1.4142135623730951, - ([2, 2], [1, 1]), ### WRONG!!! + ([2, 2], [1, 1]), id="tiny square sorted on axis 0", ), pytest.param( tiny_quadrilateral, 0, 2.4961508830135313, - ([2, 1], [2, 4]), + ([3.384615384615385, 3.0769230769230766], [2, 1]), 4.0, ([5, 2], [1, 2]), id="tiny quadrilateral sorted on axis 0", @@ -883,7 +906,7 @@ def test_rotating_calipers( tiny_quadrilateral, 1, 2.4961508830135313, - ([2, 4], [2, 1]), + ([3.384615384615385, 3.0769230769230766], [2, 1]), 4.0, ([5, 2], [1, 2]), id="tiny quadrilateral sorted on axis 1", @@ -892,7 +915,7 @@ def test_rotating_calipers( tiny_triangle, 0, 0.7071067811865475, - ([1, 1], [1, 2]), # NB - NOT the actual min feret coordinates, yet! + ([1.5, 1.5], [1, 1]), 1.4142135623730951, ([2, 1], [1, 2]), id="tiny triangle sorted on axis 0", @@ -911,19 +934,19 @@ def test_rotating_calipers( small_circle, 1, 4.0, - ([1, 0], [1, 4]), + ([0, 1], [4, 1]), 4.47213595499958, ([4, 3], [0, 1]), id="small circle sorted on axis 0", ), pytest.param( - holo_circle, 0, 4.0, ([2, 1], [2, 5]), 4.47213595499958, ([5, 4], [1, 2]), id="holo circle sorted on axis 0" + holo_circle, 0, 4.0, ([1, 2], [5, 2]), 4.47213595499958, ([5, 4], [1, 2]), id="holo circle sorted on axis 0" ), pytest.param( holo_ellipse_horizontal, 0, 6.0, - ([7, 3], [1, 3]), + ([1, 3], [7, 3]), 8.246211251235321, ([5, 1], [3, 9]), id="holo ellipse horizontal on axis 0", @@ -937,20 +960,20 @@ def test_rotating_calipers( ([9, 5], [1, 3]), id="holo ellipse vertical on axis 0", ), - pytest.param( - holo_ellipse_angled, - 0, - 2.82842712474619, - ([2, 1], [1, 4]), - 7.615773105863909, - ([2, 1], [5, 8]), - id="holo ellipse angled on axis 0", - ), + # pytest.param( + # holo_ellipse_angled, + # 0, + # 2.82842712474619, + # ([2, 1], [1, 4]), # WRONG! Currently get [[0, 3], [2, 1]] + # 7.615773105863909, + # ([2, 1], [5, 8]), + # id="holo ellipse angled on axis 0", + # ), pytest.param( curved_line, 0, 5.252257314388902, - ([5, 1], [1, 5]), + ([2.93103448275862, 5.827586206896552], [5, 1]), 8.06225774829855, ([4, 1], [8, 8]), id="curved line sorted on axis 0", @@ -959,7 +982,7 @@ def test_rotating_calipers( curved_line, 1, 5.252257314388902, - ([5, 1], [1, 5]), + ([2.93103448275862, 5.827586206896552], [5, 1]), 8.06225774829855, ([8, 8], [4, 1]), id="curved line sorted on axis 1", @@ -978,122 +1001,131 @@ def test_min_max_feret( min_feret_distance, min_feret_coord, max_feret_distance, max_feret_coord = feret.min_max_feret( np.argwhere(shape == 1), axis ) + # Uncomment for debugging and plots which can be saved # print(f"{min_feret_distance=}") # print(f"{min_feret_coord=}") # print(f"{max_feret_distance=}") # print(f"{max_feret_coord=}") + # feret.plot_feret( + # np.argwhere(shape == 1), + # axis, + # # plot_hulls=None, + # # plot_min_feret=None, + # # plot_max_feret=None, + # # plot_triangle_heights=None, + # ) np.testing.assert_approx_equal(min_feret_distance, min_feret_distance_target) - np.testing.assert_array_equal(min_feret_coord, min_feret_coord_target) + np.testing.assert_array_almost_equal(min_feret_coord, min_feret_coord_target) np.testing.assert_approx_equal(max_feret_distance, max_feret_distance_target) - np.testing.assert_array_equal(max_feret_coord, max_feret_coord_target) + np.testing.assert_array_almost_equal(max_feret_coord, max_feret_coord_target) -@pytest.mark.parametrize( - ( - "shape", - "axis", - "min_feret_distance_target", - "min_feret_coord_target", - "max_feret_distance_target", - "max_feret_coord_target", - ), - [ - pytest.param( - filled_circle, - 0, - 6.0, - [[np.nan, np.nan], [1, 2]], - 7.211102550927978, - ([7, 6], [1, 2]), - id="filled circle sorted on axis 0", - ), - pytest.param( - filled_ellipse_horizontal, - 0, - 4.0, - [[np.nan, np.nan], [1, 2]], - 6.324555320336759, - ([4, 1], [2, 7]), - id="filled ellipse horizontal sorted on axis 0", - ), - pytest.param( - filled_ellipse_vertical, - 0, - 4.0, - ([np.nan, np.nan], [2, 5]), - 6.324555320336759, - ([7, 4], [1, 2]), - id="filled ellipse vertical sorted on axis 0", - ), - pytest.param( - filled_ellipse_angled, - 0, - 5.366563145999495, - ([1.2, 4.6], [6, 7]), - 8.94427190999916, - ([6, 1], [2, 9]), - id="filled ellipse angled sorted on axis 0", - ), - ], -) -def test_get_feret_from_mask( - shape: npt.NDArray, - axis: int, - min_feret_distance_target: float, - min_feret_coord_target: list, - max_feret_distance_target: float, - max_feret_coord_target: list, -) -> None: - """Test calculation of min/max feret for a single masked object.""" - min_feret_distance, min_feret_coord, max_feret_distance, max_feret_coord = feret.get_feret_from_mask(shape, axis) - np.testing.assert_approx_equal(min_feret_distance, min_feret_distance_target) - np.testing.assert_array_equal(min_feret_coord, min_feret_coord_target) - np.testing.assert_approx_equal(max_feret_distance, max_feret_distance_target) - np.testing.assert_array_equal(max_feret_coord, max_feret_coord_target) +# @pytest.mark.parametrize( +# ( +# "shape", +# "axis", +# "min_feret_distance_target", +# "min_feret_coord_target", +# "max_feret_distance_target", +# "max_feret_coord_target", +# ), +# [ +# pytest.param( +# filled_circle, +# 0, +# 6.0, +# [[1, 2], [7, 2]], +# 7.211102550927978, +# ([7, 6], [1, 2]), +# id="filled circle sorted on axis 0", +# ), +# pytest.param( +# filled_ellipse_horizontal, +# 0, +# 4.0, +# [[np.nan, np.nan], [1, 2]], +# 6.324555320336759, +# ([4, 1], [2, 7]), +# id="filled ellipse horizontal sorted on axis 0", +# ), +# pytest.param( +# filled_ellipse_vertical, +# 0, +# 4.0, +# ([np.nan, np.nan], [2, 5]), +# 6.324555320336759, +# ([7, 4], [1, 2]), +# id="filled ellipse vertical sorted on axis 0", +# ), +# pytest.param( +# filled_ellipse_angled, +# 0, +# 5.366563145999495, +# ([1.2, 4.6], [6, 7]), +# 8.94427190999916, +# ([6, 1], [2, 9]), +# id="filled ellipse angled sorted on axis 0", +# ), +# ], +# ) +# def test_get_feret_from_mask( +# shape: npt.NDArray, +# axis: int, +# min_feret_distance_target: float, +# min_feret_coord_target: list, +# max_feret_distance_target: float, +# max_feret_coord_target: list, +# ) -> None: +# """Test calculation of min/max feret for a single masked object.""" +# min_feret_distance, min_feret_coord, max_feret_distance, max_feret_coord = feret.get_feret_from_mask(shape, axis) +# np.testing.assert_approx_equal(min_feret_distance, min_feret_distance_target) +# np.testing.assert_approx_equal(min_feret_coord, min_feret_coord_target) +# np.testing.assert_approx_equal(max_feret_distance, max_feret_distance_target) +# np.testing.assert_approx_equal(max_feret_coord, max_feret_coord_target) -# Concatenate images to have two labeled objects within them -holo_ellipse_angled2 = holo_ellipse_angled.copy() -holo_ellipse_angled2[holo_ellipse_angled2 == 1] = 2 -# Need to pad the holo_circle -holo_image = np.concatenate((np.pad(holo_circle, pad_width=((0, 1), (0, 3))), holo_ellipse_angled2)) -filled_ellipse_angled2 = filled_ellipse_angled.copy() -filled_ellipse_angled2[filled_ellipse_angled2 == 1] = 2 -filled_image = np.concatenate((np.pad(filled_circle, pad_width=((0, 0), (0, 2))), filled_ellipse_angled2)) +# # Concatenate images to have two labeled objects within them +# holo_ellipse_angled2 = holo_ellipse_angled.copy() +# holo_ellipse_angled2[holo_ellipse_angled2 == 1] = 2 +# # Need to pad the holo_circle +# holo_image = np.concatenate((np.pad(holo_circle, pad_width=((0, 1), (0, 3))), holo_ellipse_angled2)) +# filled_ellipse_angled2 = filled_ellipse_angled.copy() +# filled_ellipse_angled2[filled_ellipse_angled2 == 1] = 2 +# filled_image = np.concatenate((np.pad(filled_circle, pad_width=((0, 0), (0, 2))), filled_ellipse_angled2)) -@pytest.mark.parametrize( - ("shape", "axis", "target"), - [ - pytest.param( - holo_image, - 0, - { - 1: (4.0, [[np.nan, np.nan], [1, 2]], 4.47213595499958, ([5, 4], [1, 2])), - 2: (2.82842712474619, [[8.0, 3.0], [10, 1]], 7.615773105863909, ([10, 1], [13, 8])), - }, - id="holo image", - ), - pytest.param( - filled_image, - 0, - { - 1: (6.0, [[np.nan, np.nan], [1, 2]], 7.211102550927978, ([7, 6], [1, 2])), - 2: (5.366563145999495, [[10.2, 4.6], [15, 7]], 8.94427190999916, ([15, 1], [11, 9])), - }, - id="filled image", - ), - ], -) -def test_get_feret_from_labelim(shape: npt.NDArray, axis: int, target: dict) -> None: - """Test calculation of min/max feret for a labelled image with multiuple objects.""" - min_max_feret_size_coord = feret.get_feret_from_labelim(shape, axis=axis) - for key, value in min_max_feret_size_coord.items(): - # Min Feret - np.testing.assert_equal(value[0], target[key][0]) - # Min Feret coordinates - np.testing.assert_array_equal(value[1], target[key][1]) - # Max Feret - np.testing.assert_equal(value[2], target[key][2]) - # Max Feret coordinates - np.testing.assert_array_equal(value[3], target[key][3]) +# @pytest.mark.parametrize( +# ("shape", "axis", "target"), +# [ +# pytest.param( +# holo_image, +# 0, +# { +# 1: (4.0, [[np.nan, np.nan], [1, 2]], 4.47213595499958, ([5, 4], [1, 2])), +# 2: (2.82842712474619, [[8.0, 3.0], [10, 1]], 7.615773105863909, ([10, 1], [13, 8])), +# }, +# id="holo image", +# ), +# pytest.param( +# filled_image, +# 0, +# { +# 1: (6.0, [[np.nan, np.nan], [1, 2]], 7.211102550927978, ([7, 6], [1, 2])), +# 2: (5.366563145999495, [[10.2, 4.6], [15, 7]], 8.94427190999916, ([15, 1], [11, 9])), +# }, +# id="filled image", +# ), +# ], +# ) +# def test_get_feret_from_labelim(shape: npt.NDArray, axis: int, target: dict) -> None: +# """Test calculation of min/max feret for a labelled image with multiuple objects.""" +# min_max_feret_size_coord = feret.get_feret_from_labelim(shape, axis=axis) +# for key, value in min_max_feret_size_coord.items(): +# # Min Feret +# np.testing.assert_equal(value[0], target[key][0]) +# # Min Feret coordinates +# np.testing.assert_array_equal(value[1], target[key][1]) +# # Max Feret +# np.testing.assert_equal(value[2], target[key][2]) +# # Max Feret coordinates +# np.testing.assert_array_equal(value[3], target[key][3]) diff --git a/topostats/measure/feret.py b/topostats/measure/feret.py index d812b3ccb0..b58eb1560b 100644 --- a/topostats/measure/feret.py +++ b/topostats/measure/feret.py @@ -11,6 +11,7 @@ from __future__ import annotations import logging +import warnings from collections.abc import Generator from math import sqrt @@ -23,6 +24,9 @@ LOGGER = logging.getLogger(LOGGER_NAME) +# Handle warnings as exceptions (encountered when gradient of base triangle is zero) +warnings.filterwarnings("error") + # pylint: disable=fixme @@ -191,7 +195,10 @@ def rotating_calipers(points: npt.NDArray, axis: int = 0) -> Generator: base1 = lower_hull[lower_index + 1] # original lower caliper base2 = lower_hull[lower_index] # previous point on lower hull apex = upper_hull[upper_index] # original upper caliper - yield triangle_height(base1, base2, apex), calipers, [list(_min_feret_coord(base1, base2, apex)), apex] + yield triangle_height(base1, base2, apex), calipers, [ + list(_min_feret_coord(np.asarray(base1), np.asarray(base2), np.asarray(apex))), + apex, + ] # @snoop @@ -231,11 +238,11 @@ def _min_feret_coord( Parameters ---------- - base1 : list + base1 : npt.NDArray Coordinates of one point on base of triangle, these are on the same side of the hull. - base2 : list + base2 : npt.NDArray Coordinates of second point on base of triangle, these are on the same side of the hull. - apex : list + apex : npt.NDArray Coordinate of the apex of the triangle, this is on the opposite hull. round_coord : bool Whether to round the point to the nearest NumPy index relative to the apex's position (i.e. either floor or @@ -247,22 +254,22 @@ def _min_feret_coord( Coordinates of the point perpendicular to the base line that is opposite the apex, this line is the minimum feret distance for acute triangles (but not scalene triangles). """ - # Find the perpendicular gradient to bc - grad_base = (base2[1] - base1[1]) / (base2[0] - base1[0]) - grad_apex_base = -1 / grad_base - # Find the intercept - intercept_ad = apex[1] - grad_apex_base * apex[0] - intercept_bc = base1[1] - grad_base * base1[0] - # Find the intersection - x = (intercept_bc - intercept_ad) / (grad_apex_base - grad_base) - y = grad_apex_base * x + intercept_ad + def angle_between(apex, b): + return np.arccos(np.dot(apex, b) / (np.linalg.norm(apex) * np.linalg.norm(b))) + + angle_apex_base1_base2 = angle_between(apex - base1, base2 - base1) + len_apex_base2 = np.linalg.norm(apex - base1) + cos_apex_base1_base2 = np.cos(angle_apex_base1_base2) + k = len_apex_base2 * cos_apex_base1_base2 + unit_base1_base2 = (base1 - base2) / np.linalg.norm(base2 - base1) + d = base1 - k * unit_base1_base2 if round_coord: # Round up/down base on position relative to apex to get an actual cell - x = np.ceil(x) if x > apex[0] else np.floor(x) - y = np.ceil(y) if y > apex[1] else np.floor(y) - return np.asarray([int(x), int(y)]) - return np.asarray([x, y]) + d[0] = np.ceil(d[0]) if d[0] > apex[0] else np.floor(d[0]) + d[1] = np.ceil(d[1]) if d[1] > apex[1] else np.floor(d[1]) + return np.asarray([int(d[0]), int(d[1])]) + return np.asarray([d[0], d[1]]) # @snoop @@ -284,22 +291,19 @@ def min_max_feret(points: npt.NDArray, axis: int = 0) -> tuple[float, tuple[int, Tuple of the minimum feret distance and its coordinates and the maximum feret distance and its coordinates. """ caliper_min_feret = list(rotating_calipers(points, axis)) - # TODO : Use this instead once we are using the min_feret_coords min_ferets, calipers, min_feret_coords = zip(*caliper_min_feret) - # min_ferets, calipers, _ = zip(*caliper_min_feret) # Calculate the squared distance between caliper pairs for max feret calipers = np.asarray(calipers) caliper1 = calipers[:, 0] caliper2 = calipers[:, 1] + # Determine maximum feret (and coordinates) from all possible calipers squared_distance_per_pair = [ ((p[0] - q[0]) ** 2 + (p[1] - q[1]) ** 2, (list(p), list(q))) for p, q in zip(caliper1, caliper2) ] - # TODO : replace calipers with min_feret_coords once correctly calculated - # caliper_min_feret = [[x, (list(map(list, y)))] for x, y in zip(min_ferets, calipers)] - # min_feret, min_feret_coord = min(caliper_min_feret) + max_feret_sq, max_feret_coord = max(squared_distance_per_pair) + # Determine minimum feret (and coordinates) from all caliper triangles triangle_min_feret = [[x, (list(map(list, y)))] for x, y in zip(min_ferets, min_feret_coords)] min_feret, min_feret_coord = min(triangle_min_feret) - max_feret_sq, max_feret_coord = max(squared_distance_per_pair) return min_feret, min_feret_coord, sqrt(max_feret_sq), max_feret_coord From f6e494516bde329b99bfc2fc7ed6d154de4c63d6 Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Mon, 26 Feb 2024 17:30:35 +0000 Subject: [PATCH 28/35] Exclude triangle heights (min feret) if outside hull The minimum feret which is calculated as the height of the triangle formed between the rotating caliper pair and the next adjacent point on the hull (with the apex being the antipodal point on the opposite hull) resulted in heights with co-ordinates that were outside of the hull if the triangles were scalene. In turn these gave incorrect minimum feret coordinates, even if the distances were correct. To avoid this a check is now made as to whether the line formed by the triangle height is `in_polygon()` using functions from Shapely. --- tests/measure/test_feret.py | 348 ++++++++++++++++++++++-------------- topostats/measure/feret.py | 115 ++++++++++-- 2 files changed, 312 insertions(+), 151 deletions(-) diff --git a/tests/measure/test_feret.py b/tests/measure/test_feret.py index 571032abc5..6d531cb7df 100644 --- a/tests/measure/test_feret.py +++ b/tests/measure/test_feret.py @@ -845,17 +845,112 @@ def test_rotating_calipers( """Test calculation of rotating caliper pairs.""" caliper_min_feret = feret.rotating_calipers(np.argwhere(shape == 1), axis) min_ferets, calipers, min_feret_coords = zip(*caliper_min_feret) - # print(f"{min_ferets=}") - # print(f"{calipers=}") - # print(f"{calipers_target=}") - # print(f"{min_feret_coords=}") - # print(f"{min_feret_coords_target=}") np.testing.assert_array_almost_equal(calipers, calipers_target) np.testing.assert_array_almost_equal(min_ferets, min_ferets_target) - # TODO : Sort of zero division errors np.testing.assert_array_almost_equal(min_feret_coords, min_feret_coords_target) +@pytest.mark.parametrize( + ("coordinates", "target"), + [ + pytest.param( + np.asarray([[0, 0], [0, 5], [5, 0], [5, 5]]), + ([[0, 0], [0, 5], [5, 5], [5, 0]]), + id="Simple square Top Left > Top Right > Bottom Left > Bottom Right", + ), + pytest.param( + np.asarray([[1, 1], [1, 0], [0, 0]]), + ([0, 0], [1, 1], [1, 0]), + id="Simple Triangle Bottom Right > Bottom Left > Apex", + ), + pytest.param( + np.argwhere(holo_ellipse_angled == 1), + ([2, 1], [1, 2], [1, 4], [5, 8], [6, 7], [6, 5]), + id="Angled ellipse.", + ), + pytest.param( + np.argwhere(holo_ellipse_horizontal == 1), + ([3, 1], [1, 3], [1, 7], [3, 9], [5, 9], [7, 7], [7, 3], [5, 1]), + id="Horizontal ellipse.", + ), + pytest.param( + np.argwhere(holo_ellipse_vertical == 1), + ([3, 1], [1, 3], [1, 5], [3, 7], [7, 7], [9, 5], [9, 3], [7, 1]), + id="Vertical ellipse.", + ), + pytest.param( + np.argwhere(curved_line == 1), + ([5, 1], [4, 1], [2, 3], [1, 5], [8, 8], [8, 7], [7, 4], [6, 2]), + id="Curved line.", + ), + ], +) +def test_sort_clockwise(coordinates: npt.NDArray, target: npt.NDArray) -> None: + """Test sorting of coordinates in a clockwise direction.""" + upper_hull, lower_hull = feret.hulls(coordinates) + hull = np.unique(np.concatenate([lower_hull, upper_hull], axis=0), axis=0) + np.testing.assert_array_equal(feret.sort_clockwise(hull), target) + + +@pytest.mark.parametrize( + ("lower_hull", "upper_hull", "line", "within"), + [ + pytest.param( + np.asarray([[0, 0], [0, 5], [5, 5]]), + np.asarray([[0, 0], [5, 0], [5, 5]]), + np.asarray([[3, 3], [4, 4]]), + [True], + id="Square with line inside.", + ), + pytest.param( + np.asarray([[0, 0], [0, 5], [5, 5]]), + np.asarray([[0, 0], [5, 0], [5, 5]]), + np.asarray([[3, 3], [3, 6]]), + False, + id="Square with line extending outside", + ), + pytest.param( + np.asarray([[0, 0], [0, 5], [5, 5]]), + np.asarray([[0, 0], [5, 0], [5, 5]]), + np.asarray([[0, 0], [0, 6]]), + False, + id="Square with line extending beyond top edge", + ), + pytest.param( + np.asarray([[0, 0], [0, 5], [5, 5]]), + np.asarray([[0, 0], [5, 0], [5, 5]]), + np.asarray([[0, 3], [3, 3]]), + True, + id="Square with line on part of top edge", + ), + pytest.param( + np.asarray([[0, 0], [0, 5], [5, 5]]), + np.asarray([[0, 0], [5, 0], [5, 5]]), + np.asarray([[0, 5], [5, 5]]), + True, + id="Square with line identical to right edge", + ), + pytest.param( + np.asarray([[1, 1], [1, 2], [2, 2]]), + np.asarray([[1, 1], [2, 1], [2, 2]]), + np.asarray([[2, 1], [1, 1]]), + True, + id="Tiny square with line identical to right edge", + ), + pytest.param( + feret.hulls(np.argwhere(holo_ellipse_angled == 1))[1], + feret.hulls(np.argwhere(holo_ellipse_angled == 1))[0], + np.asarray([[2, 1], [0, 2]]), + False, + id="Angled ellipse incorrect min feret.", + ), + ], +) +def test_in_polygon(lower_hull: npt.NDArray, upper_hull: npt.NDArray, line: list, within: bool) -> None: + """Test whether points are within polygon.""" + np.testing.assert_array_equal(feret.in_polygon(line, lower_hull, upper_hull), within) + + @pytest.mark.parametrize( ( "shape", @@ -960,15 +1055,15 @@ def test_rotating_calipers( ([9, 5], [1, 3]), id="holo ellipse vertical on axis 0", ), - # pytest.param( - # holo_ellipse_angled, - # 0, - # 2.82842712474619, - # ([2, 1], [1, 4]), # WRONG! Currently get [[0, 3], [2, 1]] - # 7.615773105863909, - # ([2, 1], [5, 8]), - # id="holo ellipse angled on axis 0", - # ), + pytest.param( + holo_ellipse_angled, + 0, + 2.82842712474619, + ([3, 2], [1, 4]), + 7.615773105863909, + ([2, 1], [5, 8]), + id="holo ellipse angled on axis 0", + ), pytest.param( curved_line, 0, @@ -1001,131 +1096,118 @@ def test_min_max_feret( min_feret_distance, min_feret_coord, max_feret_distance, max_feret_coord = feret.min_max_feret( np.argwhere(shape == 1), axis ) - # Uncomment for debugging and plots which can be saved - # print(f"{min_feret_distance=}") - # print(f"{min_feret_coord=}") - # print(f"{max_feret_distance=}") - # print(f"{max_feret_coord=}") - # feret.plot_feret( - # np.argwhere(shape == 1), - # axis, - # # plot_hulls=None, - # # plot_min_feret=None, - # # plot_max_feret=None, - # # plot_triangle_heights=None, - # ) np.testing.assert_approx_equal(min_feret_distance, min_feret_distance_target) np.testing.assert_array_almost_equal(min_feret_coord, min_feret_coord_target) np.testing.assert_approx_equal(max_feret_distance, max_feret_distance_target) np.testing.assert_array_almost_equal(max_feret_coord, max_feret_coord_target) -# @pytest.mark.parametrize( -# ( -# "shape", -# "axis", -# "min_feret_distance_target", -# "min_feret_coord_target", -# "max_feret_distance_target", -# "max_feret_coord_target", -# ), -# [ -# pytest.param( -# filled_circle, -# 0, -# 6.0, -# [[1, 2], [7, 2]], -# 7.211102550927978, -# ([7, 6], [1, 2]), -# id="filled circle sorted on axis 0", -# ), -# pytest.param( -# filled_ellipse_horizontal, -# 0, -# 4.0, -# [[np.nan, np.nan], [1, 2]], -# 6.324555320336759, -# ([4, 1], [2, 7]), -# id="filled ellipse horizontal sorted on axis 0", -# ), -# pytest.param( -# filled_ellipse_vertical, -# 0, -# 4.0, -# ([np.nan, np.nan], [2, 5]), -# 6.324555320336759, -# ([7, 4], [1, 2]), -# id="filled ellipse vertical sorted on axis 0", -# ), -# pytest.param( -# filled_ellipse_angled, -# 0, -# 5.366563145999495, -# ([1.2, 4.6], [6, 7]), -# 8.94427190999916, -# ([6, 1], [2, 9]), -# id="filled ellipse angled sorted on axis 0", -# ), -# ], -# ) -# def test_get_feret_from_mask( -# shape: npt.NDArray, -# axis: int, -# min_feret_distance_target: float, -# min_feret_coord_target: list, -# max_feret_distance_target: float, -# max_feret_coord_target: list, -# ) -> None: -# """Test calculation of min/max feret for a single masked object.""" -# min_feret_distance, min_feret_coord, max_feret_distance, max_feret_coord = feret.get_feret_from_mask(shape, axis) -# np.testing.assert_approx_equal(min_feret_distance, min_feret_distance_target) -# np.testing.assert_approx_equal(min_feret_coord, min_feret_coord_target) -# np.testing.assert_approx_equal(max_feret_distance, max_feret_distance_target) -# np.testing.assert_approx_equal(max_feret_coord, max_feret_coord_target) +@pytest.mark.parametrize( + ( + "shape", + "axis", + "min_feret_distance_target", + "min_feret_coord_target", + "max_feret_distance_target", + "max_feret_coord_target", + ), + [ + pytest.param( + filled_circle, + 0, + 6.0, + ([1.0, 2.0], [7.0, 2.0]), + 7.211102550927978, + ([7, 6], [1, 2]), + id="filled circle sorted on axis 0", + ), + pytest.param( + filled_ellipse_horizontal, + 0, + 4.0, + ([1.0, 2.0], [5.0, 2.0]), + 6.324555320336759, + ([4, 1], [2, 7]), + id="filled ellipse horizontal sorted on axis 0", + ), + pytest.param( + filled_ellipse_vertical, + 0, + 4.0, + ([2.0, 1.0], [2.0, 5.0]), + 6.324555320336759, + ([7, 4], [1, 2]), + id="filled ellipse vertical sorted on axis 0", + ), + pytest.param( + filled_ellipse_angled, + 0, + 5.65685424949238, + ([6.0, 7.0], [2.0, 3.0]), + 8.94427190999916, + ([6, 1], [2, 9]), + id="filled ellipse angled sorted on axis 0", + ), + ], +) +def test_get_feret_from_mask( + shape: npt.NDArray, + axis: int, + min_feret_distance_target: float, + min_feret_coord_target: list, + max_feret_distance_target: float, + max_feret_coord_target: list, +) -> None: + """Test calculation of min/max feret for a single masked object.""" + min_feret_distance, min_feret_coord, max_feret_distance, max_feret_coord = feret.get_feret_from_mask(shape, axis) + np.testing.assert_approx_equal(min_feret_distance, min_feret_distance_target) + np.testing.assert_array_almost_equal(min_feret_coord, min_feret_coord_target) + np.testing.assert_approx_equal(max_feret_distance, max_feret_distance_target) + np.testing.assert_array_almost_equal(max_feret_coord, max_feret_coord_target) -# # Concatenate images to have two labeled objects within them -# holo_ellipse_angled2 = holo_ellipse_angled.copy() -# holo_ellipse_angled2[holo_ellipse_angled2 == 1] = 2 -# # Need to pad the holo_circle -# holo_image = np.concatenate((np.pad(holo_circle, pad_width=((0, 1), (0, 3))), holo_ellipse_angled2)) -# filled_ellipse_angled2 = filled_ellipse_angled.copy() -# filled_ellipse_angled2[filled_ellipse_angled2 == 1] = 2 -# filled_image = np.concatenate((np.pad(filled_circle, pad_width=((0, 0), (0, 2))), filled_ellipse_angled2)) +# Concatenate images to have two labeled objects within them +holo_ellipse_angled2 = holo_ellipse_angled.copy() +holo_ellipse_angled2[holo_ellipse_angled2 == 1] = 2 +# Need to pad the holo_circle +holo_image = np.concatenate((np.pad(holo_circle, pad_width=((0, 1), (0, 3))), holo_ellipse_angled2)) +filled_ellipse_angled2 = filled_ellipse_angled.copy() +filled_ellipse_angled2[filled_ellipse_angled2 == 1] = 2 +filled_image = np.concatenate((np.pad(filled_circle, pad_width=((0, 0), (0, 2))), filled_ellipse_angled2)) -# @pytest.mark.parametrize( -# ("shape", "axis", "target"), -# [ -# pytest.param( -# holo_image, -# 0, -# { -# 1: (4.0, [[np.nan, np.nan], [1, 2]], 4.47213595499958, ([5, 4], [1, 2])), -# 2: (2.82842712474619, [[8.0, 3.0], [10, 1]], 7.615773105863909, ([10, 1], [13, 8])), -# }, -# id="holo image", -# ), -# pytest.param( -# filled_image, -# 0, -# { -# 1: (6.0, [[np.nan, np.nan], [1, 2]], 7.211102550927978, ([7, 6], [1, 2])), -# 2: (5.366563145999495, [[10.2, 4.6], [15, 7]], 8.94427190999916, ([15, 1], [11, 9])), -# }, -# id="filled image", -# ), -# ], -# ) -# def test_get_feret_from_labelim(shape: npt.NDArray, axis: int, target: dict) -> None: -# """Test calculation of min/max feret for a labelled image with multiuple objects.""" -# min_max_feret_size_coord = feret.get_feret_from_labelim(shape, axis=axis) -# for key, value in min_max_feret_size_coord.items(): -# # Min Feret -# np.testing.assert_equal(value[0], target[key][0]) -# # Min Feret coordinates -# np.testing.assert_array_equal(value[1], target[key][1]) -# # Max Feret -# np.testing.assert_equal(value[2], target[key][2]) -# # Max Feret coordinates -# np.testing.assert_array_equal(value[3], target[key][3]) +@pytest.mark.parametrize( + ("shape", "axis", "target"), + [ + pytest.param( + holo_image, + 0, + { + 1: (4.0, ([1.0, 2.0], [5.0, 2.0]), 4.47213595499958, ([5, 4], [1, 2])), + 2: (2.82842712474619, ([11.0, 2.0], [9.0, 4.0]), 7.615773105863909, ([10, 1], [13, 8])), + }, + id="holo image", + ), + pytest.param( + filled_image, + 0, + { + 1: (6.0, ([1.0, 2.0], [7.0, 2.0]), 7.211102550927978, ([7, 6], [1, 2])), + 2: (5.366563145999495, ([10.2, 4.6], [15, 7]), 8.94427190999916, ([15, 1], [11, 9])), + }, + id="filled image", + ), + ], +) +def test_get_feret_from_labelim(shape: npt.NDArray, axis: int, target: dict) -> None: + """Test calculation of min/max feret for a labelled image with multiuple objects.""" + min_max_feret_size_coord = feret.get_feret_from_labelim(shape, axis=axis) + for key, value in min_max_feret_size_coord.items(): + # Min Feret + np.testing.assert_equal(value[0], target[key][0]) + # Min Feret coordinates + np.testing.assert_array_almost_equal(value[1], target[key][1]) + # Max Feret + np.testing.assert_equal(value[2], target[key][2]) + # Max Feret coordinates + np.testing.assert_array_almost_equal(value[3], target[key][3]) diff --git a/topostats/measure/feret.py b/topostats/measure/feret.py index b58eb1560b..b3324f9a0a 100644 --- a/topostats/measure/feret.py +++ b/topostats/measure/feret.py @@ -19,6 +19,7 @@ import numpy as np import numpy.typing as npt import skimage.morphology +from shapely import LineString, Polygon, contains from topostats.logs.logs import LOGGER_NAME @@ -137,10 +138,6 @@ def all_pairs(points: npt.NDArray) -> list[tuple[list, list]]: return list(unique_combinations.values()) -# snoop.install(enabled=True) - - -# @snoop def rotating_calipers(points: npt.NDArray, axis: int = 0) -> Generator: """Given a list of 2d points, finds all ways of sandwiching the points between two parallel lines. @@ -164,6 +161,7 @@ def rotating_calipers(points: npt.NDArray, axis: int = 0) -> Generator: upper_hull, lower_hull = hulls(points, axis) upper_index = 0 lower_index = len(lower_hull) - 1 + counter = 0 while upper_index < len(upper_hull) - 1 or lower_index > 0: # yield upper_hull[upper_index], lower_hull[lower_index] calipers = (lower_hull[lower_index], upper_hull[upper_index]) @@ -195,13 +193,15 @@ def rotating_calipers(points: npt.NDArray, axis: int = 0) -> Generator: base1 = lower_hull[lower_index + 1] # original lower caliper base2 = lower_hull[lower_index] # previous point on lower hull apex = upper_hull[upper_index] # original upper caliper - yield triangle_height(base1, base2, apex), calipers, [ - list(_min_feret_coord(np.asarray(base1), np.asarray(base2), np.asarray(apex))), - apex, - ] + counter += 1 + yield triangle_height(base1, base2, apex), calipers, np.asarray( + [ + list(_min_feret_coord(np.asarray(base1), np.asarray(base2), np.asarray(apex))), + apex, + ] + ) -# @snoop def triangle_height(base1: npt.NDArray | list, base2: npt.NDArray | list, apex: npt.NDArray | list) -> float: """Calculate the height of triangle formed by three points. @@ -224,9 +224,9 @@ def triangle_height(base1: npt.NDArray | list, base2: npt.NDArray | list, apex: >>> min_feret([4, 0], [4, 3], [0,0]) 4.0 """ - a_b = np.asarray(base1) - np.asarray(base2) - a_c = np.asarray(base1) - np.asarray(apex) - return np.linalg.norm(np.cross(a_b, a_c)) / np.linalg.norm(a_b) + base1_base2 = np.asarray(base1) - np.asarray(base2) + base1_apex = np.asarray(base1) - np.asarray(apex) + return np.linalg.norm(np.cross(base1_base2, base1_apex)) / np.linalg.norm(base1_base2) def _min_feret_coord( @@ -272,7 +272,83 @@ def angle_between(apex, b): return np.asarray([d[0], d[1]]) -# @snoop +def sort_clockwise(coordinates: npt.NDArray) -> npt.NDArray: + """Sort an array of coordinates in a clockwise order. + + Parameters + ---------- + coordinates : npt.NDArray + Unordered array of points. Typically a convex hull. + + Returns + ------- + npt.NDArray + Points ordered in a clockwise direction. + + Examples + -------- + >>> import numpy as np + >>> from topostats.measure import feret + >>> unordered = np.asarray([[0, 0], [5, 5], [0, 5], [5, 0]]) + >>> feret.sort_clockwise(unordered) + + array([[0, 0], + [0, 5], + [5, 5], + [5, 0]]) + """ + center_x, center_y = coordinates.mean(0) + x, y = coordinates.T + angles = np.arctan2(x - center_x, y - center_y) + order = np.argsort(angles) + return coordinates[order] + + +def in_polygon(line: npt.NDArray, lower_hull: npt.NDArray, upper_hull: npt.NDArray) -> bool: + """Check whether a line is within or on the edge of a polygon. + + If either or both of the line points the edges of the polygon this is considered to be within, but if one of the + points is outside of the polygon it is not contained within. Uses Shapely for most checks but it was found that if a + given line was identical to one of the edges of the polygon it was considered to be outside and this is not the + desired behaviour as such lines, typically the height of triangles used when determining minimum feret distances, + are the values we wish to retain. It is only lines with points that are completely outside of the polygon that we + wish to exclude. + + Parameters + ---------- + line : npt.NDArray + Numpy array defining the coordinates of a single, linear line. + lower_hull : npt.NDArray + The lower convex hull. + upper_hull : npt.NDArray + The upper convex hull of the polygon. + + Returns + ------- + bool + Whether the line is contained within or is on the border of the polygon. + """ + # Combine the upper and lower hulls + hull = np.unique(np.concatenate([lower_hull, upper_hull], axis=0), axis=0) + # Sort the hull and create Polygon (closes the shape for testing last edge) + polygon = Polygon(sort_clockwise(hull)) + # Extract coordinates for comparison to line. + x, y = polygon.exterior.coords.xy + closed_shape = np.asarray(tuple(zip(x, y))) + # Check whether the line (notionally the triangle height) is equivalent to one of the edges. Required as Shapely + # returns False in such situations. + line = LineString(sort_clockwise(line)) + length = len(closed_shape) + edge_count = 0 + while edge_count < length - 1: + sorted_edge = sort_clockwise(closed_shape[edge_count : edge_count + 2]) + edge = LineString(sorted_edge) + if list(line.coords) == list(edge.coords): + return True + edge_count += 1 + return contains(polygon, line) + + def min_max_feret(points: npt.NDArray, axis: int = 0) -> tuple[float, tuple[int, int], float, tuple[int, int]]: """Given a list of 2-D points, returns the minimum and maximum feret diameters. @@ -301,10 +377,14 @@ def min_max_feret(points: npt.NDArray, axis: int = 0) -> tuple[float, tuple[int, ((p[0] - q[0]) ** 2 + (p[1] - q[1]) ** 2, (list(p), list(q))) for p, q in zip(caliper1, caliper2) ] max_feret_sq, max_feret_coord = max(squared_distance_per_pair) - # Determine minimum feret (and coordinates) from all caliper triangles - triangle_min_feret = [[x, (list(map(list, y)))] for x, y in zip(min_ferets, min_feret_coords)] + # Determine minimum feret (and coordinates) from all caliper triangles, but only if the min_feret_coords (y) are + # within the polygon + hull = hulls(points) + triangle_min_feret = [ + [x, (list(map(list, y)))] for x, y in zip(min_ferets, min_feret_coords) if in_polygon(y, hull[0], hull[1]) + ] min_feret, min_feret_coord = min(triangle_min_feret) - return min_feret, min_feret_coord, sqrt(max_feret_sq), max_feret_coord + return min_feret, np.asarray(min_feret_coord), sqrt(max_feret_sq), np.asarray(max_feret_coord) def get_feret_from_mask(mask_im: npt.NDArray, axis: int = 0) -> tuple[float, tuple[int, int], float, tuple[int, int]]: @@ -327,8 +407,7 @@ def get_feret_from_mask(mask_im: npt.NDArray, axis: int = 0) -> tuple[float, tup eroded = skimage.morphology.erosion(mask_im) outline = mask_im ^ eroded boundary_points = np.argwhere(outline > 0) - # convert numpy array to a list of (x,y) tuple points - boundary_point_list = list(map(list, list(boundary_points))) + boundary_point_list = np.asarray(list(map(list, list(boundary_points)))) return min_max_feret(boundary_point_list, axis) From 1d25dab58f4432a84de9226a4106fdfc8dab3a58 Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Mon, 26 Feb 2024 17:39:23 +0000 Subject: [PATCH 29/35] Adding Shapely to package dependencies --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 285d1dd087..78b543a816 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,6 +49,7 @@ dependencies = [ "scikit-image", "scipy", "seaborn", + "shapely", "snoop", "tifffile", "topofileformats", From e464f2543a3d729fc9229bc19433b96d505c8861 Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Tue, 27 Feb 2024 11:14:09 +0000 Subject: [PATCH 30/35] Add tests for `measure.feret.plot_feret()` Practising what I preach and adding tests for the `measure.feret.plot_feret()` function used for visualising hulls, callipers, triangle heights and feret distances. Each image is 38-43kb so not huge. --- tests/measure/test_feret.py | 46 ++++++++++++++++++ .../test_plot_feret_Exclude calipers.png | Bin 0 -> 41991 bytes .../feret/test_plot_feret_Exclude hull.png | Bin 0 -> 39116 bytes .../test_plot_feret_Exclude max feret.png | Bin 0 -> 39164 bytes .../test_plot_feret_Exclude min feret.png | Bin 0 -> 38440 bytes .../feret/test_plot_feret_Exclude points.png | Bin 0 -> 43180 bytes ...st_plot_feret_Exclude triangle heights.png | Bin 0 -> 41370 bytes .../feret/test_plot_feret_Plot everything.png | Bin 0 -> 43178 bytes topostats/measure/feret.py | 21 ++++++-- 9 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 tests/resources/img/feret/test_plot_feret_Exclude calipers.png create mode 100644 tests/resources/img/feret/test_plot_feret_Exclude hull.png create mode 100644 tests/resources/img/feret/test_plot_feret_Exclude max feret.png create mode 100644 tests/resources/img/feret/test_plot_feret_Exclude min feret.png create mode 100644 tests/resources/img/feret/test_plot_feret_Exclude points.png create mode 100644 tests/resources/img/feret/test_plot_feret_Exclude triangle heights.png create mode 100644 tests/resources/img/feret/test_plot_feret_Plot everything.png diff --git a/tests/measure/test_feret.py b/tests/measure/test_feret.py index 6d531cb7df..36acfae7e1 100644 --- a/tests/measure/test_feret.py +++ b/tests/measure/test_feret.py @@ -1211,3 +1211,49 @@ def test_get_feret_from_labelim(shape: npt.NDArray, axis: int, target: dict) -> np.testing.assert_equal(value[2], target[key][2]) # Max Feret coordinates np.testing.assert_array_almost_equal(value[3], target[key][3]) + + +@pytest.mark.parametrize( + ( + "shape", + "axis", + "plot_points", + "plot_hulls", + "plot_calipers", + "plot_triangle_heights", + "plot_min_feret", + "plot_max_feret", + ), + [ + pytest.param(tiny_quadrilateral, 0, "k", ("g-", "r-"), "y-", "b:", "m--", "m--", id="Plot everything"), + pytest.param(tiny_quadrilateral, 0, None, ("g-", "r-"), "y-", "b:", "m--", "m--", id="Exclude points"), + pytest.param(tiny_quadrilateral, 0, "k", None, "y-", "b:", "m--", "m--", id="Exclude hull"), + pytest.param(tiny_quadrilateral, 0, "k", ("g-", "r-"), None, "b:", "m--", "m--", id="Exclude calipers"), + pytest.param(tiny_quadrilateral, 0, "k", ("g-", "r-"), "y-", None, "m--", "m--", id="Exclude triangle heights"), + pytest.param(tiny_quadrilateral, 0, "k", ("g-", "r-"), "y-", "b:", None, "m--", id="Exclude min feret"), + pytest.param(tiny_quadrilateral, 0, "k", ("g-", "r-"), "y-", "b:", "m--", None, id="Exclude max feret"), + ], +) +@pytest.mark.mpl_image_compare(baseline_dir="../resources/img/feret") +def test_plot_feret( # pylint: disable=too-many-arguments + shape: npt.NDArray, + axis: int, + plot_points: str | None, + plot_hulls: tuple | None, + plot_calipers: str | None, + plot_triangle_heights: str | None, + plot_min_feret: str | None, + plot_max_feret: str | None, +) -> None: + """Tests the plotting function used for investigating whether feret distances are correct.""" + fig, _ = feret.plot_feret( + np.argwhere(shape == 1), + axis, + plot_points, + plot_hulls, + plot_calipers, + plot_triangle_heights, + plot_min_feret, + plot_max_feret, + ) + return fig diff --git a/tests/resources/img/feret/test_plot_feret_Exclude calipers.png b/tests/resources/img/feret/test_plot_feret_Exclude calipers.png new file mode 100644 index 0000000000000000000000000000000000000000..1e6ad76c4bf9f0925a5da67c5fca38f28e97b999 GIT binary patch literal 41991 zcmeEuhdKDq;_LhUjQ9KXdalEg|!JhYoH2UZ*_e?%wX{g1|17iukK`rC?&Tc;Km=2YVA z+VQRQ@_nkkm9&0UZ-!g)SMvrleu$KN8gxj6IxrVQ{X)N2xp0f;Uw(nVb_QQj#KfWZDRaC62HaWZN^3+f% zjw*EH(dV(orB`h2?Dpbg*;cN+vU;nL`Rtk($1@mz{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PLJ-!2bbA6*ap6 literal 0 HcmV?d00001 diff --git a/tests/resources/img/feret/test_plot_feret_Exclude max feret.png b/tests/resources/img/feret/test_plot_feret_Exclude max feret.png new file mode 100644 index 0000000000000000000000000000000000000000..3d577657c84477cc6c7d048deab07bb3115bb8f1 GIT binary patch literal 39164 zcmeFZg;!PE`!~92MQNnFMGz3_R2q>INu^8akWQr$kQ9`V5*3jW5RsCS5JXWxIs}v! zq~m?2-*bL3?tRC&f53H&a}G!LUVE(>&-1CdqqQ|vhzRKjF&GSynyR8M27|+b!C)Jn zz=ywijUzIXM_f)?-#Pj^JGVV<-stM=l<@ZR_&i#hGcQ4>mc&6yhW-qP z#x7u@(4P;!Wf)dA^ry}O>#`#H#iK~Kf<_chjHeDeQ! zzq4V;-)kn0{r?wYW5bKSe?Lq)|B{Br{RQnP$6xQmPkpk#2qPuzNt@)V) zH_7ty@*bq7hJPzDu^K9~;JN;S@|9U*e0n;~eL4}siJ*OcVkT)GNj)~UqBb<=dQ-_- zvdt-HuW47^zJ9Q`SZY69QP?TFI9S>-pA&qZMUsuJtDV(QQO~+|{@lUNOoILQ*Jt0o zd#9ay8Sg%g5cc4!o5H@DTWfKVB+S$INMz;z{Q5dIH5K|u#DR^MmoR}z=7RsLYekx{ z;IOY3>xb9XN%88xjDl-36=~&&4vYDp-mUeRU;AocmaCJmy!QJyuWPzdHKUZ*t&hDkkQ#v9WQe+&#Edu2L-3+SZoxaD|PK{U??i4FSVTzMhhd zZ@rcYnVFeW&flc#lioNzJv~hrSNaBivA4AxOL&I2sig(y>x=6xi=~b6#RjEx%iH7r ztC#Zo%@@CwD326rWMIRT!R#o-3u4O`E}Z$w8&M-sK!f)?0G$;nr@ zhzJQ`_DEO8>tokvI@o!5PB=R|hZ76cxlUoTv9nLj%|*n~i#_6(#XM0-V1l8O)2KfF z-7Vm=_p@kfaq*OZfWSq^A<{2JT4GW+&PlcJZ?9Ut4?78;7#0~xaQo|va9Uwo`J{r( z!0nZ>Q*cw`_5Sn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R3 literal 0 HcmV?d00001 diff --git a/tests/resources/img/feret/test_plot_feret_Exclude min feret.png b/tests/resources/img/feret/test_plot_feret_Exclude min feret.png new file mode 100644 index 0000000000000000000000000000000000000000..d77028f7144c88507b638111edfe0ac67621e92d GIT binary patch literal 38440 zcmeFZg;&>G^ey_Or9%XyO9TW-0ci!K5fGJ<4ub~iQV@_11w=|f5drCLkuFgrq)WQH z@A`1gx$pPJc;k-y2Rz3qJ)hX0z1LoAt~uxCwYr)-As#gz3WXw6RFKs~p)eRxD0J-$ z*zhL_&M)oYUpJlPw4LtRS~$5FJD8(Xjh*bQY@Mv0m@qng`ECpCOUu0`rl`JaSTdQ<dOM?8bsL^~B)A{99#%Q$jMe>@fp3JxZt!;4aF`u<%yy_b=d^}Csyg2DwsYC;ne6aVjW zvZXEP{;h3ta&ouQdsCk;^$&eDJx(PdAu%c|SD-g-AfupQ6D4m73J-7otdXvs{eXM_ z@bKH{D4lsntX!sA60FaQt9O%wh%^e&(b1ESChOoCT+y%D4fW-4q+v0+8N9Yhzcn^S zB`1e}QhjgoBlQ-$)@Kr%(aKk!KeH3iiIR`|oJoY!OK^&6F*9d2AY8FN>%q4>!! z^{@Ijb977a!f1qr^em^F!}gE2daz{WWo7SFV}%55a&5W3x}qGL>V0y!zPWk3E&2+d z>$=fMwc9T%n&}mqyUF4WZ#eF$f4Gh1>gt-R`BCWtF>%YU%)8w5*F;6BnV6W^AAY4B z86DO5qQ$YjHqKz#lYB#Oz?JymqjKDOm+*M1T9PO{xP3!NApKF5^W;j|_?{C;OYOxH-iv%b4~r@*A?N13gmewB0Al)aNEov711ih+TF z{JK6>UiBs(5xw~S$o{5s=C8?}0YiBh_2lH_i_O`N=~0*QCiqsB{`Z1U$Y701ZO3g2 zJ^vIxftCEMl@&cys~mTo(8tH8XjZSxMy@5CZgOreE@}z)A{!$UQ-js0uP+J{6LX@$ z4~I(1TO3wo;_u(x5xq`WY!V6zY++&HG6P}k6cGA_vF$N zJ`WF1-`7Vp0+!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oQvytdC@$I-t`Gv$3=2;?4pNib)VZjp34eZBtC`4vT3W?9JGfd?fSDYGS~D z9ClS+SV_Xd!r>7SuRu0cGwi4ln$CLZ%Jnd9@L}IxMAeue+ufo{q>LN{QuSR*f?5rv zcvwW=2VtIj0h|BLJg6;QtUQ5F0@eB~cr@U;aG@s!OlyrG_n418UQu(8pBi5WvHY9#5u0w{ z`|$iCJSWl;hu35%v;zs(!~1WT%7vo*?DBFWNM?&!H!-$Y$Ug-$)4K=OU<)V=*zkGb z)Svb-jqx!=WEiMkQYVanB~B31CL-fL`OVBvCb8 z-KZ`VS7s|%AfV;dw6ebul+Gm5eB`0+0OIU7X+K`B0)#gzLW3phHE`TZQSx%G4I;UQ z%RR0oWY!fdiQF3M?!pEH)ZsSnmba?`i_|G;r5CY~tw07XGlKDd5-739#or zgp5l-Ppb|sIB2SD2Ksu2|Fwhlx`n&VE8BMG=e+c)ugu*T&obpvic?#b2e-{pvpM4d~a$TM8((|sIu?@Ro;{z{y9YycF^Q!3wU3SZw z{zk{r$U*1v)fts}mR}6Be#%yod+L3vV%9dezt~9$CLDdyJ*}t5j}y7AbN=8Rr;p8J zZl^_V_do`Sf8G^E7@X~JJJ&sCU)pUb%I2cTJ>*fLS!fsq`ZXH?D)RT6bH?VPFFl{w z_mjt5Ilb}H^N7|7*4RdVorfnu&z(KCac*&Oal*T%Z*uYGg!`V{FCzIJR}$ZiKp-N{ zPOGdmUBj=6!30TivyfsimjP9expgE6^Z%P)H!<8U4~8n9esF_l!W`8+fzMYrzxMwC DW+EBj literal 0 HcmV?d00001 diff --git a/tests/resources/img/feret/test_plot_feret_Exclude points.png b/tests/resources/img/feret/test_plot_feret_Exclude points.png new file mode 100644 index 0000000000000000000000000000000000000000..4a251e68e5aa7877ba9fa22c3f5ccef5f44d8c16 GIT binary patch literal 43180 zcmeFZd038Z`}cb`Pc%rSlqO_I5|T=@3ZZDyAPq>AO7mQzNRc_B3C$Bq^PrJP(WEp< zLeV@A*7xxIe($^1w%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HgA1!(z5s2E_msYisM031GYpXRQFz zS8P?ZAM6x(b3mg$^Q|x%G#UOGd^Elef1WzQzlw z!PUuEO)C6w#ZLm+VNR>{RLXMICOMy%gokX}#a{6m`65RH_~dSU+4*X*{?)=w4dHP2 z#wAyh3%ZNQj)C0hvtC{MjHDztr}bln$!??lGLqyc=u6d2Z>mOjl8qz0M+i?N!G%}2Mjh(uf0U)`Xs@C>lS zW&?!^z=_!dJDxBt=xjMwYaV3EU^{OJ4)0j&L2Mg?9bj%P_PmvBhf&3sfQeA z5`=B0gWfnV34J>gI5jmj2OUH|v+9!&wbsHy^&8O_Ra{*wo|u|yXlrMIyj@XANmg<3 z9Z1FU(UWTexW5~c&$fpk&Z1&?XXZ$|ay^CnnTYt)J|2Y*knf{E`T8NZy+uTS7^ngV z7q_!=D+e}QQ5B|eEX~bxpgSoUNYH0{v@Hbaaqrt!rmREA%OB5b2iXxIzP@pF-e&DirST0OJQVZ)# zL4d7s@7}<(><=H5K@8#meJHNsSk1(-4c=gp@OralJorB|Yk1#|M-O<-S~=u9mv zdZ7ma`gWUc^Iu?Lk!cs-dm5Sxd0+NRmz3cz*?4$(N{vBx8C+JRLX9lSSABuoH3j_Y zlGy$4VDwoPz~c{vNbF2T(C`>|q~1(;!l$XOOp3xOP)E JN7~@|{{iBRSm6Kw literal 0 HcmV?d00001 diff --git a/tests/resources/img/feret/test_plot_feret_Exclude triangle heights.png b/tests/resources/img/feret/test_plot_feret_Exclude triangle heights.png new file mode 100644 index 0000000000000000000000000000000000000000..6c0d944c78a00514854df9fa525d0b3d481a15f3 GIT binary patch literal 41370 zcmeFZi943<+CF?Kg~(K)lqo|=p;E|9rBosciAVMWjI*D3l0E5;A8>GL@*v zSP?RW%zXQ)XRUXw-}l?z?fU~h+j^d7x$oO`U)MPt$A0Ylew>#MAKJTo*_ve(MJ?Z_ zuBJ^D8Q51^_`G+P^@v${U#nSCl zQ`T|2*Z-{sEPlp~~l`=oVXSCs`qp>! zMfEmL+5EV6=X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G;aR->ufWxzAb8|i?e;#_9KvkE#Pfd3g{Bqq@0tn~B<~aD_P@*(163El%mdEqZ zqDl;(xE{ur93NZj&YeN0+`K&K$9V{<4>3UbMv#uN2qqKu*m?kA>V4qbeI?;mG^eoB z0_%%Ao%O?qeKD8xqT=FO)Py)#S!E%){U9_Slt(#12N?d7d-m*E<>nWS0t;5+YnY3snC~ zH*fZVU_jpB;2^_sc>N1lfnjw>U&x??#+BvDh5HaV+m`>tj$AYC1w%lD&I7&xY@C{s zwi2$e8&WF;FdpwTi+OD2BJ`iUuyR;Ec<=-E%3GS6@0uArUL;M>2${DKk9cj5!03_O+mbiz2(Mw!0EN9|U<{nS>9ZFJjEI>Jy%zMc zb8~+{b+#C~ct?*sqRYuDv0x=Yrisl+r52>qdtpLv<`^9+xeVI}&RK>DJ(^OWhoVg1 z$|1OTH}JhC5@0HJ!P9Ss`W#G>eQIa4`33VSCpTC57(z}*AUXCr`kjPCoABaDP~$q= z2w$&&TfK3eI0H(WD)J$8ouK6*>^Q5Y0)-C None: """Plot upper and lower convex hulls with rotating calipers and optionally the minimum feret distances. @@ -476,6 +479,10 @@ def plot_feret( # pylint: disable=too-many-arguments,too-many-locals Format string for plotting the minimum feret. If 'None' the minimum feret is not plotted. plot_max_feret : str Format string for plotting the maximum feret. If 'None' the maximum feret is not plotted. + filename : str | Path | None + Location to save the image to. + show: bool + Whether to display the image. Examples -------- @@ -506,6 +513,8 @@ def plot_feret( # pylint: disable=too-many-arguments,too-many-locals >>> feret.plot_feret(another_triangle) """ + # Derive everything needed regardless of required, routine is only for investigating/debugging so speed not + # critical. upper_hull, lower_hull = hulls(points) upper_hull = np.asarray(upper_hull) lower_hull = np.asarray(lower_hull) @@ -517,6 +526,7 @@ def plot_feret( # pylint: disable=too-many-arguments,too-many-locals min_feret_coords = np.asarray(min_feret_coords) max_feret_coords = np.asarray(max_feret_coords) + fig, ax = plt.subplots(1, 1) if plot_points is not None: plt.scatter(points[:, 0], points[:, 1], c=plot_points) if plot_hulls is not None: @@ -543,11 +553,16 @@ def plot_feret( # pylint: disable=too-many-arguments,too-many-locals plt.plot( max_feret_coords[:, 0], max_feret_coords[:, 1], - plot_min_feret, + plot_max_feret, label=f"Maximum Feret ({max_feret_distance:.3f})", ) plt.title("Upper and Lower Convex Hulls") plt.axis("equal") plt.legend() plt.grid(True) - plt.show() + if filename is not None: + plt.savefig(filename) + if show: + plt.show() + + return fig, ax From 3fff00e70d325d13946c9a668d955a613a12b3cc Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Wed, 6 Mar 2024 08:47:10 +0000 Subject: [PATCH 31/35] Numpydoc validation --- topostats/measure/feret.py | 54 ++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 22 deletions(-) diff --git a/topostats/measure/feret.py b/topostats/measure/feret.py index 0aa744610f..520e4bff51 100644 --- a/topostats/measure/feret.py +++ b/topostats/measure/feret.py @@ -33,15 +33,16 @@ def orientation(p: npt.NDArray, q: npt.NDArray, r: npt.NDArray) -> int: - """Determine the orientation of three points as either clockwise, counter-clock-wise or colinear. + """ + Determine the orientation of three points as either clockwise, counter-clock-wise or colinear. Parameters ---------- - p: npt.NDArray + p : npt.NDArray First point (assumed to have a length of 2). - q: npt.NDArray + q : npt.NDArray Second point (assumed to have a length of 2). - r: npt.NDArray + r : npt.NDArray Third point (assumed to have a length of 2). Returns @@ -58,7 +59,7 @@ def sort_coords(points: npt.NDArray, axis: int = 1) -> npt.NDArray: Parameters ---------- - points: npt.NDArray + points : npt.NDArray Array of coordinates axis : int Which axis to axis coordinates on 0 for row; 1 for columns (default). @@ -115,13 +116,14 @@ def hulls(points: npt.NDArray, axis: int = 1) -> tuple[list, list]: def all_pairs(points: npt.NDArray) -> list[tuple[list, list]]: - """Given a list of 2d points, finds all ways of sandwiching the points. + """ + Given a list of 2-D points, finds all ways of sandwiching the points. Calculates the upper and lower convex hulls and then finds all pairwise combinations between each set of points. Parameters ---------- - points: npt.NDArray + points : npt.NDArray Numpy array of coordinates defining the outline of an object.mro Returns @@ -140,7 +142,8 @@ def all_pairs(points: npt.NDArray) -> list[tuple[list, list]]: def rotating_calipers(points: npt.NDArray, axis: int = 0) -> Generator: - """Given a list of 2d points, finds all ways of sandwiching the points between two parallel lines. + """ + Given a list of 2-D points, finds all ways of sandwiching the points between two parallel lines. This yields the sequence of pairs of points touched by each pair of lines across all points around the hull of a polygon. @@ -149,7 +152,7 @@ def rotating_calipers(points: npt.NDArray, axis: int = 0) -> Generator: Parameters ---------- - points: npt.NDArray + points : npt.NDArray Numpy array of coordinates defining the outline of an object. axis : int Which axis to sort coordinates on, 0 for row (default); 1 for columns. @@ -204,7 +207,8 @@ def rotating_calipers(points: npt.NDArray, axis: int = 0) -> Generator: def triangle_height(base1: npt.NDArray | list, base2: npt.NDArray | list, apex: npt.NDArray | list) -> float: - """Calculate the height of triangle formed by three points. + """ + Calculate the height of triangle formed by three points. Parameters ---------- @@ -233,7 +237,8 @@ def triangle_height(base1: npt.NDArray | list, base2: npt.NDArray | list, apex: def _min_feret_coord( base1: npt.NDArray, base2: npt.NDArray, apex: npt.NDArray, round_coord: bool = False ) -> npt.NDArray: - """Calculate the coordinate opposite the apex that is prependicular to the base of the triangle. + """ + Calculate the coordinate opposite the apex that is prependicular to the base of the triangle. Code courtesy of @SylviaWhittle. @@ -306,7 +311,8 @@ def sort_clockwise(coordinates: npt.NDArray) -> npt.NDArray: def in_polygon(line: npt.NDArray, lower_hull: npt.NDArray, upper_hull: npt.NDArray) -> bool: - """Check whether a line is within or on the edge of a polygon. + """ + Check whether a line is within or on the edge of a polygon. If either or both of the line points the edges of the polygon this is considered to be within, but if one of the points is outside of the polygon it is not contained within. Uses Shapely for most checks but it was found that if a @@ -351,7 +357,8 @@ def in_polygon(line: npt.NDArray, lower_hull: npt.NDArray, upper_hull: npt.NDArr def min_max_feret(points: npt.NDArray, axis: int = 0) -> tuple[float, tuple[int, int], float, tuple[int, int]]: - """Given a list of 2-D points, returns the minimum and maximum feret diameters. + """ + Given a list of 2-D points, returns the minimum and maximum feret diameters. `Feret diameter ` @@ -389,15 +396,16 @@ def min_max_feret(points: npt.NDArray, axis: int = 0) -> tuple[float, tuple[int, def get_feret_from_mask(mask_im: npt.NDArray, axis: int = 0) -> tuple[float, tuple[int, int], float, tuple[int, int]]: - """Calculate the minimum and maximum feret diameter of the foreground object of a binary mask. + """ + Calculate the minimum and maximum feret diameter of the foreground object of a binary mask. The outline of the object is calculated and the pixel coordinates transformed to a list for calculation. Parameters ---------- - mask_im: npt.NDArray + mask_im : npt.NDArray Binary Numpy array. - axis: int + axis : int Which axis to sort coordinates on, 0 for row (default); 1 for columns. Returns @@ -413,17 +421,18 @@ def get_feret_from_mask(mask_im: npt.NDArray, axis: int = 0) -> tuple[float, tup def get_feret_from_labelim(label_image: npt.NDArray, labels: None | list | set = None, axis: int = 0) -> dict: - """Calculate the minimum and maximum feret and coordinates of each connected component within a labelled image. + """ + Calculate the minimum and maximum feret and coordinates of each connected component within a labelled image. If labels is None, all labels > 0 will be analyzed. Parameters ---------- - label_image: npt.NDArray + label_image : npt.NDArray Numpy array with labelled connected components (integer) - labels: None | list + labels : None | list A list of labelled objects for which to calculate - axis: int + axis : int Which axis to sort coordinates on, 0 for row (default); 1 for columns. Returns @@ -452,7 +461,8 @@ def plot_feret( # pylint: disable=too-many-arguments,too-many-locals # noqa: C9 filename: str | Path | None = "./feret.png", show: bool = False, ) -> None: - """Plot upper and lower convex hulls with rotating calipers and optionally the minimum feret distances. + """ + Plot upper and lower convex hulls with rotating calipers and optionally the minimum feret distances. Plot varying levels of details in constructing convex hulls and deriving the minimum and maximum feret. @@ -481,7 +491,7 @@ def plot_feret( # pylint: disable=too-many-arguments,too-many-locals # noqa: C9 Format string for plotting the maximum feret. If 'None' the maximum feret is not plotted. filename : str | Path | None Location to save the image to. - show: bool + show : bool Whether to display the image. Examples From 066f4c5c2ac63f4a1e718bb0743769768b9f7754 Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Tue, 12 Mar 2024 21:29:41 +0000 Subject: [PATCH 32/35] Switching to Ray Tracer for points in polygon --- tests/measure/test_feret.py | 345 +++++++++++++++++++++++++++++++++++- topostats/measure/feret.py | 189 +++++++++++++++++--- 2 files changed, 506 insertions(+), 28 deletions(-) diff --git a/tests/measure/test_feret.py b/tests/measure/test_feret.py index 36acfae7e1..7fcd49a758 100644 --- a/tests/measure/test_feret.py +++ b/tests/measure/test_feret.py @@ -45,6 +45,8 @@ tiny_triangle = np.asarray([[0, 0, 0, 0], [0, 1, 1, 0], [0, 1, 0, 0], [0, 0, 0, 0]], dtype=np.uint8) +arbitrary_triangle = np.array([[1.18727719, 2.96140198], [4.14262995, 3.17983179], [6.92472119, 0.64147496]]) + tiny_rectangle = np.asarray([[0, 0, 0, 0], [0, 1, 1, 0], [0, 1, 1, 0], [0, 1, 1, 0], [0, 0, 0, 0]], dtype=np.uint8) tiny_ellipse = np.asarray( @@ -122,12 +124,35 @@ def test_orientation(point1: tuple, point2: tuple, point3: tuple, target: int) - pytest.param(tiny_quadrilateral, 0, [[1, 2], [2, 1], [2, 4], [5, 2]], id="tiny quadrilateral sorted on axis 0"), ], ) -def test_sort_coords(shape: npt.NDArray, axis: str, target: npt.NDArray) -> None: +def test_sort_coords(shape: npt.NDArray, axis: int, target: npt.NDArray) -> None: """Test sorting of coordinates.""" sorted_coords = feret.sort_coords(np.argwhere(shape == 1), axis) np.testing.assert_array_equal(sorted_coords, target) +@pytest.mark.parametrize( + ("coords", "axis", "target"), + [ + pytest.param( + arbitrary_triangle, + 0, + [[1.187277, 2.961402], [4.14263, 3.179832], [6.924721, 0.641475]], + id="arbitrary triangle sorted on axis 0", + ), + pytest.param( + arbitrary_triangle, + 1, + [[6.924721, 0.641475], [1.187277, 2.961402], [4.14263, 3.179832]], + id="arbitrary triangle sorted on axis 1", + ), + ], +) +def test_sort_coords_arbitrary(coords: npt.NDArray, axis: int, target: npt.NDArray) -> None: + """Test sorting of coordinates.""" + sorted_coords = feret.sort_coords(coords, axis) + np.testing.assert_array_almost_equal(sorted_coords, target) + + @pytest.mark.parametrize( ("shape", "axis"), [ @@ -283,6 +308,25 @@ def test_hulls(shape: npt.NDArray, axis: bool, upper_target: list, lower_target: np.testing.assert_array_equal(lower, lower_target) +@pytest.mark.parametrize( + ("coords", "axis", "upper_target", "lower_target"), + [ + pytest.param( + arbitrary_triangle, + 0, + [[1.187277, 2.961402], [4.14263, 3.179832], [6.924721, 0.641475]], + [[1.187277, 2.961402], [6.924721, 0.641475]], + id="arbitrary triangle sorted on axis 0", + ), + ], +) +def test_hulls_arbitrary(coords: npt.NDArray, axis: bool, upper_target: list, lower_target: list) -> None: + """Test construction of upper and lower hulls.""" + upper, lower = feret.hulls(coords, axis) + np.testing.assert_array_almost_equal(upper, upper_target) + np.testing.assert_array_almost_equal(lower, lower_target) + + @pytest.mark.parametrize( ("shape", "points_target"), [ @@ -529,6 +573,27 @@ def test_all_pairs(shape: npt.NDArray, points_target: list) -> None: ), pytest.param([4, 3], [4, 6], [0, 0], 4.0, id="offset"), pytest.param([4, 3], [3, 6], [0, 0], 4.743416490252569, id="offset"), + pytest.param( + [1.187277, 2.961402], + [4.14263, 3.179832], + [6.924721, 0.641475], + 2.736517033606448, + id="arbitrary triangle, height 1", + ), + pytest.param( + [1.187277, 2.961402], + [6.924721, 0.641475], + [4.14263, 3.179832], + 1.3103558947980252, + id="arbitrary triangle height 2", + ), + pytest.param( + [6.924721, 0.641475], + [4.14263, 3.179832], + [1.187277, 2.961402], + 2.1532876859324226, + id="arbitrary triangle height 3", + ), ], ) def test_triangle_heights( @@ -582,6 +647,30 @@ def test_triangle_heights( np.asarray([1, 1]), id="tiny triangle with base gradient zero, apex gradient 0.5 (rounding)", ), + pytest.param( + [1.187277, 2.961402], + [4.14263, 3.179832], + [6.924721, 0.641475], + False, + [6.723015, 3.370548], + id="arbitrary triangle, height 1", + ), + pytest.param( + [1.187277, 2.961402], + [6.924721, 0.641475], + [4.14263, 3.179832], + False, + [3.651425, 1.965027], + id="arbitrary triangle height 2", + ), + pytest.param( + [6.924721, 0.641475], + [4.14263, 3.179832], + [1.187277, 2.961402], + False, + [2.638607, 4.55209], + id="arbitrary triangle height 3", + ), ], ) def test_min_feret_coord( @@ -850,6 +939,52 @@ def test_rotating_calipers( np.testing.assert_array_almost_equal(min_feret_coords, min_feret_coords_target) +@pytest.mark.parametrize( + ("coords", "axis", "calipers_target", "min_ferets_target", "min_feret_coords_target"), + [ + pytest.param( + arbitrary_triangle, + 0, + ( + ([6.92472119, 0.64147496], [1.18727719, 2.96140198]), + ([6.92472119, 0.64147496], [4.14262995, 3.17983179]), + ([1.18727719, 2.96140198], [4.14262995, 3.17983179]), + ), + (2.7365167317626233, 1.3103556366489382, 2.153287228471869), + ( + [[6.7230157, 3.37054783], [6.92472119, 0.64147496]], + [[3.65142552, 1.96502724], [4.14262995, 3.17983179]], + [[2.63860725, 4.55208955], [1.18727719, 2.96140198]], + ), + id="arbitrary triangle sorted by axis 0", + ), + ], +) +def test_rotating_calipers_arbitrary( + coords: npt.NDArray, axis: int, calipers_target: tuple, min_ferets_target: tuple, min_feret_coords_target: tuple +) -> None: + """Test calculation of rotating caliper pairs.""" + caliper_min_feret = feret.rotating_calipers(coords, axis) + min_ferets, calipers, min_feret_coords = zip(*caliper_min_feret) + np.testing.assert_array_almost_equal(calipers, calipers_target) + np.testing.assert_array_almost_equal(min_ferets, min_ferets_target) + np.testing.assert_array_almost_equal(min_feret_coords, min_feret_coords_target) + + +@pytest.mark.parametrize( + ("base1", "base2", "apex", "target_angle"), + [ + pytest.param(np.asarray([1, 1]), np.asarray([1, 0]), np.asarray([0, 0]), 45.0, id="45-degree"), + pytest.param(np.asarray([1, 3]), np.asarray([1, 0]), np.asarray([0, 0]), 18.434948822922017, id="18.43-degree"), + pytest.param(np.asarray([1, 4]), np.asarray([1, 0]), np.asarray([0, 0]), 14.036243467926484, id="-degree"), + ], +) +def test_angle_between(base1: npt.NDArray, base2: npt.NDArray, apex: npt.NDArray, target_angle: float) -> None: + """Test calculation of angle between base and apex.""" + angle = feret._angle_between(apex - base1, base2 - base1) + assert np.rad2deg(angle) == pytest.approx(target_angle) + + @pytest.mark.parametrize( ("coordinates", "target"), [ @@ -883,6 +1018,11 @@ def test_rotating_calipers( ([5, 1], [4, 1], [2, 3], [1, 5], [8, 8], [8, 7], [7, 4], [6, 2]), id="Curved line.", ), + pytest.param( + arbitrary_triangle, + ([[1.18727719, 2.96140198], [4.14262995, 3.17983179], [6.92472119, 0.64147496]]), + id="Arbitrary triangle", + ), ], ) def test_sort_clockwise(coordinates: npt.NDArray, target: npt.NDArray) -> None: @@ -892,6 +1032,160 @@ def test_sort_clockwise(coordinates: npt.NDArray, target: npt.NDArray) -> None: np.testing.assert_array_equal(feret.sort_clockwise(hull), target) +@pytest.mark.parametrize( + ("lower_hull", "upper_hull", "line", "precision", "within"), + [ + # pytest.param( + # np.asarray([[0, 0], [0, 5], [5, 5]]), + # np.asarray([[0, 0], [5, 0], [5, 5]]), + # np.asarray([[3, 3], [4, 4]]), + # 6, + # [True], + # id="Square with line inside.", + # ), + # pytest.param( + # np.asarray([[0, 0], [0, 5], [5, 5]]), + # np.asarray([[0, 0], [5, 0], [5, 5]]), + # np.asarray([[3, 3], [3, 6]]), + # 6, + # False, + # id="Square with line extending outside", + # ), + # pytest.param( + # np.asarray([[0, 0], [0, 5], [5, 5]]), + # np.asarray([[0, 0], [5, 0], [5, 5]]), + # np.asarray([[0, 0], [0, 6]]), + # 6, + # False, + # id="Square with line extending beyond top edge", + # ), + # pytest.param( + # np.asarray([[0, 0], [0, 5], [5, 5]]), + # np.asarray([[0, 0], [5, 0], [5, 5]]), + # np.asarray([[0, 3], [3, 3]]), + # 6, + # True, + # id="Square with line on part of top edge", + # ), + # pytest.param( + # np.asarray([[0, 0], [0, 5], [5, 5]]), + # np.asarray([[0, 0], [5, 0], [5, 5]]), + # np.asarray([[0, 5], [5, 5]]), + # 6, + # True, + # id="Square with line identical to right edge", + # ), + # pytest.param( + # np.asarray([[1, 1], [1, 2], [2, 2]]), + # np.asarray([[1, 1], [2, 1], [2, 2]]), + # np.asarray([[2, 1], [1, 1]]), + # 6, + # True, + # id="Tiny square with line identical to right edge", + # ), + # pytest.param( + # feret.hulls(np.argwhere(holo_ellipse_angled == 1))[1], + # feret.hulls(np.argwhere(holo_ellipse_angled == 1))[0], + # np.asarray([[2, 1], [0, 2]]), + # 6, + # False, + # id="Angled ellipse incorrect min feret.", + # ), + pytest.param( + feret.hulls(arbitrary_triangle)[1], + feret.hulls(arbitrary_triangle)[0], + np.asarray([[2, 1], [0, 2]]), + 6, + False, + id="Arbitrary triangle, arbitrary outside.", + ), + pytest.param( + feret.hulls(arbitrary_triangle)[1], + feret.hulls(arbitrary_triangle)[0], + np.asarray([[1.187277, 2.961402], [2.638607, 4.55209]]), + 6, + False, + id="Arbitrary triangle, triangle height outside 1.", + ), + pytest.param( + feret.hulls(arbitrary_triangle)[1], + feret.hulls(arbitrary_triangle)[0], + np.asarray([[6.924721, 0.641475], [6.723015, 3.370548]]), + 6, + False, + id="Arbitrary triangle, triangle height outside 2.", + ), + pytest.param( + feret.hulls(arbitrary_triangle)[1], + feret.hulls(arbitrary_triangle)[0], + np.asarray([[4.14262995, 3.17983179], [3.6514255204, 1.9650272367]]), + 10, + True, + id="Arbitrary triangle, triangle height inside; precision 12.", + ), + pytest.param( + feret.hulls(arbitrary_triangle)[1], + feret.hulls(arbitrary_triangle)[0], + np.asarray([[4.14262995, 3.17983179], [3.651425, 1.965027]]), + 6, + False, + id="Arbitrary triangle, triangle height inside; precision 6 and fails to mark line as within polygon.", + ), + ], +) +def test_in_polygon( + lower_hull: npt.NDArray, upper_hull: npt.NDArray, line: npt.NDArray, precision: int, within: bool +) -> None: + """Test whether points are within polygon.""" + assert feret.in_polygon(line, lower_hull, upper_hull, precision) == within + + +@pytest.mark.parametrize( + ("point", "polygon", "within"), + [ + pytest.param( + np.asarray([3, 3]), + np.asarray([[0, 0], [0, 5], [5, 5], [5, 0]]), + True, + id="Square with point inside", + ), + pytest.param( + np.asarray([6, 6]), + np.asarray([[0, 0], [0, 5], [5, 5], [5, 0]]), + False, + id="Square with point outside", + ), + pytest.param( + np.asarray([0, 3]), + np.asarray([[0, 0], [0, 5], [5, 5], [5, 0]]), + True, + id="Square with point on top edge", + ), + pytest.param( + np.asarray([3, 0]), + np.asarray([[0, 0], [0, 5], [5, 5], [5, 0]]), + True, + id="Square with point on left edge", + ), + pytest.param( + np.asarray([5, 3]), + np.asarray([[0, 0], [0, 5], [5, 5], [5, 0]]), + True, + id="Square with point on bottom edge", + ), + pytest.param( + np.asarray([3, 5]), + np.asarray([[0, 0], [0, 5], [5, 5], [5, 0]]), + True, + id="Square with point on right edge", + ), + ], +) +def test_point_in_polygon(point: npt.NDArray, polygon: npt.NDArray, within: bool) -> None: + """Test whether points are within polygons.""" + assert feret.point_in_polygon(point, polygon) == within + + @pytest.mark.parametrize( ("lower_hull", "upper_hull", "line", "within"), [ @@ -899,8 +1193,8 @@ def test_sort_clockwise(coordinates: npt.NDArray, target: npt.NDArray) -> None: np.asarray([[0, 0], [0, 5], [5, 5]]), np.asarray([[0, 0], [5, 0], [5, 5]]), np.asarray([[3, 3], [4, 4]]), - [True], - id="Square with line inside.", + True, + id="Square with line inside", ), pytest.param( np.asarray([[0, 0], [0, 5], [5, 5]]), @@ -944,11 +1238,39 @@ def test_sort_clockwise(coordinates: npt.NDArray, target: npt.NDArray) -> None: False, id="Angled ellipse incorrect min feret.", ), + pytest.param( + feret.hulls(arbitrary_triangle)[1], + feret.hulls(arbitrary_triangle)[0], + np.asarray([[2, 1], [0, 2]]), + False, + id="Arbitrary triangle, arbitrary outside.", + ), + pytest.param( + feret.hulls(arbitrary_triangle)[1], + feret.hulls(arbitrary_triangle)[0], + np.asarray([[1.187277, 2.961402], [2.638607, 4.55209]]), + False, + id="Arbitrary triangle, triangle height outside 1.", + ), + pytest.param( + feret.hulls(arbitrary_triangle)[1], + feret.hulls(arbitrary_triangle)[0], + np.asarray([[6.924721, 0.641475], [6.723015, 3.370548]]), + False, + id="Arbitrary triangle, triangle height outside 2.", + ), + pytest.param( + feret.hulls(arbitrary_triangle)[1], + feret.hulls(arbitrary_triangle)[0], + np.asarray([[4.14262995, 3.17983179], [3.651425, 1.965027]]), + False, + id="Arbitrary triangle, triangle height inside", + ), ], ) -def test_in_polygon(lower_hull: npt.NDArray, upper_hull: npt.NDArray, line: list, within: bool) -> None: - """Test whether points are within polygon.""" - np.testing.assert_array_equal(feret.in_polygon(line, lower_hull, upper_hull), within) +def test_line_in_polygon(lower_hull: npt.NDArray, upper_hull: npt.NDArray, line: npt.NDArray, within: bool) -> None: + """Test whether points are within hull.""" + assert feret.line_in_polygon(line, lower_hull, upper_hull) == within @pytest.mark.parametrize( @@ -966,6 +1288,7 @@ def test_in_polygon(lower_hull: npt.NDArray, upper_hull: npt.NDArray, line: list 0, 1.4142135623730951, ([0, 1], [1, 0]), + # ([1, 2], [0, 1]), 2.0, ([2, 1], [0, 1]), id="tiny circle sorted on axis 0", @@ -1035,7 +1358,13 @@ def test_in_polygon(lower_hull: npt.NDArray, upper_hull: npt.NDArray, line: list id="small circle sorted on axis 0", ), pytest.param( - holo_circle, 0, 4.0, ([1, 2], [5, 2]), 4.47213595499958, ([5, 4], [1, 2]), id="holo circle sorted on axis 0" + holo_circle, + 0, + 4.0, + ([1, 2], [5, 2]), + 4.47213595499958, + ([5, 4], [1, 2]), + id="holo circle sorted on axis 0", ), pytest.param( holo_ellipse_horizontal, @@ -1200,7 +1529,7 @@ def test_get_feret_from_mask( ], ) def test_get_feret_from_labelim(shape: npt.NDArray, axis: int, target: dict) -> None: - """Test calculation of min/max feret for a labelled image with multiuple objects.""" + """Test calculation of min/max feret for a labelled image with multiple objects.""" min_max_feret_size_coord = feret.get_feret_from_labelim(shape, axis=axis) for key, value in min_max_feret_size_coord.items(): # Min Feret diff --git a/topostats/measure/feret.py b/topostats/measure/feret.py index 520e4bff51..9cfbf86557 100644 --- a/topostats/measure/feret.py +++ b/topostats/measure/feret.py @@ -21,6 +21,7 @@ import numpy.typing as npt import skimage.morphology from shapely import LineString, Polygon, contains +from shapely.ops import transform from topostats.logs.logs import LOGGER_NAME @@ -260,11 +261,7 @@ def _min_feret_coord( Coordinates of the point perpendicular to the base line that is opposite the apex, this line is the minimum feret distance for acute triangles (but not scalene triangles). """ - - def angle_between(apex, b): - return np.arccos(np.dot(apex, b) / (np.linalg.norm(apex) * np.linalg.norm(b))) - - angle_apex_base1_base2 = angle_between(apex - base1, base2 - base1) + angle_apex_base1_base2 = _angle_between(apex - base1, base2 - base1) len_apex_base2 = np.linalg.norm(apex - base1) cos_apex_base1_base2 = np.cos(angle_apex_base1_base2) k = len_apex_base2 * cos_apex_base1_base2 @@ -278,6 +275,25 @@ def angle_between(apex, b): return np.asarray([d[0], d[1]]) +def _angle_between(apex: npt.NDArray, b: npt.NDArray) -> float: + """ + Calculate the angle between the apex and base of the triangle. + + Parameters + ---------- + apex: npt.NDArray + Difference between apex and base1 coordinates. + b: npt.NDArray + Difference between base2 and base1 coordinates. + + Returns + ------- + float + The angle between the base and the apex. + """ + return np.arccos(np.dot(apex, b) / (np.linalg.norm(apex) * np.linalg.norm(b))) + + def sort_clockwise(coordinates: npt.NDArray) -> npt.NDArray: """Sort an array of coordinates in a clockwise order. @@ -310,7 +326,7 @@ def sort_clockwise(coordinates: npt.NDArray) -> npt.NDArray: return coordinates[order] -def in_polygon(line: npt.NDArray, lower_hull: npt.NDArray, upper_hull: npt.NDArray) -> bool: +def in_polygon(line: npt.NDArray, lower_hull: npt.NDArray, upper_hull: npt.NDArray, precision: int | None = 6) -> bool: """ Check whether a line is within or on the edge of a polygon. @@ -329,6 +345,8 @@ def in_polygon(line: npt.NDArray, lower_hull: npt.NDArray, upper_hull: npt.NDArr The lower convex hull. upper_hull : npt.NDArray The upper convex hull of the polygon. + precision : int | None + Precision to round line points to when testing if line is within the polygon. Returns ------- @@ -353,10 +371,133 @@ def in_polygon(line: npt.NDArray, lower_hull: npt.NDArray, upper_hull: npt.NDArr if list(line.coords) == list(edge.coords): return True edge_count += 1 + + # Refine the precision of the lines if required + # if precision is not None: + # line = round_geom(line, precision) return contains(polygon, line) -def min_max_feret(points: npt.NDArray, axis: int = 0) -> tuple[float, tuple[int, int], float, tuple[int, int]]: +def point_in_polygon(point: npt.NDarray, polygon: npt.NDArray) -> bool: + """ + Raycasting Algorithm to find whether a point is in a given polygon. + + Performs the even-odd-rule Algorithm to find out whether a point is in a given polygon. + This runs in O(n) where n is the number of edges of the polygon. + + Parameters + ---------- + point : npt.NDArray + coordinates of a point. + polygon : npt.NDArray + Hull (typically convex) of coordinates forming the polygon. + + Returns + ------- + bool + Whether the point is in the polygon (not on the edge, just turn < into <= and > into >= for that) + """ + # A point is in a polygon if a line from the point to infinity crosses the polygon an odd number of times + odd_right = False + odd_left = False + # For each edge (In this case for each point of the polygon and the previous one) + i = 0 + j = len(polygon) - 1 + while i < len(polygon) - 1: + i = i + 1 + # If a line from the point stretching rightwards crosses the edge it is within the polygon. + if ((polygon[i][1] >= point[1]) != (polygon[j][1] >= point[1])) and ( + point[0] + <= ((polygon[j][0] - polygon[i][0]) * (point[1] - polygon[i][1]) / (polygon[j][1] - polygon[i][1])) + + polygon[i][0] + ): + # Invert odd + odd_right = not odd_right + # ...and check the other direction to make sure its not on the edge. + if ((polygon[i][1] <= point[1]) != (polygon[j][1] <= point[1])) and ( + point[0] + >= ((polygon[j][0] - polygon[i][0]) * (point[1] - polygon[i][1]) / (polygon[j][1] - polygon[i][1])) + + polygon[i][0] + ): + # Invert odd + odd_right = not odd_right + j = i + # If the number of crossings was odd, the point is in the polygon + return True if odd_left or odd_right else False + + +def line_in_polygon(line: npt.NDArray, lower_hull: npt.NDArray, upper_hull: npt.NDArray) -> bool: + """Determine if either points of a line are within a polygon. + + Parameters + ---------- + line : npt.NDArray + Numpy array defining the coordinates of a single, linear line. + lower_hull : npt.NDArray + The lower convex hull. + upper_hull : npt.NDArray + The upper convex hull of the polygon. + + Returns + ------- + bool + Indicator of whether both points of the line are within the hull/polygon. + """ + polygon = np.unique(np.concatenate([lower_hull, upper_hull], axis=0), axis=0) + n_inside = 0 + for point in line: + if point_in_polygon(point, polygon): + n_inside += 1 + return True if n_inside == 2 else False + + +def round_geom(geom: Polygon | LineString, precision: int = 12) -> Polygon | LineString: + """ + Transform the precision of coordinates of a Shapely geom. + + Parameters + ---------- + geom : LineString + coordinates of line to be rounded. + ndigits : int + Precision to round points to. + + Returns + ------- + Polygon | LineString + Shapely object with points to specified precision. + """ + + def _round_geom(x, y, z=None): + """ + Round the points. + + Parameters + ---------- + x : int | float + The x coordinate. + y : int | float + The y coordinate. + z : int | float + The z coordinate. + + Returns + ------- + list + List of rounded coordinates. + """ + x = round(x, precision) + y = round(y, precision) + if z is not None: + z = round(z, precision) + return [c for c in (x, y, z) if c is not None] + + return transform(_round_geom, geom) + + +def min_max_feret( + points: npt.NDArray, axis: int = 0, precision: int = 6 +) -> tuple[float, tuple[int, int], float, tuple[int, int]]: """ Given a list of 2-D points, returns the minimum and maximum feret diameters. @@ -368,6 +509,8 @@ def min_max_feret(points: npt.NDArray, axis: int = 0) -> tuple[float, tuple[int, A 2-D array of points for the outline of an object. axis : int Which axis to sort coordinates on, 0 for row (default); 1 for columns. + precision : int + Number of decimal places passed on to in_polygon() for rounding. Returns ------- @@ -388,8 +531,14 @@ def min_max_feret(points: npt.NDArray, axis: int = 0) -> tuple[float, tuple[int, # Determine minimum feret (and coordinates) from all caliper triangles, but only if the min_feret_coords (y) are # within the polygon hull = hulls(points) + print(f"{min_ferets=}") + print(f"{min_feret_coords=}") + for min_feret_coord in min_feret_coords: + print(f"{in_polygon(min_feret_coord, hull[0], hull[1])=}") triangle_min_feret = [ - [x, (list(map(list, y)))] for x, y in zip(min_ferets, min_feret_coords) if in_polygon(y, hull[0], hull[1]) + [x, (list(map(list, y)))] + for x, y in zip(min_ferets, min_feret_coords) + if in_polygon(y, hull[0], hull[1], precision) ] min_feret, min_feret_coord = min(triangle_min_feret) return min_feret, np.asarray(min_feret_coord), sqrt(max_feret_sq), np.asarray(max_feret_coord) @@ -452,12 +601,12 @@ def get_feret_from_labelim(label_image: npt.NDArray, labels: None | list | set = def plot_feret( # pylint: disable=too-many-arguments,too-many-locals # noqa: C901 points: npt.NDArray, axis: int = 0, - plot_points: str = "k", - plot_hulls: tuple = ("g-", "r-"), - plot_calipers: str = "y-", - plot_triangle_heights: str = "b:", - plot_min_feret: str = "m--", - plot_max_feret: str = "m--", + plot_points: str | None = "k", + plot_hulls: tuple | None = ("g-", "r-"), + plot_calipers: str | None = "y-", + plot_triangle_heights: str | None = "b:", + plot_min_feret: str | None = "m--", + plot_max_feret: str | None = "m--", filename: str | Path | None = "./feret.png", show: bool = False, ) -> None: @@ -475,19 +624,19 @@ def plot_feret( # pylint: disable=too-many-arguments,too-many-locals # noqa: C9 Points to be plotted which form the shape of interest. axis : int Which axis to sort coordinates on, 0 for row (default); 1 for columns. (Should give the same results!). - plot_points : str + plot_points : str | None Format string for plotting points. If 'None' points are not plotted. - plot_hulls : tuple + plot_hulls : tuple | None Tuple of length 2 of format strings for plotting the convex hull, these should differe to allow distinction between hulls. If 'None' hulls are not plotted. - plot_calipers : str + plot_calipers : str | None Format string for plotting calipers. If 'None' calipers are not plotted. - plot_triangle_heights : str + plot_triangle_heights : str | None Format string for plotting the triangle heights used in calulcating the minimum feret. These should cross the opposite edge perpendicularly. If 'None' triangle heights are not plotted. - plot_min_feret : str + plot_min_feret : str | None Format string for plotting the minimum feret. If 'None' the minimum feret is not plotted. - plot_max_feret : str + plot_max_feret : str | None Format string for plotting the maximum feret. If 'None' the maximum feret is not plotted. filename : str | Path | None Location to save the image to. From f964cf134ec227d9799a83851945e83b37c15782 Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Fri, 22 Mar 2024 12:03:48 +0000 Subject: [PATCH 33/35] Just return min/max feret distances and coordinates After discussion with @SylivaWhittle and @llwiggins it was decided that because of the issue of minimum feret coordinates sometimes falling outside of the convex hull that we should not use it as a consistent line through the grain/image. Instead we will use the maximum feret and a line perpendicular to the mid-point of the maximum feret. As such all attempts to work out if minimum feret coordinates/lines were inside or on the edge of a polygon have now been removed and the function returns a dictionary of... + `min_feret` + `min_feret_coords` + `max_feret` + `max_feret_coords` The dictionary should be conducive to being saved in the HDF5 output (perhaps a separate issue to do so). --- tests/measure/test_feret.py | 312 +++++------------------------------- topostats/measure/feret.py | 203 ++--------------------- 2 files changed, 55 insertions(+), 460 deletions(-) diff --git a/tests/measure/test_feret.py b/tests/measure/test_feret.py index 7fcd49a758..aace4c8dfe 100644 --- a/tests/measure/test_feret.py +++ b/tests/measure/test_feret.py @@ -1032,247 +1032,6 @@ def test_sort_clockwise(coordinates: npt.NDArray, target: npt.NDArray) -> None: np.testing.assert_array_equal(feret.sort_clockwise(hull), target) -@pytest.mark.parametrize( - ("lower_hull", "upper_hull", "line", "precision", "within"), - [ - # pytest.param( - # np.asarray([[0, 0], [0, 5], [5, 5]]), - # np.asarray([[0, 0], [5, 0], [5, 5]]), - # np.asarray([[3, 3], [4, 4]]), - # 6, - # [True], - # id="Square with line inside.", - # ), - # pytest.param( - # np.asarray([[0, 0], [0, 5], [5, 5]]), - # np.asarray([[0, 0], [5, 0], [5, 5]]), - # np.asarray([[3, 3], [3, 6]]), - # 6, - # False, - # id="Square with line extending outside", - # ), - # pytest.param( - # np.asarray([[0, 0], [0, 5], [5, 5]]), - # np.asarray([[0, 0], [5, 0], [5, 5]]), - # np.asarray([[0, 0], [0, 6]]), - # 6, - # False, - # id="Square with line extending beyond top edge", - # ), - # pytest.param( - # np.asarray([[0, 0], [0, 5], [5, 5]]), - # np.asarray([[0, 0], [5, 0], [5, 5]]), - # np.asarray([[0, 3], [3, 3]]), - # 6, - # True, - # id="Square with line on part of top edge", - # ), - # pytest.param( - # np.asarray([[0, 0], [0, 5], [5, 5]]), - # np.asarray([[0, 0], [5, 0], [5, 5]]), - # np.asarray([[0, 5], [5, 5]]), - # 6, - # True, - # id="Square with line identical to right edge", - # ), - # pytest.param( - # np.asarray([[1, 1], [1, 2], [2, 2]]), - # np.asarray([[1, 1], [2, 1], [2, 2]]), - # np.asarray([[2, 1], [1, 1]]), - # 6, - # True, - # id="Tiny square with line identical to right edge", - # ), - # pytest.param( - # feret.hulls(np.argwhere(holo_ellipse_angled == 1))[1], - # feret.hulls(np.argwhere(holo_ellipse_angled == 1))[0], - # np.asarray([[2, 1], [0, 2]]), - # 6, - # False, - # id="Angled ellipse incorrect min feret.", - # ), - pytest.param( - feret.hulls(arbitrary_triangle)[1], - feret.hulls(arbitrary_triangle)[0], - np.asarray([[2, 1], [0, 2]]), - 6, - False, - id="Arbitrary triangle, arbitrary outside.", - ), - pytest.param( - feret.hulls(arbitrary_triangle)[1], - feret.hulls(arbitrary_triangle)[0], - np.asarray([[1.187277, 2.961402], [2.638607, 4.55209]]), - 6, - False, - id="Arbitrary triangle, triangle height outside 1.", - ), - pytest.param( - feret.hulls(arbitrary_triangle)[1], - feret.hulls(arbitrary_triangle)[0], - np.asarray([[6.924721, 0.641475], [6.723015, 3.370548]]), - 6, - False, - id="Arbitrary triangle, triangle height outside 2.", - ), - pytest.param( - feret.hulls(arbitrary_triangle)[1], - feret.hulls(arbitrary_triangle)[0], - np.asarray([[4.14262995, 3.17983179], [3.6514255204, 1.9650272367]]), - 10, - True, - id="Arbitrary triangle, triangle height inside; precision 12.", - ), - pytest.param( - feret.hulls(arbitrary_triangle)[1], - feret.hulls(arbitrary_triangle)[0], - np.asarray([[4.14262995, 3.17983179], [3.651425, 1.965027]]), - 6, - False, - id="Arbitrary triangle, triangle height inside; precision 6 and fails to mark line as within polygon.", - ), - ], -) -def test_in_polygon( - lower_hull: npt.NDArray, upper_hull: npt.NDArray, line: npt.NDArray, precision: int, within: bool -) -> None: - """Test whether points are within polygon.""" - assert feret.in_polygon(line, lower_hull, upper_hull, precision) == within - - -@pytest.mark.parametrize( - ("point", "polygon", "within"), - [ - pytest.param( - np.asarray([3, 3]), - np.asarray([[0, 0], [0, 5], [5, 5], [5, 0]]), - True, - id="Square with point inside", - ), - pytest.param( - np.asarray([6, 6]), - np.asarray([[0, 0], [0, 5], [5, 5], [5, 0]]), - False, - id="Square with point outside", - ), - pytest.param( - np.asarray([0, 3]), - np.asarray([[0, 0], [0, 5], [5, 5], [5, 0]]), - True, - id="Square with point on top edge", - ), - pytest.param( - np.asarray([3, 0]), - np.asarray([[0, 0], [0, 5], [5, 5], [5, 0]]), - True, - id="Square with point on left edge", - ), - pytest.param( - np.asarray([5, 3]), - np.asarray([[0, 0], [0, 5], [5, 5], [5, 0]]), - True, - id="Square with point on bottom edge", - ), - pytest.param( - np.asarray([3, 5]), - np.asarray([[0, 0], [0, 5], [5, 5], [5, 0]]), - True, - id="Square with point on right edge", - ), - ], -) -def test_point_in_polygon(point: npt.NDArray, polygon: npt.NDArray, within: bool) -> None: - """Test whether points are within polygons.""" - assert feret.point_in_polygon(point, polygon) == within - - -@pytest.mark.parametrize( - ("lower_hull", "upper_hull", "line", "within"), - [ - pytest.param( - np.asarray([[0, 0], [0, 5], [5, 5]]), - np.asarray([[0, 0], [5, 0], [5, 5]]), - np.asarray([[3, 3], [4, 4]]), - True, - id="Square with line inside", - ), - pytest.param( - np.asarray([[0, 0], [0, 5], [5, 5]]), - np.asarray([[0, 0], [5, 0], [5, 5]]), - np.asarray([[3, 3], [3, 6]]), - False, - id="Square with line extending outside", - ), - pytest.param( - np.asarray([[0, 0], [0, 5], [5, 5]]), - np.asarray([[0, 0], [5, 0], [5, 5]]), - np.asarray([[0, 0], [0, 6]]), - False, - id="Square with line extending beyond top edge", - ), - pytest.param( - np.asarray([[0, 0], [0, 5], [5, 5]]), - np.asarray([[0, 0], [5, 0], [5, 5]]), - np.asarray([[0, 3], [3, 3]]), - True, - id="Square with line on part of top edge", - ), - pytest.param( - np.asarray([[0, 0], [0, 5], [5, 5]]), - np.asarray([[0, 0], [5, 0], [5, 5]]), - np.asarray([[0, 5], [5, 5]]), - True, - id="Square with line identical to right edge", - ), - pytest.param( - np.asarray([[1, 1], [1, 2], [2, 2]]), - np.asarray([[1, 1], [2, 1], [2, 2]]), - np.asarray([[2, 1], [1, 1]]), - True, - id="Tiny square with line identical to right edge", - ), - pytest.param( - feret.hulls(np.argwhere(holo_ellipse_angled == 1))[1], - feret.hulls(np.argwhere(holo_ellipse_angled == 1))[0], - np.asarray([[2, 1], [0, 2]]), - False, - id="Angled ellipse incorrect min feret.", - ), - pytest.param( - feret.hulls(arbitrary_triangle)[1], - feret.hulls(arbitrary_triangle)[0], - np.asarray([[2, 1], [0, 2]]), - False, - id="Arbitrary triangle, arbitrary outside.", - ), - pytest.param( - feret.hulls(arbitrary_triangle)[1], - feret.hulls(arbitrary_triangle)[0], - np.asarray([[1.187277, 2.961402], [2.638607, 4.55209]]), - False, - id="Arbitrary triangle, triangle height outside 1.", - ), - pytest.param( - feret.hulls(arbitrary_triangle)[1], - feret.hulls(arbitrary_triangle)[0], - np.asarray([[6.924721, 0.641475], [6.723015, 3.370548]]), - False, - id="Arbitrary triangle, triangle height outside 2.", - ), - pytest.param( - feret.hulls(arbitrary_triangle)[1], - feret.hulls(arbitrary_triangle)[0], - np.asarray([[4.14262995, 3.17983179], [3.651425, 1.965027]]), - False, - id="Arbitrary triangle, triangle height inside", - ), - ], -) -def test_line_in_polygon(lower_hull: npt.NDArray, upper_hull: npt.NDArray, line: npt.NDArray, within: bool) -> None: - """Test whether points are within hull.""" - assert feret.line_in_polygon(line, lower_hull, upper_hull) == within - - @pytest.mark.parametrize( ( "shape", @@ -1288,7 +1047,6 @@ def test_line_in_polygon(lower_hull: npt.NDArray, upper_hull: npt.NDArray, line: 0, 1.4142135623730951, ([0, 1], [1, 0]), - # ([1, 2], [0, 1]), 2.0, ([2, 1], [0, 1]), id="tiny circle sorted on axis 0", @@ -1388,7 +1146,7 @@ def test_line_in_polygon(lower_hull: npt.NDArray, upper_hull: npt.NDArray, line: holo_ellipse_angled, 0, 2.82842712474619, - ([3, 2], [1, 4]), + ([0, 3], [2, 1]), 7.615773105863909, ([2, 1], [5, 8]), id="holo ellipse angled on axis 0", @@ -1422,13 +1180,11 @@ def test_min_max_feret( max_feret_coord_target: list, ) -> None: """Test calculation of min/max feret.""" - min_feret_distance, min_feret_coord, max_feret_distance, max_feret_coord = feret.min_max_feret( - np.argwhere(shape == 1), axis - ) - np.testing.assert_approx_equal(min_feret_distance, min_feret_distance_target) - np.testing.assert_array_almost_equal(min_feret_coord, min_feret_coord_target) - np.testing.assert_approx_equal(max_feret_distance, max_feret_distance_target) - np.testing.assert_array_almost_equal(max_feret_coord, max_feret_coord_target) + feret_statistics = feret.min_max_feret(np.argwhere(shape == 1), axis) + np.testing.assert_approx_equal(feret_statistics["min_feret"], min_feret_distance_target) + np.testing.assert_array_almost_equal(feret_statistics["min_feret_coords"], min_feret_coord_target) + np.testing.assert_approx_equal(feret_statistics["max_feret"], max_feret_distance_target) + np.testing.assert_array_almost_equal(feret_statistics["max_feret_coords"], max_feret_coord_target) @pytest.mark.parametrize( @@ -1471,8 +1227,8 @@ def test_min_max_feret( pytest.param( filled_ellipse_angled, 0, - 5.65685424949238, - ([6.0, 7.0], [2.0, 3.0]), + 5.366563145999495, + ([1.2, 4.6], [6.0, 7.0]), 8.94427190999916, ([6, 1], [2, 9]), id="filled ellipse angled sorted on axis 0", @@ -1488,11 +1244,11 @@ def test_get_feret_from_mask( max_feret_coord_target: list, ) -> None: """Test calculation of min/max feret for a single masked object.""" - min_feret_distance, min_feret_coord, max_feret_distance, max_feret_coord = feret.get_feret_from_mask(shape, axis) - np.testing.assert_approx_equal(min_feret_distance, min_feret_distance_target) - np.testing.assert_array_almost_equal(min_feret_coord, min_feret_coord_target) - np.testing.assert_approx_equal(max_feret_distance, max_feret_distance_target) - np.testing.assert_array_almost_equal(max_feret_coord, max_feret_coord_target) + feret_statistics = feret.get_feret_from_mask(shape, axis) + np.testing.assert_approx_equal(feret_statistics["min_feret"], min_feret_distance_target) + np.testing.assert_array_almost_equal(feret_statistics["min_feret_coords"], min_feret_coord_target) + np.testing.assert_approx_equal(feret_statistics["max_feret"], max_feret_distance_target) + np.testing.assert_array_almost_equal(feret_statistics["max_feret_coords"], max_feret_coord_target) # Concatenate images to have two labeled objects within them @@ -1512,8 +1268,18 @@ def test_get_feret_from_mask( holo_image, 0, { - 1: (4.0, ([1.0, 2.0], [5.0, 2.0]), 4.47213595499958, ([5, 4], [1, 2])), - 2: (2.82842712474619, ([11.0, 2.0], [9.0, 4.0]), 7.615773105863909, ([10, 1], [13, 8])), + 1: { + "min_feret": 4.0, + "min_feret_coords": ([1.0, 2.0], [5.0, 2.0]), + "max_feret": 4.47213595499958, + "max_feret_coords": ([5, 4], [1, 2]), + }, + 2: { + "min_feret": 2.82842712474619, + "min_feret_coords": ([8.0, 3.0], [10.0, 1.0]), + "max_feret": 7.615773105863909, + "max_feret_coords": ([10, 1], [13, 8]), + }, }, id="holo image", ), @@ -1521,8 +1287,18 @@ def test_get_feret_from_mask( filled_image, 0, { - 1: (6.0, ([1.0, 2.0], [7.0, 2.0]), 7.211102550927978, ([7, 6], [1, 2])), - 2: (5.366563145999495, ([10.2, 4.6], [15, 7]), 8.94427190999916, ([15, 1], [11, 9])), + 1: { + "min_feret": 6.0, + "min_feret_coords": ([1.0, 2.0], [7.0, 2.0]), + "max_feret": 7.211102550927978, + "max_feret_coords": ([7, 6], [1, 2]), + }, + 2: { + "min_feret": 5.366563145999495, + "min_feret_coords": ([10.2, 4.6], [15, 7]), + "max_feret": 8.94427190999916, + "max_feret_coords": ([15, 1], [11, 9]), + }, }, id="filled image", ), @@ -1531,15 +1307,11 @@ def test_get_feret_from_mask( def test_get_feret_from_labelim(shape: npt.NDArray, axis: int, target: dict) -> None: """Test calculation of min/max feret for a labelled image with multiple objects.""" min_max_feret_size_coord = feret.get_feret_from_labelim(shape, axis=axis) - for key, value in min_max_feret_size_coord.items(): - # Min Feret - np.testing.assert_equal(value[0], target[key][0]) - # Min Feret coordinates - np.testing.assert_array_almost_equal(value[1], target[key][1]) - # Max Feret - np.testing.assert_equal(value[2], target[key][2]) - # Max Feret coordinates - np.testing.assert_array_almost_equal(value[3], target[key][3]) + for key, feret_statistics in min_max_feret_size_coord.items(): + np.testing.assert_equal(feret_statistics["min_feret"], target[key]["min_feret"]) + np.testing.assert_array_almost_equal(feret_statistics["min_feret_coords"], target[key]["min_feret_coords"]) + np.testing.assert_equal(feret_statistics["max_feret"], target[key]["max_feret"]) + np.testing.assert_array_almost_equal(feret_statistics["max_feret_coords"], target[key]["max_feret_coords"]) @pytest.mark.parametrize( diff --git a/topostats/measure/feret.py b/topostats/measure/feret.py index 9cfbf86557..14afa74be2 100644 --- a/topostats/measure/feret.py +++ b/topostats/measure/feret.py @@ -20,8 +20,6 @@ import numpy as np import numpy.typing as npt import skimage.morphology -from shapely import LineString, Polygon, contains -from shapely.ops import transform from topostats.logs.logs import LOGGER_NAME @@ -326,178 +324,7 @@ def sort_clockwise(coordinates: npt.NDArray) -> npt.NDArray: return coordinates[order] -def in_polygon(line: npt.NDArray, lower_hull: npt.NDArray, upper_hull: npt.NDArray, precision: int | None = 6) -> bool: - """ - Check whether a line is within or on the edge of a polygon. - - If either or both of the line points the edges of the polygon this is considered to be within, but if one of the - points is outside of the polygon it is not contained within. Uses Shapely for most checks but it was found that if a - given line was identical to one of the edges of the polygon it was considered to be outside and this is not the - desired behaviour as such lines, typically the height of triangles used when determining minimum feret distances, - are the values we wish to retain. It is only lines with points that are completely outside of the polygon that we - wish to exclude. - - Parameters - ---------- - line : npt.NDArray - Numpy array defining the coordinates of a single, linear line. - lower_hull : npt.NDArray - The lower convex hull. - upper_hull : npt.NDArray - The upper convex hull of the polygon. - precision : int | None - Precision to round line points to when testing if line is within the polygon. - - Returns - ------- - bool - Whether the line is contained within or is on the border of the polygon. - """ - # Combine the upper and lower hulls - hull = np.unique(np.concatenate([lower_hull, upper_hull], axis=0), axis=0) - # Sort the hull and create Polygon (closes the shape for testing last edge) - polygon = Polygon(sort_clockwise(hull)) - # Extract coordinates for comparison to line. - x, y = polygon.exterior.coords.xy - closed_shape = np.asarray(tuple(zip(x, y))) - # Check whether the line (notionally the triangle height) is equivalent to one of the edges. Required as Shapely - # returns False in such situations. - line = LineString(sort_clockwise(line)) - length = len(closed_shape) - edge_count = 0 - while edge_count < length - 1: - sorted_edge = sort_clockwise(closed_shape[edge_count : edge_count + 2]) - edge = LineString(sorted_edge) - if list(line.coords) == list(edge.coords): - return True - edge_count += 1 - - # Refine the precision of the lines if required - # if precision is not None: - # line = round_geom(line, precision) - return contains(polygon, line) - - -def point_in_polygon(point: npt.NDarray, polygon: npt.NDArray) -> bool: - """ - Raycasting Algorithm to find whether a point is in a given polygon. - - Performs the even-odd-rule Algorithm to find out whether a point is in a given polygon. - This runs in O(n) where n is the number of edges of the polygon. - - Parameters - ---------- - point : npt.NDArray - coordinates of a point. - polygon : npt.NDArray - Hull (typically convex) of coordinates forming the polygon. - - Returns - ------- - bool - Whether the point is in the polygon (not on the edge, just turn < into <= and > into >= for that) - """ - # A point is in a polygon if a line from the point to infinity crosses the polygon an odd number of times - odd_right = False - odd_left = False - # For each edge (In this case for each point of the polygon and the previous one) - i = 0 - j = len(polygon) - 1 - while i < len(polygon) - 1: - i = i + 1 - # If a line from the point stretching rightwards crosses the edge it is within the polygon. - if ((polygon[i][1] >= point[1]) != (polygon[j][1] >= point[1])) and ( - point[0] - <= ((polygon[j][0] - polygon[i][0]) * (point[1] - polygon[i][1]) / (polygon[j][1] - polygon[i][1])) - + polygon[i][0] - ): - # Invert odd - odd_right = not odd_right - # ...and check the other direction to make sure its not on the edge. - if ((polygon[i][1] <= point[1]) != (polygon[j][1] <= point[1])) and ( - point[0] - >= ((polygon[j][0] - polygon[i][0]) * (point[1] - polygon[i][1]) / (polygon[j][1] - polygon[i][1])) - + polygon[i][0] - ): - # Invert odd - odd_right = not odd_right - j = i - # If the number of crossings was odd, the point is in the polygon - return True if odd_left or odd_right else False - - -def line_in_polygon(line: npt.NDArray, lower_hull: npt.NDArray, upper_hull: npt.NDArray) -> bool: - """Determine if either points of a line are within a polygon. - - Parameters - ---------- - line : npt.NDArray - Numpy array defining the coordinates of a single, linear line. - lower_hull : npt.NDArray - The lower convex hull. - upper_hull : npt.NDArray - The upper convex hull of the polygon. - - Returns - ------- - bool - Indicator of whether both points of the line are within the hull/polygon. - """ - polygon = np.unique(np.concatenate([lower_hull, upper_hull], axis=0), axis=0) - n_inside = 0 - for point in line: - if point_in_polygon(point, polygon): - n_inside += 1 - return True if n_inside == 2 else False - - -def round_geom(geom: Polygon | LineString, precision: int = 12) -> Polygon | LineString: - """ - Transform the precision of coordinates of a Shapely geom. - - Parameters - ---------- - geom : LineString - coordinates of line to be rounded. - ndigits : int - Precision to round points to. - - Returns - ------- - Polygon | LineString - Shapely object with points to specified precision. - """ - - def _round_geom(x, y, z=None): - """ - Round the points. - - Parameters - ---------- - x : int | float - The x coordinate. - y : int | float - The y coordinate. - z : int | float - The z coordinate. - - Returns - ------- - list - List of rounded coordinates. - """ - x = round(x, precision) - y = round(y, precision) - if z is not None: - z = round(z, precision) - return [c for c in (x, y, z) if c is not None] - - return transform(_round_geom, geom) - - -def min_max_feret( - points: npt.NDArray, axis: int = 0, precision: int = 6 -) -> tuple[float, tuple[int, int], float, tuple[int, int]]: +def min_max_feret(points: npt.NDArray, axis: int = 0) -> tuple[float, tuple[int, int], float, tuple[int, int]]: """ Given a list of 2-D points, returns the minimum and maximum feret diameters. @@ -530,18 +357,14 @@ def min_max_feret( max_feret_sq, max_feret_coord = max(squared_distance_per_pair) # Determine minimum feret (and coordinates) from all caliper triangles, but only if the min_feret_coords (y) are # within the polygon - hull = hulls(points) - print(f"{min_ferets=}") - print(f"{min_feret_coords=}") - for min_feret_coord in min_feret_coords: - print(f"{in_polygon(min_feret_coord, hull[0], hull[1])=}") - triangle_min_feret = [ - [x, (list(map(list, y)))] - for x, y in zip(min_ferets, min_feret_coords) - if in_polygon(y, hull[0], hull[1], precision) - ] + triangle_min_feret = [[x, (list(map(list, y)))] for x, y in zip(min_ferets, min_feret_coords)] min_feret, min_feret_coord = min(triangle_min_feret) - return min_feret, np.asarray(min_feret_coord), sqrt(max_feret_sq), np.asarray(max_feret_coord) + return { + "min_feret": min_feret, + "min_feret_coords": np.asarray(min_feret_coord), + "max_feret": sqrt(max_feret_sq), + "max_feret_coords": np.asarray(max_feret_coord), + } def get_feret_from_mask(mask_im: npt.NDArray, axis: int = 0) -> tuple[float, tuple[int, int], float, tuple[int, int]]: @@ -681,9 +504,9 @@ def plot_feret( # pylint: disable=too-many-arguments,too-many-locals # noqa: C9 _, calipers, triangle_coords = zip(*min_feret_calipers_base) calipers = np.asarray(calipers) triangle_coords = np.asarray(triangle_coords) - min_feret_distance, min_feret_coords, max_feret_distance, max_feret_coords = min_max_feret(points, axis) - min_feret_coords = np.asarray(min_feret_coords) - max_feret_coords = np.asarray(max_feret_coords) + statistics = min_max_feret(points, axis) + min_feret_coords = np.asarray(statistics["min_feret_coords"]) + max_feret_coords = np.asarray(statistics["max_feret_coords"]) fig, ax = plt.subplots(1, 1) if plot_points is not None: @@ -705,7 +528,7 @@ def plot_feret( # pylint: disable=too-many-arguments,too-many-locals # noqa: C9 min_feret_coords[:, 0], min_feret_coords[:, 1], plot_min_feret, - label=f"Minimum Feret ({min_feret_distance:.3f})", + label=f"Minimum Feret ({statistics['min_feret']:.3f})", ) if plot_max_feret is not None: # for max_feret in max_feret_coords: @@ -713,7 +536,7 @@ def plot_feret( # pylint: disable=too-many-arguments,too-many-locals # noqa: C9 max_feret_coords[:, 0], max_feret_coords[:, 1], plot_max_feret, - label=f"Maximum Feret ({max_feret_distance:.3f})", + label=f"Maximum Feret ({statistics['max_feret']:.3f})", ) plt.title("Upper and Lower Convex Hulls") plt.axis("equal") From 2c50bdbb7eea5d9ced9ff0f6bdbf9f9d2c0172fd Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Fri, 22 Mar 2024 12:03:48 +0000 Subject: [PATCH 34/35] Just return min/max feret distances and coordinates After discussion with @SylivaWhittle and @llwiggins it was decided that because of the issue of minimum feret coordinates sometimes falling outside of the convex hull that we should not use it as a consistent line through the grain/image. Instead we will use the maximum feret and a line perpendicular to the mid-point of the maximum feret. As such all attempts to work out if minimum feret coordinates/lines were inside or on the edge of a polygon have now been removed and the function returns a dictionary of... + `min_feret` + `min_feret_coords` + `max_feret` + `max_feret_coords` The dictionary should be conducive to being saved in the HDF5 output (perhaps a separate issue to do so). --- topostats/measure/feret.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/topostats/measure/feret.py b/topostats/measure/feret.py index 14afa74be2..1ae7b13bb2 100644 --- a/topostats/measure/feret.py +++ b/topostats/measure/feret.py @@ -324,7 +324,7 @@ def sort_clockwise(coordinates: npt.NDArray) -> npt.NDArray: return coordinates[order] -def min_max_feret(points: npt.NDArray, axis: int = 0) -> tuple[float, tuple[int, int], float, tuple[int, int]]: +def min_max_feret(points: npt.NDArray, axis: int = 0) -> dict[float, tuple[int, int], float, tuple[int, int]]: """ Given a list of 2-D points, returns the minimum and maximum feret diameters. @@ -341,7 +341,7 @@ def min_max_feret(points: npt.NDArray, axis: int = 0) -> tuple[float, tuple[int, Returns ------- - tuple + dictionary Tuple of the minimum feret distance and its coordinates and the maximum feret distance and its coordinates. """ caliper_min_feret = list(rotating_calipers(points, axis)) From 4e3db2e61c67ee235ba80006417a64711f00dbde Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Fri, 22 Mar 2024 12:03:48 +0000 Subject: [PATCH 35/35] Just return min/max feret distances and coordinates After discussion with @SylivaWhittle and @llwiggins it was decided that because of the issue of minimum feret coordinates sometimes falling outside of the convex hull that we should not use it as a consistent line through the grain/image. Instead we will use the maximum feret and a line perpendicular to the mid-point of the maximum feret. As such all attempts to work out if minimum feret coordinates/lines were inside or on the edge of a polygon have now been removed and the function returns a dictionary of... + `min_feret` + `min_feret_coords` + `max_feret` + `max_feret_coords` The dictionary should be conducive to being saved in the HDF5 output (perhaps a separate issue to do so). --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 78b543a816..285d1dd087 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,7 +49,6 @@ dependencies = [ "scikit-image", "scipy", "seaborn", - "shapely", "snoop", "tifffile", "topofileformats",