diff --git a/Testing/Data/parameters.2D.NC.translation.ASGD.toml b/Testing/Data/parameters.2D.NC.translation.ASGD.toml index 38b83e048..ed6d49143 100644 --- a/Testing/Data/parameters.2D.NC.translation.ASGD.toml +++ b/Testing/Data/parameters.2D.NC.translation.ASGD.toml @@ -1,13 +1,13 @@ -// This parameter file is used to register the images -// 2D_square_object_at_(1,3) and 2D_square_object_at_(2,1). +# This parameter file is used to register the images +# 2D_square_object_at_(1,3) and 2D_square_object_at_(2,1). -(FixedInternalImagePixelType "float") -(FixedImageDimension 2) -(MovingInternalImagePixelType "float") -(MovingImageDimension 2) +FixedInternalImagePixelType = "float" +FixedImageDimension = 2 +MovingInternalImagePixelType = "float" +MovingImageDimension = 2 -(Metric "AdvancedNormalizedCorrelation") -(Optimizer "AdaptiveStochasticGradientDescent") -(Transform "TranslationTransform") -(MaximumNumberOfIterations 2) -(ImageSampler "Full") +Metric = "AdvancedNormalizedCorrelation" +Optimizer = "AdaptiveStochasticGradientDescent" +Transform = "TranslationTransform" +MaximumNumberOfIterations = 2 +ImageSampler = "Full" diff --git a/Testing/Data/parameters.3D.Kappa.bspline.ASGD.001.toml b/Testing/Data/parameters.3D.Kappa.bspline.ASGD.001.toml index 0e6fe125e..b7f1482a3 100644 --- a/Testing/Data/parameters.3D.Kappa.bspline.ASGD.001.toml +++ b/Testing/Data/parameters.3D.Kappa.bspline.ASGD.001.toml @@ -1,88 +1,88 @@ -// 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. +# 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 +# ********** Image Types -(FixedInternalImagePixelType "float") -(FixedImageDimension 3) -(MovingInternalImagePixelType "float") -(MovingImageDimension 3) +FixedInternalImagePixelType = "float" +FixedImageDimension = 3 +MovingInternalImagePixelType = "float" +MovingImageDimension = 3 -// ********** Components +# ********** Components -(Registration "MultiResolutionRegistration") -(FixedImagePyramid "FixedRecursiveImagePyramid") -(MovingImagePyramid "MovingRecursiveImagePyramid") -(Interpolator "NearestNeighborInterpolator") -(Metric "AdvancedKappaStatistic") -(Optimizer "AdaptiveStochasticGradientDescent") -(ResampleInterpolator "FinalBSplineInterpolator") -(Resampler "DefaultResampler") -(Transform "BSplineTransform") +Registration = "MultiResolutionRegistration" +FixedImagePyramid = "FixedRecursiveImagePyramid" +MovingImagePyramid = "MovingRecursiveImagePyramid" +Interpolator = "NearestNeighborInterpolator" +Metric = "AdvancedKappaStatistic" +Optimizer = "AdaptiveStochasticGradientDescent" +ResampleInterpolator = "FinalBSplineInterpolator" +Resampler = "DefaultResampler" +Transform = "BSplineTransform" -// ********** Pyramid +# ********** Pyramid -// Total number of resolutions -(NumberOfResolutions 3) -(ImagePyramidSchedule 4 4 4 2 2 2 1 1 1) +# Total number of resolutions +NumberOfResolutions = 3 +ImagePyramidSchedule = [4, 4, 4, 2, 2, 2, 1, 1, 1] -// ********** Transform +# ********** Transform -(FinalGridSpacingInPhysicalUnits 10.0 10.0 10.0) -(GridSpacingSchedule 4.0 2.0 1.0) -(HowToCombineTransforms "Compose") +FinalGridSpacingInPhysicalUnits = [10.0, 10.0, 10.0] +GridSpacingSchedule = [4.0, 2.0, 1.0] +HowToCombineTransforms = "Compose" -// ********** Optimizer +# ********** Optimizer -// Maximum number of iterations in each resolution level: -(MaximumNumberOfIterations 100) +# Maximum number of iterations in each resolution level: +MaximumNumberOfIterations = 100 -(AutomaticParameterEstimation "true") -(UseAdaptiveStepSizes "true") +AutomaticParameterEstimation = true +UseAdaptiveStepSizes = true -// ********** Metric +# ********** Metric -(UseComplement "true") -(UseForegroundValue "false") -(ForegroundValue 1) +UseComplement = true +UseForegroundValue = false +ForegroundValue = 1 -// ********** Several +# ********** Several -(WriteTransformParametersEachIteration "false") -(WriteTransformParametersEachResolution "true") -(WriteResultImageAfterEachResolution "false") -(WritePyramidImagesAfterEachResolution "false") -(WriteResultImage "false") -(ShowExactMetricValue "false") -(ErodeMask "false") -(UseDirectionCosines "true") +WriteTransformParametersEachIteration = false +WriteTransformParametersEachResolution = true +WriteResultImageAfterEachResolution = false +WritePyramidImagesAfterEachResolution = false +WriteResultImage = false +ShowExactMetricValue = false +ErodeMask = false +UseDirectionCosines = true -// ********** ImageSampler +# ********** ImageSampler -//Number of spatial samples used to compute the mutual information in each resolution level: -(ImageSampler "Random") -(NumberOfSpatialSamples 2000) -(NewSamplesEveryIteration "true") -(UseRandomSampleRegion "false") -//(SampleRegionSize 50.0 50.0 50.0) -(MaximumNumberOfSamplingAttempts 5) +#Number of spatial samples used to compute the mutual information in each resolution level: +ImageSampler = "Random" +NumberOfSpatialSamples = 2000 +NewSamplesEveryIteration = true +UseRandomSampleRegion = false +#(SampleRegionSize 50.0 50.0 50.0) +MaximumNumberOfSamplingAttempts = 5 -// ********** Interpolator and Resampler +# ********** Interpolator and Resampler -//Order of B-Spline interpolation used in each resolution level: -(BSplineInterpolationOrder 1) +#Order of B-Spline interpolation used in each resolution level: +BSplineInterpolationOrder = 1 -//Order of B-Spline interpolation used for applying the final deformation: -(FinalBSplineInterpolationOrder 0) +#Order of B-Spline interpolation used for applying the final deformation: +FinalBSplineInterpolationOrder = 0 -//Default pixel value for pixels that come from outside the picture: -(DefaultPixelValue 0) +#Default pixel value for pixels that come from outside the picture: +DefaultPixelValue = 0 diff --git a/Testing/Data/parameters.3D.MI.bspline.ASGD.001.toml b/Testing/Data/parameters.3D.MI.bspline.ASGD.001.toml index b0f59a886..209324291 100644 --- a/Testing/Data/parameters.3D.MI.bspline.ASGD.001.toml +++ b/Testing/Data/parameters.3D.MI.bspline.ASGD.001.toml @@ -1,90 +1,90 @@ -// 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. +# 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 +# ********** Image Types -(FixedInternalImagePixelType "float") -(FixedImageDimension 3) -(MovingInternalImagePixelType "float") -(MovingImageDimension 3) +FixedInternalImagePixelType = "float" +FixedImageDimension = 3 +MovingInternalImagePixelType = "float" +MovingImageDimension = 3 -// ********** Components +# ********** Components -(Registration "MultiResolutionRegistration") -(FixedImagePyramid "FixedRecursiveImagePyramid") -(MovingImagePyramid "MovingRecursiveImagePyramid") -(Interpolator "BSplineInterpolator") -(Metric "AdvancedMattesMutualInformation") -(Optimizer "AdaptiveStochasticGradientDescent") -(ResampleInterpolator "FinalBSplineInterpolator") -(Resampler "DefaultResampler") -(Transform "BSplineTransform") +Registration = "MultiResolutionRegistration" +FixedImagePyramid = "FixedRecursiveImagePyramid" +MovingImagePyramid = "MovingRecursiveImagePyramid" +Interpolator = "BSplineInterpolator" +Metric = "AdvancedMattesMutualInformation" +Optimizer = "AdaptiveStochasticGradientDescent" +ResampleInterpolator = "FinalBSplineInterpolator" +Resampler = "DefaultResampler" +Transform = "BSplineTransform" -// ********** Pyramid +# ********** Pyramid -// Total number of resolutions -(NumberOfResolutions 3) -(ImagePyramidSchedule 4 4 4 2 2 2 1 1 1) +# Total number of resolutions +NumberOfResolutions = 3 +ImagePyramidSchedule = [4, 4, 4, 2, 2, 2, 1, 1, 1] -// ********** Transform +# ********** Transform -(FinalGridSpacingInPhysicalUnits 10.0 10.0 10.0) -(GridSpacingSchedule 4.0 2.0 1.0) -(HowToCombineTransforms "Compose") +FinalGridSpacingInPhysicalUnits = [10.0, 10.0, 10.0] +GridSpacingSchedule = [4.0, 2.0, 1.0] +HowToCombineTransforms = "Compose" -// ********** Optimizer +# ********** Optimizer -// Maximum number of iterations in each resolution level: -(MaximumNumberOfIterations 500) +# Maximum number of iterations in each resolution level: +MaximumNumberOfIterations = 500 -(AutomaticParameterEstimation "true") -(UseAdaptiveStepSizes "true") +AutomaticParameterEstimation = true +UseAdaptiveStepSizes = true -// ********** Metric +# ********** Metric -(NumberOfHistogramBins 32) -(FixedKernelBSplineOrder 0) -(MovingKernelBSplineOrder 3) -(UseFastAndLowMemoryVersion "true") +NumberOfHistogramBins = 32 +FixedKernelBSplineOrder = 0 +MovingKernelBSplineOrder = 3 +UseFastAndLowMemoryVersion = true -// ********** Several +# ********** Several -(WriteTransformParametersEachIteration "false") -(WriteTransformParametersEachResolution "true") -(WriteResultImageAfterEachResolution "false") -(WritePyramidImagesAfterEachResolution "false") -(WriteResultImage "false") -(ShowExactMetricValue "false") -(ErodeMask "false") -(UseDirectionCosines "true") +WriteTransformParametersEachIteration = false +WriteTransformParametersEachResolution = true +WriteResultImageAfterEachResolution = false +WritePyramidImagesAfterEachResolution = false +WriteResultImage = false +ShowExactMetricValue = false +ErodeMask = false +UseDirectionCosines = true -// ********** ImageSampler +# ********** ImageSampler -//Number of spatial samples used to compute the mutual information in each resolution level: -(ImageSampler "Random") -(NumberOfSpatialSamples 2000) -(NewSamplesEveryIteration "true") -(UseRandomSampleRegion "false") -//(SampleRegionSize 50.0 50.0 50.0) -(MaximumNumberOfSamplingAttempts 5) +#Number of spatial samples used to compute the mutual information in each resolution level: +ImageSampler = "Random" +NumberOfSpatialSamples = 2000 +NewSamplesEveryIteration = true +UseRandomSampleRegion = false +#(SampleRegionSize 50.0 50.0 50.0) +MaximumNumberOfSamplingAttempts = 5 -// ********** Interpolator and Resampler +# ********** Interpolator and Resampler -//Order of B-Spline interpolation used in each resolution level: -(BSplineInterpolationOrder 1) +#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) +#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) +#Default pixel value for pixels that come from outside the picture: +DefaultPixelValue = 0 diff --git a/Testing/Data/parameters.3D.MI.bspline.SGD.001.toml b/Testing/Data/parameters.3D.MI.bspline.SGD.001.toml index e1908c2f2..e005a0b9f 100644 --- a/Testing/Data/parameters.3D.MI.bspline.SGD.001.toml +++ b/Testing/Data/parameters.3D.MI.bspline.SGD.001.toml @@ -1,87 +1,87 @@ -// ********** Image Types +# ********** Image Types -(FixedInternalImagePixelType "float") -(FixedImageDimension 3) -(MovingInternalImagePixelType "float") -(MovingImageDimension 3) +FixedInternalImagePixelType = "float" +FixedImageDimension = 3 +MovingInternalImagePixelType = "float" +MovingImageDimension = 3 -// ********** Components +# ********** Components -(Registration "MultiResolutionRegistration") -(FixedImagePyramid "FixedSmoothingImagePyramid") -(MovingImagePyramid "MovingSmoothingImagePyramid") -(Interpolator "BSplineInterpolator") -(Metric "AdvancedMattesMutualInformation") -(Optimizer "StandardGradientDescent") -(ResampleInterpolator "FinalBSplineInterpolator") -(Resampler "DefaultResampler") -(Transform "BSplineTransform") +Registration = "MultiResolutionRegistration" +FixedImagePyramid = "FixedSmoothingImagePyramid" +MovingImagePyramid = "MovingSmoothingImagePyramid" +Interpolator = "BSplineInterpolator" +Metric = "AdvancedMattesMutualInformation" +Optimizer = "StandardGradientDescent" +ResampleInterpolator = "FinalBSplineInterpolator" +Resampler = "DefaultResampler" +Transform = "BSplineTransform" -// ********** Pyramid +# ********** Pyramid -// Total number of resolutions -(NumberOfResolutions 3) -(ImagePyramidSchedule 4 4 4 2 2 2 1 1 1) +# Total number of resolutions +NumberOfResolutions = 3 +ImagePyramidSchedule = [4, 4, 4, 2, 2, 2, 1, 1, 1] -// ********** Transform +# ********** Transform -(FinalGridSpacingInPhysicalUnits 10.0 10.0 10.0) -(GridSpacingSchedule 4.0 2.0 1.0) -(HowToCombineTransforms "Compose") +FinalGridSpacingInPhysicalUnits = [10.0, 10.0, 10.0] +GridSpacingSchedule = [4.0, 2.0, 1.0] +HowToCombineTransforms = "Compose" -// ********** Optimizer +# ********** Optimizer -// Maximum number of iterations in each resolution level: -(MaximumNumberOfIterations 100) +# Maximum number of iterations in each resolution level: +MaximumNumberOfIterations = 100 -(SP_A 20) -(SP_a 1000) -(SP_alpha 0.6) +SP_A = 20 +SP_a = 1000 +SP_alpha = 0.6 -// ********** Metric +# ********** Metric -(NumberOfHistogramBins 32) -(FixedKernelBSplineOrder 0) -(MovingKernelBSplineOrder 3) -(UseFastAndLowMemoryVersion "true") +NumberOfHistogramBins = 32 +FixedKernelBSplineOrder = 0 +MovingKernelBSplineOrder = 3 +UseFastAndLowMemoryVersion = true -// ********** Several +# ********** Several -(WriteTransformParametersEachIteration "false") -(WriteTransformParametersEachResolution "true") -(WriteResultImageAfterEachResolution "false") -(WritePyramidImagesAfterEachResolution "false") -(WriteResultImage "false") -(ShowExactMetricValue "false") -(ErodeMask "false") -(UseDirectionCosines "true") +WriteTransformParametersEachIteration = false +WriteTransformParametersEachResolution = true +WriteResultImageAfterEachResolution = false +WritePyramidImagesAfterEachResolution = false +WriteResultImage = false +ShowExactMetricValue = false +ErodeMask = false +UseDirectionCosines = true -// ********** ImageSampler +# ********** ImageSampler -//Number of spatial samples used to compute the mutual information in each resolution level: -(ImageSampler "Random") -(NumberOfSpatialSamples 2000) -(NewSamplesEveryIteration "true") -(UseRandomSampleRegion "false") -//(SampleRegionSize 50.0 50.0 50.0) -(MaximumNumberOfSamplingAttempts 5) +#Number of spatial samples used to compute the mutual information in each resolution level: +ImageSampler = "Random" +NumberOfSpatialSamples = 2000 +NewSamplesEveryIteration = true +UseRandomSampleRegion = false +#(SampleRegionSize 50.0 50.0 50.0) +MaximumNumberOfSamplingAttempts = 5 -// ********** Interpolator and Resampler +# ********** Interpolator and Resampler -//Order of B-Spline interpolation used in each resolution level: -(BSplineInterpolationOrder 1) +#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) +#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) +#Default pixel value for pixels that come from outside the picture: +DefaultPixelValue = 0 diff --git a/Testing/Data/parameters.3D.MI.bspline.SGD.002.toml b/Testing/Data/parameters.3D.MI.bspline.SGD.002.toml index f749c9df3..62db261ce 100644 --- a/Testing/Data/parameters.3D.MI.bspline.SGD.002.toml +++ b/Testing/Data/parameters.3D.MI.bspline.SGD.002.toml @@ -1,86 +1,86 @@ -// ********** Image Types +# ********** Image Types -(FixedInternalImagePixelType "float") -(FixedImageDimension 3) -(MovingInternalImagePixelType "float") -(MovingImageDimension 3) +FixedInternalImagePixelType = "float" +FixedImageDimension = 3 +MovingInternalImagePixelType = "float" +MovingImageDimension = 3 -// ********** Components +# ********** Components -(Registration "MultiResolutionRegistration") -(FixedImagePyramid "FixedSmoothingImagePyramid") -(MovingImagePyramid "MovingSmoothingImagePyramid") -(Interpolator "BSplineInterpolator") -(Metric "AdvancedMattesMutualInformation") -(Optimizer "StandardGradientDescent") -(ResampleInterpolator "FinalBSplineInterpolator") -(Resampler "DefaultResampler") -(Transform "BSplineTransform") +Registration = "MultiResolutionRegistration" +FixedImagePyramid = "FixedSmoothingImagePyramid" +MovingImagePyramid = "MovingSmoothingImagePyramid" +Interpolator = "BSplineInterpolator" +Metric = "AdvancedMattesMutualInformation" +Optimizer = "StandardGradientDescent" +ResampleInterpolator = "FinalBSplineInterpolator" +Resampler = "DefaultResampler" +Transform = "BSplineTransform" -// ********** Pyramid +# ********** Pyramid -// Total number of resolutions -(NumberOfResolutions 3) -(ImagePyramidSchedule 4 4 4 2 2 2 1 1 1) +# Total number of resolutions +NumberOfResolutions = 3 +ImagePyramidSchedule = [4, 4, 4, 2, 2, 2, 1, 1, 1] -// ********** Transform +# ********** Transform -(FinalGridSpacingInPhysicalUnits 10.0 10.0 10.0) -(GridSpacingSchedule 4.0 2.0 1.0) -(HowToCombineTransforms "Compose") +FinalGridSpacingInPhysicalUnits = [10.0, 10.0, 10.0] +GridSpacingSchedule = [4.0, 2.0, 1.0] +HowToCombineTransforms = "Compose" -// ********** Optimizer +# ********** Optimizer -// Maximum number of iterations in each resolution level: -(MaximumNumberOfIterations 100) +# Maximum number of iterations in each resolution level: +MaximumNumberOfIterations = 100 -(SP_A 20) -(SP_a 1000) -(SP_alpha 0.6) +SP_A = 20 +SP_a = 1000 +SP_alpha = 0.6 -// ********** Metric +# ********** Metric -(NumberOfHistogramBins 32) -(FixedKernelBSplineOrder 0) -(MovingKernelBSplineOrder 3) -(UseFastAndLowMemoryVersion "true") +NumberOfHistogramBins = 32 +FixedKernelBSplineOrder = 0 +MovingKernelBSplineOrder = 3 +UseFastAndLowMemoryVersion = true -// ********** Several +# ********** Several -(WriteTransformParametersEachIteration "false") -(WriteTransformParametersEachResolution "true") -(WriteResultImageAfterEachResolution "false") -(WritePyramidImagesAfterEachResolution "false") -(WriteResultImage "false") -(ShowExactMetricValue "false") -(ErodeMask "false") -(UseDirectionCosines "true") +WriteTransformParametersEachIteration = false +WriteTransformParametersEachResolution = true +WriteResultImageAfterEachResolution = false +WritePyramidImagesAfterEachResolution = false +WriteResultImage = false +ShowExactMetricValue = false +ErodeMask = false +UseDirectionCosines = true -// ********** ImageSampler +# ********** ImageSampler -//Number of spatial samples used to compute the mutual information in each resolution level: -(ImageSampler "Grid") -(SampleGridSpacing 8 8 8 8 8 8 8 8 8) -(UseRandomSampleRegion "false") -//(SampleRegionSize 50.0 50.0 50.0) -(MaximumNumberOfSamplingAttempts 5) +#Number of spatial samples used to compute the mutual information in each resolution level: +ImageSampler = "Grid" +SampleGridSpacing = [8, 8, 8, 8, 8, 8, 8, 8, 8] +UseRandomSampleRegion = false +#(SampleRegionSize 50.0 50.0 50.0) +MaximumNumberOfSamplingAttempts = 5 -// ********** Interpolator and Resampler +# ********** Interpolator and Resampler -//Order of B-Spline interpolation used in each resolution level: -(BSplineInterpolationOrder 1) +#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) +#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) +#Default pixel value for pixels that come from outside the picture: +DefaultPixelValue = 0 diff --git a/Testing/Data/parameters.3D.MI.bspline.SGD.003.toml b/Testing/Data/parameters.3D.MI.bspline.SGD.003.toml index a889e036c..e16e84a58 100644 --- a/Testing/Data/parameters.3D.MI.bspline.SGD.003.toml +++ b/Testing/Data/parameters.3D.MI.bspline.SGD.003.toml @@ -1,84 +1,84 @@ -// ********** Image Types +# ********** Image Types -(FixedInternalImagePixelType "float") -(FixedImageDimension 3) -(MovingInternalImagePixelType "float") -(MovingImageDimension 3) +FixedInternalImagePixelType = "float" +FixedImageDimension = 3 +MovingInternalImagePixelType = "float" +MovingImageDimension = 3 -// ********** Components +# ********** Components -(Registration "MultiResolutionRegistration") -(FixedImagePyramid "FixedRecursiveImagePyramid") -(MovingImagePyramid "MovingRecursiveImagePyramid") -(Interpolator "BSplineInterpolator") -(Metric "AdvancedMattesMutualInformation") -(Optimizer "StandardGradientDescent") -(ResampleInterpolator "FinalBSplineInterpolator") -(Resampler "DefaultResampler") -(Transform "BSplineTransform") +Registration = "MultiResolutionRegistration" +FixedImagePyramid = "FixedRecursiveImagePyramid" +MovingImagePyramid = "MovingRecursiveImagePyramid" +Interpolator = "BSplineInterpolator" +Metric = "AdvancedMattesMutualInformation" +Optimizer = "StandardGradientDescent" +ResampleInterpolator = "FinalBSplineInterpolator" +Resampler = "DefaultResampler" +Transform = "BSplineTransform" -// ********** Pyramid +# ********** Pyramid -// Total number of resolutions -(NumberOfResolutions 2) -// To allow for fast testing: -(ImagePyramidSchedule 4 4 4 2 2 2) +# Total number of resolutions +NumberOfResolutions = 2 +# To allow for fast testing: +ImagePyramidSchedule = [4, 4, 4, 2, 2, 2] -// ********** Transform +# ********** Transform -(FinalGridSpacingInPhysicalUnits 10.0 10.0 10.0) -(GridSpacingSchedule 2.0 1.0) -(HowToCombineTransforms "Compose") +FinalGridSpacingInPhysicalUnits = [10.0, 10.0, 10.0] +GridSpacingSchedule = [2.0, 1.0] +HowToCombineTransforms = "Compose" -// ********** Optimizer +# ********** Optimizer -// Maximum number of iterations in each resolution level: -(MaximumNumberOfIterations 10 5) +# Maximum number of iterations in each resolution level: +MaximumNumberOfIterations = [10, 5] -(SP_A 20) -(SP_a 2000) -(SP_alpha 0.6) +SP_A = 20 +SP_a = 2000 +SP_alpha = 0.6 -// ********** Metric +# ********** Metric -(NumberOfHistogramBins 32) -(FixedKernelBSplineOrder 0) -(MovingKernelBSplineOrder 3) -(UseFastAndLowMemoryVersion "true") +NumberOfHistogramBins = 32 +FixedKernelBSplineOrder = 0 +MovingKernelBSplineOrder = 3 +UseFastAndLowMemoryVersion = true -// ********** Several +# ********** Several -(WriteTransformParametersEachIteration "false") -(WriteTransformParametersEachResolution "true") -(WriteResultImageAfterEachResolution "false") -(WritePyramidImagesAfterEachResolution "false") -(WriteResultImage "false") -(ShowExactMetricValue "false") -(ErodeMask "false") -(UseDirectionCosines "true") +WriteTransformParametersEachIteration = false +WriteTransformParametersEachResolution = true +WriteResultImageAfterEachResolution = false +WritePyramidImagesAfterEachResolution = false +WriteResultImage = false +ShowExactMetricValue = false +ErodeMask = false +UseDirectionCosines = true -// ********** ImageSampler +# ********** ImageSampler -//Number of spatial samples used to compute the mutual information in each resolution level: -(ImageSampler "Full") -(MaximumNumberOfSamplingAttempts 5) +#Number of spatial samples used to compute the mutual information in each resolution level: +ImageSampler = "Full" +MaximumNumberOfSamplingAttempts = 5 -// ********** Interpolator and Resampler +# ********** Interpolator and Resampler -//Order of B-Spline interpolation used in each resolution level: -(BSplineInterpolationOrder 1) +#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) +#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) +#Default pixel value for pixels that come from outside the picture: +DefaultPixelValue = 0 diff --git a/Testing/Data/parameters.3D.MI.bspline.SGD.004.toml b/Testing/Data/parameters.3D.MI.bspline.SGD.004.toml index 40366ce8e..6731c6f8a 100644 --- a/Testing/Data/parameters.3D.MI.bspline.SGD.004.toml +++ b/Testing/Data/parameters.3D.MI.bspline.SGD.004.toml @@ -1,86 +1,86 @@ -// ********** Image Types +# ********** Image Types -(FixedInternalImagePixelType "float") -(FixedImageDimension 3) -(MovingInternalImagePixelType "float") -(MovingImageDimension 3) +FixedInternalImagePixelType = "float" +FixedImageDimension = 3 +MovingInternalImagePixelType = "float" +MovingImageDimension = 3 -// ********** Components +# ********** Components -(Registration "MultiResolutionRegistration") -(FixedImagePyramid "FixedSmoothingImagePyramid") -(MovingImagePyramid "MovingSmoothingImagePyramid") -(Interpolator "BSplineInterpolator") -(Metric "AdvancedMattesMutualInformation") -(Optimizer "StandardGradientDescent") -(ResampleInterpolator "FinalBSplineInterpolator") -(Resampler "DefaultResampler") -(Transform "BSplineTransform") +Registration = "MultiResolutionRegistration" +FixedImagePyramid = "FixedSmoothingImagePyramid" +MovingImagePyramid = "MovingSmoothingImagePyramid" +Interpolator = "BSplineInterpolator" +Metric = "AdvancedMattesMutualInformation" +Optimizer = "StandardGradientDescent" +ResampleInterpolator = "FinalBSplineInterpolator" +Resampler = "DefaultResampler" +Transform = "BSplineTransform" -// ********** Pyramid +# ********** Pyramid -// Total number of resolutions -(NumberOfResolutions 3) -(ImagePyramidSchedule 4 4 4 2 2 2 1 1 1) +# Total number of resolutions +NumberOfResolutions = 3 +ImagePyramidSchedule = [4, 4, 4, 2, 2, 2, 1, 1, 1] -// ********** Transform +# ********** Transform -(FinalGridSpacingInPhysicalUnits 10.0 10.0 10.0) -(GridSpacingSchedule 4.0 2.0 1.0) -(HowToCombineTransforms "Compose") +FinalGridSpacingInPhysicalUnits = [10.0, 10.0, 10.0] +GridSpacingSchedule = [4.0, 2.0, 1.0] +HowToCombineTransforms = "Compose" -// ********** Optimizer +# ********** Optimizer -// Maximum number of iterations in each resolution level: -(MaximumNumberOfIterations 100) +# Maximum number of iterations in each resolution level: +MaximumNumberOfIterations = 100 -(SP_A 20) -(SP_a 1000) -(SP_alpha 0.6) +SP_A = 20 +SP_a = 1000 +SP_alpha = 0.6 -// ********** Metric +# ********** Metric -(NumberOfHistogramBins 32) -(FixedKernelBSplineOrder 0) -(MovingKernelBSplineOrder 3) -(UseFastAndLowMemoryVersion "true") +NumberOfHistogramBins = 32 +FixedKernelBSplineOrder = 0 +MovingKernelBSplineOrder = 3 +UseFastAndLowMemoryVersion = true -// ********** Several +# ********** Several -(WriteTransformParametersEachIteration "false") -(WriteTransformParametersEachResolution "true") -(WriteResultImageAfterEachResolution "false") -(WritePyramidImagesAfterEachResolution "false") -(WriteResultImage "false") -(ShowExactMetricValue "false") -(ErodeMask "false") -(UseDirectionCosines "true") +WriteTransformParametersEachIteration = false +WriteTransformParametersEachResolution = true +WriteResultImageAfterEachResolution = false +WritePyramidImagesAfterEachResolution = false +WriteResultImage = false +ShowExactMetricValue = false +ErodeMask = false +UseDirectionCosines = true -// ********** ImageSampler +# ********** ImageSampler -//Number of spatial samples used to compute the mutual information in each resolution level: -(ImageSampler "RandomSparseMask") -(NumberOfSpatialSamples 2000) -(UseRandomSampleRegion "false") -//(SampleRegionSize 50.0 50.0 50.0) -(MaximumNumberOfSamplingAttempts 5) +#Number of spatial samples used to compute the mutual information in each resolution level: +ImageSampler = "RandomSparseMask" +NumberOfSpatialSamples = 2000 +UseRandomSampleRegion = false +#(SampleRegionSize 50.0 50.0 50.0) +MaximumNumberOfSamplingAttempts = 5 -// ********** Interpolator and Resampler +# ********** Interpolator and Resampler -//Order of B-Spline interpolation used in each resolution level: -(BSplineInterpolationOrder 1) +#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) +#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) +#Default pixel value for pixels that come from outside the picture: +DefaultPixelValue = 0 diff --git a/Testing/Data/parameters.3D.NC.affine.ASGD.001.toml b/Testing/Data/parameters.3D.NC.affine.ASGD.001.toml index 8b7cde580..d50e0317c 100644 --- a/Testing/Data/parameters.3D.NC.affine.ASGD.001.toml +++ b/Testing/Data/parameters.3D.NC.affine.ASGD.001.toml @@ -1,82 +1,82 @@ -// 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. +# 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 +# ********** Image Types -(FixedInternalImagePixelType "float") -(FixedImageDimension 3) -(MovingInternalImagePixelType "float") -(MovingImageDimension 3) +FixedInternalImagePixelType = "float" +FixedImageDimension = 3 +MovingInternalImagePixelType = "float" +MovingImageDimension = 3 -// ********** Components +# ********** Components -(Registration "MultiResolutionRegistration") -(FixedImagePyramid "FixedRecursiveImagePyramid") -(MovingImagePyramid "MovingRecursiveImagePyramid") -(Interpolator "BSplineInterpolator") -(Metric "AdvancedNormalizedCorrelation") -(Optimizer "AdaptiveStochasticGradientDescent") -(ResampleInterpolator "FinalBSplineInterpolator") -(Resampler "DefaultResampler") -(Transform "AffineTransform") +Registration = "MultiResolutionRegistration" +FixedImagePyramid = "FixedRecursiveImagePyramid" +MovingImagePyramid = "MovingRecursiveImagePyramid" +Interpolator = "BSplineInterpolator" +Metric = "AdvancedNormalizedCorrelation" +Optimizer = "AdaptiveStochasticGradientDescent" +ResampleInterpolator = "FinalBSplineInterpolator" +Resampler = "DefaultResampler" +Transform = "AffineTransform" -// ********** Pyramid +# ********** Pyramid -// Total number of resolutions -(NumberOfResolutions 3) -(ImagePyramidSchedule 4 4 4 2 2 2 1 1 1) +# Total number of resolutions +NumberOfResolutions = 3 +ImagePyramidSchedule = [4, 4, 4, 2, 2, 2, 1, 1, 1] -// ********** Transform +# ********** Transform -(AutomaticScalesEstimation "true") -(AutomaticTransformInitialization "true") -(HowToCombineTransforms "Compose") +AutomaticScalesEstimation = true +AutomaticTransformInitialization = true +HowToCombineTransforms = "Compose" -// ********** Optimizer +# ********** Optimizer -// Maximum number of iterations in each resolution level: -(MaximumNumberOfIterations 500) +# Maximum number of iterations in each resolution level: +MaximumNumberOfIterations = 500 -(AutomaticParameterEstimation "true") -(UseAdaptiveStepSizes "true") +AutomaticParameterEstimation = true +UseAdaptiveStepSizes = true -// ********** Metric +# ********** Metric -// ********** Several +# ********** Several -(WriteTransformParametersEachIteration "false") -(WriteTransformParametersEachResolution "true") -(WriteResultImageAfterEachResolution "false") -(WriteResultImage "false") -(ShowExactMetricValue "false") -(ErodeMask "false") -(UseDirectionCosines "true") +WriteTransformParametersEachIteration = false +WriteTransformParametersEachResolution = true +WriteResultImageAfterEachResolution = false +WriteResultImage = false +ShowExactMetricValue = false +ErodeMask = false +UseDirectionCosines = true -// ********** ImageSampler +# ********** ImageSampler -//Number of spatial samples used to compute the mutual information in each resolution level: -(ImageSampler "RandomCoordinate") -(NumberOfSpatialSamples 2000) -(NewSamplesEveryIteration "true") -(UseRandomSampleRegion "false") -(MaximumNumberOfSamplingAttempts 5) +#Number of spatial samples used to compute the mutual information in each resolution level: +ImageSampler = "RandomCoordinate" +NumberOfSpatialSamples = 2000 +NewSamplesEveryIteration = true +UseRandomSampleRegion = false +MaximumNumberOfSamplingAttempts = 5 -// ********** Interpolator and Resampler +# ********** Interpolator and Resampler -//Order of B-Spline interpolation used in each resolution level: -(BSplineInterpolationOrder 1) +#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) +#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) +#Default pixel value for pixels that come from outside the picture: +DefaultPixelValue = 0 diff --git a/Testing/Data/parameters.3D.NC.affine.SGD.001.toml b/Testing/Data/parameters.3D.NC.affine.SGD.001.toml index 54b20f817..2c7dd6210 100644 --- a/Testing/Data/parameters.3D.NC.affine.SGD.001.toml +++ b/Testing/Data/parameters.3D.NC.affine.SGD.001.toml @@ -1,80 +1,80 @@ -// ********** Image Types +# ********** Image Types -(FixedInternalImagePixelType "float") -(FixedImageDimension 3) -(MovingInternalImagePixelType "float") -(MovingImageDimension 3) +FixedInternalImagePixelType = "float" +FixedImageDimension = 3 +MovingInternalImagePixelType = "float" +MovingImageDimension = 3 -// ********** Components +# ********** Components -(Registration "MultiResolutionRegistration") -(FixedImagePyramid "FixedRecursiveImagePyramid") -(MovingImagePyramid "MovingRecursiveImagePyramid") -(Interpolator "BSplineInterpolator") -(Metric "AdvancedNormalizedCorrelation") -(Optimizer "StandardGradientDescent") -(ResampleInterpolator "FinalBSplineInterpolator") -(Resampler "DefaultResampler") -(Transform "AffineTransform") +Registration = "MultiResolutionRegistration" +FixedImagePyramid = "FixedRecursiveImagePyramid" +MovingImagePyramid = "MovingRecursiveImagePyramid" +Interpolator = "BSplineInterpolator" +Metric = "AdvancedNormalizedCorrelation" +Optimizer = "StandardGradientDescent" +ResampleInterpolator = "FinalBSplineInterpolator" +Resampler = "DefaultResampler" +Transform = "AffineTransform" -// ********** Pyramid +# ********** Pyramid -// Total number of resolutions -(NumberOfResolutions 3) -(ImagePyramidSchedule 4 4 4 2 2 2 1 1 1) +# Total number of resolutions +NumberOfResolutions = 3 +ImagePyramidSchedule = [4, 4, 4, 2, 2, 2, 1, 1, 1] -// ********** Transform +# ********** Transform -(AutomaticScalesEstimation "true") -(AutomaticTransformInitialization "true") -(HowToCombineTransforms "Compose") +AutomaticScalesEstimation = true +AutomaticTransformInitialization = true +HowToCombineTransforms = "Compose" -// ********** Optimizer +# ********** Optimizer -// Maximum number of iterations in each resolution level: -(MaximumNumberOfIterations 500) +# Maximum number of iterations in each resolution level: +MaximumNumberOfIterations = 500 -(SP_A 20) -(SP_a 1000) -(SP_alpha 0.6) +SP_A = 20 +SP_a = 1000 +SP_alpha = 0.6 -// ********** Metric +# ********** Metric -// ********** Several +# ********** Several -(WriteTransformParametersEachIteration "false") -(WriteTransformParametersEachResolution "true") -(WriteResultImageAfterEachResolution "false") -(WriteResultImage "false") -(ShowExactMetricValue "false") -(ErodeMask "false") -(UseDirectionCosines "true") +WriteTransformParametersEachIteration = false +WriteTransformParametersEachResolution = true +WriteResultImageAfterEachResolution = false +WriteResultImage = false +ShowExactMetricValue = false +ErodeMask = false +UseDirectionCosines = true -// ********** ImageSampler +# ********** ImageSampler -//Number of spatial samples used to compute the mutual information in each resolution level: -(ImageSampler "RandomCoordinate") -(NumberOfSpatialSamples 2000) -(NewSamplesEveryIteration "true") -(UseRandomSampleRegion "false") -(MaximumNumberOfSamplingAttempts 5) +#Number of spatial samples used to compute the mutual information in each resolution level: +ImageSampler = "RandomCoordinate" +NumberOfSpatialSamples = 2000 +NewSamplesEveryIteration = true +UseRandomSampleRegion = false +MaximumNumberOfSamplingAttempts = 5 -// ********** Interpolator and Resampler +# ********** Interpolator and Resampler -//Order of B-Spline interpolation used in each resolution level: -(BSplineInterpolationOrder 1) +#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) +#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) +#Default pixel value for pixels that come from outside the picture: +DefaultPixelValue = 0 diff --git a/Testing/Data/parameters.3D.NC.bspline.ASGD.001.toml b/Testing/Data/parameters.3D.NC.bspline.ASGD.001.toml index 223974258..b5beadbb1 100644 --- a/Testing/Data/parameters.3D.NC.bspline.ASGD.001.toml +++ b/Testing/Data/parameters.3D.NC.bspline.ASGD.001.toml @@ -1,86 +1,86 @@ -// 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. +# 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 +# ********** Image Types -(FixedInternalImagePixelType "float") -(FixedImageDimension 3) -(MovingInternalImagePixelType "float") -(MovingImageDimension 3) +FixedInternalImagePixelType = "float" +FixedImageDimension = 3 +MovingInternalImagePixelType = "float" +MovingImageDimension = 3 -// ********** Components +# ********** Components -(Registration "MultiResolutionRegistration") -(FixedImagePyramid "FixedRecursiveImagePyramid") -(MovingImagePyramid "MovingRecursiveImagePyramid") -(Interpolator "LinearInterpolator") -(Metric "AdvancedNormalizedCorrelation") -(Optimizer "AdaptiveStochasticGradientDescent") -(ResampleInterpolator "FinalBSplineInterpolator") -(Resampler "DefaultResampler") -(Transform "RecursiveBSplineTransform") +Registration = "MultiResolutionRegistration" +FixedImagePyramid = "FixedRecursiveImagePyramid" +MovingImagePyramid = "MovingRecursiveImagePyramid" +Interpolator = "LinearInterpolator" +Metric = "AdvancedNormalizedCorrelation" +Optimizer = "AdaptiveStochasticGradientDescent" +ResampleInterpolator = "FinalBSplineInterpolator" +Resampler = "DefaultResampler" +Transform = "RecursiveBSplineTransform" -// ********** Pyramid +# ********** Pyramid -// Total number of resolutions -(NumberOfResolutions 3) -(ImagePyramidSchedule 4 4 4 2 2 2 1 1 1) +# Total number of resolutions +NumberOfResolutions = 3 +ImagePyramidSchedule = [4, 4, 4, 2, 2, 2, 1, 1, 1] -// ********** Transform +# ********** Transform -(FinalGridSpacingInPhysicalUnits 10.0 10.0 10.0) -(GridSpacingSchedule 4.0 2.0 1.0) -(HowToCombineTransforms "Compose") +FinalGridSpacingInPhysicalUnits = [10.0, 10.0, 10.0] +GridSpacingSchedule = [4.0, 2.0, 1.0] +HowToCombineTransforms = "Compose" -// ********** Optimizer +# ********** Optimizer -// Maximum number of iterations in each resolution level: -(MaximumNumberOfIterations 1000) +# Maximum number of iterations in each resolution level: +MaximumNumberOfIterations = 1000 -(AutomaticParameterEstimation "true") -(UseAdaptiveStepSizes "true") +AutomaticParameterEstimation = true +UseAdaptiveStepSizes = true -// ********** Metric +# ********** Metric -// Just using the default values for the NC metric +# Just using the default values for the NC metric -// ********** Several +# ********** Several -(WriteTransformParametersEachIteration "false") -(WriteTransformParametersEachResolution "true") -(WriteResultImageAfterEachResolution "false") -(WritePyramidImagesAfterEachResolution "false") -(WriteResultImage "true") -(ShowExactMetricValue "false") -(ErodeMask "false") -(UseDirectionCosines "true") +WriteTransformParametersEachIteration = false +WriteTransformParametersEachResolution = true +WriteResultImageAfterEachResolution = false +WritePyramidImagesAfterEachResolution = false +WriteResultImage = true +ShowExactMetricValue = false +ErodeMask = false +UseDirectionCosines = true -// ********** ImageSampler +# ********** ImageSampler -//Number of spatial samples used to compute the mutual information in each resolution level: -(ImageSampler "RandomCoordinate") -(NumberOfSpatialSamples 2000) -(NewSamplesEveryIteration "true") -(UseRandomSampleRegion "false") -//(SampleRegionSize 50.0 50.0 50.0) -(MaximumNumberOfSamplingAttempts 5) +#Number of spatial samples used to compute the mutual information in each resolution level: +ImageSampler = "RandomCoordinate" +NumberOfSpatialSamples = 2000 +NewSamplesEveryIteration = true +UseRandomSampleRegion = false +#(SampleRegionSize 50.0 50.0 50.0) +MaximumNumberOfSamplingAttempts = 5 -// ********** Interpolator and Resampler +# ********** Interpolator and Resampler -//Order of B-Spline interpolation used in each resolution level: -(BSplineInterpolationOrder 1) +#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) +#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) +#Default pixel value for pixels that come from outside the picture: +DefaultPixelValue = 0 diff --git a/Testing/Data/parameters.3D.NC.bspline.ASGD.001a.toml b/Testing/Data/parameters.3D.NC.bspline.ASGD.001a.toml index 292afa7e0..3aa33eee7 100644 --- a/Testing/Data/parameters.3D.NC.bspline.ASGD.001a.toml +++ b/Testing/Data/parameters.3D.NC.bspline.ASGD.001a.toml @@ -1,83 +1,83 @@ -// ********** Image Types +# ********** Image Types -(FixedInternalImagePixelType "float") -(FixedImageDimension 3) -(MovingInternalImagePixelType "float") -(MovingImageDimension 3) +FixedInternalImagePixelType = "float" +FixedImageDimension = 3 +MovingInternalImagePixelType = "float" +MovingImageDimension = 3 -// ********** Components +# ********** Components -(Registration "MultiResolutionRegistration") -(FixedImagePyramid "FixedRecursiveImagePyramid") -(MovingImagePyramid "MovingRecursiveImagePyramid") -(Interpolator "LinearInterpolator") -(Metric "AdvancedNormalizedCorrelation") -(Optimizer "AdaptiveStochasticGradientDescent") -(ResampleInterpolator "FinalBSplineInterpolator") -(Resampler "DefaultResampler") -(Transform "RecursiveBSplineTransform") +Registration = "MultiResolutionRegistration" +FixedImagePyramid = "FixedRecursiveImagePyramid" +MovingImagePyramid = "MovingRecursiveImagePyramid" +Interpolator = "LinearInterpolator" +Metric = "AdvancedNormalizedCorrelation" +Optimizer = "AdaptiveStochasticGradientDescent" +ResampleInterpolator = "FinalBSplineInterpolator" +Resampler = "DefaultResampler" +Transform = "RecursiveBSplineTransform" -// ********** Pyramid +# ********** Pyramid -// Total number of resolutions -(NumberOfResolutions 3) -(ImagePyramidSchedule 4 4 4 2 2 2 1 1 1) +# Total number of resolutions +NumberOfResolutions = 3 +ImagePyramidSchedule = [4, 4, 4, 2, 2, 2, 1, 1, 1] -// ********** Transform +# ********** Transform -(FinalGridSpacingInPhysicalUnits 10.0 10.0 10.0) -(GridSpacingSchedule 4.0 2.0 1.0) -(HowToCombineTransforms "Compose") +FinalGridSpacingInPhysicalUnits = [10.0, 10.0, 10.0] +GridSpacingSchedule = [4.0, 2.0, 1.0] +HowToCombineTransforms = "Compose" -// ********** Optimizer +# ********** Optimizer -// Maximum number of iterations in each resolution level: -(MaximumNumberOfIterations 50) +# Maximum number of iterations in each resolution level: +MaximumNumberOfIterations = 50 -(AutomaticParameterEstimation "true") -(UseAdaptiveStepSizes "true") +AutomaticParameterEstimation = true +UseAdaptiveStepSizes = true -// ********** Metric +# ********** Metric -// Just using the default values for the NC metric +# Just using the default values for the NC metric -// ********** Several +# ********** Several -(WriteTransformParametersEachIteration "false") -(WriteTransformParametersEachResolution "true") -(WriteResultImageAfterEachResolution "false") -(WritePyramidImagesAfterEachResolution "false") -(WriteResultImage "true") -(ShowExactMetricValue "false") -(ErodeMask "false") -(UseDirectionCosines "true") +WriteTransformParametersEachIteration = false +WriteTransformParametersEachResolution = true +WriteResultImageAfterEachResolution = false +WritePyramidImagesAfterEachResolution = false +WriteResultImage = true +ShowExactMetricValue = false +ErodeMask = false +UseDirectionCosines = true -// ********** ImageSampler +# ********** ImageSampler -//Number of spatial samples used to compute the mutual information in each resolution level: -(ImageSampler "RandomCoordinate") -(NumberOfSpatialSamples 2000) -(NewSamplesEveryIteration "true") -(UseRandomSampleRegion "false") -//(SampleRegionSize 50.0 50.0 50.0) -(MaximumNumberOfSamplingAttempts 5) +#Number of spatial samples used to compute the mutual information in each resolution level: +ImageSampler = "RandomCoordinate" +NumberOfSpatialSamples = 2000 +NewSamplesEveryIteration = true +UseRandomSampleRegion = false +#(SampleRegionSize 50.0 50.0 50.0) +MaximumNumberOfSamplingAttempts = 5 -// ********** Interpolator and Resampler +# ********** Interpolator and Resampler -//Order of B-Spline interpolation used in each resolution level: -(BSplineInterpolationOrder 1) +#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) +#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) +#Default pixel value for pixels that come from outside the picture: +DefaultPixelValue = 0 diff --git a/Testing/Data/parameters.3D.NC.bspline.ASGD.001b.toml b/Testing/Data/parameters.3D.NC.bspline.ASGD.001b.toml index 627eb5f93..46ab78877 100644 --- a/Testing/Data/parameters.3D.NC.bspline.ASGD.001b.toml +++ b/Testing/Data/parameters.3D.NC.bspline.ASGD.001b.toml @@ -1,83 +1,83 @@ -// ********** Image Types +# ********** Image Types -(FixedInternalImagePixelType "float") -(FixedImageDimension 3) -(MovingInternalImagePixelType "float") -(MovingImageDimension 3) +FixedInternalImagePixelType = "float" +FixedImageDimension = 3 +MovingInternalImagePixelType = "float" +MovingImageDimension = 3 -// ********** Components +# ********** Components -(Registration "MultiResolutionRegistration") -(FixedImagePyramid "FixedRecursiveImagePyramid") -(MovingImagePyramid "MovingRecursiveImagePyramid") -(Interpolator "LinearInterpolator") -(Metric "AdvancedNormalizedCorrelation") -(Optimizer "AdaptiveStochasticGradientDescent") -(ResampleInterpolator "FinalBSplineInterpolator") -(Resampler "DefaultResampler") -(Transform "RecursiveBSplineTransform") +Registration = "MultiResolutionRegistration" +FixedImagePyramid = "FixedRecursiveImagePyramid" +MovingImagePyramid = "MovingRecursiveImagePyramid" +Interpolator = "LinearInterpolator" +Metric = "AdvancedNormalizedCorrelation" +Optimizer = "AdaptiveStochasticGradientDescent" +ResampleInterpolator = "FinalBSplineInterpolator" +Resampler = "DefaultResampler" +Transform = "RecursiveBSplineTransform" -// ********** Pyramid +# ********** Pyramid -// Total number of resolutions -(NumberOfResolutions 3) -(ImagePyramidSchedule 4 4 4 2 2 2 1 1 1) +# Total number of resolutions +NumberOfResolutions = 3 +ImagePyramidSchedule = [4, 4, 4, 2, 2, 2, 1, 1, 1] -// ********** Transform +# ********** Transform -(FinalGridSpacingInPhysicalUnits 10.0 10.0 10.0) -(GridSpacingSchedule 4.0 2.0 1.0) -(HowToCombineTransforms "Compose") +FinalGridSpacingInPhysicalUnits = [10.0, 10.0, 10.0] +GridSpacingSchedule = [4.0, 2.0, 1.0] +HowToCombineTransforms = "Compose" -// ********** Optimizer +# ********** Optimizer -// Maximum number of iterations in each resolution level: -(MaximumNumberOfIterations 50) +# Maximum number of iterations in each resolution level: +MaximumNumberOfIterations = 50 -(AutomaticParameterEstimation "true") -(UseAdaptiveStepSizes "false") +AutomaticParameterEstimation = true +UseAdaptiveStepSizes = false -// ********** Metric +# ********** Metric -// Just using the default values for the NC metric +# Just using the default values for the NC metric -// ********** Several +# ********** Several -(WriteTransformParametersEachIteration "false") -(WriteTransformParametersEachResolution "true") -(WriteResultImageAfterEachResolution "false") -(WritePyramidImagesAfterEachResolution "false") -(WriteResultImage "true") -(ShowExactMetricValue "false") -(ErodeMask "false") -(UseDirectionCosines "true") +WriteTransformParametersEachIteration = false +WriteTransformParametersEachResolution = true +WriteResultImageAfterEachResolution = false +WritePyramidImagesAfterEachResolution = false +WriteResultImage = true +ShowExactMetricValue = false +ErodeMask = false +UseDirectionCosines = true -// ********** ImageSampler +# ********** ImageSampler -//Number of spatial samples used to compute the mutual information in each resolution level: -(ImageSampler "RandomCoordinate") -(NumberOfSpatialSamples 2000) -(NewSamplesEveryIteration "true") -(UseRandomSampleRegion "false") -//(SampleRegionSize 50.0 50.0 50.0) -(MaximumNumberOfSamplingAttempts 5) +#Number of spatial samples used to compute the mutual information in each resolution level: +ImageSampler = "RandomCoordinate" +NumberOfSpatialSamples = 2000 +NewSamplesEveryIteration = true +UseRandomSampleRegion = false +#(SampleRegionSize 50.0 50.0 50.0) +MaximumNumberOfSamplingAttempts = 5 -// ********** Interpolator and Resampler +# ********** Interpolator and Resampler -//Order of B-Spline interpolation used in each resolution level: -(BSplineInterpolationOrder 1) +#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) +#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) +#Default pixel value for pixels that come from outside the picture: +DefaultPixelValue = 0 diff --git a/Testing/Data/parameters.3D.NC.bspline.ASGD.001c.toml b/Testing/Data/parameters.3D.NC.bspline.ASGD.001c.toml index cc10806f1..4e80ae0db 100644 --- a/Testing/Data/parameters.3D.NC.bspline.ASGD.001c.toml +++ b/Testing/Data/parameters.3D.NC.bspline.ASGD.001c.toml @@ -1,87 +1,87 @@ -// ********** Image Types +# ********** Image Types -(FixedInternalImagePixelType "float") -(FixedImageDimension 3) -(MovingInternalImagePixelType "float") -(MovingImageDimension 3) +FixedInternalImagePixelType = "float" +FixedImageDimension = 3 +MovingInternalImagePixelType = "float" +MovingImageDimension = 3 -// ********** Components +# ********** Components -(Registration "MultiResolutionRegistration") -(FixedImagePyramid "FixedRecursiveImagePyramid") -(MovingImagePyramid "MovingRecursiveImagePyramid") -(Interpolator "LinearInterpolator") -(Metric "AdvancedNormalizedCorrelation") -(Optimizer "AdaptiveStochasticGradientDescent") -(ResampleInterpolator "FinalBSplineInterpolator") -(Resampler "DefaultResampler") -(Transform "RecursiveBSplineTransform") +Registration = "MultiResolutionRegistration" +FixedImagePyramid = "FixedRecursiveImagePyramid" +MovingImagePyramid = "MovingRecursiveImagePyramid" +Interpolator = "LinearInterpolator" +Metric = "AdvancedNormalizedCorrelation" +Optimizer = "AdaptiveStochasticGradientDescent" +ResampleInterpolator = "FinalBSplineInterpolator" +Resampler = "DefaultResampler" +Transform = "RecursiveBSplineTransform" -// ********** Pyramid +# ********** Pyramid -// Total number of resolutions -(NumberOfResolutions 3) -(ImagePyramidSchedule 4 4 4 2 2 2 1 1 1) +# Total number of resolutions +NumberOfResolutions = 3 +ImagePyramidSchedule = [4, 4, 4, 2, 2, 2, 1, 1, 1] -// ********** Transform +# ********** Transform -(FinalGridSpacingInPhysicalUnits 10.0 10.0 10.0) -(GridSpacingSchedule 4.0 2.0 1.0) -(HowToCombineTransforms "Compose") +FinalGridSpacingInPhysicalUnits = [10.0, 10.0, 10.0] +GridSpacingSchedule = [4.0, 2.0, 1.0] +HowToCombineTransforms = "Compose" -// ********** Optimizer +# ********** Optimizer -// Maximum number of iterations in each resolution level: -(MaximumNumberOfIterations 50) +# Maximum number of iterations in each resolution level: +MaximumNumberOfIterations = 50 -(AutomaticParameterEstimation "false") -(UseAdaptiveStepSizes "true") +AutomaticParameterEstimation = false +UseAdaptiveStepSizes = true -(SP_a 500000) -(SP_A 20) -(SP_alpha 0.6) +SP_a = 500000 +SP_A = 20 +SP_alpha = 0.6 -// ********** Metric +# ********** Metric -// Just using the default values for the NC metric +# Just using the default values for the NC metric -// ********** Several +# ********** Several -(WriteTransformParametersEachIteration "false") -(WriteTransformParametersEachResolution "true") -(WriteResultImageAfterEachResolution "false") -(WritePyramidImagesAfterEachResolution "false") -(WriteResultImage "true") -(ShowExactMetricValue "false") -(ErodeMask "false") -(UseDirectionCosines "true") +WriteTransformParametersEachIteration = false +WriteTransformParametersEachResolution = true +WriteResultImageAfterEachResolution = false +WritePyramidImagesAfterEachResolution = false +WriteResultImage = true +ShowExactMetricValue = false +ErodeMask = false +UseDirectionCosines = true -// ********** ImageSampler +# ********** ImageSampler -//Number of spatial samples used to compute the mutual information in each resolution level: -(ImageSampler "RandomCoordinate") -(NumberOfSpatialSamples 2000) -(NewSamplesEveryIteration "true") -(UseRandomSampleRegion "false") -//(SampleRegionSize 50.0 50.0 50.0) -(MaximumNumberOfSamplingAttempts 5) +#Number of spatial samples used to compute the mutual information in each resolution level: +ImageSampler = "RandomCoordinate" +NumberOfSpatialSamples = 2000 +NewSamplesEveryIteration = true +UseRandomSampleRegion = false +#(SampleRegionSize 50.0 50.0 50.0) +MaximumNumberOfSamplingAttempts = 5 -// ********** Interpolator and Resampler +# ********** Interpolator and Resampler -//Order of B-Spline interpolation used in each resolution level: -(BSplineInterpolationOrder 1) +#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) +#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) +#Default pixel value for pixels that come from outside the picture: +DefaultPixelValue = 0 diff --git a/Testing/Data/parameters.3D.NC.bspline.ASGD.001d.toml b/Testing/Data/parameters.3D.NC.bspline.ASGD.001d.toml index 52571afb8..275ab1e54 100644 --- a/Testing/Data/parameters.3D.NC.bspline.ASGD.001d.toml +++ b/Testing/Data/parameters.3D.NC.bspline.ASGD.001d.toml @@ -1,87 +1,87 @@ -// ********** Image Types +# ********** Image Types -(FixedInternalImagePixelType "float") -(FixedImageDimension 3) -(MovingInternalImagePixelType "float") -(MovingImageDimension 3) +FixedInternalImagePixelType = "float" +FixedImageDimension = 3 +MovingInternalImagePixelType = "float" +MovingImageDimension = 3 -// ********** Components +# ********** Components -(Registration "MultiResolutionRegistration") -(FixedImagePyramid "FixedRecursiveImagePyramid") -(MovingImagePyramid "MovingRecursiveImagePyramid") -(Interpolator "LinearInterpolator") -(Metric "AdvancedNormalizedCorrelation") -(Optimizer "AdaptiveStochasticGradientDescent") -(ResampleInterpolator "FinalBSplineInterpolator") -(Resampler "DefaultResampler") -(Transform "RecursiveBSplineTransform") +Registration = "MultiResolutionRegistration" +FixedImagePyramid = "FixedRecursiveImagePyramid" +MovingImagePyramid = "MovingRecursiveImagePyramid" +Interpolator = "LinearInterpolator" +Metric = "AdvancedNormalizedCorrelation" +Optimizer = "AdaptiveStochasticGradientDescent" +ResampleInterpolator = "FinalBSplineInterpolator" +Resampler = "DefaultResampler" +Transform = "RecursiveBSplineTransform" -// ********** Pyramid +# ********** Pyramid -// Total number of resolutions -(NumberOfResolutions 3) -(ImagePyramidSchedule 4 4 4 2 2 2 1 1 1) +# Total number of resolutions +NumberOfResolutions = 3 +ImagePyramidSchedule = [4, 4, 4, 2, 2, 2, 1, 1, 1] -// ********** Transform +# ********** Transform -(FinalGridSpacingInPhysicalUnits 10.0 10.0 10.0) -(GridSpacingSchedule 4.0 2.0 1.0) -(HowToCombineTransforms "Compose") +FinalGridSpacingInPhysicalUnits = [10.0, 10.0, 10.0] +GridSpacingSchedule = [4.0, 2.0, 1.0] +HowToCombineTransforms = "Compose" -// ********** Optimizer +# ********** Optimizer -// Maximum number of iterations in each resolution level: -(MaximumNumberOfIterations 50) +# Maximum number of iterations in each resolution level: +MaximumNumberOfIterations = 50 -(AutomaticParameterEstimation "false") -(UseAdaptiveStepSizes "false") +AutomaticParameterEstimation = false +UseAdaptiveStepSizes = false -(SP_a 500000) -(SP_A 20) -(SP_alpha 0.6) +SP_a = 500000 +SP_A = 20 +SP_alpha = 0.6 -// ********** Metric +# ********** Metric -// Just using the default values for the NC metric +# Just using the default values for the NC metric -// ********** Several +# ********** Several -(WriteTransformParametersEachIteration "false") -(WriteTransformParametersEachResolution "true") -(WriteResultImageAfterEachResolution "false") -(WritePyramidImagesAfterEachResolution "false") -(WriteResultImage "true") -(ShowExactMetricValue "false") -(ErodeMask "false") -(UseDirectionCosines "true") +WriteTransformParametersEachIteration = false +WriteTransformParametersEachResolution = true +WriteResultImageAfterEachResolution = false +WritePyramidImagesAfterEachResolution = false +WriteResultImage = true +ShowExactMetricValue = false +ErodeMask = false +UseDirectionCosines = true -// ********** ImageSampler +# ********** ImageSampler -//Number of spatial samples used to compute the mutual information in each resolution level: -(ImageSampler "RandomCoordinate") -(NumberOfSpatialSamples 2000) -(NewSamplesEveryIteration "true") -(UseRandomSampleRegion "false") -//(SampleRegionSize 50.0 50.0 50.0) -(MaximumNumberOfSamplingAttempts 5) +#Number of spatial samples used to compute the mutual information in each resolution level: +ImageSampler = "RandomCoordinate" +NumberOfSpatialSamples = 2000 +NewSamplesEveryIteration = true +UseRandomSampleRegion = false +#(SampleRegionSize 50.0 50.0 50.0) +MaximumNumberOfSamplingAttempts = 5 -// ********** Interpolator and Resampler +# ********** Interpolator and Resampler -//Order of B-Spline interpolation used in each resolution level: -(BSplineInterpolationOrder 1) +#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) +#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) +#Default pixel value for pixels that come from outside the picture: +DefaultPixelValue = 0 diff --git a/Testing/Data/parameters.3D.NC.bspline.ASGD.002.toml b/Testing/Data/parameters.3D.NC.bspline.ASGD.002.toml index 20e48d81a..da8da0c20 100644 --- a/Testing/Data/parameters.3D.NC.bspline.ASGD.002.toml +++ b/Testing/Data/parameters.3D.NC.bspline.ASGD.002.toml @@ -1,89 +1,89 @@ -// ********** Image Types +# ********** Image Types -(FixedInternalImagePixelType "float") -(FixedImageDimension 3) -(MovingInternalImagePixelType "float") -(MovingImageDimension 3) +FixedInternalImagePixelType = "float" +FixedImageDimension = 3 +MovingInternalImagePixelType = "float" +MovingImageDimension = 3 -// ********** Components +# ********** Components -(Registration "MultiMetricMultiResolutionRegistration") -(FixedImagePyramid "FixedRecursiveImagePyramid") -(MovingImagePyramid "MovingRecursiveImagePyramid") -(Interpolator "LinearInterpolator") -(Metric "AdvancedNormalizedCorrelation" "CorrespondingPointsEuclideanDistanceMetric") -(Optimizer "AdaptiveStochasticGradientDescent") -(ResampleInterpolator "FinalBSplineInterpolator") -(Resampler "DefaultResampler") -(Transform "RecursiveBSplineTransform") +Registration = "MultiMetricMultiResolutionRegistration" +FixedImagePyramid = "FixedRecursiveImagePyramid" +MovingImagePyramid = "MovingRecursiveImagePyramid" +Interpolator = "LinearInterpolator" +Metric = ["AdvancedNormalizedCorrelation", "CorrespondingPointsEuclideanDistanceMetric"] +Optimizer = "AdaptiveStochasticGradientDescent" +ResampleInterpolator = "FinalBSplineInterpolator" +Resampler = "DefaultResampler" +Transform = "RecursiveBSplineTransform" -// ********** Pyramid +# ********** Pyramid -// Total number of resolutions -(NumberOfResolutions 3) -(ImagePyramidSchedule 4 4 4 2 2 2 1 1 1) +# Total number of resolutions +NumberOfResolutions = 3 +ImagePyramidSchedule = [4, 4, 4, 2, 2, 2, 1, 1, 1] -// ********** Transform +# ********** Transform -(FinalGridSpacingInPhysicalUnits 10.0 10.0 10.0) -(GridSpacingSchedule 4.0 2.0 1.0) -(HowToCombineTransforms "Compose") +FinalGridSpacingInPhysicalUnits = [10.0, 10.0, 10.0] +GridSpacingSchedule = [4.0, 2.0, 1.0] +HowToCombineTransforms = "Compose" -// ********** Optimizer +# ********** Optimizer -// Maximum number of iterations in each resolution level: -(MaximumNumberOfIterations 50) +# Maximum number of iterations in each resolution level: +MaximumNumberOfIterations = 50 -// For fast testing: -(NumberOfJacobianMeasurements 2500 5000 10000) +# For fast testing: +NumberOfJacobianMeasurements = [2500, 5000, 10000] -(AutomaticParameterEstimation "true") -(UseAdaptiveStepSizes "true") +AutomaticParameterEstimation = true +UseAdaptiveStepSizes = true -// ********** Metric +# ********** Metric -// Just using the default values for the NC metric +# Just using the default values for the NC metric -(Metric0Weight 1) -(Metric1Weight 0.001) +Metric0Weight = 1 +Metric1Weight = 0.001 -// ********** Several +# ********** Several -(WriteTransformParametersEachIteration "false") -(WriteTransformParametersEachResolution "true") -(WriteResultImageAfterEachResolution "false") -(WritePyramidImagesAfterEachResolution "false") -(WriteResultImage "false") -(ShowExactMetricValue "false") -(ErodeMask "false") -(UseDirectionCosines "true") +WriteTransformParametersEachIteration = false +WriteTransformParametersEachResolution = true +WriteResultImageAfterEachResolution = false +WritePyramidImagesAfterEachResolution = false +WriteResultImage = false +ShowExactMetricValue = false +ErodeMask = false +UseDirectionCosines = true -// ********** ImageSampler +# ********** ImageSampler -//Number of spatial samples used to compute the mutual information in each resolution level: -(ImageSampler "RandomCoordinate") -(NumberOfSpatialSamples 500) -(NewSamplesEveryIteration "true") -(UseRandomSampleRegion "false") -//(SampleRegionSize 50.0 50.0 50.0) -(MaximumNumberOfSamplingAttempts 5) +#Number of spatial samples used to compute the mutual information in each resolution level: +ImageSampler = "RandomCoordinate" +NumberOfSpatialSamples = 500 +NewSamplesEveryIteration = true +UseRandomSampleRegion = false +#(SampleRegionSize 50.0 50.0 50.0) +MaximumNumberOfSamplingAttempts = 5 -// ********** Interpolator and Resampler +# ********** Interpolator and Resampler -//Order of B-Spline interpolation used in each resolution level: -(BSplineInterpolationOrder 1) +#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) +#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) +#Default pixel value for pixels that come from outside the picture: +DefaultPixelValue = 0 diff --git a/Testing/Data/parameters.3D.NC.bspline.ASGD.003.toml b/Testing/Data/parameters.3D.NC.bspline.ASGD.003.toml index 4314cd784..3f82cc667 100644 --- a/Testing/Data/parameters.3D.NC.bspline.ASGD.003.toml +++ b/Testing/Data/parameters.3D.NC.bspline.ASGD.003.toml @@ -1,91 +1,91 @@ -// ********** Image Types +# ********** Image Types -(FixedInternalImagePixelType "float") -(FixedImageDimension 3) -(MovingInternalImagePixelType "float") -(MovingImageDimension 3) +FixedInternalImagePixelType = "float" +FixedImageDimension = 3 +MovingInternalImagePixelType = "float" +MovingImageDimension = 3 -// ********** Components +# ********** Components -(Registration "MultiMetricMultiResolutionRegistration") -(FixedImagePyramid "FixedRecursiveImagePyramid") -(MovingImagePyramid "MovingRecursiveImagePyramid") -(Interpolator "LinearInterpolator") -(Metric "AdvancedNormalizedCorrelation" "TransformBendingEnergyPenalty") -(Optimizer "AdaptiveStochasticGradientDescent") -(ResampleInterpolator "FinalBSplineInterpolator") -(Resampler "DefaultResampler") -(Transform "RecursiveBSplineTransform") +Registration = "MultiMetricMultiResolutionRegistration" +FixedImagePyramid = "FixedRecursiveImagePyramid" +MovingImagePyramid = "MovingRecursiveImagePyramid" +Interpolator = "LinearInterpolator" +Metric = ["AdvancedNormalizedCorrelation", "TransformBendingEnergyPenalty"] +Optimizer = "AdaptiveStochasticGradientDescent" +ResampleInterpolator = "FinalBSplineInterpolator" +Resampler = "DefaultResampler" +Transform = "RecursiveBSplineTransform" -// ********** Pyramid +# ********** Pyramid -// Total number of resolutions -(NumberOfResolutions 3) -(ImagePyramidSchedule 4 4 4 2 2 2 1 1 1) +# Total number of resolutions +NumberOfResolutions = 3 +ImagePyramidSchedule = [4, 4, 4, 2, 2, 2, 1, 1, 1] -// ********** Transform +# ********** Transform -(FinalGridSpacingInPhysicalUnits 10.0 10.0 10.0) -(GridSpacingSchedule 4.0 2.0 1.0) -(HowToCombineTransforms "Compose") +FinalGridSpacingInPhysicalUnits = [10.0, 10.0, 10.0] +GridSpacingSchedule = [4.0, 2.0, 1.0] +HowToCombineTransforms = "Compose" -// ********** Optimizer +# ********** Optimizer -// Maximum number of iterations in each resolution level: -// Keep it low here to allow fast testing. Not recommended values! -(MaximumNumberOfIterations 25 25 25) -(NumberOfSamplesForExactGradient 10000) +# Maximum number of iterations in each resolution level: +# Keep it low here to allow fast testing. Not recommended values! +MaximumNumberOfIterations = [25, 25, 25] +NumberOfSamplesForExactGradient = 10000 -// For fast testing: -(NumberOfJacobianMeasurements 2500 5000 10000) +# For fast testing: +NumberOfJacobianMeasurements = [2500, 5000, 10000] -(AutomaticParameterEstimation "true") -(UseAdaptiveStepSizes "true") +AutomaticParameterEstimation = true +UseAdaptiveStepSizes = true -// ********** Metric +# ********** Metric -// Just using the default values for the NC metric +# Just using the default values for the NC metric -(Metric0Weight 1) -(Metric1Weight 0.1) +Metric0Weight = 1 +Metric1Weight = 0.1 -// ********** Several +# ********** Several -(WriteTransformParametersEachIteration "false") -(WriteTransformParametersEachResolution "true") -(WriteResultImageAfterEachResolution "false") -(WritePyramidImagesAfterEachResolution "false") -(WriteResultImage "false") -(ShowExactMetricValue "false") -(ErodeMask "false") -(UseDirectionCosines "true") +WriteTransformParametersEachIteration = false +WriteTransformParametersEachResolution = true +WriteResultImageAfterEachResolution = false +WritePyramidImagesAfterEachResolution = false +WriteResultImage = false +ShowExactMetricValue = false +ErodeMask = false +UseDirectionCosines = true -// ********** ImageSampler +# ********** ImageSampler -//Number of spatial samples used to compute the mutual information in each resolution level: -(ImageSampler "RandomCoordinate") -(NumberOfSpatialSamples 500) -(NewSamplesEveryIteration "true") -(UseRandomSampleRegion "false") -//(SampleRegionSize 50.0 50.0 50.0) -(MaximumNumberOfSamplingAttempts 5) +#Number of spatial samples used to compute the mutual information in each resolution level: +ImageSampler = "RandomCoordinate" +NumberOfSpatialSamples = 500 +NewSamplesEveryIteration = true +UseRandomSampleRegion = false +#(SampleRegionSize 50.0 50.0 50.0) +MaximumNumberOfSamplingAttempts = 5 -// ********** Interpolator and Resampler +# ********** Interpolator and Resampler -//Order of B-Spline interpolation used in each resolution level: -(BSplineInterpolationOrder 1) +#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) +#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) +#Default pixel value for pixels that come from outside the picture: +DefaultPixelValue = 0 diff --git a/Testing/Data/parameters.3D.NC.bspline.ASGD.004.toml b/Testing/Data/parameters.3D.NC.bspline.ASGD.004.toml index c156742fb..9060a4dc2 100644 --- a/Testing/Data/parameters.3D.NC.bspline.ASGD.004.toml +++ b/Testing/Data/parameters.3D.NC.bspline.ASGD.004.toml @@ -1,99 +1,99 @@ -// ********** Image Types +# ********** Image Types -(FixedInternalImagePixelType "float") -(FixedImageDimension 3) -(MovingInternalImagePixelType "float") -(MovingImageDimension 3) +FixedInternalImagePixelType = "float" +FixedImageDimension = 3 +MovingInternalImagePixelType = "float" +MovingImageDimension = 3 -// ********** Components +# ********** Components -(Registration "MultiMetricMultiResolutionRegistration") -(FixedImagePyramid "FixedRecursiveImagePyramid") -(MovingImagePyramid "MovingRecursiveImagePyramid") -(Interpolator "LinearInterpolator") -(Metric "AdvancedNormalizedCorrelation" "TransformRigidityPenalty") -(Optimizer "AdaptiveStochasticGradientDescent") -(ResampleInterpolator "FinalBSplineInterpolator") -(Resampler "DefaultResampler") -(Transform "RecursiveBSplineTransform") +Registration = "MultiMetricMultiResolutionRegistration" +FixedImagePyramid = "FixedRecursiveImagePyramid" +MovingImagePyramid = "MovingRecursiveImagePyramid" +Interpolator = "LinearInterpolator" +Metric = ["AdvancedNormalizedCorrelation", "TransformRigidityPenalty"] +Optimizer = "AdaptiveStochasticGradientDescent" +ResampleInterpolator = "FinalBSplineInterpolator" +Resampler = "DefaultResampler" +Transform = "RecursiveBSplineTransform" -// ********** Pyramid +# ********** Pyramid -// Total number of resolutions -(NumberOfResolutions 3) -(ImagePyramidSchedule 4 4 4 2 2 2 1 1 1) +# Total number of resolutions +NumberOfResolutions = 3 +ImagePyramidSchedule = [4, 4, 4, 2, 2, 2, 1, 1, 1] -// ********** Transform +# ********** Transform -(FinalGridSpacingInPhysicalUnits 10.0 10.0 10.0) -(GridSpacingSchedule 4.0 2.0 1.0) -(HowToCombineTransforms "Compose") +FinalGridSpacingInPhysicalUnits = [10.0, 10.0, 10.0] +GridSpacingSchedule = [4.0, 2.0, 1.0] +HowToCombineTransforms = "Compose" -// ********** Optimizer +# ********** Optimizer -// Maximum number of iterations in each resolution level: -// Keep low to allow for fast testing. Not recommended values! -(MaximumNumberOfIterations 25) -(NumberOfSamplesForExactGradient 10000) +# Maximum number of iterations in each resolution level: +# Keep low to allow for fast testing. Not recommended values! +MaximumNumberOfIterations = 25 +NumberOfSamplesForExactGradient = 10000 -// For fast testing: -(NumberOfJacobianMeasurements 2500 5000 10000) +# For fast testing: +NumberOfJacobianMeasurements = [2500, 5000, 10000] -(AutomaticParameterEstimation "true") -(UseAdaptiveStepSizes "true") +AutomaticParameterEstimation = true +UseAdaptiveStepSizes = true -// ********** Metric +# ********** Metric -// Just using the default values for the NC metric +# Just using the default values for the NC metric -(Metric0Weight 1) -(Metric1Weight 0.1) +Metric0Weight = 1 +Metric1Weight = 0.1 -// Rigidity computed on entire image domain -(LinearityConditionWeight 100.0) -(OrthonormalityConditionWeight 1.0) -(PropernessConditionWeight 2.0) -(UseLinearityCondition "true") -(UseOrthonormalityCondition "true") -(UsePropernessCondition "true") +# Rigidity computed on entire image domain +LinearityConditionWeight = 100.0 +OrthonormalityConditionWeight = 1.0 +PropernessConditionWeight = 2.0 +UseLinearityCondition = true +UseOrthonormalityCondition = true +UsePropernessCondition = true -// ********** Several +# ********** Several -(WriteTransformParametersEachIteration "false") -(WriteTransformParametersEachResolution "true") -(WriteResultImageAfterEachResolution "false") -(WritePyramidImagesAfterEachResolution "false") -(WriteResultImage "false") -(ShowExactMetricValue "false") -(ErodeMask "false") -(UseDirectionCosines "true") +WriteTransformParametersEachIteration = false +WriteTransformParametersEachResolution = true +WriteResultImageAfterEachResolution = false +WritePyramidImagesAfterEachResolution = false +WriteResultImage = false +ShowExactMetricValue = false +ErodeMask = false +UseDirectionCosines = true -// ********** ImageSampler +# ********** ImageSampler -//Number of spatial samples used to compute the mutual information in each resolution level: -(ImageSampler "RandomCoordinate") -(NumberOfSpatialSamples 500) -(NewSamplesEveryIteration "true") -(UseRandomSampleRegion "false") -//(SampleRegionSize 50.0 50.0 50.0) -(MaximumNumberOfSamplingAttempts 5) +#Number of spatial samples used to compute the mutual information in each resolution level: +ImageSampler = "RandomCoordinate" +NumberOfSpatialSamples = 500 +NewSamplesEveryIteration = true +UseRandomSampleRegion = false +#(SampleRegionSize 50.0 50.0 50.0) +MaximumNumberOfSamplingAttempts = 5 -// ********** Interpolator and Resampler +# ********** Interpolator and Resampler -//Order of B-Spline interpolation used in each resolution level: -(BSplineInterpolationOrder 1) +#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) +#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) +#Default pixel value for pixels that come from outside the picture: +DefaultPixelValue = 0 diff --git a/Testing/Data/parameters.3D.NC.bspline.ASGD.004b.toml.in b/Testing/Data/parameters.3D.NC.bspline.ASGD.004b.toml.in index 3650a4450..0ebdca72d 100644 --- a/Testing/Data/parameters.3D.NC.bspline.ASGD.004b.toml.in +++ b/Testing/Data/parameters.3D.NC.bspline.ASGD.004b.toml.in @@ -1,104 +1,104 @@ -// ********** Image Types +# ********** Image Types -(FixedInternalImagePixelType "float") -(FixedImageDimension 3) -(MovingInternalImagePixelType "float") -(MovingImageDimension 3) +FixedInternalImagePixelType = "float" +FixedImageDimension = 3 +MovingInternalImagePixelType = "float" +MovingImageDimension = 3 -// ********** Components +# ********** Components -(Registration "MultiMetricMultiResolutionRegistration") -(FixedImagePyramid "FixedRecursiveImagePyramid") -(MovingImagePyramid "MovingRecursiveImagePyramid") -(Interpolator "BSplineInterpolator") -(Metric "AdvancedNormalizedCorrelation" "TransformRigidityPenalty") -(Optimizer "AdaptiveStochasticGradientDescent") -(ResampleInterpolator "FinalBSplineInterpolator") -(Resampler "DefaultResampler") -(Transform "BSplineTransform") +Registration = "MultiMetricMultiResolutionRegistration" +FixedImagePyramid = "FixedRecursiveImagePyramid" +MovingImagePyramid = "MovingRecursiveImagePyramid" +Interpolator = "BSplineInterpolator" +Metric = ["AdvancedNormalizedCorrelation", "TransformRigidityPenalty"] +Optimizer = "AdaptiveStochasticGradientDescent" +ResampleInterpolator = "FinalBSplineInterpolator" +Resampler = "DefaultResampler" +Transform = "BSplineTransform" -// ********** Pyramid +# ********** Pyramid -// Total number of resolutions -(NumberOfResolutions 3) -(ImagePyramidSchedule 4 4 4 2 2 2 1 1 1) +# Total number of resolutions +NumberOfResolutions = 3 +ImagePyramidSchedule = [4, 4, 4, 2, 2, 2, 1, 1, 1] -// ********** Transform +# ********** Transform -(FinalGridSpacingInPhysicalUnits 10.0 10.0 10.0) -(GridSpacingSchedule 4.0 2.0 1.0) -(HowToCombineTransforms "Compose") +FinalGridSpacingInPhysicalUnits = [10.0, 10.0, 10.0] +GridSpacingSchedule = [4.0, 2.0, 1.0] +HowToCombineTransforms = "Compose" -// ********** Optimizer +# ********** Optimizer -// Maximum number of iterations in each resolution level: -// Keep low to allow for fast testing. Not recommended values! -(MaximumNumberOfIterations 25) -(NumberOfSamplesForExactGradient 10000) +# Maximum number of iterations in each resolution level: +# Keep low to allow for fast testing. Not recommended values! +MaximumNumberOfIterations = 25 +NumberOfSamplesForExactGradient = 10000 -// For fast testing: -(NumberOfJacobianMeasurements 2500 5000 10000) +# For fast testing: +NumberOfJacobianMeasurements = [2500, 5000, 10000] -(AutomaticParameterEstimation "true") -(UseAdaptiveStepSizes "true") +AutomaticParameterEstimation = true +UseAdaptiveStepSizes = true -// ********** Metric +# ********** Metric -// Just using the default values for the NC metric +# Just using the default values for the NC metric -(Metric0Weight 1) -(Metric1Weight 0.1 0.0001 0.00001) +Metric0Weight = 1 +Metric1Weight = [0.1, 0.0001, 0.00001] -// Rigidity computed on sub-domain specified with an image -(LinearityConditionWeight 100.0) -(OrthonormalityConditionWeight 1.0) -(PropernessConditionWeight 2.0) -(UseLinearityCondition "true") -(UseOrthonormalityCondition "true") -(UsePropernessCondition "true") -(DilateRigidityImages "false" "false" "false") -(DilationRadiusMultiplier 2.0) -(FixedRigidityImageName "") -(MovingRigidityImageName "@TestDataDir@/3DCT_lung_followup_segmentation.mha") +# Rigidity computed on sub-domain specified with an image +LinearityConditionWeight = 100.0 +OrthonormalityConditionWeight = 1.0 +PropernessConditionWeight = 2.0 +UseLinearityCondition = true +UseOrthonormalityCondition = true +UsePropernessCondition = true +DilateRigidityImages = [false, false, false] +DilationRadiusMultiplier = 2.0 +FixedRigidityImageName = "" +MovingRigidityImageName = "@TestDataDir@/3DCT_lung_followup_segmentation.mha" -// ********** Several +# ********** Several -(WriteTransformParametersEachIteration "false") -(WriteTransformParametersEachResolution "true") -(WriteResultImageAfterEachResolution "false") -(WritePyramidImagesAfterEachResolution "false") -(WriteResultImage "false") -(ShowExactMetricValue "false") -(ErodeMask "false") -(UseDirectionCosines "true") +WriteTransformParametersEachIteration = false +WriteTransformParametersEachResolution = true +WriteResultImageAfterEachResolution = false +WritePyramidImagesAfterEachResolution = false +WriteResultImage = false +ShowExactMetricValue = false +ErodeMask = false +UseDirectionCosines = true -// ********** ImageSampler +# ********** ImageSampler -//Number of spatial samples used to compute the mutual information in each resolution level: -(ImageSampler "RandomCoordinate") -(NumberOfSpatialSamples 500) -(NewSamplesEveryIteration "true") -(UseRandomSampleRegion "false") -//(SampleRegionSize 50.0 50.0 50.0) -(MaximumNumberOfSamplingAttempts 5) +#Number of spatial samples used to compute the mutual information in each resolution level: +ImageSampler = "RandomCoordinate" +NumberOfSpatialSamples = 500 +NewSamplesEveryIteration = true +UseRandomSampleRegion = false +#(SampleRegionSize 50.0 50.0 50.0) +MaximumNumberOfSamplingAttempts = 5 -// ********** Interpolator and Resampler +# ********** Interpolator and Resampler -//Order of B-Spline interpolation used in each resolution level: -(BSplineInterpolationOrder 1) +#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) +#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) +#Default pixel value for pixels that come from outside the picture: +DefaultPixelValue = 0 diff --git a/Testing/Data/parameters.3D.NC.bspline.QN.001.toml b/Testing/Data/parameters.3D.NC.bspline.QN.001.toml index ce44c4fae..9b1353b21 100644 --- a/Testing/Data/parameters.3D.NC.bspline.QN.001.toml +++ b/Testing/Data/parameters.3D.NC.bspline.QN.001.toml @@ -1,90 +1,90 @@ -// ********** Image Types +# ********** Image Types -(FixedInternalImagePixelType "float") -(FixedImageDimension 3) -(MovingInternalImagePixelType "float") -(MovingImageDimension 3) +FixedInternalImagePixelType = "float" +FixedImageDimension = 3 +MovingInternalImagePixelType = "float" +MovingImageDimension = 3 -// ********** Components +# ********** Components -(Registration "MultiResolutionRegistration") -(FixedImagePyramid "FixedSmoothingImagePyramid") -(MovingImagePyramid "MovingSmoothingImagePyramid") -(Interpolator "BSplineInterpolator") -(Metric "AdvancedNormalizedCorrelation") -(Optimizer "QuasiNewtonLBFGS") -(ResampleInterpolator "FinalBSplineInterpolator") -(Resampler "DefaultResampler") -(Transform "BSplineTransform") +Registration = "MultiResolutionRegistration" +FixedImagePyramid = "FixedSmoothingImagePyramid" +MovingImagePyramid = "MovingSmoothingImagePyramid" +Interpolator = "BSplineInterpolator" +Metric = "AdvancedNormalizedCorrelation" +Optimizer = "QuasiNewtonLBFGS" +ResampleInterpolator = "FinalBSplineInterpolator" +Resampler = "DefaultResampler" +Transform = "BSplineTransform" -// ********** Pyramid +# ********** Pyramid -// Total number of resolutions -(NumberOfResolutions 3) -(ImagePyramidSchedule 4 4 4 2 2 2 1 1 1) +# Total number of resolutions +NumberOfResolutions = 3 +ImagePyramidSchedule = [4, 4, 4, 2, 2, 2, 1, 1, 1] -// ********** Transform +# ********** Transform -(FinalGridSpacingInPhysicalUnits 10.0 10.0 10.0) -(GridSpacingSchedule 4.0 2.0 1.0) -(HowToCombineTransforms "Compose") +FinalGridSpacingInPhysicalUnits = [10.0, 10.0, 10.0] +GridSpacingSchedule = [4.0, 2.0, 1.0] +HowToCombineTransforms = "Compose" -// ********** Optimizer +# ********** Optimizer -// Maximum number of iterations in each resolution level: -(MaximumNumberOfIterations 20) +# Maximum number of iterations in each resolution level: +MaximumNumberOfIterations = 20 -(GenerateLineSearchIterations "true") -(MaximumNumberOfLineSearchIterations 10) -(StepLength 1) -(LineSearchValueTolerance 0.0001) -(LineSearchGradientTolerance 0.9) -(GradientMagnitudeTolerance 0.00000001) -(LBFGSUpdateAccuracy 5) -(StopIfWolfeNotSatisfied "true") +GenerateLineSearchIterations = true +MaximumNumberOfLineSearchIterations = 10 +StepLength = 1 +LineSearchValueTolerance = 0.0001 +LineSearchGradientTolerance = 0.9 +GradientMagnitudeTolerance = 0.00000001 +LBFGSUpdateAccuracy = 5 +StopIfWolfeNotSatisfied = true -// ********** Metric +# ********** Metric -// Just using the default values for the NC metric +# Just using the default values for the NC metric -// ********** Several +# ********** Several -(WriteTransformParametersEachIteration "false") -(WriteTransformParametersEachResolution "true") -(WriteResultImageAfterEachResolution "false") -(WritePyramidImagesAfterEachResolution "false") -(WriteResultImage "false") -(ShowExactMetricValue "false") -(ErodeMask "false") -(UseDirectionCosines "true") +WriteTransformParametersEachIteration = false +WriteTransformParametersEachResolution = true +WriteResultImageAfterEachResolution = false +WritePyramidImagesAfterEachResolution = false +WriteResultImage = false +ShowExactMetricValue = false +ErodeMask = false +UseDirectionCosines = true -// ********** ImageSampler +# ********** ImageSampler -//Number of spatial samples used to compute the mutual information in each resolution level: -// No new samples every iteration for the QN optimizer -(ImageSampler "RandomCoordinate") -(NumberOfSpatialSamples 20000) -(NewSamplesEveryIteration "false") -(UseRandomSampleRegion "false") -//(SampleRegionSize 50.0 50.0 50.0) -(MaximumNumberOfSamplingAttempts 5) +#Number of spatial samples used to compute the mutual information in each resolution level: +# No new samples every iteration for the QN optimizer +ImageSampler = "RandomCoordinate" +NumberOfSpatialSamples = 20000 +NewSamplesEveryIteration = false +UseRandomSampleRegion = false +#(SampleRegionSize 50.0 50.0 50.0) +MaximumNumberOfSamplingAttempts = 5 -// ********** Interpolator and Resampler +# ********** Interpolator and Resampler -//Order of B-Spline interpolation used in each resolution level: -(BSplineInterpolationOrder 1) +#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) +#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) +#Default pixel value for pixels that come from outside the picture: +DefaultPixelValue = 0 diff --git a/Testing/Data/parameters.3D.NC.bspline.SGD.001.toml b/Testing/Data/parameters.3D.NC.bspline.SGD.001.toml index 577662a94..56a153d07 100644 --- a/Testing/Data/parameters.3D.NC.bspline.SGD.001.toml +++ b/Testing/Data/parameters.3D.NC.bspline.SGD.001.toml @@ -1,84 +1,84 @@ -// ********** Image Types +# ********** Image Types -(FixedInternalImagePixelType "float") -(FixedImageDimension 3) -(MovingInternalImagePixelType "float") -(MovingImageDimension 3) +FixedInternalImagePixelType = "float" +FixedImageDimension = 3 +MovingInternalImagePixelType = "float" +MovingImageDimension = 3 -// ********** Components +# ********** Components -(Registration "MultiResolutionRegistration") -(FixedImagePyramid "FixedSmoothingImagePyramid") -(MovingImagePyramid "MovingSmoothingImagePyramid") -(Interpolator "BSplineInterpolator") -(Metric "AdvancedNormalizedCorrelation") -(Optimizer "StandardGradientDescent") -(ResampleInterpolator "FinalBSplineInterpolator") -(Resampler "DefaultResampler") -(Transform "BSplineTransform") +Registration = "MultiResolutionRegistration" +FixedImagePyramid = "FixedSmoothingImagePyramid" +MovingImagePyramid = "MovingSmoothingImagePyramid" +Interpolator = "BSplineInterpolator" +Metric = "AdvancedNormalizedCorrelation" +Optimizer = "StandardGradientDescent" +ResampleInterpolator = "FinalBSplineInterpolator" +Resampler = "DefaultResampler" +Transform = "BSplineTransform" -// ********** Pyramid +# ********** Pyramid -// Total number of resolutions -(NumberOfResolutions 3) -(ImagePyramidSchedule 4 4 4 2 2 2 1 1 1) +# Total number of resolutions +NumberOfResolutions = 3 +ImagePyramidSchedule = [4, 4, 4, 2, 2, 2, 1, 1, 1] -// ********** Transform +# ********** Transform -(FinalGridSpacingInPhysicalUnits 10.0 10.0 10.0) -(GridSpacingSchedule 4.0 2.0 1.0) -(HowToCombineTransforms "Compose") +FinalGridSpacingInPhysicalUnits = [10.0, 10.0, 10.0] +GridSpacingSchedule = [4.0, 2.0, 1.0] +HowToCombineTransforms = "Compose" -// ********** Optimizer +# ********** Optimizer -// Maximum number of iterations in each resolution level: -(MaximumNumberOfIterations 100) +# Maximum number of iterations in each resolution level: +MaximumNumberOfIterations = 100 -(SP_A 20) -(SP_a 1000) -(SP_alpha 0.6) +SP_A = 20 +SP_a = 1000 +SP_alpha = 0.6 -// ********** Metric +# ********** Metric -// Just using the default values for the NC metric +# Just using the default values for the NC metric -// ********** Several +# ********** Several -(WriteTransformParametersEachIteration "false") -(WriteTransformParametersEachResolution "true") -(WriteResultImageAfterEachResolution "false") -(WritePyramidImagesAfterEachResolution "false") -(WriteResultImage "false") -(ShowExactMetricValue "false") -(ErodeMask "false") -(UseDirectionCosines "true") +WriteTransformParametersEachIteration = false +WriteTransformParametersEachResolution = true +WriteResultImageAfterEachResolution = false +WritePyramidImagesAfterEachResolution = false +WriteResultImage = false +ShowExactMetricValue = false +ErodeMask = false +UseDirectionCosines = true -// ********** ImageSampler +# ********** ImageSampler -//Number of spatial samples used to compute the mutual information in each resolution level: -(ImageSampler "RandomCoordinate") -(NumberOfSpatialSamples 2000) -(NewSamplesEveryIteration "true") -(UseRandomSampleRegion "false") -//(SampleRegionSize 50.0 50.0 50.0) -(MaximumNumberOfSamplingAttempts 5) +#Number of spatial samples used to compute the mutual information in each resolution level: +ImageSampler = "RandomCoordinate" +NumberOfSpatialSamples = 2000 +NewSamplesEveryIteration = true +UseRandomSampleRegion = false +#(SampleRegionSize 50.0 50.0 50.0) +MaximumNumberOfSamplingAttempts = 5 -// ********** Interpolator and Resampler +# ********** Interpolator and Resampler -//Order of B-Spline interpolation used in each resolution level: -(BSplineInterpolationOrder 1) +#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) +#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) +#Default pixel value for pixels that come from outside the picture: +DefaultPixelValue = 0 diff --git a/Testing/Data/parameters.3D.NC.bspline_r.ASGD.001a.toml b/Testing/Data/parameters.3D.NC.bspline_r.ASGD.001a.toml index 74d2acc20..c38928166 100644 --- a/Testing/Data/parameters.3D.NC.bspline_r.ASGD.001a.toml +++ b/Testing/Data/parameters.3D.NC.bspline_r.ASGD.001a.toml @@ -1,84 +1,84 @@ -// ********** Image Types +# ********** Image Types -(FixedInternalImagePixelType "float") -(FixedImageDimension 3) -(MovingInternalImagePixelType "float") -(MovingImageDimension 3) +FixedInternalImagePixelType = "float" +FixedImageDimension = 3 +MovingInternalImagePixelType = "float" +MovingImageDimension = 3 -// ********** Components +# ********** Components -(Registration "MultiResolutionRegistration") -(FixedImagePyramid "FixedRecursiveImagePyramid") -(MovingImagePyramid "MovingRecursiveImagePyramid") -(Interpolator "BSplineInterpolator") -(Metric "AdvancedNormalizedCorrelation") -(Optimizer "AdaptiveStochasticGradientDescent") -(ResampleInterpolator "FinalBSplineInterpolator") -(Resampler "DefaultResampler") -(Transform "RecursiveBSplineTransform") +Registration = "MultiResolutionRegistration" +FixedImagePyramid = "FixedRecursiveImagePyramid" +MovingImagePyramid = "MovingRecursiveImagePyramid" +Interpolator = "BSplineInterpolator" +Metric = "AdvancedNormalizedCorrelation" +Optimizer = "AdaptiveStochasticGradientDescent" +ResampleInterpolator = "FinalBSplineInterpolator" +Resampler = "DefaultResampler" +Transform = "RecursiveBSplineTransform" -// ********** Pyramid +# ********** Pyramid -// Total number of resolutions -(NumberOfResolutions 3) -(ImagePyramidSchedule 4 4 4 2 2 2 1 1 1) +# Total number of resolutions +NumberOfResolutions = 3 +ImagePyramidSchedule = [4, 4, 4, 2, 2, 2, 1, 1, 1] -// ********** Transform +# ********** Transform -(FinalGridSpacingInPhysicalUnits 10.0 10.0 10.0) -(GridSpacingSchedule 4.0 2.0 1.0) -(HowToCombineTransforms "Compose") +FinalGridSpacingInPhysicalUnits = [10.0, 10.0, 10.0] +GridSpacingSchedule = [4.0, 2.0, 1.0] +HowToCombineTransforms = "Compose" -// ********** Optimizer +# ********** Optimizer -// Maximum number of iterations in each resolution level: -(MaximumNumberOfIterations 100) +# Maximum number of iterations in each resolution level: +MaximumNumberOfIterations = 100 -(AutomaticParameterEstimation "true") -(ASGDParameterEstimationMethod "DisplacementDistribution") -(UseAdaptiveStepSizes "true") +AutomaticParameterEstimation = true +ASGDParameterEstimationMethod = "DisplacementDistribution" +UseAdaptiveStepSizes = true -// ********** Metric +# ********** Metric -// Just using the default values for the NC metric +# Just using the default values for the NC metric -// ********** Several +# ********** Several -(WriteTransformParametersEachIteration "false") -(WriteTransformParametersEachResolution "true") -(WriteResultImageAfterEachResolution "false") -(WritePyramidImagesAfterEachResolution "false") -(WriteResultImage "true") -(ShowExactMetricValue "false") -(ErodeMask "false") -(UseDirectionCosines "true") +WriteTransformParametersEachIteration = false +WriteTransformParametersEachResolution = true +WriteResultImageAfterEachResolution = false +WritePyramidImagesAfterEachResolution = false +WriteResultImage = true +ShowExactMetricValue = false +ErodeMask = false +UseDirectionCosines = true -// ********** ImageSampler +# ********** ImageSampler -//Number of spatial samples used to compute the mutual information in each resolution level: -(ImageSampler "RandomCoordinate") -(NumberOfSpatialSamples 2000) -(NewSamplesEveryIteration "true") -(UseRandomSampleRegion "false") -//(SampleRegionSize 50.0 50.0 50.0) -(MaximumNumberOfSamplingAttempts 5) +#Number of spatial samples used to compute the mutual information in each resolution level: +ImageSampler = "RandomCoordinate" +NumberOfSpatialSamples = 2000 +NewSamplesEveryIteration = true +UseRandomSampleRegion = false +#(SampleRegionSize 50.0 50.0 50.0) +MaximumNumberOfSamplingAttempts = 5 -// ********** Interpolator and Resampler +# ********** Interpolator and Resampler -//Order of B-Spline interpolation used in each resolution level: -(BSplineInterpolationOrder 1) +#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) +#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) +#Default pixel value for pixels that come from outside the picture: +DefaultPixelValue = 0 diff --git a/Testing/Data/parameters.3D.NC.euler.ASGD.001.toml b/Testing/Data/parameters.3D.NC.euler.ASGD.001.toml index b51508a9a..0b7f87608 100644 --- a/Testing/Data/parameters.3D.NC.euler.ASGD.001.toml +++ b/Testing/Data/parameters.3D.NC.euler.ASGD.001.toml @@ -1,79 +1,79 @@ -// ********** Image Types +# ********** Image Types -(FixedInternalImagePixelType "float") -(FixedImageDimension 3) -(MovingInternalImagePixelType "float") -(MovingImageDimension 3) +FixedInternalImagePixelType = "float" +FixedImageDimension = 3 +MovingInternalImagePixelType = "float" +MovingImageDimension = 3 -// ********** Components +# ********** Components -(Registration "MultiResolutionRegistration") -(FixedImagePyramid "FixedRecursiveImagePyramid") -(MovingImagePyramid "MovingRecursiveImagePyramid") -(Interpolator "BSplineInterpolator") -(Metric "AdvancedNormalizedCorrelation") -(Optimizer "AdaptiveStochasticGradientDescent") -(ResampleInterpolator "FinalBSplineInterpolator") -(Resampler "DefaultResampler") -(Transform "EulerTransform") +Registration = "MultiResolutionRegistration" +FixedImagePyramid = "FixedRecursiveImagePyramid" +MovingImagePyramid = "MovingRecursiveImagePyramid" +Interpolator = "BSplineInterpolator" +Metric = "AdvancedNormalizedCorrelation" +Optimizer = "AdaptiveStochasticGradientDescent" +ResampleInterpolator = "FinalBSplineInterpolator" +Resampler = "DefaultResampler" +Transform = "EulerTransform" -// ********** Pyramid +# ********** Pyramid -// Total number of resolutions -(NumberOfResolutions 3) -(ImagePyramidSchedule 4 4 4 2 2 2 1 1 1) +# Total number of resolutions +NumberOfResolutions = 3 +ImagePyramidSchedule = [4, 4, 4, 2, 2, 2, 1, 1, 1] -// ********** Transform +# ********** Transform -(AutomaticScalesEstimation "true") -(AutomaticTransformInitialization "true") -(HowToCombineTransforms "Compose") +AutomaticScalesEstimation = true +AutomaticTransformInitialization = true +HowToCombineTransforms = "Compose" -// ********** Optimizer +# ********** Optimizer -// Maximum number of iterations in each resolution level: -(MaximumNumberOfIterations 200) +# Maximum number of iterations in each resolution level: +MaximumNumberOfIterations = 200 -(AutomaticParameterEstimation "true") -(UseAdaptiveStepSizes "true") +AutomaticParameterEstimation = true +UseAdaptiveStepSizes = true -// ********** Metric +# ********** Metric -// ********** Several +# ********** Several -(WriteTransformParametersEachIteration "false") -(WriteTransformParametersEachResolution "true") -(WriteResultImageAfterEachResolution "false") -(WriteResultImage "false") -(ShowExactMetricValue "false") -(ErodeMask "false") -(UseDirectionCosines "true") +WriteTransformParametersEachIteration = false +WriteTransformParametersEachResolution = true +WriteResultImageAfterEachResolution = false +WriteResultImage = false +ShowExactMetricValue = false +ErodeMask = false +UseDirectionCosines = true -// ********** ImageSampler +# ********** ImageSampler -//Number of spatial samples used to compute the mutual information in each resolution level: -(ImageSampler "RandomCoordinate") -(NumberOfSpatialSamples 2000) -(NewSamplesEveryIteration "true") -(UseRandomSampleRegion "false") -(MaximumNumberOfSamplingAttempts 5) +#Number of spatial samples used to compute the mutual information in each resolution level: +ImageSampler = "RandomCoordinate" +NumberOfSpatialSamples = 2000 +NewSamplesEveryIteration = true +UseRandomSampleRegion = false +MaximumNumberOfSamplingAttempts = 5 -// ********** Interpolator and Resampler +# ********** Interpolator and Resampler -//Order of B-Spline interpolation used in each resolution level: -(BSplineInterpolationOrder 1) +#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) +#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) +#Default pixel value for pixels that come from outside the picture: +DefaultPixelValue = 0 diff --git a/Testing/Data/parameters.3D.NC.translation.ASGD.001.toml b/Testing/Data/parameters.3D.NC.translation.ASGD.001.toml index 67e23e1c8..9d54143c1 100644 --- a/Testing/Data/parameters.3D.NC.translation.ASGD.001.toml +++ b/Testing/Data/parameters.3D.NC.translation.ASGD.001.toml @@ -1,79 +1,79 @@ -// ********** Image Types +# ********** Image Types -(FixedInternalImagePixelType "float") -(FixedImageDimension 3) -(MovingInternalImagePixelType "float") -(MovingImageDimension 3) +FixedInternalImagePixelType = "float" +FixedImageDimension = 3 +MovingInternalImagePixelType = "float" +MovingImageDimension = 3 -// ********** Components +# ********** Components -(Registration "MultiResolutionRegistration") -(FixedImagePyramid "FixedRecursiveImagePyramid") -(MovingImagePyramid "MovingRecursiveImagePyramid") -(Interpolator "BSplineInterpolator") -(Metric "AdvancedNormalizedCorrelation") -(Optimizer "AdaptiveStochasticGradientDescent") -(ResampleInterpolator "FinalBSplineInterpolator") -(Resampler "DefaultResampler") -(Transform "TranslationTransform") +Registration = "MultiResolutionRegistration" +FixedImagePyramid = "FixedRecursiveImagePyramid" +MovingImagePyramid = "MovingRecursiveImagePyramid" +Interpolator = "BSplineInterpolator" +Metric = "AdvancedNormalizedCorrelation" +Optimizer = "AdaptiveStochasticGradientDescent" +ResampleInterpolator = "FinalBSplineInterpolator" +Resampler = "DefaultResampler" +Transform = "TranslationTransform" -// ********** Pyramid +# ********** Pyramid -// Total number of resolutions -(NumberOfResolutions 3) -(ImagePyramidSchedule 4 4 4 2 2 2 1 1 1) +# Total number of resolutions +NumberOfResolutions = 3 +ImagePyramidSchedule = [4, 4, 4, 2, 2, 2, 1, 1, 1] -// ********** Transform +# ********** Transform -(AutomaticScalesEstimation "true") -(AutomaticTransformInitialization "true") -(HowToCombineTransforms "Compose") +AutomaticScalesEstimation = true +AutomaticTransformInitialization = true +HowToCombineTransforms = "Compose" -// ********** Optimizer +# ********** Optimizer -// Maximum number of iterations in each resolution level: -(MaximumNumberOfIterations 200) +# Maximum number of iterations in each resolution level: +MaximumNumberOfIterations = 200 -(AutomaticParameterEstimation "true") -(UseAdaptiveStepSizes "true") +AutomaticParameterEstimation = true +UseAdaptiveStepSizes = true -// ********** Metric +# ********** Metric -// ********** Several +# ********** Several -(WriteTransformParametersEachIteration "false") -(WriteTransformParametersEachResolution "true") -(WriteResultImageAfterEachResolution "false") -(WriteResultImage "false") -(ShowExactMetricValue "false") -(ErodeMask "false") -(UseDirectionCosines "true") +WriteTransformParametersEachIteration = false +WriteTransformParametersEachResolution = true +WriteResultImageAfterEachResolution = false +WriteResultImage = false +ShowExactMetricValue = false +ErodeMask = false +UseDirectionCosines = true -// ********** ImageSampler +# ********** ImageSampler -//Number of spatial samples used to compute the mutual information in each resolution level: -(ImageSampler "RandomCoordinate") -(NumberOfSpatialSamples 2000) -(NewSamplesEveryIteration "true") -(UseRandomSampleRegion "false") -(MaximumNumberOfSamplingAttempts 5) +#Number of spatial samples used to compute the mutual information in each resolution level: +ImageSampler = "RandomCoordinate" +NumberOfSpatialSamples = 2000 +NewSamplesEveryIteration = true +UseRandomSampleRegion = false +MaximumNumberOfSamplingAttempts = 5 -// ********** Interpolator and Resampler +# ********** Interpolator and Resampler -//Order of B-Spline interpolation used in each resolution level: -(BSplineInterpolationOrder 1) +#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) +#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) +#Default pixel value for pixels that come from outside the picture: +DefaultPixelValue = 0 diff --git a/Testing/Data/parameters.3D.NMI.bspline.ASGD.001.toml b/Testing/Data/parameters.3D.NMI.bspline.ASGD.001.toml index d616f51fd..fa196cb80 100644 --- a/Testing/Data/parameters.3D.NMI.bspline.ASGD.001.toml +++ b/Testing/Data/parameters.3D.NMI.bspline.ASGD.001.toml @@ -1,88 +1,88 @@ -// ********** Image Types +# ********** Image Types -(FixedInternalImagePixelType "float") -(FixedImageDimension 3) -(MovingInternalImagePixelType "float") -(MovingImageDimension 3) +FixedInternalImagePixelType = "float" +FixedImageDimension = 3 +MovingInternalImagePixelType = "float" +MovingImageDimension = 3 -// ********** Components +# ********** Components -(Registration "MultiResolutionRegistration") -(FixedImagePyramid "FixedRecursiveImagePyramid") -(MovingImagePyramid "MovingRecursiveImagePyramid") -(Interpolator "BSplineInterpolator") -(Metric "NormalizedMutualInformation") -(Optimizer "AdaptiveStochasticGradientDescent") -(ResampleInterpolator "FinalBSplineInterpolator") -(Resampler "DefaultResampler") -(Transform "BSplineTransform") +Registration = "MultiResolutionRegistration" +FixedImagePyramid = "FixedRecursiveImagePyramid" +MovingImagePyramid = "MovingRecursiveImagePyramid" +Interpolator = "BSplineInterpolator" +Metric = "NormalizedMutualInformation" +Optimizer = "AdaptiveStochasticGradientDescent" +ResampleInterpolator = "FinalBSplineInterpolator" +Resampler = "DefaultResampler" +Transform = "BSplineTransform" -// ********** Pyramid +# ********** Pyramid -// Total number of resolutions -(NumberOfResolutions 3) -(ImagePyramidSchedule 4 4 4 2 2 2 1 1 1) +# Total number of resolutions +NumberOfResolutions = 3 +ImagePyramidSchedule = [4, 4, 4, 2, 2, 2, 1, 1, 1] -// ********** Transform +# ********** Transform -(FinalGridSpacingInPhysicalUnits 10.0 10.0 10.0) -(GridSpacingSchedule 4.0 2.0 1.0) -(HowToCombineTransforms "Compose") +FinalGridSpacingInPhysicalUnits = [10.0, 10.0, 10.0] +GridSpacingSchedule = [4.0, 2.0, 1.0] +HowToCombineTransforms = "Compose" -// ********** Optimizer +# ********** Optimizer -// Maximum number of iterations in each resolution level: -(MaximumNumberOfIterations 100) +# Maximum number of iterations in each resolution level: +MaximumNumberOfIterations = 100 -// For fast testing: -(NumberOfJacobianMeasurements 2500 5000 10000) +# For fast testing: +NumberOfJacobianMeasurements = [2500, 5000, 10000] -(AutomaticParameterEstimation "true") -(UseAdaptiveStepSizes "true") +AutomaticParameterEstimation = true +UseAdaptiveStepSizes = true -// ********** Metric +# ********** Metric -(NumberOfHistogramBins 32) -(FixedKernelBSplineOrder 0) -(MovingKernelBSplineOrder 3) +NumberOfHistogramBins = 32 +FixedKernelBSplineOrder = 0 +MovingKernelBSplineOrder = 3 -// ********** Several +# ********** Several -(WriteTransformParametersEachIteration "false") -(WriteTransformParametersEachResolution "true") -(WriteResultImageAfterEachResolution "false") -(WritePyramidImagesAfterEachResolution "false") -(WriteResultImage "false") -(ShowExactMetricValue "false") -(ErodeMask "false") -(UseDirectionCosines "true") +WriteTransformParametersEachIteration = false +WriteTransformParametersEachResolution = true +WriteResultImageAfterEachResolution = false +WritePyramidImagesAfterEachResolution = false +WriteResultImage = false +ShowExactMetricValue = false +ErodeMask = false +UseDirectionCosines = true -// ********** ImageSampler +# ********** ImageSampler -//Number of spatial samples used to compute the mutual information in each resolution level: -(ImageSampler "RandomCoordinate") -(NumberOfSpatialSamples 500) -(NewSamplesEveryIteration "true") -(UseRandomSampleRegion "false") -//(SampleRegionSize 50.0 50.0 50.0) -(MaximumNumberOfSamplingAttempts 5) +#Number of spatial samples used to compute the mutual information in each resolution level: +ImageSampler = "RandomCoordinate" +NumberOfSpatialSamples = 500 +NewSamplesEveryIteration = true +UseRandomSampleRegion = false +#(SampleRegionSize 50.0 50.0 50.0) +MaximumNumberOfSamplingAttempts = 5 -// ********** Interpolator and Resampler +# ********** Interpolator and Resampler -//Order of B-Spline interpolation used in each resolution level: -(BSplineInterpolationOrder 1) +#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) +#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) +#Default pixel value for pixels that come from outside the picture: +DefaultPixelValue = 0 diff --git a/Testing/Data/parameters.3D.SSD.bspline.ASGD.001.toml b/Testing/Data/parameters.3D.SSD.bspline.ASGD.001.toml index 81e826f1f..e82575e20 100644 --- a/Testing/Data/parameters.3D.SSD.bspline.ASGD.001.toml +++ b/Testing/Data/parameters.3D.SSD.bspline.ASGD.001.toml @@ -1,86 +1,86 @@ -// ********** Image Types +# ********** Image Types -(FixedInternalImagePixelType "float") -(FixedImageDimension 3) -(MovingInternalImagePixelType "float") -(MovingImageDimension 3) +FixedInternalImagePixelType = "float" +FixedImageDimension = 3 +MovingInternalImagePixelType = "float" +MovingImageDimension = 3 -// ********** Components +# ********** Components -(Registration "MultiResolutionRegistration") -(FixedImagePyramid "FixedRecursiveImagePyramid") -(MovingImagePyramid "MovingRecursiveImagePyramid") -(Interpolator "BSplineInterpolator") -(Metric "AdvancedMeanSquares") -(Optimizer "AdaptiveStochasticGradientDescent") -(ResampleInterpolator "FinalBSplineInterpolator") -(Resampler "DefaultResampler") -(Transform "BSplineTransform") +Registration = "MultiResolutionRegistration" +FixedImagePyramid = "FixedRecursiveImagePyramid" +MovingImagePyramid = "MovingRecursiveImagePyramid" +Interpolator = "BSplineInterpolator" +Metric = "AdvancedMeanSquares" +Optimizer = "AdaptiveStochasticGradientDescent" +ResampleInterpolator = "FinalBSplineInterpolator" +Resampler = "DefaultResampler" +Transform = "BSplineTransform" -// ********** Pyramid +# ********** Pyramid -// Total number of resolutions -(NumberOfResolutions 3) -(ImagePyramidSchedule 4 4 4 2 2 2 1 1 1) +# Total number of resolutions +NumberOfResolutions = 3 +ImagePyramidSchedule = [4, 4, 4, 2, 2, 2, 1, 1, 1] -// ********** Transform +# ********** Transform -(FinalGridSpacingInPhysicalUnits 10.0 10.0 10.0) -(GridSpacingSchedule 4.0 2.0 1.0) -(HowToCombineTransforms "Compose") +FinalGridSpacingInPhysicalUnits = [10.0, 10.0, 10.0] +GridSpacingSchedule = [4.0, 2.0, 1.0] +HowToCombineTransforms = "Compose" -// ********** Optimizer +# ********** Optimizer -// Maximum number of iterations in each resolution level: -(MaximumNumberOfIterations 100) +# Maximum number of iterations in each resolution level: +MaximumNumberOfIterations = 100 -// For fast testing: -(NumberOfJacobianMeasurements 2500 5000 10000) +# For fast testing: +NumberOfJacobianMeasurements = [2500, 5000, 10000] -(AutomaticParameterEstimation "true") -(UseAdaptiveStepSizes "true") +AutomaticParameterEstimation = true +UseAdaptiveStepSizes = true -// ********** Metric +# ********** Metric -// Just using the default values for the NC metric +# Just using the default values for the NC metric -// ********** Several +# ********** Several -(WriteTransformParametersEachIteration "false") -(WriteTransformParametersEachResolution "true") -(WriteResultImageAfterEachResolution "false") -(WritePyramidImagesAfterEachResolution "false") -(WriteResultImage "false") -(ShowExactMetricValue "false") -(ErodeMask "false") -(UseDirectionCosines "true") +WriteTransformParametersEachIteration = false +WriteTransformParametersEachResolution = true +WriteResultImageAfterEachResolution = false +WritePyramidImagesAfterEachResolution = false +WriteResultImage = false +ShowExactMetricValue = false +ErodeMask = false +UseDirectionCosines = true -// ********** ImageSampler +# ********** ImageSampler -//Number of spatial samples used to compute the mutual information in each resolution level: -(ImageSampler "RandomCoordinate") -(NumberOfSpatialSamples 500) -(NewSamplesEveryIteration "true") -(UseRandomSampleRegion "false") -//(SampleRegionSize 50.0 50.0 50.0) -(MaximumNumberOfSamplingAttempts 5) +#Number of spatial samples used to compute the mutual information in each resolution level: +ImageSampler = "RandomCoordinate" +NumberOfSpatialSamples = 500 +NewSamplesEveryIteration = true +UseRandomSampleRegion = false +#(SampleRegionSize 50.0 50.0 50.0) +MaximumNumberOfSamplingAttempts = 5 -// ********** Interpolator and Resampler +# ********** Interpolator and Resampler -//Order of B-Spline interpolation used in each resolution level: -(BSplineInterpolationOrder 1) +#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) +#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) +#Default pixel value for pixels that come from outside the picture: +DefaultPixelValue = 0 diff --git a/Testing/Data/parameters.3D.SSD.bspline.ASGD.002.toml b/Testing/Data/parameters.3D.SSD.bspline.ASGD.002.toml index 63acd792c..7405422fd 100644 --- a/Testing/Data/parameters.3D.SSD.bspline.ASGD.002.toml +++ b/Testing/Data/parameters.3D.SSD.bspline.ASGD.002.toml @@ -1,86 +1,86 @@ -// ********** Image Types +# ********** Image Types -(FixedInternalImagePixelType "float") -(FixedImageDimension 3) -(MovingInternalImagePixelType "float") -(MovingImageDimension 3) +FixedInternalImagePixelType = "float" +FixedImageDimension = 3 +MovingInternalImagePixelType = "float" +MovingImageDimension = 3 -// ********** Components +# ********** Components -(Registration "MultiResolutionRegistration") -(FixedImagePyramid "FixedRecursiveImagePyramid") -(MovingImagePyramid "MovingRecursiveImagePyramid") -(Interpolator "LinearInterpolator") -(Metric "AdvancedMeanSquares") -(Optimizer "AdaptiveStochasticGradientDescent") -(ResampleInterpolator "FinalBSplineInterpolator") -(Resampler "DefaultResampler") -(Transform "BSplineTransform") +Registration = "MultiResolutionRegistration" +FixedImagePyramid = "FixedRecursiveImagePyramid" +MovingImagePyramid = "MovingRecursiveImagePyramid" +Interpolator = "LinearInterpolator" +Metric = "AdvancedMeanSquares" +Optimizer = "AdaptiveStochasticGradientDescent" +ResampleInterpolator = "FinalBSplineInterpolator" +Resampler = "DefaultResampler" +Transform = "BSplineTransform" -// ********** Pyramid +# ********** Pyramid -// Total number of resolutions -(NumberOfResolutions 3) -(ImagePyramidSchedule 4 4 4 2 2 2 1 1 1) +# Total number of resolutions +NumberOfResolutions = 3 +ImagePyramidSchedule = [4, 4, 4, 2, 2, 2, 1, 1, 1] -// ********** Transform +# ********** Transform -(FinalGridSpacingInPhysicalUnits 10.0 10.0 10.0) -(GridSpacingSchedule 4.0 2.0 1.0) -(HowToCombineTransforms "Compose") +FinalGridSpacingInPhysicalUnits = [10.0, 10.0, 10.0] +GridSpacingSchedule = [4.0, 2.0, 1.0] +HowToCombineTransforms = "Compose" -// ********** Optimizer +# ********** Optimizer -// Maximum number of iterations in each resolution level: -(MaximumNumberOfIterations 100) +# Maximum number of iterations in each resolution level: +MaximumNumberOfIterations = 100 -// For fast testing: -(NumberOfJacobianMeasurements 2500 5000 10000) +# For fast testing: +NumberOfJacobianMeasurements = [2500, 5000, 10000] -(AutomaticParameterEstimation "true") -(UseAdaptiveStepSizes "true") +AutomaticParameterEstimation = true +UseAdaptiveStepSizes = true -// ********** Metric +# ********** Metric -// Just using the default values for the NC metric +# Just using the default values for the NC metric -// ********** Several +# ********** Several -(WriteTransformParametersEachIteration "false") -(WriteTransformParametersEachResolution "true") -(WriteResultImageAfterEachResolution "false") -(WritePyramidImagesAfterEachResolution "false") -(WriteResultImage "false") -(ShowExactMetricValue "false") -(ErodeMask "false") -(UseDirectionCosines "true") +WriteTransformParametersEachIteration = false +WriteTransformParametersEachResolution = true +WriteResultImageAfterEachResolution = false +WritePyramidImagesAfterEachResolution = false +WriteResultImage = false +ShowExactMetricValue = false +ErodeMask = false +UseDirectionCosines = true -// ********** ImageSampler +# ********** ImageSampler -//Number of spatial samples used to compute the mutual information in each resolution level: -(ImageSampler "RandomCoordinate") -(NumberOfSpatialSamples 500) -(NewSamplesEveryIteration "true") -(UseRandomSampleRegion "false") -//(SampleRegionSize 50.0 50.0 50.0) -(MaximumNumberOfSamplingAttempts 5) +#Number of spatial samples used to compute the mutual information in each resolution level: +ImageSampler = "RandomCoordinate" +NumberOfSpatialSamples = 500 +NewSamplesEveryIteration = true +UseRandomSampleRegion = false +#(SampleRegionSize 50.0 50.0 50.0) +MaximumNumberOfSamplingAttempts = 5 -// ********** Interpolator and Resampler +# ********** Interpolator and Resampler -//Order of B-Spline interpolation used in each resolution level: -(BSplineInterpolationOrder 1) +#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) +#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) +#Default pixel value for pixels that come from outside the picture: +DefaultPixelValue = 0 diff --git a/Testing/Data/parameters.3D.SSD.bspline.ASGD.003.toml b/Testing/Data/parameters.3D.SSD.bspline.ASGD.003.toml index fd85ce926..4e449c5e6 100644 --- a/Testing/Data/parameters.3D.SSD.bspline.ASGD.003.toml +++ b/Testing/Data/parameters.3D.SSD.bspline.ASGD.003.toml @@ -1,84 +1,84 @@ -// ********** Image Types +# ********** Image Types -(FixedInternalImagePixelType "float") -(MovingInternalImagePixelType "float") +FixedInternalImagePixelType = "float" +MovingInternalImagePixelType = "float" -// ********** Components +# ********** Components -(Registration "MultiResolutionRegistration") -(FixedImagePyramid "FixedRecursiveImagePyramid") -(MovingImagePyramid "MovingRecursiveImagePyramid") -(Interpolator "NearestNeighborInterpolator") -(Metric "AdvancedMeanSquares") -(Optimizer "AdaptiveStochasticGradientDescent") -(ResampleInterpolator "FinalBSplineInterpolator") -(Resampler "DefaultResampler") -(Transform "BSplineTransform") +Registration = "MultiResolutionRegistration" +FixedImagePyramid = "FixedRecursiveImagePyramid" +MovingImagePyramid = "MovingRecursiveImagePyramid" +Interpolator = "NearestNeighborInterpolator" +Metric = "AdvancedMeanSquares" +Optimizer = "AdaptiveStochasticGradientDescent" +ResampleInterpolator = "FinalBSplineInterpolator" +Resampler = "DefaultResampler" +Transform = "BSplineTransform" -// ********** Pyramid +# ********** Pyramid -// Total number of resolutions -(NumberOfResolutions 3) -(ImagePyramidSchedule 4 4 4 2 2 2 1 1 1) +# Total number of resolutions +NumberOfResolutions = 3 +ImagePyramidSchedule = [4, 4, 4, 2, 2, 2, 1, 1, 1] -// ********** Transform +# ********** Transform -(FinalGridSpacingInPhysicalUnits 10.0 10.0 10.0) -(GridSpacingSchedule 4.0 2.0 1.0) -(HowToCombineTransforms "Compose") +FinalGridSpacingInPhysicalUnits = [10.0, 10.0, 10.0] +GridSpacingSchedule = [4.0, 2.0, 1.0] +HowToCombineTransforms = "Compose" -// ********** Optimizer +# ********** Optimizer -// Maximum number of iterations in each resolution level: -(MaximumNumberOfIterations 100) +# Maximum number of iterations in each resolution level: +MaximumNumberOfIterations = 100 -// For fast testing: -(NumberOfJacobianMeasurements 2500 5000 10000) +# For fast testing: +NumberOfJacobianMeasurements = [2500, 5000, 10000] -(AutomaticParameterEstimation "true") -(UseAdaptiveStepSizes "true") +AutomaticParameterEstimation = true +UseAdaptiveStepSizes = true -// ********** Metric +# ********** Metric -// Just using the default values for the NC metric +# Just using the default values for the NC metric -// ********** Several +# ********** Several -(WriteTransformParametersEachIteration "false") -(WriteTransformParametersEachResolution "true") -(WriteResultImageAfterEachResolution "false") -(WritePyramidImagesAfterEachResolution "false") -(WriteResultImage "false") -(ShowExactMetricValue "false") -(ErodeMask "false") -(UseDirectionCosines "true") +WriteTransformParametersEachIteration = false +WriteTransformParametersEachResolution = true +WriteResultImageAfterEachResolution = false +WritePyramidImagesAfterEachResolution = false +WriteResultImage = false +ShowExactMetricValue = false +ErodeMask = false +UseDirectionCosines = true -// ********** ImageSampler +# ********** ImageSampler -//Number of spatial samples used to compute the mutual information in each resolution level: -(ImageSampler "RandomCoordinate") -(NumberOfSpatialSamples 500) -(NewSamplesEveryIteration "true") -(UseRandomSampleRegion "false") -//(SampleRegionSize 50.0 50.0 50.0) -(MaximumNumberOfSamplingAttempts 5) +#Number of spatial samples used to compute the mutual information in each resolution level: +ImageSampler = "RandomCoordinate" +NumberOfSpatialSamples = 500 +NewSamplesEveryIteration = true +UseRandomSampleRegion = false +#(SampleRegionSize 50.0 50.0 50.0) +MaximumNumberOfSamplingAttempts = 5 -// ********** Interpolator and Resampler +# ********** Interpolator and Resampler -//Order of B-Spline interpolation used in each resolution level: -(BSplineInterpolationOrder 1) +#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) +#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) +#Default pixel value for pixels that come from outside the picture: +DefaultPixelValue = 0