Commit 50ee490f authored by Jamie Mcclelland's avatar Jamie Mcclelland

fixed bug where objective function gradient was only being calculated when NMI...

fixed bug where objective function gradient was only being calculated when NMI was the similarity measure
parent 496af7eb
......@@ -1085,8 +1085,7 @@ void reg_f3d<T>::GetObjectiveFunctionGradient()
if(!this->useApproxGradient)
{
// Compute the gradient of the similarity measure
if(this->similarityWeight>0 &&
(this->measure_nmi!=NULL || this->measure_multichannel_nmi!=NULL) )
if(this->similarityWeight>0)
{
this->WarpFloatingImage(this->interpolation);
this->GetSimilarityMeasureGradient();
......
......@@ -1080,8 +1080,7 @@ void reg_f3d_sym<T>::GetObjectiveFunctionGradient()
if(!this->useApproxGradient)
{
// Compute the gradient of the similarity measure
if(this->similarityWeight>0 &&
(this->measure_nmi!=NULL || this->measure_multichannel_nmi!=NULL))
if(this->similarityWeight>0)
{
this->WarpFloatingImage(this->interpolation);
this->GetSimilarityMeasureGradient();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment