-BUG: The UseRandomSampleRegion option is ignored in the following case: 1) MultiMetricMultiResolutionRegistration, AND 2) Using more than one metric, AND 3) Using only one sampler (RandomCoordinate), AND 4) Using AdaptiveStochasticGradientDescent, AND 5) Using AutomaticParameterEstimation. The bug was caused because the SampleGradients function failed to turn on the UseRandomSampleRegion after turning it off, because it assumed that each sampler was different, while they actually all point to the same instance. Bug reported by Valerio Fortunati. 



git-svn-id: https://svn.bigr.nl/elastix/trunkpublic@4562 4d348492-3962-11de-aa85-65a2020054a3