#===========================================================================
# UNCOMMENT EACH LIBRARY NEEDED (WILL BE FOUND AND USED AUTOMATICALLY)
SET(${BBTK_PACKAGE_NAME}_USE_VTK ON)
-# SET(${BBTK_PACKAGE_NAME}_USE_ITK ON)
+ SET(${BBTK_PACKAGE_NAME}_USE_ITK ON)
# SET(${BBTK_PACKAGE_NAME}_USE_GDCM ON)
# SET(${BBTK_PACKAGE_NAME}_USE_GSMIS ON)
SET(${BBTK_PACKAGE_NAME}_USE_WXWIDGETS ON)
std::vector<int> size;
vtkImageData *mask, *value;
+ vtkImageData* img = bbGetInputIn();
+
+ std::vector<vtkImageData*> selectedimages;
+ if(img!=NULL && currentimg!=img){
+
+ currentimg=img;
+ selectedimages.push_back(img);
+ frame->setVectImages(selectedimages);
+ }
+
+
+
if(bbGetInputGet()==1){
- bbSetInputGet(0);
+ bbSetInputGet(0);
//eventHandler->checkInformationPanel();
//eventHandler->getValuesXYZ(vectx, vecty, vectz, &size);
//eventHandler->getMaskValue(mask, value);
std::vector<vtkImageData*> selectedimages;
//selectedimages.push_back(img);
- wxFrame* frame1 = new wxFrame(parent, wxID_ANY, wxT("ROI Application - Evaluation version, 23 Oct 2008 "), wxPoint(400,50), wxSize(800, 600) );
- frame = wxContourMainFrame::getInstance(frame1, wxID_ANY, wxString(_T("")), wxPoint(100,50), wxSize(800, 600), selectedimages );
+ //wxFrame* frame1 = new wxFrame(parent, wxID_ANY, wxT("ROI Application - Evaluation version, 23 Oct 2008 "), wxPoint(400,50), wxSize(800, 600) );
+ //frame = wxContourMainFrame::getInstance(frame1, wxID_ANY, wxString(_T("")), wxPoint(100,50), wxSize(800, 600), selectedimages );
//new wxContourMainFrame( frame1, wxID_ANY, _T(""), wxPoint(50,50), wxSize(800, 600),selectedimages );
- frame1->CreateStatusBar();
-
+ //frame1->CreateStatusBar();
+ //bbSetOutputWidget( frame1 );
+ frame = wxContourMainFrame::getInstance(parent, wxID_ANY, wxString(_T("")), wxPoint(100,50), wxSize(800, 600), selectedimages );
+ bbSetOutputWidget( frame );
- bbSetOutputWidget( frame1 );
+
{
bbSetInputGet(0);
+ bbSetInputIn(NULL);
}
void nDimensions::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
private:
wxContourMainFrame* frame;
+ vtkImageData* currentimg;
//wxContourEventHandler * eventHandler;
};
m_mgr.SetManagedWindow(this);
_creatingContoursActive = false;
_theViewPanel = NULL;
-// _modelManager = NULL;
- _instantPanel = NULL;
-// _buttonsBar = NULL;
-// _gridPanel = NULL;
-// _drawToolsPanel = NULL;
-// _operationsToolsPanel = NULL;
-// _autoFormsPanel = NULL;
-// _standardToolsPanel = NULL;
-// _editionToolsPanel = NULL;
-// _listViewPanel = NULL;
-// _sceneManager = NULL;
-// _actualInstant = NULL;
+ _instantPanel = NULL;
_refLineControl = NULL;
_refLineModel = NULL;
_refLineView = NULL;
m_notebook_style =wxAUI_NB_TAB_SPLIT | wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER;
m_notebook_theme = 0;
//wxContour_ActionCommandsID a;
- _numberOfVariablesStatistics = 6+1;
-
+ _numberOfVariablesStatistics = 7;
- _performingOperation = new PerformingOperation();
-//JCP 17 - 10 - 2008
+ _datadir = datadir;
+
inredo = 0;
inundo = 0;
-#if defined(__GNUC__)
- std::string str_home(getenv("HOME"));
-#elif defined(_WIN32)
- std::string str_home(getenv("USERPROFILE"));
-#endif
- std::string strCreaContourDataTmp = str_home + "/.creaContourDataTemp/";
-// std::string command("mkdir "+strCreaContourDataTmp);
-// system( command.c_str() );
-
- kernelManager = new KernelManagerContour( images , datadir+"/data/" , strCreaContourDataTmp );
- //kernelManager->setVectImages(images);
- //kernelManager->initializeEnvironment();
-
- //vtkImageData* selectedimage = kernelManager->getVectImages()[0];
-
-//-------------------------------------------------------------
+ interfMainPanel* pannew = interfMainPanel::getInstance(parent,datadir+"/data/Icons");//, eventHandler);
+ _performingOperation = new PerformingOperation();
- /*frame = new wxContourMainFrame(_builder->getImSourceEnv(), _builder->getImSectionEnv(), _builder->getAxesEnv(), _builder->getContourEnv(),NULL, wxID_ANY, wxT("ROI Application Sample"), wxPoint(50,50), wxSize(800, 600));
- frame->Show(TRUE);*/
- //Creating the evtHandler of the panels
- //wxContourEventHandler * eventHandler = new wxContourEventHandler();
- //Creating the window that will show the panels
+ if(images.size() > 0){
+ this->setVectImages(images);
+ }
- //Getting the parent for the panels ( using aui )
- wxAuiNotebook * notebook = this->createNotebook();
+}
+
+void wxContourMainFrame::setVectImages( std::vector<vtkImageData*> images ){
+
+ #if defined(__GNUC__)
+ std::string str_home(getenv("HOME"));
+ #elif defined(_WIN32)
+ std::string str_home(getenv("USERPROFILE"));
+ #endif
+ std::string strCreaContourDataTmp = str_home + "/.creaContourDataTemp/";
- //JCP 17 - 11 - 08
- //wxInstantChooserPanel * instantPanel = new wxInstantChooserPanel( notebook, "Instant Chooser", true);
- //JCP 17 - 11 - 08
std::vector<std::string> conceptNameVect;
std::vector<int> conceptSizeVect;
-
+ wxAuiNotebook * notebook = this->createNotebook();
- _instantPanel = new wxInstantChooserPanel( notebook, "Instant Chooser", true, false, "c" );
- _theViewPanel = new wxContourViewPanel( kernelManager->getSourceImage(), notebook );
+ kernelManager = new KernelManagerContour( images , _datadir+"/data/" , strCreaContourDataTmp );
- kernelManager->getConceptsInformation(conceptNameVect, conceptSizeVect);
+ _instantPanel = new wxInstantChooserPanel( notebook, "Instant Chooser", true, false, "c" );
+ _theViewPanel = new wxContourViewPanel( kernelManager->getSourceImage(), notebook );
+
+//-------------------------------------------------------------
+ kernelManager->getConceptsInformation(conceptNameVect, conceptSizeVect);
_instantPanel->addConcepts(conceptNameVect, conceptSizeVect);
//*******************changeInstant();
_theViewPanel->setVerticalConcept( "Axe Depth", data->getMinValue(), data->getMaxValue(), data->getMinShowedValue(), data->getMaxShowedValue(), data->getActualValue() );
- //eventHandler->setModelManager( kernelManager->getOutlineModelManager() );
- //eventHandler->setViewPanel( _theViewPanel );
- //_theViewPanel->initializeScenceManager();
- //eventHandler->setInstantChooserPanel( _instantPanel );
-
- //bool successConfiuration = eventHandler->configureEventsHandling();
-
- //successConfiuration &= this->configurePanels( notebook );
this->configurePanels( notebook );
- interfMainPanel* pannew = interfMainPanel::getInstance(parent,datadir+"/data/Icons");//, eventHandler);
-
-//JCP 17 -10 - 2008
-
-
- }
+}
wxContourMainFrame* wxContourMainFrame :: getInstance(wxWindow* parent, wxWindowID id,const wxString& title,const wxPoint& pos,const wxSize& size,std::vector<vtkImageData*> images, long style,std::string datadir ){
wxContourMainFrame(wxWindow* parent, wxWindowID id,const wxString& title,const wxPoint& pos,const wxSize& size,long style = wxDEFAULT_FRAME_STYLE | wxSUNKEN_BORDER);
- wxContourMainFrame(wxWindow* parent, wxWindowID id,const wxString& title,const wxPoint& pos,const wxSize& size,std::vector<vtkImageData*> images, long style = wxDEFAULT_FRAME_STYLE | wxSUNKEN_BORDER,std::string datadir="<void>");
+ wxContourMainFrame(wxWindow* parent, wxWindowID id,const wxString& title,const wxPoint& pos,const wxSize& size,std::vector<vtkImageData*> images, long style = wxDEFAULT_FRAME_STYLE | wxSUNKEN_BORDER,std::string datadir="C:/Creatis/creaContoursBin/RelWithDebInfo/");
~wxContourMainFrame();
//------------------------------------------------------------------------------------------------------------
// Creational and initialization methods
//------------------------------------------------------------------------------------------------------------
+
+ void setVectImages( std::vector<vtkImageData*> images );
+
bool configurePanels(wxAuiNotebook * theNoteBook );
void setNotebook( wxAuiNotebook * theNoteBook );
//------------------------------------------------------------------------------------------------------------
// Attributes getters and setters
//------------------------------------------------------------------------------------------------------------
- static wxContourMainFrame* getInstance(wxWindow* parent, wxWindowID id,const wxString& title,const wxPoint& pos,const wxSize& size,std::vector<vtkImageData*> images, long style = wxDEFAULT_FRAME_STYLE | wxSUNKEN_BORDER, std::string datadir="<void>");
+ static wxContourMainFrame* getInstance(wxWindow* parent, wxWindowID id,const wxString& title,const wxPoint& pos,const wxSize& size,std::vector<vtkImageData*> images, long style = wxDEFAULT_FRAME_STYLE | wxSUNKEN_BORDER, std::string datadir="C:/Creatis/creaContoursBin/RelWithDebInfo/");
static wxContourMainFrame* getInstance();
//------------------------------------------------------------------------------------------------------------
// Other functional methods
KernelManagerContour* kernelManager;
+ std::string _datadir;
+
wxContourViewPanel* _theViewPanel;
wxInstantChooserPanel * _instantPanel;