wsidata.register_wsidata_accessor#
- register_wsidata_accessor(name)#
Register a custom accessor on WSIData objects.
Examples
Create a custom accessor for WSIData objects, the init method of the accessor class should accept a single argument, which is the WSIData object.
>>> @register_wsidata_accessor("my_accessor") ... class MyAccessor: ... def __init__(self, obj): ... self.obj = obj ... ... def my_method(self): ... return "Hello, world!"