You can indeed use vtkPolyDataToImageStencil, vtkImageStencilToImage, and vtkImageStencil to fill in a labelmap volume using a closed contour. The code above generally looks all right, probably there is just a few bugs that you need to hunt down. If you just want to visualize a filled contour then you can add a polydata with a polygon cell. You can probably modify the contour widget representation to show this filled polygon (but maybe there are already such representations available).
However, I would recommend to not reimplement a segmentation tool (and viewer, and DICOM importer/exporter, etc.) from scratch. By customizing/extending existing free, open-source, restriction-free medical image computing frameworks, such as 3D Slicer or MITK, you could provide much better software to your users, much faster.