It is possible that a line segment cuts the mask but has no points inside --> missed
Maybe transform mask to polydata and use vtkIntersectionPolyDataFilter