Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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
def rendering(self, rendering):
if isinstance(rendering, str):
rendering = Rendering(rendering)
self._rendering = rendering
self.events.rendering()
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()
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()