1 #include "bbCreaContournDimensions.h"
2 #include "bbcreaContoursPackage.h"
3 namespace bbcreaContours
6 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaContours,nDimensions)
7 BBTK_BLACK_BOX_IMPLEMENTATION(nDimensions,bbtk::WxBlackBox);
8 void nDimensions::Process()
11 double **vectx, **vecty, **vectz;
13 std::vector< void * > vectortemp;
14 std::vector<int> size;
15 vtkImageData *mask, *value;
17 vtkImageData* img = bbGetInputIn();
19 std::vector<vtkImageData*> selectedimages;
20 if(img!=NULL && currentimg!=img){
22 wxContourMainFrame::getInstance()->ShowToolsPanel(true);
24 selectedimages.push_back(img);
25 wxContourMainFrame::getInstance()->setVectImages(selectedimages);
30 if(currentimg != NULL){
31 int contourtype = bbGetInputContourType();
32 //wxContourMainFrame::getInstance()->getValuesXYZ(vectx, vecty, vectz, &size);
33 wxContourMainFrame::getInstance()->getMaskValue(mask, value, contourtype);
39 bbSetOutputSizeContour(size);
40 bbSetOutputMask(mask);
41 bbSetOutputValue(value);
43 void nDimensions::CreateWidget(wxWindow* parent)
46 //vtkImageData* img = bbGetInputIn();
48 std::vector<vtkImageData*> selectedimages;
49 //selectedimages.push_back(img);
51 //wxFrame* frame1 = new wxFrame(parent, wxID_ANY, wxT("ROI Application - Evaluation version, 23 Oct 2008 "), wxPoint(400,50), wxSize(800, 600) );
52 //frame = wxContourMainFrame::getInstance(frame1, wxID_ANY, wxString(_T("")), wxPoint(100,50), wxSize(800, 600), selectedimages );
53 //new wxContourMainFrame( frame1, wxID_ANY, _T(""), wxPoint(50,50), wxSize(800, 600),selectedimages );
54 //frame1->CreateStatusBar();
55 //bbSetOutputWidget( frame1 );
58 char currentPath[_MAX_PATH];
59 HMODULE hand = GetModuleHandle("bbcreaContours");
60 GetModuleFileName(hand, currentPath, _MAX_PATH);
64 path = path.substr(0,path.find_last_of("\\"));
67 wxPanel* panel = wxContourMainFrame::getInstance(parent, wxID_ANY, wxString(_T("")), wxPoint(100,50), wxSize(800, 600), selectedimages,wxDEFAULT_FRAME_STYLE | wxSUNKEN_BORDER,path );
68 wxContourMainFrame::getInstance()->ShowToolsPanel(false);
69 //std::cout<<"creaContours = "<<panel<<std::endl;
70 bbSetOutputWidget( panel );
77 //-----------------------------------------------------------------
78 void nDimensions::bbUserSetDefaultValues()
80 bbSetInputContourType(0);
84 //-----------------------------------------------------------------
85 void nDimensions::bbUserInitializeProcessing()
89 //-----------------------------------------------------------------
90 void nDimensions::bbUserFinalizeProcessing()
94 // EO namespace bbCreaContour