routine in ENVI to pass from EVF to ROI???? [message #49571] |
Thu, 03 August 2006 00:20  |
txominhermos
Messages: 25 Registered: October 2005
|
Junior Member |
|
|
Hello mates,
I am trying but I am not able to find the ENVI routine to program the
conversión from EVT to ROI (or the one to pass from SHP to EVF to
ROI).
Does it exit? or it is nor possible to do it by programming.
Thanks for your attention.
txo
|
|
|
|
Re: routine in ENVI to pass from EVF to ROI???? [message #49614 is a reply to message #49571] |
Sun, 06 August 2006 23:45   |
txominhermos
Messages: 25 Registered: October 2005
|
Junior Member |
|
|
Thanks for your reply David,
but I dont know how to use ARRAY_INDICES with an image load via
ENVI_OPEN_FILE. As you know the arguments requieres are Array and
Index, but I do not have the array in memory (because it is too big).
I have got the indices from:
FOR j=0,nb-1 DO BEGIN
roi_data = ENVI_GET_ROI_DATA( roi_id, fid=fid, pos = [j])
ENVI_GET_ROI_INFORMATION, roi_id, ns=ns, nl=nl
roi_addresses = ENVI_GET_ROI(roi_id) ; Get the
"position" of the pixels in the ROI
ENDFOR
So, the main problem -in this moment- is how to transform pixel
addresses into pixel coordinates with an image load via ENVI_OPEN_FILE
and without memory to store that image.
-txomin
David Streutker ha escrito:
> Once you have the vector of roi_addresses, you can use ARRAY_INDICES to
> convert the addresses to 2-dimensional coordinates. Then find the MIN
> and MAX of the x and y coordinates.
>
> If you have read the original file already, just use
> ENVI_WRITE_ENVI_FILE, Data[xMin:xMax,yMin:yMax] ...
>
> If you don't have enough memory to read in the original file, I *think*
> you can use MOSAIC_DOIT to clip the original. MOSAIC_DOIT is meant for
> use with multiple files, but I believe it will work with a single one,
> and you can use the x0 and y0 keywords to effectively subset the image.
>
> -David
|
|
|
|
|
Re: routine in ENVI to pass from EVF to ROI???? [message #49685 is a reply to message #49571] |
Tue, 08 August 2006 02:15  |
txominhermos
Messages: 25 Registered: October 2005
|
Junior Member |
|
|
well, i have found the code of the function in internet :)
thanks again!
txominhermos@gmail.com ha escrito:
> Thanks for all David, your help has been great :)
>
> I have seen in internet that the DIMENSIONS keyword has been added in
> the version 6.0. I do have the ENVI 4.0 with IDL 6.0.1 and I cannot use
> that keyword, but at least I know where I can find the solution.
>
>
> -Txomin
>
>
>
> David Streutker ha escrito:
>
>> Once the file is opened with ENVI_OPEN_FILE, use ENVI_FILE_QUERY with
>> the DIMS keyword to get the dimensions (lines and samples).
>>
>> ARRAY_INDICES also has a DIMENSIONS keyword so that you don't need the
>> entire array, just the dimensions of it.
>>
>> -David
|
|
|
Re: routine in ENVI to pass from EVF to ROI???? [message #49686 is a reply to message #49606] |
Tue, 08 August 2006 01:56  |
txominhermos
Messages: 25 Registered: October 2005
|
Junior Member |
|
|
Thanks for all David, your help has been great :)
I have seen in internet that the DIMENSIONS keyword has been added in
the version 6.0. I do have the ENVI 4.0 with IDL 6.0.1 and I cannot use
that keyword, but at least I know where I can find the solution.
-Txomin
David Streutker ha escrito:
> Once the file is opened with ENVI_OPEN_FILE, use ENVI_FILE_QUERY with
> the DIMS keyword to get the dimensions (lines and samples).
>
> ARRAY_INDICES also has a DIMENSIONS keyword so that you don't need the
> entire array, just the dimensions of it.
>
> -David
|
|
|