using TCoordinate = float;
int
main(int, char *[])
{
TSphere::Pointer sphere = TSphere::New();
sphere->Update();
TMesh::Pointer mesh = sphere->GetOutput();
mesh->DisconnectPipeline();
for (unsigned int i = 0; i < mesh->GetNumberOfPoints(); ++i)
mesh->SetPointData(i, 5.0);
for (unsigned int i = 0; i < mesh->GetNumberOfCells(); ++i)
mesh->SetCellData(i, 10.0);
std::cout << mesh->GetNumberOfPoints() << std::endl;
std::cout << mesh->GetPointData()->Size() << std::endl;
std::cout << mesh->GetPointData()->ElementAt(0) << std::endl << std::endl;
std::cout << mesh->GetNumberOfCells() << std::endl;
std::cout << mesh->GetCellData()->Size() << std::endl;
std::cout << mesh->GetCellData()->ElementAt(0) << std::endl << std::endl;
TMeshWriter::Pointer meshWriter = TMeshWriter::New();
meshWriter->SetFileName("mesh.vtk");
meshWriter->SetInput(mesh);
meshWriter->Update();
return EXIT_SUCCESS;
}