[vtkusers] Select cells within vtkPolyData object using a query string
David E DeMarle
dave.demarle at kitware.com
Thu Jun 19 12:45:17 EDT 2014
Slight correction to what Miro said, QUERY() seems to be a paraview
specific extension.
You can see the implementation of it
in ParaViewCore/ClientServerCore/Core/vtkPVExtractSelection.cxx
David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909
On Tue, Jun 17, 2014 at 3:15 PM, Miro Drahos <mdrahos at robodoc.com> wrote:
> 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
> <christian.bauer at rwth-aachen.de?subject=>
> OpenPGP: http://keys.gnupg.net/pks/lookup?op=get&search=0x5AA452D5F31608DA
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20140619/ba483051/attachment.html>
More information about the vtkusers
mailing list