using System;
namespace itk.simple.examples
{
class LandmarkRegistration
{
static void Main(string[] args)
{
fixedImage = pasteFilter.
Execute(fixedImage, 200);
movingImage = pasteFilter.
Execute(movingImage, 69);
VectorDouble fixedLandmarks = new VectorDouble(new double[] {10, 10, 20, 10, 20, 20});
VectorDouble movingLandmarks = new VectorDouble(new double[] {50, 50, 60, 50, 60, 60});
landmarkInitializer.SetFixedLandmarks(fixedLandmarks);
landmarkInitializer.SetMovingLandmarks(movingLandmarks);
Transform outputTransform = landmarkInitializer.Execute(transform);
Console.WriteLine(outputTransform.
ToString());
Image outputImage = SimpleITK.Resample(movingImage, fixedImage, outputTransform,
InterpolatorEnum.sitkLinear, 150);
SimpleITK.WriteImage(outputImage, "landmark_example.png");
string outName;
if (args.Length > 0)
{
outName = args[0];
}
else
{
outName = "landmark_transform.tfm";
}
SimpleITK.WriteTransform(outputTransform, outName);
}
}
}
The Image class for SimpleITK.
Paste an image (or a constant value) into another image.
void SetSourceSize(std::vector< unsigned int > SourceSize)
void SetDestinationIndex(std::vector< int > DestinationIndex)
Image Execute(Image &&destinationImage, const Image &sourceImage)
void SetSourceIndex(std::vector< int > SourceIndex)
PixelIDValueEnum
Enumerated values of pixelIDs.