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()
10 double **vectx = 0, **vecty = 0, **vectz = 0;
12 std::vector< void * > vectortemp;
13 std::vector<int> size;
14 vtkImageData **mask = 0, **value = 0;
16 vtkImageData* img = bbGetInputIn();
18 std::vector<vtkImageData*> selectedimages;
19 if(img!=NULL && currentimg!=img){
21 wxContourMainFrame::getInstance()->ShowToolsPanel(true);
23 selectedimages.push_back(img);
24 wxContourMainFrame::getInstance()->setVectImages(selectedimages);
27 if(currentimg != NULL){
28 int contourtype = bbGetInputContourType();
29 //wxContourMainFrame::getInstance()->getValuesXYZ(vectx, vecty, vectz, &size);
30 //wxContourMainFrame::getInstance()->getMaskValue(mask, value, contourtype);
36 bbSetOutputSizeContour(size);
37 bbSetOutputMask(*mask);
38 bbSetOutputValue(*value);
41 //-----------------------------------------------------------------
42 void nDimensions::CreateWidget(wxWindow* parent)
44 //vtkImageData* img = bbGetInputIn();
46 std::vector<vtkImageData*> selectedimages;
47 //selectedimages.push_back(img);
49 //wxFrame* frame1 = new wxFrame(parent, wxID_ANY, wxT("ROI Application - Evaluation version, 23 Oct 2008 "), wxPoint(400,50), wxSize(800, 600) );
50 //frame = wxContourMainFrame::getInstance(frame1, wxID_ANY, wxString(_T("")), wxPoint(100,50), wxSize(800, 600), selectedimages );
51 //new wxContourMainFrame( frame1, wxID_ANY, _T(""), wxPoint(50,50), wxSize(800, 600),selectedimages );
52 //frame1->CreateStatusBar();
53 //bbSetOutputWidget( frame1 );
56 char currentPath[_MAX_PATH];
57 HMODULE hand = GetModuleHandle("bbcreaContours");
58 GetModuleFileName(hand, currentPath, _MAX_PATH);
62 path = path.substr(0,path.find_last_of("\\"));
65 wxPanel* panel = wxContourMainFrame::getInstance(parent, wxID_ANY, wxString(_T("")), wxPoint(100,50), wxSize(800, 600), selectedimages,wxDEFAULT_FRAME_STYLE | wxSUNKEN_BORDER,path );
66 wxContourMainFrame::getInstance()->ShowToolsPanel(false);
67 //std::cout<<"creaContours = "<<panel<<std::endl;
68 bbSetOutputWidget( panel );
71 //-----------------------------------------------------------------
72 void nDimensions::bbUserSetDefaultValues()
74 bbSetInputContourType(0);
78 //-----------------------------------------------------------------
79 void nDimensions::bbUserInitializeProcessing()
83 //-----------------------------------------------------------------
84 void nDimensions::bbUserFinalizeProcessing()
88 } // EO namespace bbCreaContour