volumes of contiguous areas that have range of values [message #93543] |
Tue, 16 August 2016 09:12  |
astroboy.20000
Messages: 39 Registered: August 2012
|
Member |
|
|
Hello, sorry for a dumb question but I can't find anything in the documentation and I'm at my wit's end.
Some years ago I had a 3D dataset in which certain volume elements had values between, say, 100 and 150. The IDL routine was about to identify all the elements with values in that range (of course) and also to compute how many continuous regions created by such elements, and the volume of each contiguous region.
Can anyone tell me the name of the routine?
Thanks,
Mark
|
|
|
Re: volumes of contiguous areas that have range of values [message #93544 is a reply to message #93543] |
Tue, 16 August 2016 09:33  |
Dick Jackson
Messages: 347 Registered: August 1998
|
Senior Member |
|
|
On Tuesday, 16 August 2016 09:13:49 UTC-7, M Q wrote:
> Hello, sorry for a dumb question but I can't find anything in the documentation and I'm at my wit's end.
>
> Some years ago I had a 3D dataset in which certain volume elements had values between, say, 100 and 150. The IDL routine was about to identify all the elements with values in that range (of course) and also to compute how many continuous regions created by such elements, and the volume of each contiguous region.
>
> Can anyone tell me the name of the routine?
>
> Thanks,
>
> Mark
Hi Mark,
I think LABEL_REGION will do the trick:
http://www.harrisgeospatial.com/docs/LABEL_REGION.html
Start with something like this:
inRange = data GT 100 AND data LT 150
regions = LABEL_REGION(inRange) ; /ALL_NEIGHBORS may be desired
Then, HISTOGRAM (possibly with REVERSE_INDICES) is helpful, to get at the number (and the locations) of elements in each region:
http://www.harrisgeospatial.com/docs/histogram.html
I hope that helps to point you in the right direction!
Cheers,
-Dick
Dick Jackson Software Consulting Inc.
Victoria, BC, Canada --- http://www.d-jackson.com
|
|
|