#include <iostream>
int
main(int argc, char * argv[])
{
if (argc < 3)
{
std::cerr << "arguments expected: test.xml test-slice.xml" << std::endl;
return EXIT_FAILURE;
}
try
{
reader->SetFileName(argv[1]);
reader->Update();
std::string query = "";
do
{
std::cout << "query = \"" << query << "\"" << std::endl;
{
std::cout << "invalid query!" << std::endl;
}
else
{
dom1 = dom2;
std::cout << "tag : " << dom1->GetName() << std::endl;
std::cout << "path: " << dom1->GetPath() << std::endl;
std::cout << *dom1 << std::endl;
}
std::cout << std::endl << "type a query (... to quit) > ";
std::cin >> query;
} while (query != "...");
writer->SetInput(dom1);
writer->SetFileName(argv[2]);
writer->Update();
}
catch (const itk::ExceptionObject & eo)
{
return EXIT_FAILURE;
}
catch (...)
{
std::cerr << "Unknown exception caught!" << std::endl;
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}