X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=lib%2FcpPlugins%2FInterface%2FBaseMPRWidget.cxx;h=2017b177f7e75617a79e8f96a4d0d132977dd923;hb=f0973535a17816d016f83dc6b31b91756d2d93f6;hp=7caa4e0d11adc2d197259571f10fd2beb6c7ea99;hpb=5028428b36813a4f690f2ecae8c6669b30ce5d47;p=cpPlugins.git diff --git a/lib/cpPlugins/Interface/BaseMPRWidget.cxx b/lib/cpPlugins/Interface/BaseMPRWidget.cxx index 7caa4e0..2017b17 100644 --- a/lib/cpPlugins/Interface/BaseMPRWidget.cxx +++ b/lib/cpPlugins/Interface/BaseMPRWidget.cxx @@ -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 ); } // -------------------------------------------------------------------------