Changes of elastix 4.2 compared to elastix 4.1
Enhancements:
elastix 4.2 builds with ITK 3.14.
 Updated the manual with more advanced topics and a developers guide.
 All transforms in
elastix now support the computation of their spatial derivatives, and not only the derivatives to the transformation parameters. These spatial derivatives are often required for the computation of regularization or penelty terms. The new transforms are termed "Advanced" to indicate the difference with the normal ITKversions. The use of these advanced transforms is now mandatory in elastix . You can download a pdf that explains the details.
 The advanced transforms also implement sparseness of the parameters, i.e. it keeps track which parameters are influenced by an image sample (the nonzero Jacobians). For example for the Bspline transform, this is a general way of exploiting its compact support.
 All metrics make use of sparse Jacobians.
 We removed Bspline specific code from the AdvancedImageToImageMetric. With the introduction of the sparse Jacobians it is not needed anymore, and it cleans up the code tremendously.
 The rigidity penalty term was rewritten to form a separate and independent component. So, it is now possible to use it with other metrics than just mutual information. The implementation is not based on the spatial derivaives, but on a filtering of the Bspline coeffiecients, as detailed in our Medical Physics paper of 2007. Select it with:
(Metric "TransformRigidityPenalty")
 We implemented the preconditioning technique by Nicholas Tustison: "Directly Manipulated Freeform Deformations". It is currently only implemented for the AdvancedMattesMutualInformation metric, but it could be easily implemented for other metrics. The preconditioning can be selected with the option:
(UseJacobianPreconditioning "true")
The implementation also supports nonBspline transforms, but it is questionable what it does in that case.
 Binary mask erosion is now much faster, since we changed the code to use parabolic erode filters from Richard Beare and Gaetan Lehmann.
 We added an option to write the pyramid images, to inspect what they look like during the registration. Select it with:
(WritePyramidImagesAfterEachResolution "true")
 We added the option to initialize a transformation with the center of gravity instead of only the geometrical center (which stays the default value). Select it with:
(AutomaticTransformInitializationMethod "CenterOfGravity")
 The adaptive stochastic gradient descent (ASGD) optimization routine was only able to automatically compute its parameters when the number of transform parameters (N) was limited. This was due to the fact that the computation required a covariance matrix of size N by N, so we got memory problems. The updated implementation makes use of sparse matrices (most of the matrix is empty for transforms with compact support). Together with some smart speedup tricks this yields an efficient algorithm. So, in
elastix 4.2 ASGD is usable for much larger registration problems.
 Previously we contributed the TransformToDeformationFieldSource class to the ITK. Since it was recently adopted in the ITK repository, we now use the ITK version and not the local one.
 We added compilation instructions for the ITK.
New classes and/or methods:
 We created a new parameter file parser. The previous parser was based on an old C library we took from the InsightApplications, and had some pitfalls. The new parser for example does not need a point "." to specify a floating value, which could results in erroneous registration results when the parameter file contained this error. Additionally, the C++ code is clearer and more maintainable. For the user there are no changes.
 A new transform was added: the WeightedCombinationTransform. It optimizes a weighted sum of subtransforms. The weights form the transform parameters. You could use this for example to implement registration using a statistical deformation model (by setting each subtransform to a principal deformation mode). Also, the transform may simply be used in transformix to average a number of TransformParameter files for example. Select it with:
(Transform "WeightedCombinationTransform")
(SubTransforms "tp0.txt" "TransformParameters.1.txt" "tpbspline.txt")
See this link for more details.
 Several flavours of physicsbased spline transforms were added: the SplineKernelTransform. ITK classes are based on rework by Rupert Brooks of existing ITK kernel transforms. For
elastix we made them threadsafe and inherit from advanced transform. The SplineKernelTransform implements a ThinPlateSpline and some variants (ElasticBodySpline, VolumeSpline, ElasticBodyReciprocalSpline). These transform currently do not implement the computation of spatial derivatives. Select it with:
(Transform "SplineKernelTransform")
(SplineKernelType "ThinPlateSpline") or
(SplineKernelType "VolumeSpline") or
(SplineKernelType "ElasticBodySpline") or
(SplineKernelType "ElastixBodyReciprocalSpline")
See this link for more details.
 We introduce a bending energy penalty term, based on the new spatial derivatives. Select it with:
(Metric "TransformBendingEnergyPenalty")
See this link for more details.
 A new metric DisplacementMagnitudePenalty was added. It is a transform penalty term that penalises T(x)x^2. You can use this to invert transforms, by setting the transform to inverted as an initial transform, setting (HowToCombineTransforms "Compose"), and running elastix with this metric. After that you can manually set the initial transform in the last parameter file to "NoInitialTransform", and voila, you have the inverse transform! Strictly speaken, you should then also change the Size/Spacing/Origin/Index settings to match that of the moving image. Select it with:
(Metric "DisplacementMagnitudePenalty")
See this link for more details.
Bugs:
 Some small bugs were fixed.
 The kappa statistic metric did not work properly for floating images, since comparison was performed with "==" instead of "difference < epsilon".
