#include "bbcreaMaracasVisuCutModule.h" #include "bbcreaMaracasVisuPackage.h" #include "creaSystem.h" namespace bbcreaMaracasVisu { BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,CutModule) BBTK_BLACK_BOX_IMPLEMENTATION(CutModule,bbtk::WxBlackBox); void CutModule::Process() { vtkImageData* img = bbGetInputIn(); vtkRenderWindowInteractor* interactor = bbGetInputInteractor(); vtkRenderer* render = bbGetInputRenderer(); if(img != NULL && interactor != NULL && render != NULL && _mainpanel!=NULL){ if(_currentimage!=img){ _currentimage=img; _mainpanel->setImageData(img); } _mainpanel->setInteractor(interactor); _mainpanel->setRenderer(render); bbSetOutputOut(_mainpanel->GetResultImage()); } } void CutModule::CreateWidget(wxWindow* parent) { std::string lastname("bbcreaMaracasVisu.dll"); // JPR std::string path = crea::System::GetDllAppPath(lastname); _mainpanel = CutModelMainPanel::getInstance(parent, path); _mainpanel->SetType(0); bbSetOutputWidget( _mainpanel); Process(); } void CutModule::bbUserSetDefaultValues() { _mainpanel = NULL; _currentimage=NULL; bbSetInputIn(0); bbSetInputInteractor(0); bbSetInputRenderer(0); bbSetOutputOut(0); } void CutModule::bbUserInitializeProcessing() { } void CutModule::bbUserFinalizeProcessing() { } } // EO namespace bbcreaMaracasVisu