Problem closing contours with CONTOUR,/CLOSED [message #28959] |
Mon, 21 January 2002 11:48 |
David Williams
Messages: 13 Registered: February 2000
|
Junior Member |
|
|
Once again I pay a visit to this temple of knowledge, and ask the
inhabitants for help with what is probably a very simple matter. I
hope....
In my group, we've set up a function that:
a) contours an image (not hard) at a single level
b) takes the co-ordinates that define each contour, and keeps this
information in a structure (see below)
c) checks the pixels inside each contour in turn to find a particular
pixel value.
d) finally, overplots the contours much thicker, so you can see where
they are.
Now, this works grand (sorry for the Irish-ism), and the function works
on a cube of images, each image in turn, until it finds a contour which
runs to the image boundary.
That's when the function sometimes runs into trouble.
The crux of the issue is that
CONTOUR,image,levels=thresh,path_xy=xy,path_info=info,$
/path_data_coords,/over,/closed
doesn't necessarily always close the contour, and we need it to close
them completely.
Is there a known bug (or 'feature') with CONTOUR that causes it to not
close contours properly at the edges of a 2-D array? And is there a
work-around? (The code is part of the built-in routines, so I guess I
can't exactly hack around with it.)
Or am I doing something wrong that's earth-shatteringly obvious...?
As ever, I'd really appreciate whatever help you can offer (I'm using
IDL 5.4 on a RedHat 7.1 Linux PC system). MANY thanks in advance.
(Replies are welcome either to this newsgroup or by e-mail to
d.williams@qub.ac.uk. Whichever you prefer. Cheers.)
Dave.
--
------------------------------------------------------------ ---------
David R. Williams, | BT7 1NN, Northern Ireland.
Astrophysics & Planetary Science, | d.williams@qub.ac.uk
Queen's University, Belfast, | http://star.pst.qub.ac.uk/~drw/
============================================================ =========
|
|
|