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

Home » Public Forums » archive » changing contrast and brightness on the fly
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: changing contrast and brightness on the fly [message #25435 is a reply to message #25432] Fri, 15 June 2001 19:43 Go to previous messageGo to previous message
david[2] is currently offline  david[2]
Messages: 100
Registered: June 2001
Senior Member
Simon Williams writes:

> I'm looking for tips on how to implement an image display feature that's
> bugging me. I'm new to widget programming, trying to get up to speed
> with David Fanning's book and other helps, but any short-cuts would be
> appreciated.
>
> The job is to display an MRI image and to be able to adjust the image
> brightness and contrast interactively, without going to any special
> widgets like sliders. The control I have in mind is to
> middle-click the image and then have drag right/left control contrast
> and drag up/down control brightness.
>
> The plan is to replicate functionality that the end users (radiology
> folks) are already familiar with from other image viewers. In the
> longer term plan, the display would also be re-sizable and allow
> interactive ROI drawing as well.
>
> It sounds easy but I can't find anything similar described on the web
> etc. to use as a suitable starting point.

Sometimes the things that sound the easiest are really
the hardest. :-)

But in this case, I think you are right. It's
fairly easy. The hard part (it seems to me) is
coming up with the appropriate equation to
go from a movement in pixel space to a change
in contract/brightness. I remember working with
Phil Williams when he was at Children's Hospital
in Cinncinatti and he had a gadget just like this.
I can't recall the equation how, but I seem to
remember it was some kind of high energy particle
field equation, or something. He had chanced upon
it from a previous life as a real physicist. Great
use for it though.

In any case, I think it is likely someone will
offer you something very like this, or at least
a better idea than I can give you. It is a
common feature of medical image processing.
I wouldn't be surprised to see the algorithm in
a medical imaging book.

> Question: is changing the
> contrast and brightness to be achieved by re-defining the
> color table and re-scaling the data?

Yes, I think this is exactly what you need to do.
If you can just find the right scaling equation...

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: New book: "Practical IDL Programming"
Next Topic: Re: contour boundaries

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

Current Time: Wed Oct 08 19:02:38 PDT 2025

Total time taken to generate the page: 0.00479 seconds