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

Home » Public Forums » archive » Re: byte array
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: byte array [message #45100] Sun, 14 August 2005 12:21
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Callisto writes:

> I have a (n,n,n) byte array (n can be 64, 128, 256...). I want to
> be able to "group" all points, i.e., group all the neighbouring values
> of 1 in groups, all the neighbouring values of 2 in groups, and so on.
> For example (2-D):
>
> 1 1 1 2 2 1 1 0
> 1 1 0 0 2 1 3 0
> 0 1 0 0 0 0 3 3
>
> in this case, I have two groups of "1", one group of "2", one group of
> "3" and three groups of "0".
>
> Is there a smart way to do it?

I would have a look at LABEL_REGION. You may have to
put a 1-pixel "border" on your image to get what you
expect. LABEL_REGION does something daft with regions
that butt up against the image edges as I recall.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Previous Topic: byte array
Next Topic: Re: dynamic array workaround?

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

Current Time: Thu Oct 09 08:34:23 PDT 2025

Total time taken to generate the page: 0.72403 seconds