From af3386fc3ac8c37a65f77c7b52df102db1e0a8f6 Mon Sep 17 00:00:00 2001 From: Brianna Major Date: Wed, 6 Dec 2023 07:48:02 -0500 Subject: [PATCH] ENH: Add clipping planes getter/setter --- itkwidgets/viewer.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/itkwidgets/viewer.py b/itkwidgets/viewer.py index b0f27558..31c6eb90 100644 --- a/itkwidgets/viewer.py +++ b/itkwidgets/viewer.py @@ -242,6 +242,13 @@ def set_background_color(self, bgColor: List[float]): def get_background_color(self): return self.viewer_rpc.itk_viewer.getBackgroundColor() + @fetch_value + def set_cropping_planes(self, croppingPlanes): + self.viewer_rpc.itk_viewer.setCroppingPlanes(croppingPlanes) + @fetch_value + async def get_cropping_planes(self): + return await self.viewer_rpc.itk_viewer.getCroppingPlanes() + @fetch_value def set_image(self, image: Image, name: str = 'Image'): render_type = _detect_render_type(image, 'image')