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

Home » Public Forums » archive » routine in ENVI to pass from EVF to ROI????
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
routine in ENVI to pass from EVF to ROI???? [message #49571] Thu, 03 August 2006 00:20 Go to next message
txominhermos is currently offline  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 #49606 is a reply to message #49571] Mon, 07 August 2006 08:43 Go to previous messageGo to next message
David Streutker is currently offline  David Streutker
Messages: 34
Registered: June 2005
Member
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 #49614 is a reply to message #49571] Sun, 06 August 2006 23:45 Go to previous messageGo to next message
txominhermos is currently offline  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 #49634 is a reply to message #49571] Fri, 04 August 2006 08:50 Go to previous messageGo to next message
David Streutker is currently offline  David Streutker
Messages: 34
Registered: June 2005
Member
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 #49636 is a reply to message #49571] Fri, 04 August 2006 02:37 Go to previous messageGo to next message
txominhermos is currently offline  txominhermos
Messages: 25
Registered: October 2005
Junior Member
> If you just want a rectangle area that includes all the ROIs, why not
> just read the coordinates of vertexes and get the maximum and minumum
> values?



YES, I want a rectangle, but I just can get the pixel addresses (
roi_addresses = ENVI_GET_ROI(roi_id)), and I cannot use

image(roi_addresses)= 1

and then extract the array_indices, to get the coordinates, because I
am working with 40000X35000 pixels images, so the computer does not
have enought memory.


Do u know how to get the coordinates and then do the subset using just
the envi routines as ENVI_WRITE_ENVI_FILE or to an external file (like
tiff) ???
Re: routine in ENVI to pass from EVF to ROI???? [message #49685 is a reply to message #49571] Tue, 08 August 2006 02:15 Go to previous message
txominhermos is currently offline  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 Go to previous message
txominhermos is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: iPlot and applications
Next Topic: Programmatically subset one image using ENVI routines.

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

Current Time: Wed Oct 08 19:24:02 PDT 2025

Total time taken to generate the page: 0.00675 seconds