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
I don't know how to wrap get/set of color range with matplotlib like vmin and vmax properties. How to do synchronous wrapping of async Viewer methods?
Goal is something like adding this to Viewer class
@property def vmin(self): range = self.get_image_color_range() return range[0] @vmin.setter def vmin(self, vmin): range = self.get_image_color_range() range[0] = vmin self.set_image_color_range(range)
The text was updated successfully, but these errors were encountered:
Nice! The synchronous wrapping is added with the @fetch_value decorator, and you'll need to make make anything awaiting a network request async:
@fetch_value
@property @fetch_value async def vmin(self): range = await self.get_image_color_range() return range[0] @vmin.setter @fetch_value async def vmin(self, vmin): range = await self.get_image_color_range() range[0] = value self.set_image_color_range(range)
And just a reminder that if you're providing an example we need to resolve anything requiring a network request in the next cell (for now at least):
viewer.vmin = 10
vmin = viewer.vmin
vmin
Sorry, something went wrong.
ENH: Add vmin and vmax to viewer
be90d4d
Closes InsightSoftwareConsortium#723
7a74f8e
3b6e2ba
Successfully merging a pull request may close this issue.
I don't know how to wrap get/set of color range with matplotlib like vmin and vmax properties. How to do synchronous wrapping of async Viewer methods?
Goal is something like adding this to Viewer class
The text was updated successfully, but these errors were encountered: