int
main(int, char *[])
{
PointSetType::Pointer pointSet = PointSetType::New();
PointSetType::PixelType pixel;
unsigned int pointId = 0;
constexpr double radius = 3.0;
for (unsigned int i = 0; i < 360; i++)
{
point[0] = radius * std::sin(angle);
point[1] = radius * std::cos(angle);
point[2] = 1.0;
pixel.SetRed(point[0] * 2.0);
pixel.SetGreen(point[1] * 2.0);
pixel.SetBlue(point[2] * 2.0);
pointSet->SetPoint(pointId, point);
pointSet->SetPointData(pointId, pixel);
pointId++;
}
using PointIterator = PointSetType::PointsContainer::ConstIterator;
PointIterator pointIterator = pointSet->GetPoints()->Begin();
PointIterator pointEnd = pointSet->GetPoints()->End();
while (pointIterator != pointEnd)
{
point = pointIterator.Value();
std::cout << point << std::endl;
++pointIterator;
}
using PointDataIterator = PointSetType::PointDataContainer::ConstIterator;
PointDataIterator pixelIterator = pointSet->GetPointData()->Begin();
PointDataIterator pixelEnd = pointSet->GetPointData()->End();
while (pixelIterator != pixelEnd)
{
pixel = pixelIterator.Value();
std::cout << pixel << std::endl;
++pixelIterator;
}
return EXIT_SUCCESS;
}