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 printf("EED nDimensions::Process 01\n");
13 double **vectx = 0, **vecty = 0, **vectz = 0;
15 std::vector< void * > vectortemp;
16 std::vector<int> size;
17 vtkImageData **mask = 0, **value = 0;
19 vtkImageData* img = bbGetInputIn();
21 std::vector<vtkImageData*> selectedimages;
22 if(img!=NULL && currentimg!=img){
24 printf("EED nDimensions::Process 02\n");
25 wxContourMainFrame::getInstance()->ShowToolsPanel(true);
27 selectedimages.push_back(img);
28 wxContourMainFrame::getInstance()->setVectImages(selectedimages);
29 printf("EED nDimensions::Process 03\n");
32 printf("EED nDimensions::Process 04\n");
33 if(currentimg != NULL){
34 int contourtype = bbGetInputContourType();
35 //wxContourMainFrame::getInstance()->getValuesXYZ(vectx, vecty, vectz, &size);
36 //wxContourMainFrame::getInstance()->getMaskValue(mask, value, contourtype);
39 printf("EED nDimensions::Process 05\n");
41 printf("EED nDimensions::Process 05.1\n");
43 printf("EED nDimensions::Process 05.2\n");
45 printf("EED nDimensions::Process 05.3\n");
46 bbSetOutputSizeContour(size);
47 printf("EED nDimensions::Process 05.4\n");
48 bbSetOutputMask(*mask);
49 printf("EED nDimensions::Process 05.5\n");
50 bbSetOutputValue(*value);
51 printf("EED nDimensions::Process 06\n");
54 //-----------------------------------------------------------------
55 void nDimensions::CreateWidget(wxWindow* parent)
57 //vtkImageData* img = bbGetInputIn();
59 std::vector<vtkImageData*> selectedimages;
60 //selectedimages.push_back(img);
62 //wxFrame* frame1 = new wxFrame(parent, wxID_ANY, wxT("ROI Application - Evaluation version, 23 Oct 2008 "), wxPoint(400,50), wxSize(800, 600) );
63 //frame = wxContourMainFrame::getInstance(frame1, wxID_ANY, wxString(_T("")), wxPoint(100,50), wxSize(800, 600), selectedimages );
64 //new wxContourMainFrame( frame1, wxID_ANY, _T(""), wxPoint(50,50), wxSize(800, 600),selectedimages );
65 //frame1->CreateStatusBar();
66 //bbSetOutputWidget( frame1 );
67 std::string datadir=".";
69 datadir = crea::System::GetDllAppPath();
71 datadir= crea::System::GetExecutablePath();
75 #ifdef LINUX /* assume this is OSX */
76 datadir=datadir+"/../share/creaContours";
79 #ifdef MACOSX /* assume this is OSX */
80 datadir=datadir+"/../../../../share/creaContours";
84 printf("EED nDimensions::CreateWidget path=%s\n",datadir.c_str() );
86 wxPanel* panel = wxContourMainFrame::getInstance(parent, wxID_ANY, wxString(_T("")), wxPoint(100,50), wxSize(800, 600), selectedimages,wxDEFAULT_FRAME_STYLE | wxSUNKEN_BORDER,datadir );
87 wxContourMainFrame::getInstance()->ShowToolsPanel(false);
88 //EED bbSetOutputWidget( panel );
89 bbSetOutputWidget( new wxPanel(parent,-1) );
92 //-----------------------------------------------------------------
93 void nDimensions::bbUserSetDefaultValues()
95 bbSetInputContourType(0);
99 //-----------------------------------------------------------------
100 void nDimensions::bbUserInitializeProcessing()
104 //-----------------------------------------------------------------
105 void nDimensions::bbUserFinalizeProcessing()
109 } // EO namespace bbCreaContour