[vtkusers] Point addition and removal data structure
Marcelino Rodriguez Cancio
marcelinorc at uclv.edu.cu
Wed Nov 13 10:07:55 EST 2013
You may use vtkPointSet to achieve most of your needs
>> able to add individual points at random
vtkPointSet::GetPoints<file:///E:\DOCUMENTATION\TK\VTK\vtkDocHtml-5.8.0\html\a01526.html#f8a9a39d0ff4c56454be8d35a42b7f34>()::InsertNextPoint() and call for each point you want to add.
Also, you may call
vtkPointSet:: GetPoints<file:///E:\DOCUMENTATION\TK\VTK\vtkDocHtml-5.8.0\html\a01526.html#f8a9a39d0ff4c56454be8d35a42b7f34>()::SetNumberOfPoints() to specify the number of points and then set each point using vtkPointSet::GetPoints()::SetPoint()<file:///E:\DOCUMENTATION\TK\VTK\vtkDocHtml-5.8.0\html\a01524.html#0ca9c77d1efbeb7dff8d15ec34b19192>
>>want it to be able to detect if the point is already contained
vtkPointSet::FindPoint<file:///E:\DOCUMENTATION\TK\VTK\vtkDocHtml-5.8.0\html\a01526.html#a752212d5f6334f42dfcfd7d5ba10977>
-- I need access to the underlying data for an external programme
vtkPointSet::GetPoint<file:///E:\DOCUMENTATION\TK\VTK\vtkDocHtml-5.8.0\html\a00485.html#e8406fa1dc144b392ef28111c71a47b0>s()::GetPoint(pointid)
--Finally, and most importantly, I want to be able to delete points<file:///E:\DOCUMENTATION\TK\VTK\vtkDocHtml-5.8.0\html\a00485.html#e8406fa1dc144b392ef28111c71a47b0>
vtkPointSet::GetPoint<file:///E:\DOCUMENTATION\TK\VTK\vtkDocHtml-5.8.0\html\a00485.html#e8406fa1dc144b392ef28111c71a47b0>s()::GetData().RemoveTuple(pointid)
-- So deletion should not re-number the point ids once a point is removed.
I owe you that, unfortunately I think vtkIdType is just an index rather than a key.
From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Andrew Parker
Sent: miércoles, 13 de noviembre de 2013 8:27
To: vtkusers at vtk.org
Subject: [vtkusers] Point addition and removal data structure
All,
I am looking for a vtk data structure with the following requirements:
-- I want to be able to add individual points at random, rather than construct the data structure from a point list. When the point is added I want the id of the point added returned
-- I want it to be able to detect if the point is already contained, and if so return the id of the contained point, else the newly added id - so strongly enforce no duplication. I would prefer a very tight tolerance for duplicate point detection.
-- I need access to the underlying data for an external programme, so I'm hoping that they're stored as x_y_x for point 0 and then x_y_z for point 1 etc. I can live without this, but would prefer access to contiguous underlying storage.
-- Finally, and most importantly, I want to be able to delete points, without it invalidating previously returned id's for other points that remain after deletion. So deletion should not re-number the point ids once a point is removed. It should also not be an overly costly process to delete, as this is likely to happen just as frequently as addition. I would prefer deletion over contiguous point storage, so if I have to sacrifice one then it would be the above requirement rather than this one.
I thought I had most of the above with vtkMergePoints, but I don't think I can remove points with that data structure? Or at least I couldn't figure that out?
Can anybody recommend anything in vtk that can do all of the above? Or indeed as equally valid confirm that the above cannot all be met currently within vtk?
Speed and efficiency of both point addition and removal are vital. I only care about 3D points, so not bothered about connectivity of faces/cells etc.
Cheers,
Andy
________________________________
La Universidad Central "Marta Abreu" de Las Villas en su 60 Aniversario. Fundada el 30 de noviembre de 1952. Visítenos en: http://www.uclv.edu.cu
Participe en Universidad 2014, del 10 al 14 de febrero de 2014. Habana. Cuba. http://www.congresouniversidad.cu/
________________________________
Se certificó que el correo no contiene virus.
Comprobada por AVG - www.avg.es<http://www.avg.es>
Versión: 2013.0.3349 / Base de datos de virus: 3204/6513 - Fecha de la versión: 23/07/2013
Las Definiciones de virus internas están desactualizadas.
________________________________
La Universidad Central "Marta Abreu" de Las Villas en su 60 Aniversario. Fundada el 30 de noviembre de 1952. Visítenos en: http://www.uclv.edu.cu
Participe en Universidad 2014, del 10 al 14 de febrero de 2014. Habana. Cuba. http://www.congresouniversidad.cu/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20131113/42f2ab66/attachment.htm>
More information about the vtkusers
mailing list