How to use the napari.layers.image._constants.Rendering function in napari

To help you get started, we’ve selected a few napari examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github napari / napari / napari / _vispy / vispy_image_layer.py View on Github external
def _on_iso_threshold_change(self):
        rendering = self.layer.rendering
        if isinstance(rendering, str):
            rendering = Rendering(rendering)
        if self.layer.dims.ndisplay == 3 and rendering == Rendering.ISO:
            self.node.threshold = float(self.layer.iso_threshold)
            self.node.shared_program['u_threshold'] = self.node.threshold
github napari / napari / napari / layers / image / image.py View on Github external
def rendering(self, rendering):
        if isinstance(rendering, str):
            rendering = Rendering(rendering)

        self._rendering = rendering
        self.events.rendering()
github napari / napari / napari / _qt / layers / qt_image_layer.py View on Github external
def _toggle_iso_threhold_visbility(self):
        rendering = self.layer.rendering
        if isinstance(rendering, str):
            rendering = Rendering(rendering)
        if rendering == Rendering.ISO:
            self.isoThesholdSilder.show()
            self.isoThesholdLabel.show()
        else:
            self.isoThesholdSilder.hide()
            self.isoThesholdLabel.hide()
github napari / napari / napari / _qt / layers / qt_image_layer.py View on Github external
def _toggle_iso_threhold_visbility(self):
        rendering = self.layer.rendering
        if isinstance(rendering, str):
            rendering = Rendering(rendering)
        if rendering == Rendering.ISO:
            self.isoThesholdSilder.show()
            self.isoThesholdLabel.show()
        else:
            self.isoThesholdSilder.hide()
            self.isoThesholdLabel.hide()