Skip to content

Commit

Permalink
ENH: Add clipping planes getter/setter
Browse files Browse the repository at this point in the history
  • Loading branch information
bnmajor committed Dec 11, 2023
1 parent 41b8a60 commit c1ac8a8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions itkwidgets/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,13 @@ def set_background_color(self, bgColor: List[float]):
async def get_background_color(self):
return await self.viewer_rpc.itk_viewer.getBackgroundColor()

@fetch_value
def set_cropping_planes(self, cropping_planes):
self.viewer_rpc.itk_viewer.setCroppingPlanes(cropping_planes)
@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')
Expand Down

0 comments on commit c1ac8a8

Please sign in to comment.