using TCoordinate = float;
int main(int argc, char * argv[] )
{
int i = 0;
if (argc == 2) i = atoi(argv[1]);
i = std::max(std::min(i,8),0);
std::string fileName = "sphere";
switch (i) {
case 0: fileName += ".vtk"; break;
case 1: fileName += ".byu"; break;
case 2: fileName += ".fcv"; break;
case 3: fileName += ".fsa"; break;
case 4: fileName += ".fsb"; break;
case 5: fileName += ".gii"; break;
case 6: fileName += ".obj"; break;
case 7: fileName += ".off"; break;
}
std::cout << "File Name: " << fileName << std::endl;
TSphere::Pointer sphere = TSphere::New();
TWriter::Pointer writer = TWriter::New();
TReader::Pointer reader = TReader::New();
writer->SetInput( sphere->GetOutput() );
writer->SetFileName( fileName );
writer->Update();
reader->SetFileName( fileName );
reader->Update();
return EXIT_SUCCESS;
}