RF: Merge various pairs of cost function classes which have large amounts of shared code
The CostFxnCompoundBiasFieldVarianceScaled
and CostFxnCompoundWarpFieldVarianceScaled
classes are identical with the exception of a single value used during initialisation. This MR merges the two into a single class called CostFnxnCompoundVarianceScaled
, which is templated on the WarpField
and BiasField
classes.
Similarly, the CostFxnBendingEnergy
and CostFxnBendingEnergyBiasfield
classes have quite a lot of duplicated code, and differ primarily in their implementation of the CostFxn::cost()
function. These two classes have similarly been merged into a single CostFxnBendingEnergy
class, which is templated on the WarpFieldBSpline
and BiasFieldBSpline
classes.
Edited by Paul McCarthy