How to do boolean operation on vtkPolyData?

Hi all,

I would like to select a part of polydata with vtkInteractorStyleRubberBandPick, and I have realized it with vtkSelection and vtkSelectionNode. Here is the picture
part1

And I would like to select another part of polydata and do boolean operation on them.
part2

I want to make the part which is selected only once get selected (in the picture is red) and the part which is selected twice get unselected (in the picture is yellow).

How can I realize this? I really need some help.

Thank you. Any ideas will be helpful.

Tiana