[vtkusers] How to delete set of points..?
David Doria
daviddoria+vtk at gmail.com
Wed Aug 18 10:10:08 EDT 2010
On Wed, Aug 18, 2010 at 10:06 AM, Rakesh Patil <rakeshthp at in.com> wrote:
>
> Hello sir,
>
> As you said, i have used rubber band pick style to select multiple points.
> I tried the example given by you.. But it gives me selected data..
>
> Now actually scenario is that suppose there is a set of points, And i
> select half part
> of this and delete. So after deleting the half part, the graphics window
> must show
> the other remaining half only..
>
> But here
>
> extractSelection->GetOutput()
>
>
> contains the selected data. This i already have. Any other work around?
>
> Time being i have used
>
> http://vtk.org/Wiki/VTK/Examples/Cxx/PolyData/DeletePoint
>
> and this logic takes lot of time.
>
> Thanks
>
>
Did you see this part at the bottom?
//get points that are NOT in the selection
selectionNode->GetProperties()->Set(vtkSelectionNode::INVERSE(), 1);
//invert the selection
extractSelection->Update();
std::cout << "There are " << vtkDataSet::SafeDownCast
(extractSelection->GetOutput())->GetNumberOfPoints()
<< " points not in the selection." << std::endl;
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100818/34c5dd6d/attachment.htm>
More information about the vtkusers
mailing list