Collection of different sized arrays [message #69517] |
Sun, 17 January 2010 04:37 |
robintw
Messages: 37 Registered: March 2009
|
Member |
|
|
Hi,
I have a suspicion that this question may have been asked before, but I
can't seem to find the answer in the achives of this group. Possibly I'm
not searching using the right keywords...
Basically, I need to keep a collection of different sized arrays. I am
writing an image segmentation routine, which will take an image and
split it into segments. I need to keep track of which pixels in the
image are in each segment. My thought is that I'll have an array for
each segment which will contain the indices of the pixels within that
segment. However, I can't work out how to store this collection of
arrays in IDL, as each array will be a different length, and I won't
know the number of segments or the lengths of the arrays at
compile-time. Also, to add to the fun, the pixels in each segment are
likely to change during the segmentation process...
I have a suspicion the answer may involve pointers, or objects
(possibly?) or something like that, but I'm not really sure.
Any ideas would be much appreciated,
Thanks,
Robin Wilson
University of Southampton, UK
|
|
|