ExtractCellsUsingPoints giving unusual output

Hi,

I want to split one triangular mesh into two parts based on the material information which is already included in the mesh.

The data is looking like this and it should be split into two parts the blue one and the other one.
I am using this example.
https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/ExtractCellsUsingPoints/#download-and-build-extractcellsusingpoints

But every time I am getting a wrong output. I am not understanding what caused this problem. Could you please help me.

I am attaching my input file here my source code and input file.

34

https://drive.google.com/open?id=1osYC3GqOq3-RNFYTtJ8MoxJbtxxd2VBp

Regards