[Insight-users] Simplify a set of points in ITK
Arnaud GELAS
arnaud_gelas at hms.harvard.edu
Wed Nov 24 11:57:37 EST 2010
Hi Marta,
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.
You may have a look at vnl_random, here:
http://www.lems.brown.edu/vision/vxl_doc/html/core/vnl/html/classvnl__random.html
HTH,
Arnaud
On 11/24/2010 11:17 AM, Marta Peroni wrote:
> Hi!
> 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).
> I found a very nice implementation of this in CGAL
> Random_Simplify_Points, but unfortunately I cannot include the whole
> library in my project.
> So here it comes the question:
> 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).
> Is there something similar to
> itk::ImageRandomNonRepeatingIteratorWithIndex but for points
> containers?and/or a shuffle method?
> thanks a lot
> Marta
> --
> *******************************************************************
> Marta Peroni
> PhD Student - Bioengineering department - Politecnico di Milano (IT)
>
> contacts:
> mail: marta.peroni at mail.polimi.it <mailto:marta.peroni at mail.polimi.it>
> , m.peroni at gmail.com <mailto:m.peroni at gmail.com>
> mobile: +393488202136 (IT) +16178186365 (US)
> office: +39 02 2399 9022
>
> ********************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20101124/a1291a69/attachment.htm>
More information about the Insight-users
mailing list