1 #include "bbCreaContournDimensions.h"
2 #include "bbcreaContoursPackage.h"
4 #include "creaSystem.h"
5 namespace bbcreaContours
8 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaContours,nDimensions)
9 BBTK_BLACK_BOX_IMPLEMENTATION(nDimensions,bbtk::WxBlackBox);
10 void nDimensions::Process()
12 double **vectx = 0, **vecty = 0, **vectz = 0;
14 std::vector< void * > vectortemp;
15 std::vector<int> size;
16 vtkImageData **mask = 0, **value = 0;
18 vtkImageData* img = bbGetInputIn();
20 std::vector<vtkImageData*> selectedimages;
21 if(img!=NULL && currentimg!=img){
23 printf("EED nDimensions::Process 02\n");
24 wxContourMainFrame::getInstance()->ShowToolsPanel(true);
26 selectedimages.push_back(img);
27 wxContourMainFrame::getInstance()->setVectImages(selectedimages);
28 printf("EED nDimensions::Process 03\n");
31 if(currentimg != NULL){
32 int contourtype = bbGetInputContourType();
33 //wxContourMainFrame::getInstance()->getValuesXYZ(vectx, vecty, vectz, &size);
34 //wxContourMainFrame::getInstance()->getMaskValue(mask, value, contourtype);
40 bbSetOutputSizeContour(size);
41 bbSetOutputMask(*mask);
42 bbSetOutputValue(*value);
45 //-----------------------------------------------------------------
46 void nDimensions::CreateWidget(wxWindow* parent)
48 //vtkImageData* img = bbGetInputIn();
50 std::vector<vtkImageData*> selectedimages;
51 //selectedimages.push_back(img);
53 //wxFrame* frame1 = new wxFrame(parent, wxID_ANY, wxT("ROI Application - Evaluation version, 23 Oct 2008 "), wxPoint(400,50), wxSize(800, 600) );
54 //frame = wxContourMainFrame::getInstance(frame1, wxID_ANY, wxString(_T("")), wxPoint(100,50), wxSize(800, 600), selectedimages );
55 //new wxContourMainFrame( frame1, wxID_ANY, _T(""), wxPoint(50,50), wxSize(800, 600),selectedimages );
56 //frame1->CreateStatusBar();
57 //bbSetOutputWidget( frame1 );
58 std::string datadir=".";
60 printf("EED WARNING Verify that GetDllAppPath in nDimensions::CreateWidget bbCreaContournDimensions is working.. \n");
61 datadir = crea::System::GetDllAppPath("bbCreaContours.dll");
63 datadir= crea::System::GetExecutablePath();
67 #ifdef LINUX /* assume this is OSX */
68 datadir=datadir+"/../share/creaContours";
71 #ifdef MACOSX /* assume this is OSX */
72 datadir=datadir+"/../../../../share/creaContours";
76 printf("EED nDimensions::CreateWidget path=%s\n",datadir.c_str() );
78 wxPanel* panel = wxContourMainFrame::getInstance(parent, wxID_ANY, wxString(_T("")), wxPoint(100,50), wxSize(800, 600), selectedimages,wxDEFAULT_FRAME_STYLE | wxSUNKEN_BORDER,datadir );
79 wxContourMainFrame::getInstance()->ShowToolsPanel(false);
80 //EED bbSetOutputWidget( panel );
81 bbSetOutputWidget( new wxPanel(parent,-1) );
84 //-----------------------------------------------------------------
85 void nDimensions::bbUserSetDefaultValues()
87 bbSetInputContourType(0);
91 //-----------------------------------------------------------------
92 void nDimensions::bbUserInitializeProcessing()
96 //-----------------------------------------------------------------
97 void nDimensions::bbUserFinalizeProcessing()
101 } // EO namespace bbCreaContour