Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# start the generator
next(i)
return inner
return f
@widgets.register
class Viewer(ViewerParent):
"""Viewer widget class."""
_view_name = Unicode('ViewerView').tag(sync=True)
_model_name = Unicode('ViewerModel').tag(sync=True)
_view_module = Unicode('itkwidgets').tag(sync=True)
_model_module = Unicode('itkwidgets').tag(sync=True)
_view_module_version = Unicode('^0.25.0').tag(sync=True)
_model_module_version = Unicode('^0.25.0').tag(sync=True)
image = ITKImage(
default_value=None,
allow_none=True,
help="Image to visualize.").tag(
sync=False,
**itkimage_serialization)
rendered_image = ITKImage(
default_value=None,
allow_none=True).tag(
sync=True,
**itkimage_serialization)
_rendering_image = CBool(
default_value=False,
help="We are currently volume rendering the image.").tag(sync=True)
interpolation = CBool(
default_value=True,
help="Use linear interpolation in slicing planes.").tag(sync=True)
@widgets.register
class Viewer(ViewerParent):
"""Viewer widget class."""
_view_name = Unicode('ViewerView').tag(sync=True)
_model_name = Unicode('ViewerModel').tag(sync=True)
_view_module = Unicode('itkwidgets').tag(sync=True)
_model_module = Unicode('itkwidgets').tag(sync=True)
_view_module_version = Unicode('^0.25.0').tag(sync=True)
_model_module_version = Unicode('^0.25.0').tag(sync=True)
image = ITKImage(
default_value=None,
allow_none=True,
help="Image to visualize.").tag(
sync=False,
**itkimage_serialization)
rendered_image = ITKImage(
default_value=None,
allow_none=True).tag(
sync=True,
**itkimage_serialization)
_rendering_image = CBool(
default_value=False,
help="We are currently volume rendering the image.").tag(sync=True)
interpolation = CBool(
default_value=True,
help="Use linear interpolation in slicing planes.").tag(sync=True)
cmap = Colormap('Viridis (matplotlib)').tag(sync=True)
_custom_cmap = NDArray(dtype=np.float32, default_value=None, allow_none=True,
help="RGB triples from 0.0 to 1.0 that define a custom linear, sequential colormap")\
.tag(sync=True, **array_serialization)\
.valid(shape_constraints(None, 3))
shadow = CBool(