Image viewer plugin, refreshing low and high values of the slider widget

Hi folks, another image viewer plugin related question. Is it possible to update the low and high values of the slider widget based on the return values of plugin function? E.g something like this? custom_plugin = Plugin(image_filter = calc_and_show) custom_plugin += Slider('parameter1', low = calc_and_show.lower_bound(), high = calc_and_show.upper_bound() ) Thanks for the great support so far! Marcel

Marcel, If you mean dynamically updating the range of the slider, then no, this is not possible with our framework. You might see https://github.com/FelixHartmann/traitsui-tutorial-qt if you're looking to create something more complex than what we offer. Also, note that we are moving away from our current Qt-based Viewer toward IPython widgets (hopefully in time for the 0.12 release later this year). Regards, Steve On Monday, February 2, 2015 at 3:03:15 AM UTC-6, Marcel Gutsche wrote:
Hi folks,
another image viewer plugin related question. Is it possible to update the low and high values of the slider widget based on the return values of plugin function?
E.g something like this?
custom_plugin = Plugin(image_filter = calc_and_show) custom_plugin += Slider('parameter1', low = calc_and_show.lower_bound(), high = calc_and_show.upper_bound() )
Thanks for the great support so far!
Marcel

Oddly enough, I figured out how to do this yesterday for traitsui. Check out my answer to this question on stack overflow: http://stackoverflow.com/questions/9956167/change-property-parameter-from-wi... I adapted the DynamicRange trait from an old example floating around from Jonathan March. PS, Steven, our group has spent considerable time getting complex GUI's with IPython widgets together. I put a video of one online a few months ago: http://hugadams.github.io/scikit-spectra/ I can link you to the source code if you're interested, as we found that the IPython widget framework had a fair learning curve in regard to sophisticated apps. Having some far-along examples really helps, so let me know if you'd like to see some of them. On Monday, February 2, 2015 at 4:03:15 AM UTC-5, Marcel Gutsche wrote:
Hi folks,
another image viewer plugin related question. Is it possible to update the low and high values of the slider widget based on the return values of plugin function?
E.g something like this?
custom_plugin = Plugin(image_filter = calc_and_show) custom_plugin += Slider('parameter1', low = calc_and_show.lower_bound(), high = calc_and_show.upper_bound() )
Thanks for the great support so far!
Marcel

Adam, I saw your demo a few weeks ago and was inspired: https://github.com/scikit-image/scikit-image/issues/1311. Very cool work. Regards, Steve On Tuesday, February 3, 2015 at 6:51:09 PM UTC-6, Adam Hughes wrote:
Oddly enough, I figured out how to do this yesterday for traitsui. Check out my answer to this question on stack overflow:
http://stackoverflow.com/questions/9956167/change-property-parameter-from-wi...
I adapted the DynamicRange trait from an old example floating around from Jonathan March.
PS, Steven, our group has spent considerable time getting complex GUI's with IPython widgets together. I put a video of one online a few months ago:
http://hugadams.github.io/scikit-spectra/
I can link you to the source code if you're interested, as we found that the IPython widget framework had a fair learning curve in regard to sophisticated apps. Having some far-along examples really helps, so let me know if you'd like to see some of them.
On Monday, February 2, 2015 at 4:03:15 AM UTC-5, Marcel Gutsche wrote:
Hi folks,
another image viewer plugin related question. Is it possible to update the low and high values of the slider widget based on the return values of plugin function?
E.g something like this?
custom_plugin = Plugin(image_filter = calc_and_show) custom_plugin += Slider('parameter1', low = calc_and_show.lower_bound(), high = calc_and_show.upper_bound() )
Thanks for the great support so far!
Marcel
participants (3)
-
Adam Hughes
-
Marcel Gutsche
-
Steven Silvester