Skip to content
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

Improve/reconcile SwingColorTableWidget and SwingColorBar #82

Open
imagejan opened this issue Mar 8, 2019 · 1 comment
Open

Improve/reconcile SwingColorTableWidget and SwingColorBar #82

imagejan opened this issue Mar 8, 2019 · 1 comment

Comments

@imagejan
Copy link
Member

imagejan commented Mar 8, 2019

As far as I can see, SwingColorTableWidget currently can be used to display LUTs in input dialogs, but not to actually choose a LUT from a list of available LUTs.

There's also SwingColorBar that seems to serve a similar purpose.

Let's improve the widget to act as a dropdown choice with LUT titles and color bars (with the choices populated from LUTService.findLUTs()), to make it easy to choose color tables in input dialogs.

@NicoKiaru
Copy link

I modified the ColorTable widget in order to enable choosing a LUT from it (https://github.com/NicoKiaru/imagej-ui-swing/blob/7e1ae9cdca2180193ee010baa852d24b364f5904/src/main/java/net/imagej/ui/swing/widget/SwingColorTableWidget.java)

However one problem is that it is not well suited for scriptability and recording : there is no trace of the origin of the LUT in the ColorTable object.

I discovered only after this Command https://github.com/imagej/imagej-common/blob/master/src/main/java/net/imagej/lut/LUTSelector.java
This Command uses indeed SwingColorTable Widget for display only, but the advantage is that the lut is only specified by a String from which a ColorTable can be retrieved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants