Exemple #1
0
        def test_plates_from_image(self, image_circle):
            label = "label"
            plates = PlateCollection(shape=(1, 1))
            plates.plates_from_image(image=image_circle,
                                     diameter=180,
                                     labels={1: label})

            assert plates.count == 1
            assert plates.centers == [(102, 102)]
            assert plates.items[0].diameter == 160
            assert plates.items[0].name == label
Exemple #2
0
        def test_plates_from_image_invalid(self, image_circle):
            plates = PlateCollection()

            with pytest.raises(ValueError):
                plates.plates_from_image(image=image_circle, diameter=180)