[vtkusers] Selections
David Doria
daviddoria+vtk at gmail.com
Tue Feb 2 07:15:00 EST 2010
On Mon, Feb 1, 2010 at 11:49 PM, Bill Lorensen <bill.lorensen at gmail.com>wrote:
> Have you looked for a test that uses vtkExtractSelection? I found one
> in VTK/Graphics/Testing/Cxx/TestExtraction.cxx. It might help. I have
> not looked at your example or the test.
>
> On Mon, Feb 1, 2010 at 8:33 PM, David Doria <daviddoria+vtk at gmail.com<daviddoria%2Bvtk at gmail.com>>
> wrote:
> > I am trying to demonstrate vtkSelectionSource and vtkExtractSelection:
> > http://www.vtk.org/Wiki/VTK/Examples/ExtractSelection
> > The example is setup to create 50 random points and extract 10 of them
> (IDs
> > 10 through 20, so maybe 11?). Is this the right idea? Create a
> > selectionSource, tell it which things you want to select, then extract
> the
> > selection?
> > The output of the extractSelection filter is NULL, so clearly it is not
> > exactly correct :)
> > Also, the output of the ExtractSelection is a vtkDataObject, so I tried
> to
> > cast it as a vtkDataSet to get back to a sane data type - is this a
> > reasonable approach? 'obj' is null for now so I can't tell if the cast
> will
> > work.
> > Any suggestions?
> > Thanks,
> >
> > David
>
>
That helped catch a bug with the ExtractSelection filter, but I believe the
problem lies in the SelectionSource. There doesn't seem to be any tests that
use a vtkSelectionSource (this is bad, right!?).
Here is the latest version:
http://www.vtk.org/Wiki/VTK/Examples/ExtractSelection
It exits successfully, but there are 0 points in the output.
Thanks,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100202/8009c24a/attachment.htm>
More information about the vtkusers
mailing list