|
14 | 14 | import uuid |
15 | 15 |
|
16 | 16 | from ._method_types import deferred_methods |
17 | | -from ._type_aliases import Gaussians, Style, Image, PointSet, CroppingPlanes |
| 17 | +from ._type_aliases import Style, Image, PointSet, CroppingPlanes, Points2d |
18 | 18 | from ._initialization_params import ( |
19 | 19 | init_params_dict, |
20 | 20 | build_config, |
@@ -784,30 +784,26 @@ async def get_image_interpolation_enabled(self) -> asyncio.Future | bool: |
784 | 784 | return await self.viewer_rpc.itk_viewer.getImageInterpolationEnabled() |
785 | 785 |
|
786 | 786 | @fetch_value |
787 | | - def set_image_piecewise_function_gaussians(self, gaussians: Gaussians) -> None: |
788 | | - """Set the volume rendering opacity transfer function Gaussian |
789 | | - parameters. For each image component, multiple Gaussians can be |
790 | | - specified. Queue the function to be run in the background thread once |
| 787 | + def set_image_piecewise_function_points(self, points: Points2d) -> None: |
| 788 | + """Set the volume rendering opacity transfer function points. |
| 789 | + Queue the function to be run in the background thread once |
791 | 790 | the plugin API is available. |
792 | 791 |
|
793 | | - :param gaussians: Opacity transfer function Gaussian |
794 | | - parameters. Default Gaussian parameters: |
795 | | - {'position': 0.5, 'height': 1, 'width': 0.5, 'xBias': 0.51, 'yBias': 0.4} |
796 | | - :type gaussians: Gaussians |
| 792 | + :param points: Opacity piecewise transfer function points. Example args: [[.2, .1], [.8, .9]] |
| 793 | + :type points2d: Points2d |
797 | 794 | """ |
798 | | - self.queue_request('setImagePiecewiseFunctionGaussians', gaussians) |
| 795 | + self.queue_request('setImagePiecewiseFunctionPoints', points) |
799 | 796 | @fetch_value |
800 | | - async def get_image_piecewise_function_gaussians( |
| 797 | + async def get_image_piecewise_function_points( |
801 | 798 | self, |
802 | | - ) -> asyncio.Future | Gaussians: |
803 | | - """Get the volume rendering opacity transfer function Gaussian |
804 | | - parameters. |
| 799 | + ) -> asyncio.Future | Points2d: |
| 800 | + """Get the volume rendering opacity transfer function points. |
805 | 801 |
|
806 | 802 | :return: The future for the coroutine, to be updated with the opacity |
807 | | - transfer function Gaussian parameters. |
808 | | - :rtype: asyncio.Future | Gaussians |
| 803 | + transfer function points. |
| 804 | + :rtype: asyncio.Future | Points2d |
809 | 805 | """ |
810 | | - return await self.viewer_rpc.itk_viewer.getImagePiecewiseFunctionGaussians() |
| 806 | + return await self.viewer_rpc.itk_viewer.getImagePiecewiseFunctionPoints() |
811 | 807 |
|
812 | 808 | @fetch_value |
813 | 809 | def set_image_shadow_enabled(self, enabled: bool) -> None: |
@@ -1500,8 +1496,8 @@ def view(data=None, **kwargs): |
1500 | 1496 | :param gradient_opacity_scale: Gradient opacity scale for composite volume rendering, in the range (0.0, 1.0]. default: 0.5 |
1501 | 1497 | :type gradient_opacity_scale: float |
1502 | 1498 |
|
1503 | | - :param gaussians: Volume rendering opacity transfer function Gaussian parameters. For each image component, multiple Gaussians can be specified. Default Gaussian parameters: {'position': 0.5, 'height': 1, 'width': 0.5, 'xBias': 0.51, 'yBias': 0.4} |
1504 | | - :type gaussians: dict |
| 1499 | + :param piecewise_function_points: Volume rendering opacity transfer function parameters. Example points arg: [[.2, .1], [.8, .9]] |
| 1500 | + :type piecewise_function_points: list |
1505 | 1501 |
|
1506 | 1502 | :param blend_mode: Volume rendering blend mode. Supported modes: 'Composite', 'Maximum', 'Minimum', 'Average'. default: 'Composite' |
1507 | 1503 | :type blend_mode: string |
|
0 commit comments