Esempio n. 1
0
    def _imageOverlayImp(self):
        scene_image = self._scene.image()
        h, w = scene_image.shape[:2]
        overlay_image = np.zeros((h, w, 4), dtype=np.uint8)
        layer_set = self._scene.layerSet()

        for layer in layer_set.layers():
            color = layer.color()
            mask = layer.mask()
            color = 255 * np.array(color)
            overlay_image[mask>0, :] = color

        return ndarrayToQImage(overlay_image)
Esempio n. 2
0
    def _imageOverlayImp(self):
        scene_image = self._scene.image()
        h, w = scene_image.shape[:2]
        overlay_image = np.zeros((h, w, 4), dtype=np.uint8)
        layer_set = self._scene.layerSet()

        for layer in layer_set.layers():
            color = layer.color()
            mask = layer.mask()
            color = 255 * np.array(color)
            overlay_image[mask > 0, :] = color

        return ndarrayToQImage(overlay_image)
Esempio n. 3
0
    def render(self, image):
        self._image = image
        self._q_image = ndarrayToQImage(image)

        self.update()
Esempio n. 4
0
    def render(self, image):
        self._image = image
        self._q_image = ndarrayToQImage(image)

        self.update()