OK, thanks Michael and Ian.

I have integrated the two files in vnl & SVN committed, so it should make it to ITK eventually;
I also adapted the test program to the "testlib" style, but I kept the standalone version (with getopt), to be activated with a compile switch.

--      Peter.

Från: "mbowers@cis.jhu.edu" <mbowers@cis.jhu.edu>
Till: Ian Scott <scottim@imorphics.com>
Kopia: vxl-users@lists.sourceforge.net
Skickat: tisdag, 4 oktober 2011 17:38
Ämne: Re: [Vxl-users] vnl_vector sort with index

Revisiting this subject - I use vnl mostly through itk, so we get vnl and
vcl, and that's pretty much it.  I need an index sort for vnl_vector and

I wrote a class to do this.  I've attached it to the message, with a test
program, which builds against itk4, if anyone would be interested in using

Thanks again,

Michael Bowers
Center for Imaging Science

> Thank you Ian, that looks great.
>> Try contrib/mul/mbl/mbl_index_sort
>> Ian.
>> On 30/09/2011 17:07, mbowers@cis.jhu.edu wrote:
>>> In MATLAB, the sort(matrix, dimension) command returns the matrix
>>> (sorted along the dimension specified), and a matrix of the sorted indices.
>>> Does anything similar exist in vxl for vnl_vector and/or vnl_matrix?
>>> Thank you,
>>> Michael Bowers
>>> Center for Imaging Science
>>> Johns Hopkins University