Why would I need to sweep polygonal data when working with contours?

Hi!

A comment in this PolyDataContourToImageData example claims:

// sweep polygonal data (this is the important thing with contours!)

I am working with contours read from a DICOM file and would like to avoid errors in the long run.

Under the assumption that examples get reviewed before being accepted and that the comment makes sense, I am curious about the need to ‘sweep’ using a vtkLinearExtrusionFilter? Or is the use of extruder (in the example code) specific to this particular example - working with polydata that was cut and stripped from vtkSphereSource? Worded differently: When would I need to sweep/extrude polygonal data when working with contours?

The “sweep” was only needed prior to VTK 5.10, and the example might have been contributed prior to that. There is test code in VTK that demonstrates the use of vtkPolyDataToImageStencil with a contour:
Imaging/Core/Testing/Cxx/TestStencilWithPolyDataContour.cxx

But keep in mind these points from the documentation for the vtkPolyDataToImageStencil:

The polydata can either be a closed surface mesh or a series of polyline contours (one contour per slice).
If contours are provided, the contours must be aligned with the Z planes. Other contour orientations are not supported.