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

Home » Public Forums » archive » Building a mask from a vector file programmatically in ENVI‏
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: Building a mask from a vector file programmatically in ENVI‏‏ [message #66350 is a reply to message #66222] Thu, 30 April 2009 07:40 Go to previous messageGo to previous message
josea.malpica is currently offline  josea.malpica
Messages: 12
Registered: March 2008
Junior Member
> Have a look at this thread to get you started:
>
> http://groups.google.com/group/comp.lang.idl-pvwave/browse_f rm/thread...
>

Thank you for your response

We have tried to follow the advice in
http://groups.google.com/group/comp.lang.idl-pvwave/browse_f rm/thread...
And from there we have made the program below.

I do not understand how ENVI_GET_ROI get the pixel coordinates.

When program is run the roi address returned is -1
Do anyone know where the error(s) are?
Thank you very much in advance.

Jose

pro abrirvector, event

envi_select, title='Choose multispectral image',fid=fid
ENVI_FILE_QUERY, fid, dims=dims
roi_id = envi_create_roi (nl=nl, ns=ns)

; Opening my evf file
evf_fname = '11_polygon_.evf'
evf_id = envi_evf_open(evf_fname)

; Get the vector information
envi_evf_info, evf_id, num_recs=num_recs, $
data_type=data_type, projection=projection, $
layer_name=layer_name

for i=0,num_recs-1 do begin
record = envi_evf_read_record(evf_id, i)
envi_define_roi, roi_id, /polygon, xpts = record[0,*], ypts = record
[1,*]
endfor

envi_evf_close, evf_id
roi_addr = envi_get_roi(roi_id)
print, 'ROI: ', roi_addr

end
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: How do i write an "application progress" widget ?
Next Topic: any GUI crashed IDL....

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

Current Time: Tue Oct 21 09:50:40 PDT 2025

Total time taken to generate the page: 1.20125 seconds