X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 16 Mar 2009 12:47 PM by  anon
subset data via ROIS ENVI/IDL
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
16 Mar 2009 12:47 PM
    Hi all, Iam trying to make a mask via ROIS/EVF in IDL, and then aply to my images, any idea?, Thanks in advance.. Javier.

    Deleted User



    New Member


    Posts:
    New Member


    --
    21 Mar 2009 12:35 PM
    Hi all, I am trying to run a code to make the an Region of Interest (ROI) from an Vector (EVF), the code has an error in the yellow line: Someone knows what is wrong in the code?   pro make_maskpppp  compile_opt idl2  file='c:\javier\borrar\MYD04_L22.img'  envi_open_file,file,r_fid=fid  if (fid eq -1 ) then begin                 envi_batch_exit                 return  endif  envi_file_query,fid,ns=ns,nl=nl,nb=nb  dims=[-1,0,ns-1,0,nl-1]  pos=lindgen(nb)  ;**************************************  evf_fname='c:\javier\vectores\vector_2400x2400_2.evf'  evf_id = envi_evf_open(evf_fname)  envi_evf_info, evf_id, num_recs=num_recs, $  data_type=data_type, projection=projection, $  layer_name=layer_name  ; generating ROI from EVF    for i=0,num_recs-1 do begin                 record = envi_evf_read_record(evf_id, i)                 ENVI_CONVERT_FILE_COORDINATES,fid,xmap,ymap,record[0,*],record[1,*], /TO_MAP                 roi_id = ENVI_CREATE_ROI(ns=ns, nl=nl, color=4, name='evfs')                 ENVI_DEFINE_ROI, roi_id, /polygon, $                 xpts=reform(XMAP), ypts=reform(YMAP)                 roi_ids = envi_get_roi_ids()                 envi_save_rois, 'c:\javier\borrar\roi_javier.roi', roi_ids                 if (roi_ids[0] eq -1) then return                 ;                 ; Set the necessary variables                 ;  endfor  END   thanks!! Javier.
    You are not authorized to post a reply.