using System;
namespace itk.simple.examples {
m_Method=m;
}
public override void Execute() {
Console.WriteLine("{0:3} = {1:10.5} : [{2}, {3}]",
pos[0], pos[1]);
}
}
class ImageRegistrationMethod1 {
static void Main(string[] args) {
if ( args.Length < 3 )
{
Console.WriteLine("Usage: %s <fixedImageFilter> <movingImageFile> <outputTransformFile>\n", "ImageRegistrationMethod1");
return;
}
double maxStep = 4.0;
double minStep = 0.01;
uint numberOfIterations = 200;
double relaxationFactor = 0.5;
minStep,
numberOfIterations,
relaxationFactor );
IterationUpdate cmd = new IterationUpdate(R);
}
}
}
An implementation of the Command design pattern for callback.
Read an image file and return a SimpleITK Image.
void SetFileName(const PathType &fn)
void SetOutputPixelType(PixelIDValueEnum pixelID)
Set/Get The output PixelType of the image.
An interface method to the modular ITKv4 registration framework.
void SetMetricAsMeanSquares()
Use negative means squares image metric.
void SetInterpolator(InterpolatorEnum Interpolator)
Set and get the interpolator to use.
Transform Execute(const Image &fixed, const Image &moving)
Optimize the configured registration problem.
std::vector< double > GetOptimizerPosition() const
void SetOptimizerAsRegularStepGradientDescent(double learningRate, double minStep, unsigned int numberOfIterations, double relaxationFactor=0.5, double gradientMagnitudeTolerance=1e-4, EstimateLearningRateType estimateLearningRate=Never, double maximumStepSizeInPhysicalUnits=0.0)
Regular Step Gradient descent optimizer.
unsigned int GetOptimizerIteration() const
double GetMetricValue() const
void SetInitialTransform(const Transform &transform)
Set the initial transform and parameters to optimize.
The Image class for SimpleITK.
unsigned int GetDimension() const
virtual int AddCommand(itk::simple::EventEnum event, itk::simple::Command &cmd)
Add a Command Object to observer the event.
EventEnum
Events which can be observed from ProcessObject.
PixelIDValueEnum
Enumerated values of pixelIDs.