ITK  5.0.0
Insight Segmentation and Registration Toolkit
WikiExamples/IO/TransformFileReader.cxx
int main(int argc, char *argv[])
{
std::string fileName;
if(argc == 1) // No arguments were provided
{
fileName = "test.tfm";
}
else
{
fileName = argv[1];
}
// Register default transforms
#if (ITK_VERSION_MAJOR == 4 && ITK_VERSION_MINOR >= 5) || ITK_VERSION_MAJOR > 4
#else
#endif
reader->SetFileName(fileName);
reader->Update();
// Display the transform
std::cout << *(reader->GetTransformList()->begin()) << std::endl;
return EXIT_SUCCESS;
}