#include <iostream>
#include <stdlib.h>
#include <iomanip>
class IterationUpdate
{
public:
: m_Filter(m)
{}
{
using sitk::operator<<;
std::ios state(NULL);
state.copyfmt(std::cout);
std::cout << std::fixed << std::setfill(' ') << std::setprecision( 5 );
std::cout << std::setw(3) << m_Filter.GetElapsedIterations();
std::cout << " = " << std::setw(10) << m_Filter.GetMetric();
std::cout << std::endl;
std::cout.copyfmt(state);
}
private:
};
int main(int argc, char *argv[])
{
if ( argc < 4 )
{
std::cerr << "Usage: " << argv[0] << " <fixedImageFilter> <movingImageFile> [initialTransformFile] <outputTransformFile>" << std::endl;
return 1;
}
{
}
else
{
}
moving = matcher.
Execute(moving, fixed);
IterationUpdate cmd(filter);
if ( argc > 4 )
{
argv[3] = argv[4];
--argc;
displacementField = toDisplacementFilter.
Execute(initialTransform);
displacementField = filter.
Execute( fixed, moving, displacementField );
}
else
{
displacementField = filter.
Execute( fixed, moving );
}
std::cout << "-------" << std::endl;
std::cout <<
" RMS: " << filter.
GetRMSChange() << std::endl;
return 0;
}
SITKIO_EXPORT Image ReadImage(const std::string &filename, PixelIDValueEnum outputPixelType=sitkUnknown, const std::string &imageIO="")
ReadImage is a procedural interface to the ImageFileReader class which is convenient for most image r...