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

Home » Public Forums » archive » Re: unwanted color bands in image display
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: unwanted color bands in image display [message #31328] Wed, 03 July 2002 11:21 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Asti Bhatt (astib@cc.usu.edu) writes:

> Again, this is somebody else's code. But I have noticed this
> behaviour earlier also. I was using an IDL program called SIS_Browser.
> There I encountered this thing for first time, and I thought they are
> part of the data ! Then I used TV procedures in my code and got
> similar red bands, so I gave up and used LIVE TOOLS instead. I think
> it has to do with which color table I load, because bands change color
> sometimes if I change color table. Any suggestions ?

I'm going to split and double my bet. Hit me!

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: unwanted color bands in image display [message #31329 is a reply to message #31328] Wed, 03 July 2002 10:57 Go to previous messageGo to next message
astib is currently offline  astib
Messages: 15
Registered: June 2002
Junior Member
Hi,

Thanks for the replies. I have faced this problem both on Linux/Unix
Sun machines and Macintosh. Thanks Liam for suggesting patch for
Linux.

In the code color table is loaded after "SET_PLOT". This is the data
converted to ASCII format from binary files and then plotted in
different plots. But this problem is only in TV,TVSCL and viewing PS
files made with the code. The lines/bands colors are not constant,
although red is prominent. The graphics part of the code is -

CASE outtype(plotype-1) OF
'BWPS' : BEGIN
SET_PLOT,'PS'
fileN = 'psfile'
fn = 'B&WVec'+fileN+'.ps'
DEVICE, /COLOR, BITS=8, filename=fn, /landscape, YOFFSET=26.5, $
YSIZE=19.0, XSIZE=24.0, /HELVETICA, /BOLD, bits_per_pixel =
8
END

'COLRPS' : BEGIN
SET_PLOT,'PS'
fn = ' '
read,fn,prompt='Enter name of output file:'
device, /portrait,/color,bits=8,xoffset=2.,yoffset=2.,
$
xsize=17.,ysize=25.,file=fn
END

'SCR' : BEGIN
PRINT, ' Screen plot'
SET_PLOT,'MAC'
LOADCT,25 ; 25=MAC, 2=G R Bl Wh
WINDOW, colors=16, Title='IDI Winds', xsize=760, ysize=520
TVLCT, [0,255,0,0], [0,0,255,0], [0,0,0,255]
END

Again, this is somebody else's code. But I have noticed this
behaviour earlier also. I was using an IDL program called SIS_Browser.
There I encountered this thing for first time, and I thought they are
part of the data ! Then I used TV procedures in my code and got
similar red bands, so I gave up and used LIVE TOOLS instead. I think
it has to do with which color table I load, because bands change color
sometimes if I change color table. Any suggestions ?

Thanks a lot,
Asti
Re: unwanted color bands in image display [message #31358 is a reply to message #31329] Fri, 28 June 2002 14:52 Go to previous messageGo to next message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
David Fanning <david@dfanning.com> writes:

> Craig Markwardt (craigmnet@cow.physics.wisc.edu) writes:
>
>> Man, has my own dear PLOTIMAGE dropped off the radar screen? (sniff)
>
> That "PLOT" part of the name has the wrong connotations for
> me and gets stored in another part of my brain. Have you
> thought about renaming this CM_IMAGE?

Hmm, but that's the point, it works like any other plotting command. [
for setting things like X and Y axes, etc. ]

How about, just for JD, CM_PLOTIMAGE? :-)

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
Re: unwanted color bands in image display [message #31359 is a reply to message #31358] Fri, 28 June 2002 14:37 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Craig Markwardt (craigmnet@cow.physics.wisc.edu) writes:

> Man, has my own dear PLOTIMAGE dropped off the radar screen? (sniff)

That "PLOT" part of the name has the wrong connotations for
me and gets stored in another part of my brain. Have you
thought about renaming this CM_IMAGE?

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: unwanted color bands in image display [message #31362 is a reply to message #31359] Fri, 28 June 2002 14:09 Go to previous messageGo to next message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
David Fanning <david@dfanning.com> writes:


> Asti Bhatt (astib@cc.usu.edu) writes:
>
>> When I try to display image with TV or TVSCL, or for that matter,
>> store as a PS and then view it, it always shows annoying color bands
>> or lines in the image. These bands are generally red or blue,
>> depending on the monitor properties I guess. I tried to use, device,
>> decomposed=0, but that doesn't make any difference. I am quite
>> frustrated with this thing, and hence I like to use LIVE TOOLS instead
>> of TV things, but they have limited capabilities. Any suggestions for
>> removing these color bands ?
...
> Have you tried something like TVIMAGE or IMDISP to display
> your image? Sometimes getting everything set up just right
> can be a bit of a pain.

Man, has my own dear PLOTIMAGE dropped off the radar screen? (sniff)

Getting to Asti's question, I remember that there was a bug in one
recemt version of IDL's Linux graphics libraries which caused annoying
banding. If that is the case, then there should be a patch
downloadable from the RSI page that fixes the problem.

Craig

http://cow.physics.wisc.edu/~craigm/idl/idl.html (under Graphics)

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
Re: unwanted color bands in image display [message #31364 is a reply to message #31362] Fri, 28 June 2002 14:07 Go to previous messageGo to next message
Liam E. Gumley is currently offline  Liam E. Gumley
Messages: 378
Registered: January 2000
Senior Member
Asti Bhatt wrote:
> When I try to display image with TV or TVSCL, or for that matter,
> store as a PS and then view it, it always shows annoying color bands
> or lines in the image. These bands are generally red or blue,
> depending on the monitor properties I guess. I tried to use, device,
> decomposed=0, but that doesn't make any difference. I am quite
> frustrated with this thing, and hence I like to use LIVE TOOLS instead
> of TV things, but they have limited capabilities. Any suggestions for
> removing these color bands ?

Are you running IDL 5.5 on Linux, Solaris X86 or Tru64 UNIX with a
24-bit TrueColor OR 24-bit DirectColor visual class? If so, read this:

http://www.rsinc.com/services/output.cfm?tip_id=3257

Cheers,
Liam.
Practical IDL Programming
http://www.gumley.com/
Re: unwanted color bands in image display [message #31366 is a reply to message #31364] Fri, 28 June 2002 13:34 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Asti Bhatt (astib@cc.usu.edu) writes:

> When I try to display image with TV or TVSCL, or for that matter,
> store as a PS and then view it, it always shows annoying color bands
> or lines in the image. These bands are generally red or blue,
> depending on the monitor properties I guess. I tried to use, device,
> decomposed=0, but that doesn't make any difference. I am quite
> frustrated with this thing, and hence I like to use LIVE TOOLS instead
> of TV things, but they have limited capabilities. Any suggestions for
> removing these color bands ?

I'm going to go way out on the limb and guess operator
error. The TV command is pretty well tested in IDL. I doubt
it is putting red and blue bands in your image. :-)

Tell us a bit more about your image. Is it byte data?
8-bit or 24-bit? Did you scale the data yourself? How
did you do it? How did you configure your device before
you displayed the data? Did you load a color table just
before you displayed the data? Are you sure red and blue
are not part of your color table? How did you determine
this? Etc.

Have you tried something like TVIMAGE or IMDISP to display
your image? Sometimes getting everything set up just right
can be a bit of a pain.

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: unwanted color bands in image display [message #31516 is a reply to message #31358] Mon, 22 July 2002 11:59 Go to previous message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Fri, 28 Jun 2002 14:52:51 -0700, Craig Markwardt wrote:


> David Fanning <david@dfanning.com> writes:
>
>> Craig Markwardt (craigmnet@cow.physics.wisc.edu) writes:
>>
>>> Man, has my own dear PLOTIMAGE dropped off the radar screen? (sniff)
>>
>> That "PLOT" part of the name has the wrong connotations for me and gets
>> stored in another part of my brain. Have you thought about renaming
>> this CM_IMAGE?
>
> Hmm, but that's the point, it works like any other plotting command. [
> for setting things like X and Y axes, etc. ]
>
> How about, just for JD, CM_PLOTIMAGE? :-)
>

How about:

THIS_IS_CRAIG_MARKWARDTS_SPECIAL_PLOT_IMAGE_TOOL_AND_DONT_YO U_THINK_ANYTHING_DIFFERENT

I'm sure you could defend this in the name of not polluting the name
space ;)

JD
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Inside rectangle
Next Topic: Re: widget_slider with odd integers

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

Current Time: Wed Oct 08 15:17:56 PDT 2025

Total time taken to generate the page: 0.00535 seconds