Extract specified contour from vtkImageData

i have a vtkImageData, and a contour polydata. please refer to below picture.
the white contour, which is refered by red arrow represent clipping contour clips the volume data.

i want to get the target vtkimagedata clied by contour, just like the below picture

Is there any one could help me ? Thanks!