New issue
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
Color Transfer Function editor gadget #124
Conversation
@@ -0,0 +1,33 @@ | |||
from traits.etsconfig.api import ETSConfig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Demos should have an explanatory docstring.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add one.
It would be nice to have some tests to complement the code. |
""" A value drag tool for editing a PiecewiseFunction. | ||
""" | ||
|
||
#: The function being edited |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: I think for constancy with the rest of the code #:
-> #
I am not sure if this code belongs in |
I'm open to suggestions about where this could go. I thought about it for a while before settling on enable. I think that it's useful to code which is using mayavi or chaco (and needs to create colormaps). If I factor out the enaml bits in the way which you suggested, will this fit into enable better? |
|
rimshot |
Wow, there's no indication that you edited your comment... So, if we were to make a new ETS project called |
Yeah, sorry. Everything in the angle brackets was blacklisted as malformed-html so I had to ninja-edit it to escape them. I do wish Github would send out notifications for edits. I think there is a package's worth of potential UI widgets that are implemented in Enable/Chaco with the appropriate hooks for Traits UI and/or Enaml. For example, a double-ended slider that displays a range tool over a histogram/CDF of some dataset. Or a color selector in HuSL space and other interesting colorspaces. |
So, like I like that better than shoehorning this widget into |
Let the bikeshedding begin!
My vote is for |
👍 |
The tool behaves a bit strangely in a unit test, so I'm exercising the code but not testing it. |
Can push the unit test in a parallel branch, I might be able to help. |
I kinda think this PR should be closed and reopened on a shiny new |
To be continued at enthought/ensemble#1 |
This big chunk of code implements a CTF editor for creating/editing functions which map from some data space to RGBA values. I'm using it for a volume rendering viewer, but it could also be used for creating a colormap for an image plot.
NOTE: This code needs needs traits-enaml [1] and a recent version of enaml[2], but since it's not imported anywhere, the dependency isn't explicit.