int
main(int argc, char ** argv)
{
  
  if (argc < 3)
  {
    std::cerr << "Usage: " << std::endl;
    std::cerr << argv[0] << " inputImageFile  outputVectorImageFile "
              << std::endl;
    return EXIT_FAILURE;
  }
 
 
  
  
  
  
  
  
  
  
  
  
  
 
  
  using ComponentType = float;
  constexpr unsigned int Dimension = 2;
 
 
  using MagnitudePixelType = float;
  using OutputPixelType = unsigned short;
 
  
 
 
  
  
  
  
  
  
 
  
  
 
 
  
  
  
  
  
  
  
  
  
  
  
 
  
  using FilterType =
 
  auto filter = FilterType::New();
  
 
 
  
  
  
  
  
  
  
  
  
 
  
  using RescaleFilterType =
 
  auto rescaler = RescaleFilterType::New();
  
 
 
  
  
  
  
  
  
  
  
  
  
  
  
 
  
  
 
 
  
  
  
  
  
  
  
  
  
  
  
 
  
  auto reader = ReaderType::New();
  auto writer = WriterType::New();
  
 
 
  
  
  const char * inputFilename = argv[1];
  const char * outputFilename = argv[2];
 
 
  
  
  
  
  
  
  
  
  
  
  
 
  
  reader->SetFileName(inputFilename);
  writer->SetFileName(outputFilename);
  
 
 
  
  
  
  
  
  
 
  
  filter->SetInput(reader->GetOutput());
  rescaler->SetInput(filter->GetOutput());
  writer->SetInput(rescaler->GetOutput());
  
 
 
  
  
  
  
  
  
  
 
  
  try
  {
    writer->Update();
  }
  {
    std::cerr << "ExceptionObject caught !" << std::endl;
    std::cerr << err << std::endl;
    return EXIT_FAILURE;
  }
  
 
  return EXIT_SUCCESS;
}
A templated class holding a n-Dimensional covariant vector.
 
Standard exception handling object.
 
Data source that reads image data from a single file.
 
Writes image data to a single file.
 
Templated n-dimensional image class.
 
static constexpr T max(const T &)
 
static constexpr T min(const T &)
 
Applies a linear transformation to the intensity levels of the input Image.
 
Take an image of vectors as input and produce an image with the magnitude of those vectors.