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

Home » Public Forums » archive » Re: display question
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 question [message #11194] Mon, 09 March 1998 00:00
nospam is currently offline  nospam
Messages: 21
Registered: November 1997
Junior Member
In article <MPG.f6a02cf8e3f5b6698973d@news.frii.com> davidf@dfanning.com (David Fanning) writes:

> I presume that many of these boxes will be the same size
> and shape. One of the things I've done is make my own
> plot symbol (using USERSYM) that is the correct shape for
> what I want to plot. Then I just set up a plot (with or
> without axes) and simply plot the pixels into the data
> space with the Plot command and PSYM set to 8. This saves
> having to go into device coordinate space.

I tried that, but there doesn't seem to be any good way to control the
size of the symbol that you get out. You can use xyouts to get the
size of a character, and the plotting routine sets the plotted size of
the character to be "about" the size of a character. But, there
doesn't seem to be a way to control accurately the size of the symbol.

I thought of what will probably be a better solution. I'll use plot
with /NODATA to set up the axes and data space, then get the number of
pixels in the display area and the data range, then create an array
as big as the display area, fill it with my little boxes of different
sizes and colors, and then tv it once.

scott

--
Scott Stuart
stuart at ll mit edu
Re: display question [message #11200 is a reply to message #11194] Mon, 09 March 1998 00:00 Go to previous message
Martin Schultz is currently offline  Martin Schultz
Messages: 515
Registered: August 1997
Senior Member
Joseph Scott Stuart wrote:
>
> I have a sensor to calibrate in which the pixels are not laid out in a
> simple grid. I can construct an array that gives the X-Y coordinates
> (relative to some point on the focal plane) of the centers of each
> pixel, and I know the shape of each pixel. When taking calibration
> data from the sensor, I'll have an array that gives the intensity that
> each pixel is measuring. What I would like to do is make a display
> that shows a little box for each pixel, of the right size, in the
> right location with the measured intensity, and then be able to zoom
> in using the mouse cursor to select a box.
>
> I can probably get something to work by using convert_coord to get the
> device coordinates of each pixel corner, then constructing an array of
> the appropriate number of pixels, and using tv to display. But, there
> are over 15,000 pixels, and I fear that this will be much too slow.
> Are there any better ways to display a bunch of little boxes each with
> its own color at its own specified data coordinates?
>
> Thanks for any help!
>
> scott
>
> --
> Scott Stuart
> stuart at ll mit edu

if your boxes are very irregularily shaped, you may want to try the
POLYFILL command. I use this e.g. to fill 3D model grid boxes on any map
projection. Usually, 6 polygon point sare sufficient. But I am only
dealing with otoo 300 "pixels", so it may well be that 15000 will make
this approach too slow.

I guess the solution to your problem depends to a large extent on
(A) how different your pixels are, (B) how complicated their shape is,
and (C) whether you set your priority on a high resolution output (e.g.
postscript) or a fast screen output.

Martin.


--
------------------------------------------------------------ -------
Dr. Martin Schultz
Department for Earth&Planetary Sciences, Harvard University
186 Pierce Hall, 29 Oxford St., Cambridge, MA-02138, USA

phone: (617)-496-8318
fax : (617)-495-4551

e-mail: mgs@io.harvard.edu
IDL-homepage: http://www-as.harvard.edu/people/staff/mgs/idl/
------------------------------------------------------------ -------
Re: display question [message #11218 is a reply to message #11194] Fri, 06 March 1998 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Joseph Scott Stuart (nospam@ll.mit.edu) writes:

> I have a sensor to calibrate in which the pixels are not laid out in a
> simple grid. I can construct an array that gives the X-Y coordinates
> (relative to some point on the focal plane) of the centers of each
> pixel, and I know the shape of each pixel. When taking calibration
> data from the sensor, I'll have an array that gives the intensity that
> each pixel is measuring. What I would like to do is make a display
> that shows a little box for each pixel, of the right size, in the
> right location with the measured intensity, and then be able to zoom
> in using the mouse cursor to select a box.
>
> I can probably get something to work by using convert_coord to get the
> device coordinates of each pixel corner, then constructing an array of
> the appropriate number of pixels, and using tv to display. But, there
> are over 15,000 pixels, and I fear that this will be much too slow.
> Are there any better ways to display a bunch of little boxes each with
> its own color at its own specified data coordinates?

I presume that many of these boxes will be the same size
and shape. One of the things I've done is make my own
plot symbol (using USERSYM) that is the correct shape for
what I want to plot. Then I just set up a plot (with or
without axes) and simply plot the pixels into the data
space with the Plot command and PSYM set to 8. This saves
having to go into device coordinate space.

Cheers,

David
-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
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: Quasi-freehand curve fitting...
Next Topic: Vector-Drawn Fonts in plotting procedures

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

Current Time: Wed Oct 08 20:02:42 PDT 2025

Total time taken to generate the page: 0.01170 seconds