From: tbaudier Date: Thu, 25 Feb 2016 15:16:23 +0000 (+0100) Subject: Ensure to have the correct value with transformed image in the sliders X-Git-Tag: v1.4.0~42 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=4b7af871463cc4b63f52d5892f6ab2d6d40bfc28;p=clitk.git Ensure to have the correct value with transformed image in the sliders --- diff --git a/vv/vvToolRigidReg.cxx b/vv/vvToolRigidReg.cxx index a3ee902..e050426 100644 --- a/vv/vvToolRigidReg.cxx +++ b/vv/vvToolRigidReg.cxx @@ -398,7 +398,7 @@ void vvToolRigidReg::SetTransform(vtkMatrix4x4 *matrix) double rad = (checkBoxDegrees->checkState()==Qt::Checked)?180./itk::Math::pi:1.; double angleDiff = euler->GetParameters()[i]-rotSBs[i]->value()/rad+2*itk::Math::pi; angleDiff = angleDiff - 2*itk::Math::pi*itk::Math::Round(angleDiff/(2*itk::Math::pi)); - if(angleDiff>1.e-4) { + if(abs(angleDiff)>1.e-4) { rotSBs[i]->blockSignals(true); rotSBs[i]->setValue( euler->GetParameters()[i]*rad ); rotSBs[i]->blockSignals(false);