// This parameter file has kind of realistic values.
// In most other parameter files for testing, the number of samples and iterations is rather low, to allow fast testing.


// ********** Image Types

(FixedInternalImagePixelType "float")
(FixedImageDimension 3)
(MovingInternalImagePixelType "float")
(MovingImageDimension 3)


// ********** Components
(RandomSeed 42)
(Registration "MultiResolutionRegistration")
(FixedImagePyramid "FixedGenericImagePyramid")
(MovingImagePyramid "MovingGenericImagePyramid")
(ImagePyramidRescaleSchedule 1 1 1 1 1 1)
(ImagePyramidSmoothingSchedule 1 1 1 1 1 1)
(Interpolator "BSplineInterpolator")

(Metric "Impact")
(Optimizer "AdaptiveStochasticGradientDescent")
(ResampleInterpolator "FinalBSplineInterpolator")
(Resampler "DefaultResampler")
(Transform "BSplineTransform")


// ********** Pyramid

// Total number of resolutions
(NumberOfResolutions 2)
(ImagePyramidSchedule 3 3 3 1 1 1)


// ********** Transform

(FinalGridSpacingInPhysicalUnits 10.0)
(GridSpacingSchedule 3.0 1.0)
(HowToCombineTransforms "Compose")


// ********** Optimizer

// Maximum number of iterations in each resolution level:
(MaximumNumberOfIterations 200)

(AutomaticParameterEstimation "true")
(UseAdaptiveStepSizes "true")


// ********** Metric
(ImpactModelsPath0 "./M730_1_Layers.pt")
(ImpactDimension0 3)
(ImpactNumberOfChannels0 1)
(ImpactPatchSize0 5 5 5)
(ImpactVoxelSize0 3 3 3)
(ImpactLayersMask0 "1")
(ImpactSubsetFeatures0 32)
(ImpactLayersWeight0 1)
(ImpactDistance0 "L2")
(ImpactPCA0 0)

(ImpactModelsPath1 "./M730_1_Layers.pt")
(ImpactDimension1 3)
(ImpactNumberOfChannels1 1)
(ImpactPatchSize1 5 5 5)
(ImpactVoxelSize1 1 1 1)
(ImpactLayersMask1 "1")
(ImpactSubsetFeatures1 32)
(ImpactLayersWeight1 1)
(ImpactDistance1 "L2")
(ImpactPCA1 0)

(ImpactMode "Jacobian")
(ImpactGPU -1)
(ImpactFeaturesMapUpdateInterval -1)
(ImpactWriteFeatureMaps "false")


// ********** Several

(WriteTransformParametersEachIteration "false")
(WriteTransformParametersEachResolution "true")
(WriteResultImageAfterEachResolution "false")
(WritePyramidImagesAfterEachResolution "false")
(WriteResultImage "false")
(ShowExactMetricValue "false")
(ErodeMask "false")
(UseDirectionCosines "true")


// ********** ImageSampler

//Number of spatial samples used to compute the mutual information in each resolution level:
(ImageSampler "RandomCoordinate")
(NumberOfSpatialSamples 1000)
(NewSamplesEveryIteration "true")
(UseRandomSampleRegion "false")
(MaximumNumberOfSamplingAttempts 8)


// ********** Interpolator and Resampler

//Order of B-Spline interpolation used in each resolution level:
(BSplineInterpolationOrder 1)

//Order of B-Spline interpolation used for applying the final deformation:
(FinalBSplineInterpolationOrder 3)

//Default pixel value for pixels that come from outside the picture:
(DefaultPixelValue 0)


