2 #include "wxMaracasSurfaceRenderingManagerData.h"
4 /********************************************************************************************
5 ** Start of data viewmanagerData
6 *********************************************************************************************/
8 wxMaracasSurfaceRenderingManagerData::wxMaracasSurfaceRenderingManagerData(vtkProp3D* prop3Dvect, std::string dataname, vtkRenderWindowInteractor* interactor){
14 initializeBoxWidget(interactor);
19 /*_boxWidgetS1->GetPlanes( this->GetVtkClipping3DDataViewer()->GetTissuePlanes(0) );
20 _boxWidgetS1->GetPlanes( this->GetVtkClipping3DDataViewer()->GetTissuePlanes(1) );
21 _boxWidgetS1->GetPlanes( this->GetVtkClipping3DDataViewer()->GetTissuePlanes(2) );
22 _boxWidgetS1->GetPlanes( this->GetVtkClipping3DDataViewer()->GetTissuePlanes(3) );*/
26 wxMaracasSurfaceRenderingManagerData::~wxMaracasSurfaceRenderingManagerData(){
31 void wxMaracasSurfaceRenderingManagerData::initializeBoxWidget(vtkRenderWindowInteractor* interactor){
32 if(interactor!= NULL){
33 _boxWidgetS1 = vtkBoxWidget::New();
34 _boxWidgetS1->SetInteractor( interactor );
35 _boxWidgetS1->SetPlaceFactor(1.25);
37 //_boxWidgetS1->SetInput( );
38 _boxWidgetS1->PlaceWidget();
39 //_boxWidgetS1->AddObserver( vtkCommand::InteractionEvent , _vtkclipping3Ddataviewer->GetObserverS(i) );
40 _boxWidgetS1->HandlesOn ();
46 ** Adds a prop3D to the world of the application
48 void wxMaracasSurfaceRenderingManagerData::setProp3D(vtkProp3D* prop3D){
52 void wxMaracasSurfaceRenderingManagerData::addRemoveSurfaceBox(bool visible)
63 ** Changes the opacity in a prop3D
65 void wxMaracasSurfaceRenderingManagerData::changeOpacity(int value){
66 std::cout<<"chage op"<<value<<std::endl;
67 vtkActor* actor = (vtkActor*)this->_prop3D;
68 actor->GetProperty()->SetOpacity((double)value/100.0);
73 void wxMaracasSurfaceRenderingManagerData::changeColor(double red, double green, double blue){
74 std::cout<<"chage col"<<red<<green<<blue<<std::endl;
75 vtkActor* actor = (vtkActor*)this->_prop3D;
76 actor->GetProperty()->SetColor(red,green,blue);
79 ** Check if the variables are setted correctly
81 void wxMaracasSurfaceRenderingManagerData::checkInvariant(){
87 vtkProp3D* wxMaracasSurfaceRenderingManagerData::getProp3D(){
91 ** return the id from the daat
93 int wxMaracasSurfaceRenderingManagerData::getId(){
99 void wxMaracasSurfaceRenderingManagerData::setId(int propid){
106 std::string wxMaracasSurfaceRenderingManagerData::getDataname(){
112 void wxMaracasSurfaceRenderingManagerData::setDataname(std::string dataname){
113 _dataname = dataname;