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

Home » Public Forums » archive » Re: display problem mac osx
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: display problem mac osx [message #48285 is a reply to message #48237] Mon, 03 April 2006 05:56 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Cris Lanting writes:

> I have a rather strange display problem. Since I'm working on
> (functional) MR imaging
> I've written a little program which scales one data-set in the range
> 0-127 and one data-set in the range
> 128-255 to make a color overlay of the (thresholded) second image over
> the first image by adjusting the colortable.
> This works both in Windows and Linux but MaxOSX (10.4.5) seems to
> handle this a bit strange. Especially when I display a colorbar (thanks
> David) the colors are displayed correctly in the colorbar but not in
> the image itself.
>
> Here is my code to construct my colortable:
>
> ncolors = !D.Table_Size
> halfcolors = Byte(ncolors / 2)
> loadct,0,ncolors=halfcolors
> loadct,3,ncolors=halfcolors,bottom=halfcolors
>
> and for the scaling of the data the following snippet:
> im1=bytscl(image1,top=halfcolors-1)
> im2=bytscl(image2>threshold,top=halfcolors-1)+halfcolors
> etc...
>
> When I use tv (or my own equivalents) to show my data to the display
> the colors in the image are not correct but the colors in the colorbar
> are....
> Any suggestions about this peculiar problem?

I'm guessing this problem would go away if you used
TVIMAGE or IMGDISP, which are better about knowing
what color environment they need to be in to display
an image than TV. I base this on the fact that COLORBAR
works when your image doesn't.

There could be something strange about the way the
Mac handles colors (now *there* is something that would
surprise me! :^). But I would use a better TV command
first, and see if that doesn't solve this and a whole
lot more problems for you. :-)

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

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Re IDL w/ 12-bit grayscale?
Next Topic: Multiple Widget_draws

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

Current Time: Fri Oct 10 14:18:01 PDT 2025

Total time taken to generate the page: 3.43463 seconds