]> Creatis software - clitk.git/commitdiff
Ensure to have the correct value with transformed image in the sliders
authortbaudier <thomas.baudier@creatis.insa-lyon.fr>
Thu, 25 Feb 2016 15:16:23 +0000 (16:16 +0100)
committertbaudier <thomas.baudier@creatis.insa-lyon.fr>
Thu, 25 Feb 2016 15:16:23 +0000 (16:16 +0100)
vv/vvToolRigidReg.cxx

index a3ee90233c8d30b5a047b444a5dcfd2c8dd9336c..e050426ea99c52ec95cffbb59e4b12c14ec50be1 100644 (file)
@@ -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<double,double>(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);