vtkOBJImporter load data, and how to get the color of point, and change some of the cells' color by SetScalars?

Hi, Andras, I’m using vtk to get the threshold segment and translate it to polydata. But here is some problems, Can you see it? Thank you.
If possible, Can you give me how slicer process this flow?(Get the CT, threshold, translate to polydata?)

here is the link: