]> Creatis software - clitk.git/blobdiff - vv/vvDeformationDialog.cxx
Corrected tool mechanism for windows: static data members seem to be initialized...
[clitk.git] / vv / vvDeformationDialog.cxx
index 5dda22d62ebc5cfe281820cf1349a46d42c9a087..8d54d7042d4b7d6a998721e7309d568d09395fe3 100644 (file)
@@ -1,3 +1,20 @@
+/*=========================================================================
+  Program:   vv                     http://www.creatis.insa-lyon.fr/rio/vv
+
+  Authors belong to: 
+  - University of LYON              http://www.universite-lyon.fr/
+  - Léon Bérard cancer center       http://oncora1.lyon.fnclcc.fr
+  - CREATIS CNRS laboratory         http://www.creatis.insa-lyon.fr
+
+  This software is distributed WITHOUT ANY WARRANTY; without even
+  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+  PURPOSE.  See the copyright notices for more information.
+
+  It is distributed under dual licence
+
+  - BSD        See included LICENSE.txt file
+  - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+======================================================================-====*/
 #include <vector>
 #include <QComboBox>
 #include <QThread>
@@ -87,12 +104,12 @@ void vvDeformationDialog::resetSlider(int slicer_index)
 void vvDeformationDialog::computeDeformationField() {
     vvImage::Pointer sequence=mSlicerManagers[inputSequenceBox->currentIndex()]->GetSlicer(0)->GetImage();
     vtkImageData * first_image = sequence->GetVTKImages()[0];
-    if (not sequence->IsTimeSequence())
+    if (!sequence->IsTimeSequence())
     {
         this->setResult(QDialog::Rejected);
         QMessageBox::warning(this,tr("Image type error"), tr("Deformable image registration only makes sense on time sequences."));
     }
-    else if ((first_image->GetSpacing()[0] != first_image->GetSpacing()[1]) or (first_image->GetSpacing()[0] != first_image->GetSpacing()[2]))
+    else if ((first_image->GetSpacing()[0] != first_image->GetSpacing()[1]) || (first_image->GetSpacing()[0] != first_image->GetSpacing()[2]))
     {
         this->setResult(QDialog::Rejected);
         QMessageBox::warning(this,tr("Image type error"), tr("Deformable registration only works well with isotropic voxels. Please resample the image."));
@@ -123,7 +140,7 @@ void vvDeformationDialog::computeDeformationField() {
         registrator.start();
         while (!registrator.isFinished())
         {
-            if (progress.wasCanceled() and not aborted)
+            if (progress.wasCanceled() && !aborted)
             {
                 this->setResult(QDialog::Rejected);
                 registrator.abort();
@@ -136,7 +153,7 @@ void vvDeformationDialog::computeDeformationField() {
             qApp->processEvents();
             registrator.wait(50);
         }
-        if (not aborted)
+        if (!aborted)
         {
             mOutput=registrator.getOutput();
         }