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

Home » Public Forums » archive » Re: subset an image programatically
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: subset an image programatically [message #46826 is a reply to message #46824] Mon, 02 January 2006 12:05 Go to previous messageGo to previous message
Jeff N. is currently offline  Jeff N.
Messages: 120
Registered: April 2005
Senior Member
I would drop the call to ENVI_GET_ROI_INFORMATION. The values of ns &
nl are set early in the code by a call to ENVI_FILE_QUERY, which is
querying the input image. So the call to ENVI_GET_ROI_INFORMATION is
both redundant and potentially a source of error if something goes
wrong in setting up the ROI's.

Also, I would set up the "black image" like this:
out_data = intarr ( ns,nl,nb) - 9999
which allows you to skip a construct like this: out_data[*,*,*]

I'm also not sure why you need to bother creating ROI's in the first
place? If all that you're doing is setting every pixel value outside
of a vector record to -9999 (or whatever value you prefer) and keeping
every value inside the vector as is, I think you have everything you
need to do this without the ROIs. The variables xf and yf (later
REFORMed to xpts and ypts) contain the pixel addresses of the original
input image that are inside the vector record, unless I am really
missing something. Why not just build a mask for the original image
using those?

Jeff
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Printing iTools window to PS file
Next Topic: Problem Compiling and Using Functions

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

Current Time: Fri Oct 10 18:09:45 PDT 2025

Total time taken to generate the page: 0.78450 seconds