]> Creatis software - clitk.git/blobdiff - vv/vvToolPlastimatch.cxx
Debug RTStruct conversion with empty struc
[clitk.git] / vv / vvToolPlastimatch.cxx
index 466d43e947964978ce6b85479d389cdbf40c0aad..fa068ceabacc6445e0a63e3fde000dcbb203825f 100644 (file)
@@ -3,7 +3,7 @@
 
   Authors belong to:
   - University of LYON              http://www.universite-lyon.fr/
-  - Léon Bérard cancer center       http://oncora1.lyon.fnclcc.fr
+  - Léon Bérard cancer center       http://www.centreleonberard.fr
   - CREATIS CNRS laboratory         http://www.creatis.insa-lyon.fr
 
   This software is distributed WITHOUT ANY WARRANTY; without even
@@ -14,7 +14,7 @@
 
   - BSD        See included LICENSE.txt file
   - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-  ======================================================================-====*/
+  ===========================================================================**/
 
 // vv
 #include "vvToolPlastimatch.h"
@@ -163,13 +163,15 @@ void vvToolPlastimatch::apply()
   GetOptionsFromGUI();
 
   // Create the command string
-  char *command_string =
+  /*
+  const char *command_string =
     "[STAGE]\n"
     "xform=bspline\n"
     "max_its=30\n"
     "grid_spac=100 100 100\n"
     "res=4 4 2\n"
     ;
+    */
 
   // Prepare the registration
   /*
@@ -194,13 +196,18 @@ void vvToolPlastimatch::apply()
   */
 
   // Get warped output and display it
-  m_WarpedImage = vvImageFromITK<3, float>(m_WarpedImageITK);
-  std::ostringstream osstream;
-  osstream << "plm_warped_" << m_InputSlicerManagers[1]->GetFileName() << ".mhd";
-  AddImage(m_WarpedImage, osstream.str());
-
-  // Get DVF 
-  DD("TODO get and display DVF");
+  if (m_WarpedImageITK) {
+    m_WarpedImage = vvImageFromITK<3, float>(m_WarpedImageITK);
+    std::ostringstream osstream;
+    osstream << "plm_warped_" << m_InputSlicerManagers[1]->GetFileName() << ".mhd";
+    AddImage(m_WarpedImage, osstream.str());
+    
+    // Get DVF 
+    DD("TODO get and display DVF");
+  }
+  else {
+    QMessageBox::information(this, "Error", "No result ...");
+  }
 
   // End
   QApplication::restoreOverrideCursor();