X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FGUI%2FWx%2FSurfaceRenderer%2FwxMaracasSurfaceRendering.cxx;h=4f544318ab6a6e849e08548cce97345543886759;hb=b31a8b467eaec7d7fd348be7f6123eec35a6271c;hp=429734e728feddc098ee95a93f648b67777bb183;hpb=18bec22c225446f8e2e04e5c02057bf7bd763554;p=creaMaracasVisu.git diff --git a/lib/GUI/Wx/SurfaceRenderer/wxMaracasSurfaceRendering.cxx b/lib/GUI/Wx/SurfaceRenderer/wxMaracasSurfaceRendering.cxx index 429734e..4f54431 100644 --- a/lib/GUI/Wx/SurfaceRenderer/wxMaracasSurfaceRendering.cxx +++ b/lib/GUI/Wx/SurfaceRenderer/wxMaracasSurfaceRendering.cxx @@ -1,10 +1,35 @@ +/*# --------------------------------------------------------------------- +# +# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image +# pour la Sant�) +# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton +# Previous Authors : Laurent Guigues, Jean-Pierre Roux +# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil +# +# This software is governed by the CeCILL-B license under French law and +# abiding by the rules of distribution of free software. You can use, +# modify and/ or redistribute the software under the terms of the CeCILL-B +# license as circulated by CEA, CNRS and INRIA at the following URL +# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html +# or in the file LICENSE.txt. +# +# As a counterpart to the access to the source code and rights to copy, +# modify and redistribute granted by the license, users are provided only +# with a limited warranty and the software's author, the holder of the +# economic rights, and the successive licensors have only limited +# liability. +# +# The fact that you are presently reading this means that you have had +# knowledge of the CeCILL-B license and that you accept its terms. +# ------------------------------------------------------------------------ */ + /*========================================================================= Program: wxMaracas Module: $RCSfile: wxMaracasSurfaceRendering.cxx,v $ Language: C++ - Date: $Date: 2011/06/28 16:56:16 $ - Version: $Revision: 1.1 $ + Date: $Date: 2012/11/15 14:15:37 $ + Version: $Revision: 1.3 $ Copyright: (c) 2002, 2003 License: @@ -196,14 +221,22 @@ void wxMaracasSurfaceRendering::addPropMHD(vtkImageData* imgdata, std::string da } void wxMaracasSurfaceRendering::loadProp3D(wxString filename, wxString dataname){ - std::string s = std::string(filename.mb_str()); - vtkProp3D* prop3D = surrendmanager->getProp3D(s); + std::string fn = std::string(filename.mb_str()); + std::string dn = std::string(dataname.mb_str()); + + int id = surrendmanager->addProp3D(-1, fn, dn); + + if(id!=-1){ + wxMaracasSurfaceRenderingPanel* controlpan = new wxMaracasSurfaceRenderingProp3D(this, id, false, -1); + addSurfaceRenderingPanel(controlpan, dn); + } + /*vtkProp3D* prop3D = surrendmanager->getProp3D(s); if(prop3D != NULL){ s = std::string(dataname.mb_str() ); this->addProp3D(prop3D,s); }else{ //TODO msj to the user indicating error in file - } + }*/ } void wxMaracasSurfaceRendering::addProp3D(vtkProp3D* prop3D, std::string dataname){