Hi!<br>thanks for the suggestions...<br>I tried that out, but its main problem are the repetitions, which I am not allowed to have. <br>Marta<br><br><div class="gmail_quote">On 24 November 2010 17:57, Arnaud GELAS <span dir="ltr"><<a href="mailto:arnaud_gelas@hms.harvard.edu">arnaud_gelas@hms.harvard.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">
Hi Marta,<br>
<br>
If the underlying container of your pointset is a vector container
(which is the default), you only need to generate a random sequence
in between 0 and the number of points in your container.<br>
<br>
You may have a look at vnl_random, here:<br>
<a href="http://www.lems.brown.edu/vision/vxl_doc/html/core/vnl/html/classvnl__random.html" target="_blank">http://www.lems.brown.edu/vision/vxl_doc/html/core/vnl/html/classvnl__random.html</a><br>
<br>
HTH,<br><font color="#888888">
Arnaud</font><div><div></div><div class="h5"><br>
<br>
On 11/24/2010 11:17 AM, Marta Peroni wrote:
<blockquote type="cite">Hi!<br>
I have a kind of "dummy" problem. I do need to select a subset of
point cloud describing the contour of a structure (the points are
previously derived with the ITK Review implementation of Marching
Squares and therefore I do have *lots* of points). <br>
I found a very nice implementation of this in CGAL
Random_Simplify_Points, but unfortunately I cannot include the
whole library in my project. <br>
So here it comes the question: <br>
I did store my points (x,y,z) in a PointsContainer (as in
PointSet2.cxx). Now in order for the algorithm to work, I need to
randomly shuffle / randomly extract from the container (shuffle
would be the best option). <br>
Is there something similar to
itk::ImageRandomNonRepeatingIteratorWithIndex but for points
containers?and/or a shuffle method?<br>
thanks a lot<br>
Marta<br>
-- <br>
*******************************************************************<br>
Marta Peroni<br>
PhD Student - Bioengineering department - Politecnico di Milano
(IT)<br>
<br>
contacts:<br>
mail: <a href="mailto:marta.peroni@mail.polimi.it" target="_blank">marta.peroni@mail.polimi.it</a>
, <a href="mailto:m.peroni@gmail.com" target="_blank">m.peroni@gmail.com</a><br>
mobile: +393488202136 (IT) +16178186365 (US)<br>
office: +39 02 2399 9022<br>
<br>
********************************************************************<br>
</blockquote>
<br>
</div></div></div>
</blockquote></div><br><br clear="all"><br>-- <br>*******************************************************************<br>Marta Peroni<br>PhD Student - Bioengineering department - Politecnico di Milano (IT)<br><br>contacts:<br>
mail: <a href="mailto:marta.peroni@mail.polimi.it">marta.peroni@mail.polimi.it</a> , <a href="mailto:m.peroni@gmail.com">m.peroni@gmail.com</a><br>mobile: +393488202136 (IT) +16178186365 (US)<br>office: +39 02 2399 9022<br>
<br>********************************************************************<br>