]> Creatis software - creaContours.git/blob - bbtk/src/bbCreaContournDimensions.cxx
*** empty log message ***
[creaContours.git] / bbtk / src / bbCreaContournDimensions.cxx
1 #include "bbCreaContournDimensions.h"
2 #include "bbcreaContoursPackage.h"
3 namespace bbcreaContours
4 {
5
6 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaContours,nDimensions)
7 BBTK_BLACK_BOX_IMPLEMENTATION(nDimensions,bbtk::WxBlackBox);
8 void nDimensions::Process()
9 {
10  
11         double **vectx, **vecty, **vectz;
12         std::vector<int> size;
13         vtkImageData *mask, *value;
14
15         vtkImageData* img = bbGetInputIn();
16
17         std::vector<vtkImageData*> selectedimages;
18         if(img!=NULL && currentimg!=img){
19
20                 currentimg=img;
21                 selectedimages.push_back(img);
22                 frame->setVectImages(selectedimages);
23         }
24
25
26
27         if(bbGetInputGet()==1){
28                 bbSetInputGet(0);               
29                 //eventHandler->checkInformationPanel();
30                 //eventHandler->getValuesXYZ(vectx, vecty, vectz, &size);       
31                 //eventHandler->getMaskValue(mask, value);
32         }
33
34     bbSetOutputX(vectx);
35         bbSetOutputY(vecty);
36         bbSetOutputZ(vectz);
37         bbSetOutputSizeContour(size);
38         bbSetOutputMask(mask);
39         bbSetOutputValue(value);
40 }
41 void nDimensions::CreateWidget(wxWindow* parent)
42 {
43         
44         //vtkImageData* img = bbGetInputIn();
45
46         std::vector<vtkImageData*> selectedimages;
47         //selectedimages.push_back(img);
48
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 ); 
54         frame = wxContourMainFrame::getInstance(parent, wxID_ANY, wxString(_T("")), wxPoint(100,50), wxSize(800, 600), selectedimages );
55         bbSetOutputWidget( frame ); 
56         
57    
58
59     
60   
61 }
62 void nDimensions::bbUserConstructor()
63 {
64
65         bbSetInputGet(0);
66         bbSetInputIn(NULL);
67
68 }
69 void nDimensions::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
70 {
71
72 }
73 void nDimensions::bbUserDestructor()
74 {
75
76 }
77 }
78 // EO namespace bbCreaContour
79
80