<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body 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 class="moz-txt-link-freetext" href="http://www.lems.brown.edu/vision/vxl_doc/html/core/vnl/html/classvnl__random.html">http://www.lems.brown.edu/vision/vxl_doc/html/core/vnl/html/classvnl__random.html</a><br>
<br>
HTH,<br>
Arnaud<br>
<br>
On 11/24/2010 11:17 AM, Marta Peroni wrote:
<blockquote
cite="mid:AANLkTimNPYev6x2FCw=NKyZ8AiPZR=0_vqbFOF7r6Q-N@mail.gmail.com"
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 moz-do-not-send="true"
href="mailto:marta.peroni@mail.polimi.it">marta.peroni@mail.polimi.it</a>
, <a moz-do-not-send="true" 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>
</blockquote>
<br>
</body>
</html>