[vtk-developers] Sorry, wrong VTK version (was vtkExtractSelectedIds (v5.10) performance of selection including containing cells)
Andreas Buykx
A.Buykx at tnodiana.com
Fri Oct 11 06:02:43 EDT 2013
Sorry, this was about vtk 5.8. In 5.10 it appears to have been solved already.
Andreas
From: Andreas Buykx
Sent: Friday, October 11, 2013 11:44 AM
To: vtk-developers at vtk.org
Subject: vtkExtractSelectedIds (v5.10) performance of selection including containing cells
Hi all,
I have a performance problem when I use vtkExtractSelectedIds with including the containing cells. I was studying the code and found a strange for-loop in the block below (vtkExtractSelectedIds.cxx v5.10, line 870). The loop variable j is used both in the 1st for-loop and in the 3rd for-loop. The first for-loop's j value is never used, but it gets reset to a low value every time the if-statement above the 3rd for-loop is true. I suspect this is not intended.
if (containingCells)
{
for (vtkIdType j = 0; j < input->GetNumberOfPoints(); j++)
{
input->GetPointCells(ptId, ptCells);
for (i = 0; i < ptCells->GetNumberOfIds(); ++i)
{
cellId = ptCells->GetId(i);
if (!passThrough && !invert && cellInArray->GetValue(cellId) != flag)
{
input->GetCellPoints(cellId, cellPts);
for (j = 0; j < cellPts->GetNumberOfIds(); ++j)
{
pointInArray->SetValue(cellPts->GetId(j), flag);
}
}
cellInArray->SetValue(cellId, flag);
}
}
}
Andreas Buykx
Senior Software Engineer
TNO DIANA BV
Software Developers and Analysis Consultants for Civil and Geotechnical Engineering
Delftechpark 19a, 2628 XJ, Delft, The Netherlands
Tel: +31 88 34262 15 (Direct) │ Tel: +31 88 34262 00 (Switchboard) │ +31 88 34262 99 (Fax)
http://tnodiana.com<http://tnodiana.com/>
...be green keep it on screen
____________________________________________________________
TNO DIANA BV is a limited liability company registered in the trade register of the Chamber of Commerce as TNO DIANA BV with registered number 27252655.
____________________________________________________________
This e-mail and its contents are subject to the DISCLAIMER at http://tnodiana.com/content/Disclaimer
____________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20131011/d3f137e4/attachment.html>
More information about the vtk-developers
mailing list