int
main(int argc, char * argv[])
{
if (argc < 4)
{
std::cerr << "Usage: " << std::endl;
std::cerr << argv[0]
<< " inputImageFile inputDisplacementField outputImageFile"
<< std::endl;
return EXIT_FAILURE;
}
using VectorComponentType = float;
using PixelType = unsigned char;
reader->SetFileName(argv[1]);
writer->SetFileName(argv[3]);
fieldReader->SetFileName(argv[2]);
fieldReader->Update();
fieldReader->GetOutput();
using FilterType =
using InterpolatorType =
filter->SetInterpolator(interpolator);
filter->SetOutputSpacing(deformationField->GetSpacing());
filter->SetOutputOrigin(deformationField->GetOrigin());
filter->SetOutputDirection(deformationField->GetDirection());
filter->SetDisplacementField(deformationField);
filter->SetInput(reader->GetOutput());
writer->SetInput(filter->GetOutput());
try
{
writer->Update();
}
{
std::cerr << "Exception thrown " << std::endl;
std::cerr << excp << std::endl;
}
return EXIT_SUCCESS;
}