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 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: display problem mac osx [message #48236] Wed, 05 April 2006 06:31
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Cris Lanting writes:

> (I still don't really know why but I don't
> want to spend much time on the why's!)

I'd suggest intellectual laziness as a theory, but
I don't want to deal with the icy stares and the
discussion of divorce papers again. :-(

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: display problem mac osx [message #48237 is a reply to message #48236] Wed, 05 April 2006 01:05 Go to previous message
Cris Lanting is currently offline  Cris Lanting
Messages: 2
Registered: April 2006
Junior Member
That really helps indeed! (I still don't really know why but I don't
want to spend much time on the why's! It finally works; lets focus on
the 'important' stuff)

I could have known this because I already stumbled over tvimage a while
ago but since some part of the tools I (ab)use were written by someone
else who used tv/tvscl. I never thought of it.... time for some
rewriting of tv-dependent code

(It is by the way a tool which draws/displays 3 orthogonal slices of a
3d data set of an anatomy MR scan with some functional
('brain-activation') images drawn superimposed on this. With the mouse
it is quite easy to get an impression rather than staring at multiple
2d images....which in some cases does the job ;-) )

Thanks anyway!

Greetings,
Cris
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/
  Switch to threaded view of this topic Create a new topic Submit Reply
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: Wed Oct 08 15:39:55 PDT 2025

Total time taken to generate the page: 0.00381 seconds