Re: convert image DN to unique values [message #72352] |
Fri, 27 August 2010 07:47 |
Snow53
Messages: 32 Registered: July 2010
|
Member |
|
|
On Aug 27, 8:42 am, Paulo Penteado <pp.pente...@gmail.com> wrote:
> On Aug 27, 11:34 am, Snow53 <jennifer_wa...@hotmail.com> wrote:
>
>>> It seems you want
>
>>> image=lonarr(nx,ny)
>
>>> where nx,ny are the dimensions.
>
>> Thanks, but I can get the array with no problem. What I'd like to
>> figure out is how to change those values of 0 within the array, so
>> that they increase by 1 for each position in the array.
>
>> ... a better example. If I have an array(2,2) where the values are
>> 00 , and I want 01 , what is the best way to do so?
>
>> 00 2 3
>
> Oops. I meant lindgen(nx,ny).
Fantastic! Many thanks :)
|
|
|
Re: convert image DN to unique values [message #72353 is a reply to message #72352] |
Fri, 27 August 2010 07:42  |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
On Aug 27, 11:34 am, Snow53 <jennifer_wa...@hotmail.com> wrote:
>> It seems you want
>
>> image=lonarr(nx,ny)
>
>> where nx,ny are the dimensions.
>
> Thanks, but I can get the array with no problem. What I'd like to
> figure out is how to change those values of 0 within the array, so
> that they increase by 1 for each position in the array.
>
> ... a better example. If I have an array(2,2) where the values are
> 00 , and I want 01 , what is the best way to do so?
>
> 00 2 3
Oops. I meant lindgen(nx,ny).
|
|
|
Re: convert image DN to unique values [message #72354 is a reply to message #72353] |
Fri, 27 August 2010 07:38  |
Spon
Messages: 178 Registered: September 2007
|
Senior Member |
|
|
On Aug 27, 3:34 pm, Snow53 <jennifer_wa...@hotmail.com> wrote:
> On Aug 27, 8:26 am, Paulo Penteado <pp.pente...@gmail.com> wrote:
>
>
>
>> On Aug 27, 11:23 am, Snow53 <jennifer_wa...@hotmail.com> wrote:
>
>>> Hi,
>
>>> I have an image where all the DNs are 0. I need to change the pixel
>>> values to numbers that increase by 1 according to pixel location in
>>> the array. For example: 1,2,3,4,5,6,7..... 700. It seems like it
>>> should be easy to do... Any suggestions?
>
>>> Thanks!
>
>> It seems you want
>
>> image=lonarr(nx,ny)
>
>> where nx,ny are the dimensions.
>
> Thanks, but I can get the array with no problem. What I'd like to
> figure out is how to change those values of 0 within the array, so
> that they increase by 1 for each position in the array.
>
> ... a better example. If I have an array(2,2) where the values are
> 00 , and I want 01 , what is the best way to do so?
>
> 00 2 3
image=lindgen(nx,ny)
Regards,
Chris
|
|
|
Re: convert image DN to unique values [message #72355 is a reply to message #72354] |
Fri, 27 August 2010 07:34  |
Snow53
Messages: 32 Registered: July 2010
|
Member |
|
|
On Aug 27, 8:26 am, Paulo Penteado <pp.pente...@gmail.com> wrote:
> On Aug 27, 11:23 am, Snow53 <jennifer_wa...@hotmail.com> wrote:
>
>> Hi,
>
>> I have an image where all the DNs are 0. I need to change the pixel
>> values to numbers that increase by 1 according to pixel location in
>> the array. For example: 1,2,3,4,5,6,7..... 700. It seems like it
>> should be easy to do... Any suggestions?
>
>> Thanks!
>
> It seems you want
>
> image=lonarr(nx,ny)
>
> where nx,ny are the dimensions.
Thanks, but I can get the array with no problem. What I'd like to
figure out is how to change those values of 0 within the array, so
that they increase by 1 for each position in the array.
... a better example. If I have an array(2,2) where the values are
00 , and I want 01 , what is the best way to do so?
00 2 3
|
|
|
Re: convert image DN to unique values [message #72356 is a reply to message #72355] |
Fri, 27 August 2010 07:26  |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
On Aug 27, 11:23 am, Snow53 <jennifer_wa...@hotmail.com> wrote:
> Hi,
>
> I have an image where all the DNs are 0. I need to change the pixel
> values to numbers that increase by 1 according to pixel location in
> the array. For example: 1,2,3,4,5,6,7..... 700. It seems like it
> should be easy to do... Any suggestions?
>
> Thanks!
It seems you want
image=lonarr(nx,ny)
where nx,ny are the dimensions.
|
|
|