Provides a simple way to obtain the data indices from a Histogram REVERSE_INDICES vector. Returns a -1 if no indices are available. Check the COUNT keyword for the number of indices returned.
- ri in required type=integer
The REVERSE_INDICES vector that is returned from the HISTOGRAM command.
- index in required type=integer
The zero-based index into the REVERSE_INDICES vector from which to obtain the indices. For example, an index value of 4 will return the indices in the 5th bin (zero based counting) of the histogram.
- COUNT out optional type=Long
The number of indices returned by the function.
:Return Value: indices: The indices that were put into the indexth bin of the histogram. A -1 is returned if no indices are in that particular bin.
Used with the HISTOGRAM command:
IDL> image = cgDemoData(7) IDL> h = Histogram(image, REVERSE_INDICES=ri) IDL> indices = cgReverseIndices(ri, 4, COUNT=cnt) IDL> Help, indices, cnt, h INDICES LONG = Array CNT LONG = 948 <Expression> LONG = 948 IDL> image[indices] = 0
FANNING SOFTWARE CONSULTING:
David W. Fanning 1645 Sheely Drive Fort Collins, CO 80526 USA Phone: 970-221-0438 E-mail: email@example.com Coyote's Guide to IDL Programming: http://www.idlcoyote.com
Copyright (c) 2011, Fanning Software Consulting, Inc.
Written by David W. Fanning at suggestion of Ben Tupper. 7 January 2011.
|Modification date:||Fri Mar 27 11:07:38 2015|