int main( int argc, char *argv[] )
{
using PixelType = unsigned char;
LineType, ImageType >;
std::vector<LineType::LinePointType> points;
for(unsigned int i = 0; i < 20; i++)
{
LineType::LinePointType point;
point.SetPosition(10,i);
normal[0] = 0;
normal[1] = 1;
point.SetNormal(normal,0);
points.push_back(point);
}
LineType::Pointer line = LineType::New();
line->SetPoints(points);
SpatialObjectToImageFilterType::Pointer imageFilter =
SpatialObjectToImageFilterType::New();
imageFilter->SetInsideValue(255);
imageFilter->SetSize(size);
imageFilter->SetInput(line);
imageFilter->Update();
WriterType::Pointer writer = WriterType::New();
writer->SetFileName("line.png");
writer->SetInput( imageFilter->GetOutput() );
writer->Update();
return EXIT_SUCCESS;
}