Hi, Eric.<br><br>Using FindCell from vtk.vtkCellLocator in Python ( the only method I 
found useful in Python interface ) prints this:<br>
<br>
..\archive\VTK\Filtering\vtkAbstractCellLocator.cxx, line 197<br>
vtkCellLocator (01EEEF90): vtkCellLocator Does not implement FindCell 
Reverting to slow DataSet implementation<br>
<br>
and few times returns a cell_id != -1.<br><br>I want to highlight some points or cells, and put labels with their scalar or vector value. With pointdata I have done, but it remains celldata.<br><br>With pointdata I use a vtk.vtkPropPicker() and vtk.vtkPointLocator()&#39;s method .FindClosestPoint(pos).<br>
<br>With celldata I am trying with vtk.vtkCellLocator()&#39;s method .FindCell(pos)&#39;s since .FindClosestPoint(pos) is not available in Python.<br><br>At the moment labeling clicked points with their pointdata value works, but celldata does not.<br>
<br><div class="gmail_quote">On Fri, Apr 9, 2010 at 3:37 PM, Eric E. Monson <span dir="ltr">&lt;<a href="mailto:emonson@cs.duke.edu">emonson@cs.duke.edu</a>&gt;</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;">
Hello Rodrigo,<br>
<br>
Someone with more knowledge about the Python wrapping process will have to explain why some methods are wrapped and some aren&#39;t -- it&#39;s frustrating for me, too, sometimes.<br>
<br>
But, since you see FindCell, but it does not work, please explain in more detail what is going wrong when you try to use it so people can help with that.<br>
<br>
Talk to you later,<br>
-Eric<br>
<br>
------------------------------------------------------<br>
Eric E Monson<br>
Duke Visualization Technology Group<br>
<div><div></div><div class="h5"><br>
<br>
On Apr 9, 2010, at 7:45 AM, Rodrigo Valiña Gutiérrez wrote:<br>
<br>
&gt; Hi,<br>
&gt;<br>
&gt; I am using Python interface of VTK 5.4.2 and was using a<br>
&gt; vtk.vtkPointLocator, which works well.<br>
&gt;<br>
&gt; But now I want to use vtk.vtkCellLocator, and there is a problem:<br>
&gt; there are methods (specially FindClosestPoint) that I want to use and<br>
&gt; they appear in documentation and in source of vtkCellLocator, but not<br>
&gt; in Python interface. Also FindCell does not seem to work.<br>
&gt;<br>
&gt; vtkCellLocator:<br>
&gt; <a href="http://www.vtk.org/doc/release/5.4/html/a00250.html" target="_blank">http://www.vtk.org/doc/release/5.4/html/a00250.html</a><br>
&gt;<br>
&gt; The methods defined in Python are:<br>
&gt;<br>
&gt; a = vtk.vtkPointLocator()<br>
&gt; dir(a)<br>
&gt; [&#39;AddObserver&#39;, &#39;AutomaticOff&#39;, &#39;AutomaticOn&#39;, &#39;BreakOnError&#39;,<br>
&gt; &#39;BuildLocator&#39;, &#39;DebugOff&#39;, &#39;DebugOn&#39;, &#39;FastDelete&#39;,<br>
&gt; &#39;FindClosestInsertedPoint&#39;, &#39;FindClosestNPoints&#39;, &#39;FindClosestPoint&#39;,<br>
&gt; &#39;FindDistributedPoints&#39;, &#39;FindPointsWithinRadius&#39;,<br>
&gt; &#39;FreeSearchStructure&#39;, &#39;GenerateRepresentation&#39;, &#39;GetAddressAsString&#39;,<br>
&gt; &#39;GetAutomatic&#39;, &#39;GetBuildTime&#39;, &#39;GetClassName&#39;, &#39;GetDataSet&#39;,<br>
&gt; &#39;GetDebug&#39;, &#39;GetDivisions&#39;, &#39;GetGlobalWarningDisplay&#39;, &#39;GetLevel&#39;,<br>
&gt; &#39;GetMTime&#39;, &#39;GetMaxLevel&#39;, &#39;GetMaxLevelMaxValue&#39;,<br>
&gt; &#39;GetMaxLevelMinValue&#39;, &#39;GetNumberOfPointsPerBucket&#39;,<br>
&gt; &#39;GetNumberOfPointsPerBucketMaxValue&#39;,<br>
&gt; &#39;GetNumberOfPointsPerBucketMinValue&#39;, &#39;GetPoints&#39;,<br>
&gt; &#39;GetPointsInBucket&#39;, &#39;GetReferenceCount&#39;, &#39;GetTolerance&#39;,<br>
&gt; &#39;GetToleranceMaxValue&#39;, &#39;GetToleranceMinValue&#39;,<br>
&gt; &#39;GlobalWarningDisplayOff&#39;, &#39;GlobalWarningDisplayOn&#39;, &#39;HasObserver&#39;,<br>
&gt; &#39;InitPointInsertion&#39;, &#39;Initialize&#39;, &#39;InsertNextPoint&#39;, &#39;InsertPoint&#39;,<br>
&gt; &#39;InvokeEvent&#39;, &#39;IsA&#39;, &#39;IsInsertedPoint&#39;, &#39;IsTypeOf&#39;, &#39;Modified&#39;,<br>
&gt; &#39;NewInstance&#39;, &#39;PrintRevisions&#39;, &#39;Register&#39;, &#39;RemoveAllObservers&#39;,<br>
&gt; &#39;RemoveObserver&#39;, &#39;RemoveObservers&#39;, &#39;SafeDownCast&#39;, &#39;SetAutomatic&#39;,<br>
&gt; &#39;SetDataSet&#39;, &#39;SetDebug&#39;, &#39;SetDivisions&#39;, &#39;SetGlobalWarningDisplay&#39;,<br>
&gt; &#39;SetMaxLevel&#39;, &#39;SetNumberOfPointsPerBucket&#39;, &#39;SetReferenceCount&#39;,<br>
&gt; &#39;SetTolerance&#39;, &#39;UnRegister&#39;, &#39;Update&#39;]<br>
&gt;<br>
&gt; b = vtk.vtkCellLocator()<br>
&gt; dir(b)<br>
&gt; [&#39;AddObserver&#39;, &#39;AutomaticOff&#39;, &#39;AutomaticOn&#39;, &#39;BreakOnError&#39;,<br>
&gt; &#39;BuildLocator&#39;, &#39;CacheCellBoundsOff&#39;, &#39;CacheCellBoundsOn&#39;, &#39;DebugOff&#39;,<br>
&gt; &#39;DebugOn&#39;, &#39;FastDelete&#39;, &#39;FindCell&#39;, &#39;FindCellsAlongLine&#39;,<br>
&gt; &#39;FreeSearchStructure&#39;, &#39;GenerateRepresentation&#39;, &#39;GetAddressAsString&#39;,<br>
&gt; &#39;GetAutomatic&#39;, &#39;GetBuildTime&#39;, &#39;GetCacheCellBounds&#39;, &#39;GetCells&#39;,<br>
&gt; &#39;GetClassName&#39;, &#39;GetDataSet&#39;, &#39;GetDebug&#39;, &#39;GetGlobalWarningDisplay&#39;,<br>
&gt; &#39;GetLazyEvaluation&#39;, &#39;GetLevel&#39;, &#39;GetMTime&#39;, &#39;GetMaxLevel&#39;,<br>
&gt; &#39;GetMaxLevelMaxValue&#39;, &#39;GetMaxLevelMinValue&#39;, &#39;GetNumberOfBuckets&#39;,<br>
&gt; &#39;GetNumberOfCellsPerBucket&#39;, &#39;GetNumberOfCellsPerNode&#39;,<br>
&gt; &#39;GetNumberOfCellsPerNodeMaxValue&#39;, &#39;GetNumberOfCellsPerNodeMinValue&#39;,<br>
&gt; &#39;GetReferenceCount&#39;, &#39;GetRetainCellLists&#39;, &#39;GetTolerance&#39;,<br>
&gt; &#39;GetToleranceMaxValue&#39;, &#39;GetToleranceMinValue&#39;,<br>
&gt; &#39;GetUseExistingSearchStructure&#39;, &#39;GlobalWarningDisplayOff&#39;,<br>
&gt; &#39;GlobalWarningDisplayOn&#39;, &#39;HasObserver&#39;, &#39;Initialize&#39;,<br>
&gt; &#39;InsideCellBounds&#39;, &#39;IntersectWithLine&#39;, &#39;InvokeEvent&#39;, &#39;IsA&#39;,<br>
&gt; &#39;IsTypeOf&#39;, &#39;LazyEvaluationOff&#39;, &#39;LazyEvaluationOn&#39;, &#39;Modified&#39;,<br>
&gt; &#39;NewInstance&#39;, &#39;PrintRevisions&#39;, &#39;Register&#39;, &#39;RemoveAllObservers&#39;,<br>
&gt; &#39;RemoveObserver&#39;, &#39;RemoveObservers&#39;, &#39;RetainCellListsOff&#39;,<br>
&gt; &#39;RetainCellListsOn&#39;, &#39;SafeDownCast&#39;, &#39;SetAutomatic&#39;,<br>
&gt; &#39;SetCacheCellBounds&#39;, &#39;SetDataSet&#39;, &#39;SetDebug&#39;,<br>
&gt; &#39;SetGlobalWarningDisplay&#39;, &#39;SetLazyEvaluation&#39;, &#39;SetMaxLevel&#39;,<br>
&gt; &#39;SetNumberOfCellsPerBucket&#39;, &#39;SetNumberOfCellsPerNode&#39;,<br>
&gt; &#39;SetReferenceCount&#39;, &#39;SetRetainCellLists&#39;, &#39;SetTolerance&#39;,<br>
&gt; &#39;SetUseExistingSearchStructure&#39;, &#39;UnRegister&#39;, &#39;Update&#39;,<br>
&gt; &#39;UseExistingSearchStructureOff&#39;, &#39;UseExistingSearchStructureOn&#39;]<br>
&gt;<br>
&gt; is it a bug ?<br>
&gt;<br>
&gt; am I missing something ?<br>
</div></div>&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br>
</blockquote></div><br>