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()'s method .FindClosestPoint(pos).<br>
<br>With celldata I am trying with vtk.vtkCellLocator()'s method .FindCell(pos)'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"><<a href="mailto:emonson@cs.duke.edu">emonson@cs.duke.edu</a>></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't -- it'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>
> Hi,<br>
><br>
> I am using Python interface of VTK 5.4.2 and was using a<br>
> vtk.vtkPointLocator, which works well.<br>
><br>
> But now I want to use vtk.vtkCellLocator, and there is a problem:<br>
> there are methods (specially FindClosestPoint) that I want to use and<br>
> they appear in documentation and in source of vtkCellLocator, but not<br>
> in Python interface. Also FindCell does not seem to work.<br>
><br>
> vtkCellLocator:<br>
> <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>
><br>
> The methods defined in Python are:<br>
><br>
> a = vtk.vtkPointLocator()<br>
> dir(a)<br>
> ['AddObserver', 'AutomaticOff', 'AutomaticOn', 'BreakOnError',<br>
> 'BuildLocator', 'DebugOff', 'DebugOn', 'FastDelete',<br>
> 'FindClosestInsertedPoint', 'FindClosestNPoints', 'FindClosestPoint',<br>
> 'FindDistributedPoints', 'FindPointsWithinRadius',<br>
> 'FreeSearchStructure', 'GenerateRepresentation', 'GetAddressAsString',<br>
> 'GetAutomatic', 'GetBuildTime', 'GetClassName', 'GetDataSet',<br>
> 'GetDebug', 'GetDivisions', 'GetGlobalWarningDisplay', 'GetLevel',<br>
> 'GetMTime', 'GetMaxLevel', 'GetMaxLevelMaxValue',<br>
> 'GetMaxLevelMinValue', 'GetNumberOfPointsPerBucket',<br>
> 'GetNumberOfPointsPerBucketMaxValue',<br>
> 'GetNumberOfPointsPerBucketMinValue', 'GetPoints',<br>
> 'GetPointsInBucket', 'GetReferenceCount', 'GetTolerance',<br>
> 'GetToleranceMaxValue', 'GetToleranceMinValue',<br>
> 'GlobalWarningDisplayOff', 'GlobalWarningDisplayOn', 'HasObserver',<br>
> 'InitPointInsertion', 'Initialize', 'InsertNextPoint', 'InsertPoint',<br>
> 'InvokeEvent', 'IsA', 'IsInsertedPoint', 'IsTypeOf', 'Modified',<br>
> 'NewInstance', 'PrintRevisions', 'Register', 'RemoveAllObservers',<br>
> 'RemoveObserver', 'RemoveObservers', 'SafeDownCast', 'SetAutomatic',<br>
> 'SetDataSet', 'SetDebug', 'SetDivisions', 'SetGlobalWarningDisplay',<br>
> 'SetMaxLevel', 'SetNumberOfPointsPerBucket', 'SetReferenceCount',<br>
> 'SetTolerance', 'UnRegister', 'Update']<br>
><br>
> b = vtk.vtkCellLocator()<br>
> dir(b)<br>
> ['AddObserver', 'AutomaticOff', 'AutomaticOn', 'BreakOnError',<br>
> 'BuildLocator', 'CacheCellBoundsOff', 'CacheCellBoundsOn', 'DebugOff',<br>
> 'DebugOn', 'FastDelete', 'FindCell', 'FindCellsAlongLine',<br>
> 'FreeSearchStructure', 'GenerateRepresentation', 'GetAddressAsString',<br>
> 'GetAutomatic', 'GetBuildTime', 'GetCacheCellBounds', 'GetCells',<br>
> 'GetClassName', 'GetDataSet', 'GetDebug', 'GetGlobalWarningDisplay',<br>
> 'GetLazyEvaluation', 'GetLevel', 'GetMTime', 'GetMaxLevel',<br>
> 'GetMaxLevelMaxValue', 'GetMaxLevelMinValue', 'GetNumberOfBuckets',<br>
> 'GetNumberOfCellsPerBucket', 'GetNumberOfCellsPerNode',<br>
> 'GetNumberOfCellsPerNodeMaxValue', 'GetNumberOfCellsPerNodeMinValue',<br>
> 'GetReferenceCount', 'GetRetainCellLists', 'GetTolerance',<br>
> 'GetToleranceMaxValue', 'GetToleranceMinValue',<br>
> 'GetUseExistingSearchStructure', 'GlobalWarningDisplayOff',<br>
> 'GlobalWarningDisplayOn', 'HasObserver', 'Initialize',<br>
> 'InsideCellBounds', 'IntersectWithLine', 'InvokeEvent', 'IsA',<br>
> 'IsTypeOf', 'LazyEvaluationOff', 'LazyEvaluationOn', 'Modified',<br>
> 'NewInstance', 'PrintRevisions', 'Register', 'RemoveAllObservers',<br>
> 'RemoveObserver', 'RemoveObservers', 'RetainCellListsOff',<br>
> 'RetainCellListsOn', 'SafeDownCast', 'SetAutomatic',<br>
> 'SetCacheCellBounds', 'SetDataSet', 'SetDebug',<br>
> 'SetGlobalWarningDisplay', 'SetLazyEvaluation', 'SetMaxLevel',<br>
> 'SetNumberOfCellsPerBucket', 'SetNumberOfCellsPerNode',<br>
> 'SetReferenceCount', 'SetRetainCellLists', 'SetTolerance',<br>
> 'SetUseExistingSearchStructure', 'UnRegister', 'Update',<br>
> 'UseExistingSearchStructureOff', 'UseExistingSearchStructureOn']<br>
><br>
> is it a bug ?<br>
><br>
> am I missing something ?<br>
</div></div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> 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>
><br>
> 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>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br>
</blockquote></div><br>