I read a stl file and want to convert it to image, How can i do using ITK?

this is the stl 3D PolyData.
图片

Look at TriangleMeshToBinaryImage filter example.