Hi
I am new to ITK , I am using SimpleITK in C#.
I have planar closed contour , a set of coordinates. What I need to do is create a binary mask with the same dimensions spacing and origin as the original ITK Image.
I am not sure which filters would be the correct ones to use for this purpose.
I have tried to perform this task using VTK with limited success
Any help and pointers would be greatly appreciated
ITK and SimpleITK do not support this type of operation (polygon rasterization).
You were looking in the right place, VTK. Have you tried asking on the vtk discourse? I suspect there are other C# libraries that allow you to drawPolygon/fillPolygon.
The issue with vtkPolyDataToImageStencil is that it seems to create artifacts, even thought the contour region is 100% fully closed. What seems to me to be random is entire lines missing from the contours ,for example :