comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: cw_fslider
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: cw_fslider [message #13926] Tue, 29 December 1998 00:00
David Foster is currently offline  David Foster
Messages: 341
Registered: January 1996
Senior Member
Lisa Bryan wrote:
>
> Hello all,
>
> I am having problem with the DRAG keyword to the CW_FSLIDER function.
> When using this slider I want to see the values change as I slide the
> slider button. This feature is described in the help section under
> the keyword DRAG. According to the help section by setting /DRAG, I
> should be able to see events as I drag the slider button. And, in
> fact, this works as described in the WIDGET_SLIDER function using the
> same keyword. Unfortunately, I need to use the floating version of
> this function. BTW, I'm using this to build a tool for interactively
> changing the greylevels of a displayed image. Anyone out there
> already done this? Thanks for your help.
>
> P.S. I'm still looking for the double slider if anyone has it.
>

Lisa -

You might be interested in my GRAYSCALE.PRO routine. It is a double
slider that allows you to interactively adjust the grayscale. You
will need my STRETCH2.PRO as well. You can define colors that are
to be preserved, a minimum and maximum value for the grayscale,
and you can create a "slit-scale" where half the values are used
for a grayscale and half are used for a "color-scale" using the
color of your choice.

It would be pretty easy to modify this to use the floating sliders.

These can be downloaded from:

ftp://bial8.ucsd.edu/pub/software/idl/share/idl_share.tar.gz

Dave
--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
David S. Foster Univ. of California, San Diego
Programmer/Analyst Brain Image Analysis Laboratory
foster@bial1.ucsd.edu Department of Psychiatry
(619) 622-5892 8950 Via La Jolla Drive, Suite 2240
La Jolla, CA 92037
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
Re: cw_fslider [message #13944 is a reply to message #13926] Tue, 22 December 1998 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Lisa Bryan (lbryanNOSPAM@arete-az.com) writes:

> I am having problem with the DRAG keyword to the CW_FSLIDER function.
> When using this slider I want to see the values change as I slide the
> slider button. This feature is described in the help section under
> the keyword DRAG. According to the help section by setting /DRAG, I
> should be able to see events as I drag the slider button. And, in
> fact, this works as described in the WIDGET_SLIDER function using the
> same keyword. Unfortunately, I need to use the floating version of
> this function.

Humm, I don't know why this is happening. Drag events are not
available for all machines, but if you see it working on normal
sliders, then it should certainly work for floating sliders.
Are you sure you have seen it working on *this* machine?
I don't see anything in the CW_FSLIDER code that would cause
problems, although this code is a mystery:

IF NOT (KEYWORD_SET(drag)) THEN drag = 0

Does anyone see any advantages (other than its harder to
understand and protects your job better) than this simpler
construction:

drag = Keyword_Set(drag)

> BTW, I'm using this to build a tool for interactively
> changing the greylevels of a displayed image. Anyone out there
> already done this?

Have you seen my program XStretch? This puts up a
histogram plot of the image (along with the image)
and allows you to interactively move two bars in
the window. (It's like a double slider, I guess.)
The image pixels are "streched" between the values
of the two bars.

http://www.dfanning.com/programs/xstretch.pro

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Progamming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Moving Realized Widgets
Next Topic: Catching type conversion errors

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:43:30 PDT 2025

Total time taken to generate the page: 0.00667 seconds