Commit 67c084e0 authored by Marc Modat's avatar Marc Modat

Error when integrating the flow with a negative number of squaring step. Corrected

parent 01fcaa4f
......@@ -340,8 +340,8 @@ int main(int argc, char **argv)
tempFlowField->intent_p1=inputTransformationImage->intent_p1;
tempFlowField->intent_p2=inputTransformationImage->intent_p2;
reg_defField_getDeformationFieldFromFlowField(tempFlowField,
deformationFieldImage,
false);
deformationFieldImage,
false);
nifti_image_free(tempFlowField);
}
break;
......
......@@ -3964,7 +3964,7 @@ void reg_defField_getDeformationFieldFromFlowField(nifti_image *flowFieldImage,
flowFieldImage->intent_p2 = squaringNumber;
else flowFieldImage->intent_p2 = -squaringNumber;
}
else squaringNumber=flowFieldImage->intent_p2;
else squaringNumber=static_cast<int>(fabsf(flowFieldImage->intent_p2));
// The displacement field is scaled
float scalingValue = pow(2.0f,fabs(squaringNumber));
......
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