COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### Conversion of 2D to 1D

• Email
• Follow

```Hi,

How can we convert a 2D array (image) into 1D in IDL?

Regards
Neil
```
 0

See related articles to this posting

```On Mar 29, 5:45=A0pm, Neil <swapneil.v...@gmail.com> wrote:
> Hi,
>
> How can we convert a 2D array (image) into 1D in IDL?
>
>
> Regards
> Neil

imageoned =3D reform(imagetwod,n_elements(imagetwod))
```
 0

```On 29 Mrz., 09:52, Maxwell Peck <maxjp...@gmail.com> wrote:
> On Mar 29, 5:45=A0pm, Neil <swapneil.v...@gmail.com> wrote:
>
> > Hi,
>
> > How can we convert a 2D array (image) into 1D in IDL?
>
>
> > Regards
> > Neil
>
> imageoned =3D reform(imagetwod,n_elements(imagetwod))

Or simplier: imageoned=3Dimagetwod[*]

Regards

CR
```
 0

```On Mar 30, 2:13=A0am, chris <rog...@googlemail.com> wrote:
> On 29 Mrz., 09:52, Maxwell Peck <maxjp...@gmail.com> wrote:
>
> > On Mar 29, 5:45=A0pm, Neil <swapneil.v...@gmail.com> wrote:
>
> > > Hi,
>
> > > How can we convert a 2D array (image) into 1D in IDL?
>
>
> > > Regards
> > > Neil
>
> > imageoned =3D reform(imagetwod,n_elements(imagetwod))
>
> Or simplier: imageoned=3Dimagetwod[*]
>
> Regards
>
> CR

The only reason I don't do it that way is I've never been completely
whether that operation generates an index vector.

Max
```
 0

3 Replies
1025 Views

Similar Articles

12/8/2013 11:52:48 PM
page loaded in 28487 ms. (0)