[vtkusers] Select cells within vtkPolyData object using a query string

Miro Drahos mdrahos at robodoc.com
Tue Jun 17 15:15:14 EDT 2014


It seems vtkSelectionNode::QUERY is not implemented. If you look at the 
source code, there is no case for it, so it defaults to error message 
and returns. Use an alternative selection (e.g. by indices).
Miro



On 06/17/2014 01:53 AM, Christian Bauer wrote:
> Hi all,
>
> I currently try to use the VTK C++ library, more precisely I try to 
> extract a selection by using a query string.
> Sadly I receive this error message from within vtk:
>
>     ERROR: In ~/git/VTK/Filters/Extraction/vtkExtractSelection.cxx,
>     line 365
>     vtkExtractSelection (0x7f8dd061ed30): Unrecognized CONTENT_TYPE: 9
>
>
> The following part of the code produces the error:
>
>     selection_node->SetFieldType(vtkSelectionNode::CELL); // select cells
>     selection_node->SetContentType(vtkSelectionNode::QUERY); // use
>     query string for selection
>     selection_node->SetQueryString("scalars[:,0] == 1");
>     selection->AddNode(selection_node);
>     extract_selection->SetInputData(0,bounding_poly); // a vtkPolyData
>     object containing a triangulation
>     extract_selection->SetInputData(1,selection);
>     extract_selection->Update();
>
>
> So my question is: How can I implement the selection by a query string?
>
> Best
> Christian Bauer
> --
> Christian Bauer
> Student
> Computational Engineering Science, B. Sc.
> RWTH Aachen University
> E-Mail:christian.bauer at rwth-aachen.de 
> <mailto:christian.bauer at rwth-aachen.de?subject=>
> OpenPGP: http://keys.gnupg.net/pks/lookup?op=get&search=0x5AA452D5F31608DA
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20140617/9b433c9c/attachment.html>


More information about the vtkusers mailing list