From 4b7af871463cc4b63f52d5892f6ab2d6d40bfc28 Mon Sep 17 00:00:00 2001 From: tbaudier Date: Thu, 25 Feb 2016 16:16:23 +0100 Subject: [PATCH] Ensure to have the correct value with transformed image in the sliders --- vv/vvToolRigidReg.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.47.1