]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface/BaseMPRWidget.cxx
Merge branch 'master' of ssh://git.creatis.insa-lyon.fr/cpPlugins
[cpPlugins.git] / lib / cpPlugins / Interface / BaseMPRWidget.cxx
index 7caa4e0d11adc2d197259571f10fd2beb6c7ea99..2017b177f7e75617a79e8f96a4d0d132977dd923 100644 (file)
@@ -84,13 +84,18 @@ ShowImage(
   const double& r, const double& g, const double& b
   )
 {
-  std::cout
-    << "BaseMPRWidget: "
-    << image << " "
-    << name << " "
-    << parent << " "
-    << r << " " << g << " " << b << std::endl;
-  return( false );
+  // Update tree view
+  QTreeWidgetItem* new_item = this->_UpdateItem( name, parent );
+  if( new_item == NULL )
+    return( false );
+
+  // Associate new data
+  this->m_Images[ name ] = image;
+  this->m_Tree[ name ] = parent;
+
+  // Show image and return
+  this->m_MPRObjects->AddImage( image );
+  return( true );
 }
 
 // -------------------------------------------------------------------------