X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=bbtk%2Fsrc%2FbbcreaMaracasVisuIRMViewer.cxx;h=8d6777bfcebc42d179a9bcadbf6804fd47684ac0;hb=21c2226cf3dcad1daf3fb04818583b559694fa81;hp=f46b52d6a730225c2ef6a65356e799038db3f6bb;hpb=bf59a58c8e18d27d491ce9681c06e50c8213cb23;p=creaMaracasVisu.git diff --git a/bbtk/src/bbcreaMaracasVisuIRMViewer.cxx b/bbtk/src/bbcreaMaracasVisuIRMViewer.cxx index f46b52d..8d6777b 100644 --- a/bbtk/src/bbcreaMaracasVisuIRMViewer.cxx +++ b/bbtk/src/bbcreaMaracasVisuIRMViewer.cxx @@ -16,6 +16,8 @@ void IRMViewer::Process() std::vector tempvect; int i; + + if(irmview != NULL){ vtkRenderer* renderer = bbGetInputRenderer(); irmview->setRenderer(renderer); @@ -36,7 +38,18 @@ void IRMViewer::Process() } void IRMViewer::CreateWidget(wxWindow* parent) { - wxMaracasIRMView* irmview = wxMaracasIRMView::getInstance(parent); + char currentPath[_MAX_PATH]; + HMODULE hand = GetModuleHandle("bbcreaMaracasVisu"); + GetModuleFileName(hand, currentPath, _MAX_PATH); + + std::string path = currentPath; + + path = path.substr(0,path.find_last_of("\\")); + std::cout << "Your application's directory is: " << path; + + wxMaracasIRMView* irmview = wxMaracasIRMView::getInstance(parent,path); + //GetDllDirectory(_MAX_PATH, currentPath); + //std::cout << "Your application's directory is: " << GetDllDirectory(_MAX_PATH, currentPath)<