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

Home » Public Forums » archive » Sparse LABEL_REGION
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
Sparse LABEL_REGION [message #73763] Mon, 29 November 2010 18:23
James Preiss is currently offline  James Preiss
Messages: 2
Registered: November 2010
Junior Member
Hi Everyone,

I just finished programming a sparse version of LABEL_REGION for IDL.
It uses a list of array the foreground array indices instead of the
array itself. There is a main IDL program, some helper IDL programs,
and two C files that do the heavy lifting. I've put the whole thing
on Google Code at http://code.google.com/p/sparseblob/ including a
compiled 32-bit Windows DLL, or you can compile it yourself with
MAKE_DLL or a plain C compiler.

This is a pretty esoteric program: it becomes useful when:

1) there are few foreground elements compared to the total size of the
array,
2) you need to do region labeling over and over again on subsets of
the same foreground elements.

Here's the example that motivated its creation: a 3D array containing
an image of a blood vessel network, with 0 representing the background
and positive integers representing the travel time from the root. I
needed to label all regions with time 1, then all with time 2, etc...
but the vessels are only about 1/200 of the array. LABEL_REGION was
working over the whole thing each time instead of just looking at the
subset of the 1/200 with the right time value. I experienced probably
100x speedup, maybe more, after making the change.

Anyway, if this sounds interesting to you, please download it and try
it out. There's a zip file on the download section of my Google Code
page: http://code.google.com/p/sparseblob/downloads/list .
Instructions on how to install and use the program are included in the
README. The software is very much untested and probably is missing
some error checking, so I would appreciate any feedback.

James Preiss
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: high quality 'old' direct graphics
Next Topic: Re: New Graphics Challange

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

Current Time: Wed Oct 08 11:43:56 PDT 2025

Total time taken to generate the page: 0.00522 seconds