]> Creatis software - creaMaracasVisu.git/blob - bbtk/src/bbmaracasvisuContourCrown.cxx
e9a2a471ae026e2fd4c7f2e65e1e657ebf163189
[creaMaracasVisu.git] / bbtk / src / bbmaracasvisuContourCrown.cxx
1 #include "bbmaracasvisuContourCrown.h"
2 #include "bbmaracasvisuPackage.h"
3
4 #include <vtkImageData.h>
5
6 namespace bbmaracasvisu
7 {
8
9 BBTK_ADD_BLACK_BOX_TO_PACKAGE(maracasvisu,ContourCrown)
10 BBTK_BLACK_BOX_IMPLEMENTATION(ContourCrown,bbtk::WxBlackBox);
11
12 //-----------------------------------------------------------
13 void ContourCrown::Process()
14 {
15 //JSTG 04-04-08
16         mwxwidget->SetControlPoints( bbGetInputControlPointsInX(), bbGetInputControlPointsInY(), bbGetInputControlPointsInZ() );
17         
18         LstValuePosX.clear();
19         LstValuePosY.clear();
20         LstValuePosZ.clear();
21         mwxwidget->GetValuesInsideCrown(&LstValue,&LstValuePosX,&LstValuePosY,&LstValuePosZ);
22
23 //JSTG 226-02-08 ----------------------------------------------------------
24         LstContourX.clear();
25         LstContourY.clear();
26         LstContourZ.clear();
27         mwxwidget->GetSplinePoints(&LstContourX,&LstContourY,&LstContourZ);
28 //-------------------------------------------------------------------------
29
30         bbSetOutputLstValue(&LstValue);
31         bbSetOutputLstValuePosX(&LstValuePosX);
32         bbSetOutputLstValuePosY(&LstValuePosY);
33         bbSetOutputLstValuePosZ(&LstValuePosZ);
34         bbSetOutputLstContourX(&LstContourX);
35         bbSetOutputLstContourY(&LstContourY);
36         bbSetOutputLstContourZ(&LstContourZ);
37         bbSetOutputLstContourCrlX(&LstContourCrlX);
38         bbSetOutputLstContourCrlY(&LstContourCrlY);
39         bbSetOutputLstContourCrlZ(&LstContourCrlZ);
40         bbSetOutputLstContourCrlZ(&LstContourCrlZ);
41 }
42
43 //-----------------------------------------------------------
44 void ContourCrown::CreateWidget()
45 {
46         bbtkDebugMessageInc("Core",9,"ContourCrown::CreateWidget()"<<std::endl);
47   
48         if (bbGetInputwxVtkBaseView()==NULL) 
49     {
50       wxMessageDialog(NULL,  bbtk::std2wx("(ContourCrown) Input 'wxVtkBaseView' is not set"),  bbtk::std2wx(bbGetFullName()) ).ShowModal();
51     }
52         if (bbGetInputIn()==NULL) 
53     {
54       wxMessageDialog(NULL,  bbtk::std2wx("(ContourCrown) Input 'In' is not set"),  bbtk::std2wx(bbGetFullName()) ).ShowModal();
55     }
56
57         mwxwidget = new wxMaracasCoutourTool( bbGetWxParent(), bbGetInputwxVtkBaseView(), bbGetInputIn() );
58         mwxwidget->ConfigureVTK();
59
60         bbSetOutputImageValueResult( mwxwidget->GetVtkImageValueResult() );
61         bbSetOutputImageMaskResult( mwxwidget->GetVtkImageMaskResult() );
62         bbSetOutputWidget(mwxwidget);
63         bbtkDebugDecTab("Core",9);
64 }
65
66 //-----------------------------------------------------------
67 void ContourCrown::bbUserConstructor()
68 {
69         bbSetInputIn(NULL);
70         bbSetInputwxVtkBaseView(NULL);
71 //JSTG 26-02-08 ------------------------------------
72         bbSetInputControlPointsInX(NULL);
73         bbSetInputControlPointsInY(NULL);
74         bbSetInputControlPointsInZ(NULL);
75 //--------------------------------------------------
76 }
77
78 //-----------------------------------------------------------
79 void ContourCrown::bbUserCopyConstructor()
80 {
81 }
82
83 //-----------------------------------------------------------
84 void ContourCrown::bbUserDestructor()
85 {
86 }
87
88 }
89 // EO namespace bbmaracasvisu
90
91