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

Home » Public Forums » archive » Changing values of one image from 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: Changing values of one image from ENVI [message #62316 is a reply to message #62270] Sun, 31 August 2008 11:37 Go to previous messageGo to previous message
Jonathan Greenberg is currently offline  Jonathan Greenberg
Messages: 91
Registered: November 2002
Member
Again, the question is do you need to use a full image to do spatial
analysis? There are *some* analyses that really require in the entire
image, but local neighborhood spatial analyses are not one of the ones
that need ENVI_GET_DATA -- its much more scalable to simply pull a set
of lines using ENVI_GET_SLICE the size of your window into an array
rather than running on the entire dataset. If you have the memory and
small enough images, ENVI_GET_DATA can work fine, but with increasing
image sizes (I routinely work with images that range from 1gb to
100gb), I come across a lot of code that does not scale because of
that one command, when it only takes a few more lines of code to
perform tiled analyses.

Is the overhead incurred by repeated use of ENVI_GET_SLICE vs.
ENVI_GET_DATA significant as compared to the total time of processing
an image (assuming memory issues are not an issue)? Has anyone done
any tests on this?

--j

On Aug 31, 8:30 am, "devin.wh...@gmail.com" <devin.wh...@gmail.com>
wrote:
> On Aug 29, 8:15 pm, Jonathan Greenberg <jgrn...@gmail.com> wrote:
>
>
>
>> Txomin:
>
>> I need to write a thread at some point extolling how much I hate
>> "ENVI_GET_DATA" -- its one of the most useless commands in the ENVI
>> language.  I am a HUGE fan of ENVI_GET_SLICE and, if you want to get
>> more complicated, use the built-in envi tiling routines (which are
>> really just envi_get_slice x a number of lines dependent on memory).
>> The idea is, you read one line at a time, process it, write the output
>> one line at a time...  No memory issues, fast read/write, all good.
>
>> --j
>
>> On Aug 29, 8:20 am, txominher...@gmail.com wrote:
>
>>> Hello,
>>> I would like to change some pixel values of one image loaded with
>>> ENVI_OPEN_FILE, but I cannot load the entire image in memory (this is
>>> a very big image).
>>> What I do is to access and process some specific regions of the image
>>> using ENVI_GET_DATA, by defining subsets in DIMS.
>>> I really wonder if there is any keyword in the procedure
>>> ENVI_WRITE_ENVI_FILE, or other procedure (something inverse to
>>> ENVI_GET_DATA) to perform this, because the only choice that I know is
>>> to load the whole image in memory in IDL and write it again.
>
>>> Thanks
>
>>> Txomin- Hide quoted text -
>
>> - Show quoted text -
>
> ENVI_GET_DATA, ENVI_GET_SLICE, and the ENVI tiling mechanism represent
> three different ways to access image data.  I sometimes will use all
> three in the same program--depending on what kind of processing I need
> to do.  They each have their strengths and weaknesses.  For example,
> if I was interested in multi-scale spatial processing (not spectral),
> ENVI_GET_SLICE would be pretty useless since I can only retrieve one
> line at a time at full spatal resolution and the data is ordered in
> BIL or BIP.  ENVI_GET_DATA is perfect for that task.  The tiling
> mechanism is very flexible and can go either way, but requires more
> programming overhead and is often overkill for the task at hand.
> However, there are times when it is the best option.  I wouldn't
> recommend it for this task, though.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Maximum index for arrays?
Next Topic: How do I return a 2d array in a system routine?

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

Current Time: Wed Oct 08 20:10:56 PDT 2025

Total time taken to generate the page: 0.00469 seconds