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

Home » Public Forums » archive » Problem in band operations.
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
Problem in band operations. [message #88868] Mon, 30 June 2014 03:27 Go to next message
SUNIL CHOUDHURY is currently offline  SUNIL CHOUDHURY
Messages: 11
Registered: June 2014
Junior Member
Hi,i am using envi 4.8 .
I have selected some image file using ENVI_SELECT command.
I want to perform some mathematical operation on the bands of the image file like-
b1+b2-20
How to get bands b1 and b2.
Re: Problem in band operations. [message #88891 is a reply to message #88868] Tue, 01 July 2014 12:02 Go to previous messageGo to next message
skymaxwell@gmail.com is currently offline  skymaxwell@gmail.com
Messages: 127
Registered: January 2007
Senior Member
Good day!
Here is the code,which allow to solve your task


ENVI_SELECT,FID=image_fid,POS=position_bands, $
DIMS=image_dims,TITLE='Pick file'
IF (image_fid EQ -1) THEN RETURN
ENVI_FILE_QUERY,image_fid,NS=number_samples,NL=number_rows,N B=number_bands, $
INTERLEAVE=data_format,WL=wavelengths
band1=ENVI_GET_DATA(FID=image_fid,DIMS=image_dims, POS=position_bands[0])
band2=ENVI_GET_DATA(FID=image_fid,DIMS=image_dims, POS=position_bands[1])
temp=band1+band2-20
ENVI_ENTER_DATA,temp,BNAMES='Calculated value'

regards


понедельник, 30 июня 2014 г., 14:27:28 UTC+4 пользователь SUNIL CHOUDHURY написал:
> Hi,i am using envi 4.8 .
>
> I have selected some image file using ENVI_SELECT command.
>
> I want to perform some mathematical operation on the bands of the image file like-
>
> b1+b2-20
>
> How to get bands b1 and b2.
Re: Problem in band operations. [message #88896 is a reply to message #88891] Wed, 02 July 2014 04:04 Go to previous messageGo to next message
SUNIL CHOUDHURY is currently offline  SUNIL CHOUDHURY
Messages: 11
Registered: June 2014
Junior Member
On Wednesday, July 2, 2014 12:32:16 AM UTC+5:30, skymaxwell wrote:
> Good day!
>
> Here is the code,which allow to solve your task
>
>
>
>
>
> ENVI_SELECT,FID=image_fid,POS=position_bands, $
>
> DIMS=image_dims,TITLE='Pick file'
>
> IF (image_fid EQ -1) THEN RETURN
>
> ENVI_FILE_QUERY,image_fid,NS=number_samples,NL=number_rows,N B=number_bands, $
>
> INTERLEAVE=data_format,WL=wavelengths
>
> band1=ENVI_GET_DATA(FID=image_fid,DIMS=image_dims, POS=position_bands[0])
>
> band2=ENVI_GET_DATA(FID=image_fid,DIMS=image_dims, POS=position_bands[1])
>
> temp=band1+band2-20
>
> ENVI_ENTER_DATA,temp,BNAMES='Calculated value'
>
>
>
> regards
>
>
>
>
>
> понедельник, 30 июня 2014 г., 14:27:28 UTC+4 пользователь SUNIL CHOUDHURY написал:
>
>> Hi,i am using envi 4.8 .
>
>>
>
>> I have selected some image file using ENVI_SELECT command.
>
>>
>
>> I want to perform some mathematical operation on the bands of the image file like-
>
>>
>
>> b1+b2-20
>
>>
>
>> How to get bands b1 and b2.


Thanks for your reply,it was helpful
but still i have one problem ,
in exp=band1+band2-20 ,only the first two band are selected I want to select the band from the available band list
waiting for your reply

regards
Re: Problem in band operations. [message #88931 is a reply to message #88896] Fri, 04 July 2014 22:18 Go to previous messageGo to next message
skymaxwell@gmail.com is currently offline  skymaxwell@gmail.com
Messages: 127
Registered: January 2007
Senior Member
look at ENVI_GET_DATA routine and look there to POS keyword.

Also may be using of Band Math will be easy for your task ?


regards
Re: Problem in band operations. [message #88940 is a reply to message #88931] Sun, 06 July 2014 22:53 Go to previous message
SUNIL CHOUDHURY is currently offline  SUNIL CHOUDHURY
Messages: 11
Registered: June 2014
Junior Member
On Saturday, July 5, 2014 10:48:24 AM UTC+5:30, skymaxwell wrote:
> look at ENVI_GET_DATA routine and look there to POS keyword.
>
>
>
> Also may be using of Band Math will be easy for your task ?
>
>
>
>
>
> regards

THANKS skymaxwell your guidance was helpful

regards
sunil
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: creating grid
Next Topic: multi-layer tiff file

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

Current Time: Wed Oct 08 13:45:45 PDT 2025

Total time taken to generate the page: 0.00523 seconds