We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The text was updated successfully, but these errors were encountered:
freehand_shapes = cs_view.cur_image_view.get_tool_state().\ get('imageIdToolState', {}).\ get('', {}).\ get('freehand', {}).\ get('data', [])
setters are much more difficult if the old state is to be preserved
old_state = cs_view.cur_image_view.get_tool_state() new_state = old_state.copy() new_state['imageIdToolState']['']['freehand']['data'] = new_shape cs_view.cur_image_view.set_tool_state(new_state)
aggressive setters are easy
freehand_defaults = {'visible': True, 'active': False, 'invalidated': False, 'canComplete': False, 'highlight': False} test_pts = [{'x': x_coord, 'y': y_coord, 'highlight': True, 'active': False} for x_coord, y_coord in zip(range(5), range(5))] new_state = {'elementToolState': {}, 'elementViewport': {}, 'imageIdToolState': {'': {'freehand': {'data': [ dict(handles=test_pts, **freehand_defaults)]}}}} cs_view.cur_image_view.set_tool_state(new_state)
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: