Skip to content

Commit

Permalink
WIP: Convert "parameters.*.toml" files from elastix txt to TOML
Browse files Browse the repository at this point in the history
  • Loading branch information
N-Dekker committed Feb 14, 2025
1 parent 6db46f6 commit 76c1ff3
Show file tree
Hide file tree
Showing 27 changed files with 1,491 additions and 1,491 deletions.
22 changes: 11 additions & 11 deletions Testing/Data/parameters.2D.NC.translation.ASGD.toml
Original file line number Diff line number Diff line change
@@ -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"
116 changes: 58 additions & 58 deletions Testing/Data/parameters.3D.Kappa.bspline.ASGD.001.toml
Original file line number Diff line number Diff line change
@@ -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

118 changes: 59 additions & 59 deletions Testing/Data/parameters.3D.MI.bspline.ASGD.001.toml
Original file line number Diff line number Diff line change
@@ -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

Loading

0 comments on commit 76c1ff3

Please sign in to comment.