wxManualRegistration3D Class Reference

#include <wxManualRegistration3D.h>

Collaboration diagram for wxManualRegistration3D:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 wxManualRegistration3D (wxWindow *parent, marImageData *marimageData)
 ~wxManualRegistration3D ()
void ConfigureVTK ()
void ConfigureVTK_B ()
void RefreshView ()
void OnRefreshView (wxCommandEvent &event)
void OnPositionRotation (wxScrollEvent &event)
void AddPanelControl_B (wxWindow *parent, marImageData *marimagedata)
void AddSecondVolume (marImageData *marimagedata)
bool GetIfSecondVolumeExist ()
void OnTracking (wxCommandEvent &event)
void OnCutImagaData (wxCommandEvent &event)

Private Member Functions

wxPanel * Create3DView (wxWindow *parent, vtkMPRBaseData *vtkmprbasedata)
wxPanel * CreateRegistration3DControl (wxWindow *parent, vtkMPRBaseData *vtkmprbasedata)
 DECLARE_EVENT_TABLE ()

Private Attributes

vtkMPRBaseData_vtkmprbasedata_A
vtkTransform * _transform
vtkTransform * _transformBak
wxPanelCuttingImageData_panelCutting
wxCheckBox * _btnCutImageData
wxFrame * _framePanelCutting
double xBak
double yBak
double zBak
wxSlider * _posX
wxSlider * _posY
wxSlider * _posZ
wxSlider * _scaleX
wxSlider * _scaleY
wxSlider * _scaleZ
wxSlider * _angAlfa
wxSlider * _angBeta
wxSlider * _angGama
wxCheckBox * _btnTrack
wxPanel * _panelControl_B
marImageData_marimageData
wxVtk3DBaseView_wxvtk3Dbaseview_Clipping3D
wxVtkMPR3DView_wxvtkmpr3Dview_A
wxVtkClipping3DView_wxvtkclipping3Dview_A
wxVtkMPR3DView_wxvtkmpr3Dview_B
wxVtkClipping3DView_wxvtkclipping3Dview_B


Detailed Description

Definition at line 59 of file wxManualRegistration3D.h.


Constructor & Destructor Documentation

wxManualRegistration3D::wxManualRegistration3D ( wxWindow *  parent,
marImageData marimageData 
)

Definition at line 38 of file wxManualRegistration3D.cxx.

00040 : wxPanel( parent, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL)
00041 {
00042 
00043         _marimageData                                                   = marimageData;
00044 
00045     _vtkmprbasedata_A = new vtkMPRBaseData();
00046         _vtkmprbasedata_A->SetMarImageData(_marimageData);
00047 
00048         _wxvtk3Dbaseview_Clipping3D                     = NULL;
00049         _wxvtkmpr3Dview_A                                       = NULL;
00050         _wxvtkclipping3Dview_A                          = NULL;
00051 
00052         _wxvtkmpr3Dview_B                                       = NULL;
00053         _wxvtkclipping3Dview_B                          = NULL;
00054 
00055         _panelCutting                                           = NULL;
00056 
00057     wxSplitterWindow    *pnlSplitter    = new wxSplitterWindow( this , -1);
00058 
00059 // EED borrame  
00060 //      int ww,hh;
00061 
00062         wxPanel *       view3Dpanel                             = Create3DView( pnlSplitter , _vtkmprbasedata_A );
00063         wxPanel *   registrationControl         = CreateRegistration3DControl( pnlSplitter ,_vtkmprbasedata_A);
00064 
00065 //      this->GetSize(&ww,&hh);
00066 
00067     pnlSplitter -> SplitVertically( view3Dpanel, registrationControl , 700);
00068         wxBoxSizer      *sizer  = new wxBoxSizer(wxVERTICAL  );
00069         sizer           -> Add( pnlSplitter ,1,wxGROW  ,0);
00070         pnlSplitter     -> SetMinimumPaneSize( 25 );
00071         this            -> SetSizer(sizer);
00072 
00073 
00074         _transform              = vtkTransform::New();
00075         _transformBak   = vtkTransform::New();
00076         _transformBak->Identity();
00077         xBak=0;
00078         yBak=0;
00079         zBak=0;
00080 }

wxManualRegistration3D::~wxManualRegistration3D (  ) 

Definition at line 84 of file wxManualRegistration3D.cxx.

References _wxvtk3Dbaseview_Clipping3D, _wxvtkclipping3Dview_A, _wxvtkclipping3Dview_B, _wxvtkmpr3Dview_A, and _wxvtkmpr3Dview_B.

00085 {
00086         if (_wxvtk3Dbaseview_Clipping3D         != NULL) { delete       _wxvtk3Dbaseview_Clipping3D;    }
00087         if (_wxvtkmpr3Dview_A                           != NULL) { delete       _wxvtkmpr3Dview_A;                              }
00088         if (_wxvtkclipping3Dview_A                      != NULL) { delete       _wxvtkclipping3Dview_A;                 }
00089 
00090         if (_wxvtkmpr3Dview_B                           != NULL) { delete       _wxvtkmpr3Dview_B;                              }
00091         if (_wxvtkclipping3Dview_B                      != NULL) { delete       _wxvtkclipping3Dview_B;                 }
00092 }


Member Function Documentation

void wxManualRegistration3D::ConfigureVTK (  ) 

Definition at line 97 of file wxManualRegistration3D.cxx.

References _wxvtk3Dbaseview_Clipping3D, _wxvtkclipping3Dview_A, _wxvtkmpr3Dview_A, wxVtkBaseView::GetInteractorStyleBaseView(), vtkInteractorStyle3DView::SetWxVtkClipping3DView(), and vtkInteractorStyle3DView::SetWxVtkMPR3DView().

00098 {
00099         _wxvtk3Dbaseview_Clipping3D             ->  Configure();
00100 //
00101         _wxvtkmpr3Dview_A                               ->      Configure();
00102         _wxvtkclipping3Dview_A                  ->      Configure();
00103         vtkInteractorStyle3DView *vtkinteractorstyle3Dview_A = new vtkInteractorStyle3DView();
00104         vtkinteractorstyle3Dview_A->SetWxVtkMPR3DView(_wxvtkmpr3Dview_A);
00105         vtkinteractorstyle3Dview_A->SetWxVtkClipping3DView(_wxvtkclipping3Dview_A);
00106         _wxvtk3Dbaseview_Clipping3D->GetInteractorStyleBaseView()->AddInteractorStyleMaracas( vtkinteractorstyle3Dview_A );
00107 //
00108 }

Here is the call graph for this function:

void wxManualRegistration3D::ConfigureVTK_B (  ) 

Definition at line 111 of file wxManualRegistration3D.cxx.

References _wxvtk3Dbaseview_Clipping3D, _wxvtkclipping3Dview_B, _wxvtkmpr3Dview_B, wxVtkBaseView::GetInteractorStyleBaseView(), vtkInteractorStyle3DView::SetWxVtkClipping3DView(), and vtkInteractorStyle3DView::SetWxVtkMPR3DView().

Referenced by AddSecondVolume().

00112 {
00113         _wxvtkmpr3Dview_B                               ->      Configure();
00114         _wxvtkclipping3Dview_B                  ->      Configure();
00115         vtkInteractorStyle3DView *vtkinteractorstyle3Dview_B = new vtkInteractorStyle3DView();
00116         vtkinteractorstyle3Dview_B->SetWxVtkMPR3DView(_wxvtkmpr3Dview_B);
00117         vtkinteractorstyle3Dview_B->SetWxVtkClipping3DView(_wxvtkclipping3Dview_B);
00118         _wxvtk3Dbaseview_Clipping3D->GetInteractorStyleBaseView()->AddInteractorStyleMaracas( vtkinteractorstyle3Dview_B );
00119 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxManualRegistration3D::RefreshView (  ) 

Definition at line 174 of file wxManualRegistration3D.cxx.

References _angAlfa, _angBeta, _angGama, _btnTrack, _marimageData, _panelCutting, _posX, _posY, _posZ, _scaleX, _scaleY, _scaleZ, _transform, _transformBak, _wxvtk3Dbaseview_Clipping3D, _wxvtkclipping3Dview_A, _wxvtkclipping3Dview_B, _wxvtkmpr3Dview_A, _wxvtkmpr3Dview_B, marImageData::GetImageData(), vtkClipping3DDataViewer::GetTissueActor(), vtkMPRBaseData::GetTransformOrientation(), wxVtkClipping3DView::GetVtkClipping3DDataViewer(), wxVtkMPR3DView::GetVtkMPR3DDataViewer(), vtkMPR3DDataViewer::GetVtkMPRBaseData(), vtkMPRBaseData::GetX(), vtkMPRBaseData::GetY(), vtkBaseData::GetZ(), wxPanelCuttingImageData::RefreshView(), xBak, yBak, and zBak.

Referenced by AddSecondVolume(), OnCutImagaData(), OnPositionRotation(), and OnRefreshView().

00175 {
00176         double spc[3];
00177 
00178         if ( _wxvtkmpr3Dview_B!=NULL )
00179         {
00180                 if (_btnTrack->GetValue()==true)
00181                 {
00182                 
00183                         this->_marimageData->GetImageData()->GetSpacing(spc);  // image t=0
00184                         vtkTransform *m = this->_wxvtkmpr3Dview_B->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetTransformOrientation();
00185                         double x  = spc[0] * this->_wxvtkmpr3Dview_B->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetX();
00186                         double y  = spc[1] * this->_wxvtkmpr3Dview_B->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetY();
00187                         double z  = spc[2] * this->_wxvtkmpr3Dview_B->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetZ();
00188                         double xx=this->_posX->GetValue()/30.0;
00189                         double yy=this->_posY->GetValue()/30.0;
00190                         double zz=this->_posZ->GetValue()/30.0;
00191                         double sx=this->_scaleX->GetValue()/100.0;
00192                         double sy=this->_scaleY->GetValue()/100.0;
00193                         double sz=this->_scaleZ->GetValue()/100.0;
00194                         _transform->Identity();
00195 //                      _transform->Translate(x,y,z);   
00196 
00197 
00198 
00199 //                      _transform->Translate((x-xBak),(y-yBak),(z-zBak) );
00200 //                      _transform->Translate( xBak , yBak , zBak  );
00201                         _transform->Translate( xx , yy , zz  );
00202                         _transform->Translate( x , y , z  );
00203                         _transform->Concatenate( m->GetMatrix() );
00204                         _transform->RotateX( _angAlfa->GetValue()/30.0 );
00205                         _transform->RotateY( _angBeta->GetValue()/30.0 );
00206                         _transform->RotateZ( _angGama->GetValue()/30.0 );
00207                         _transform->Scale( sx,sy,sz );  
00208                         _transform->Translate(-(xBak),-(yBak),-(zBak) );
00209 
00210                         _transform->Concatenate( _transformBak->GetMatrix() );
00211 
00212                 }
00213 
00214 
00215 
00216                 vtkClipping3DDataViewer *vtkclipping3Ddataviewer = _wxvtkclipping3Dview_B->GetVtkClipping3DDataViewer();
00217                 vtkActor *vtkactor;
00218                 int i;
00219                 for (i=0;i<4;i++)
00220                 {
00221                         vtkactor = vtkclipping3Ddataviewer->GetTissueActor(i);
00222                         vtkactor->SetUserTransform( _transform );       
00223                 }
00224                 _wxvtkmpr3Dview_B                               -> RefreshView();
00225                 _wxvtkclipping3Dview_B                  -> Refresh();
00226         }
00227 
00228         _wxvtkmpr3Dview_A                               -> RefreshView();
00229         _wxvtkclipping3Dview_A                  -> Refresh();
00230         _wxvtk3Dbaseview_Clipping3D             -> Refresh();
00231 
00232         if (_panelCutting!=NULL)
00233         {
00234                 _panelCutting->RefreshView();
00235         }
00236 
00237 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxManualRegistration3D::OnRefreshView ( wxCommandEvent &  event  ) 

Definition at line 122 of file wxManualRegistration3D.cxx.

References RefreshView().

00123 {
00124         RefreshView();
00125 }

Here is the call graph for this function:

void wxManualRegistration3D::OnPositionRotation ( wxScrollEvent &  event  ) 

Definition at line 329 of file wxManualRegistration3D.cxx.

References RefreshView().

Referenced by CreateRegistration3DControl().

00330 {
00331 
00332         RefreshView();
00333 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxManualRegistration3D::AddPanelControl_B ( wxWindow *  parent,
marImageData marimagedata 
)

Definition at line 425 of file wxManualRegistration3D.cxx.

References _panelControl_B, _wxvtk3Dbaseview_Clipping3D, _wxvtkclipping3Dview_B, _wxvtkmpr3Dview_B, vtkMPR3DDataViewer::Configure(), vtkClipping3DDataViewer::Configure(), wxVtkClipping3DView::CreateControlPanel(), wxVtkMPR3DView::CreateControlPanel(), vtkBaseData::SetMarImageData(), wxVtkClipping3DView::SetVtkClipping3DDataViewer(), wxVtkMPR3DView::SetVtkMPR3DDataViewer(), vtkMPR3DDataViewer::SetVtkMPRBaseData(), and vtkClipping3DDataViewer::SetVtkMPRBaseData().

Referenced by AddSecondVolume().

00426 {
00427 
00428 //      _imageData_B=marimagedata->GetImageData();
00429 
00430     vtkMPRBaseData* vtkmprbasedata = new vtkMPRBaseData();
00431         vtkmprbasedata->SetMarImageData(marimagedata);
00432 
00433         _wxvtkclipping3Dview_B = new wxVtkClipping3DView(_wxvtk3Dbaseview_Clipping3D);
00434         vtkClipping3DDataViewer *vtkclipping3Ddataviewer_B = new vtkClipping3DDataViewer(); 
00435         vtkclipping3Ddataviewer_B->SetVtkMPRBaseData(vtkmprbasedata);
00436         vtkclipping3Ddataviewer_B->Configure();
00437         _wxvtkclipping3Dview_B->SetVtkClipping3DDataViewer(vtkclipping3Ddataviewer_B);
00438 
00439         _wxvtkmpr3Dview_B = new wxVtkMPR3DView( _wxvtk3Dbaseview_Clipping3D );
00440         vtkMPR3DDataViewer *vtkmpr3Ddataviewer_B = new vtkMPR3DDataViewer(); 
00441         vtkmpr3Ddataviewer_B->SetVtkMPRBaseData(vtkmprbasedata);
00442         vtkmpr3Ddataviewer_B->Configure();
00443         _wxvtkmpr3Dview_B->SetVtkMPR3DDataViewer(vtkmpr3Ddataviewer_B);
00444 
00445 //
00446         wxPanel         *controlPanelMPR3D_B            = _wxvtkmpr3Dview_B->CreateControlPanel(_panelControl_B);
00447         wxPanel         *controlPanelClipping3D_B       = _wxvtkclipping3Dview_B->CreateControlPanel(_panelControl_B);
00448 
00449 //      wxBoxSizer              *sizerCtrol_B                           = new wxBoxSizer(wxVERTICAL);
00450         wxFlexGridSizer *sizerCtrol_B               = new wxFlexGridSizer(1);
00451 
00452         sizerCtrol_B->Add(controlPanelMPR3D_B , 1, wxALL|wxEXPAND, 2);
00453         sizerCtrol_B->Add(controlPanelClipping3D_B , 1, wxALL|wxEXPAND, 2);
00454 
00455         _panelControl_B->SetAutoLayout(true);
00456         _panelControl_B->SetSizer(sizerCtrol_B);
00457         _panelControl_B->SetSize(400,350);
00458         _panelControl_B->Layout();
00459 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxManualRegistration3D::AddSecondVolume ( marImageData marimagedata  ) 

Definition at line 462 of file wxManualRegistration3D.cxx.

References _panelControl_B, AddPanelControl_B(), ConfigureVTK_B(), and RefreshView().

00463 {
00464         AddPanelControl_B(_panelControl_B,marimagedata);
00465         ConfigureVTK_B();
00466         RefreshView();
00467 }

Here is the call graph for this function:

bool wxManualRegistration3D::GetIfSecondVolumeExist (  ) 

Definition at line 469 of file wxManualRegistration3D.cxx.

References _wxvtkmpr3Dview_B.

00470 {
00471         bool result=false;
00472         if (_wxvtkmpr3Dview_B!=NULL)
00473         {
00474                 result=true;
00475         }
00476         return result;
00477 }

void wxManualRegistration3D::OnTracking ( wxCommandEvent &  event  ) 

Definition at line 128 of file wxManualRegistration3D.cxx.

References _marimageData, _transform, _transformBak, _wxvtkmpr3Dview_A, _wxvtkmpr3Dview_B, marImageData::GetImageData(), wxVtkMPR3DView::GetVtkMPR3DDataViewer(), vtkMPR3DDataViewer::GetVtkMPRBaseData(), vtkMPRBaseData::GetX(), vtkMPRBaseData::GetY(), vtkBaseData::GetZ(), wxVtkMPR3DView::InitOrientationPointWidget(), wxVtkMPR3DView::TestLoic1(), xBak, yBak, and zBak.

Referenced by CreateRegistration3DControl().

00129 {
00130         if (_wxvtkmpr3Dview_B!=NULL){
00131                 _wxvtkmpr3Dview_B->InitOrientationPointWidget();
00132 
00133                 double spc[3];
00134 
00135                 this->_marimageData->GetImageData()->GetSpacing(spc);  //image t=0
00136 
00137 
00138                 xBak  = spc[0] * this->_wxvtkmpr3Dview_B->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetX();
00139                 yBak  = spc[1] * this->_wxvtkmpr3Dview_B->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetY();
00140                 zBak  = spc[2] * this->_wxvtkmpr3Dview_B->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetZ();
00141 
00142                 double mat[16];
00143                 mat[0]=_transform->GetMatrix()->GetElement(0,0);
00144                 mat[1]=_transform->GetMatrix()->GetElement(0,1);
00145                 mat[2]=_transform->GetMatrix()->GetElement(0,2);
00146                 mat[3]=_transform->GetMatrix()->GetElement(0,3);
00147 
00148                 mat[4]=_transform->GetMatrix()->GetElement(1,0);
00149                 mat[5]=_transform->GetMatrix()->GetElement(1,1);
00150                 mat[6]=_transform->GetMatrix()->GetElement(1,2);
00151                 mat[7]=_transform->GetMatrix()->GetElement(1,3);
00152 
00153                 mat[8]=_transform->GetMatrix()->GetElement(2,0);
00154                 mat[9]=_transform->GetMatrix()->GetElement(2,1);
00155                 mat[10]=_transform->GetMatrix()->GetElement(2,2);
00156                 mat[11]=_transform->GetMatrix()->GetElement(2,3);
00157 
00158                 mat[12]=_transform->GetMatrix()->GetElement(3,0);
00159                 mat[13]=_transform->GetMatrix()->GetElement(3,1);
00160                 mat[14]=_transform->GetMatrix()->GetElement(3,2);
00161                 mat[15]=_transform->GetMatrix()->GetElement(3,3);
00162 
00163                 _transformBak->SetMatrix(mat);
00164         }
00165 
00166 // EED 25 Janvier 2005 TestLoic
00167         this->_wxvtkmpr3Dview_A->TestLoic1();
00168 
00169 
00170 }

Here is the call graph for this function:

Here is the caller graph for this function:

void wxManualRegistration3D::OnCutImagaData ( wxCommandEvent &  event  ) 

Definition at line 479 of file wxManualRegistration3D.cxx.

References _btnCutImageData, _framePanelCutting, _panelCutting, _vtkmprbasedata_A, _wxvtk3Dbaseview_Clipping3D, wxPanelCuttingImageData::Configure(), RefreshView(), wxPanelCuttingImageData::RemoveActors(), wxPanelCuttingImageData::SetVtkMPRBaseData(), and wxPanelCuttingImageData::SetWxVtk3DBaseView().

Referenced by Create3DView().

00480 {
00481         if (_btnCutImageData->GetValue()==true){
00482                 _framePanelCutting = new wxFrame(this,-1,_T("Cutting Module"),wxDefaultPosition,wxDefaultSize,wxCAPTION|wxSTAY_ON_TOP| wxRESIZE_BORDER );
00483                 _framePanelCutting->SetSize(550,400);
00484                 _panelCutting   = new wxPanelCuttingImageData(_framePanelCutting);
00485                 _panelCutting->SetWxVtk3DBaseView( _wxvtk3Dbaseview_Clipping3D  );
00486                 _panelCutting->SetVtkMPRBaseData( _vtkmprbasedata_A );
00487                 _panelCutting->Configure( );
00488                 _framePanelCutting->Show();
00489 //              _panelCutting->RefreshView();
00490                 RefreshView();
00491         } else {
00492                 if (_framePanelCutting!=NULL){
00493                         _panelCutting->RemoveActors();
00494                         _framePanelCutting->Close();
00495                         _framePanelCutting      = NULL;
00496                         _panelCutting           = NULL;
00497                 }
00498         }
00499 }

Here is the call graph for this function:

Here is the caller graph for this function:

wxPanel * wxManualRegistration3D::Create3DView ( wxWindow *  parent,
vtkMPRBaseData vtkmprbasedata 
) [private]

Definition at line 336 of file wxManualRegistration3D.cxx.

References _btnCutImageData, _panelControl_B, _wxvtk3Dbaseview_Clipping3D, _wxvtkclipping3Dview_A, _wxvtkmpr3Dview_A, vtkMPR3DDataViewer::Configure(), vtkClipping3DDataViewer::Configure(), wxVtkClipping3DView::CreateControlPanel(), wxVtkMPR3DView::CreateControlPanel(), wxVtkBaseView::GetWxVTKRenderWindowInteractor(), OnCutImagaData(), wxVtkClipping3DView::SetVtkClipping3DDataViewer(), wxVtkMPR3DView::SetVtkMPR3DDataViewer(), vtkMPR3DDataViewer::SetVtkMPRBaseData(), and vtkClipping3DDataViewer::SetVtkMPRBaseData().

00337 {
00338         wxWindow *wxwindow;
00339         wxPanel *panel=new wxPanel(parent,-1);
00340 //
00341         wxSplitterWindow        *panelClipping3D        = new wxSplitterWindow( panel , -1);
00342         _wxvtk3Dbaseview_Clipping3D                             = new wxVtk3DBaseView( panelClipping3D );
00343 //
00344         _wxvtkclipping3Dview_A = new wxVtkClipping3DView(_wxvtk3Dbaseview_Clipping3D);
00345         vtkClipping3DDataViewer *vtkclipping3Ddataviewer_A = new vtkClipping3DDataViewer(); 
00346         vtkclipping3Ddataviewer_A->SetVtkMPRBaseData(vtkmprbasedata);
00347         vtkclipping3Ddataviewer_A->Configure();
00348         _wxvtkclipping3Dview_A->SetVtkClipping3DDataViewer(vtkclipping3Ddataviewer_A);
00349 
00350         _wxvtkmpr3Dview_A = new wxVtkMPR3DView( _wxvtk3Dbaseview_Clipping3D );
00351         vtkMPR3DDataViewer *vtkmpr3Ddataviewer_A = new vtkMPR3DDataViewer(); 
00352         vtkmpr3Ddataviewer_A->SetVtkMPRBaseData(vtkmprbasedata);
00353         vtkmpr3Ddataviewer_A->Configure();
00354         _wxvtkmpr3Dview_A->SetVtkMPR3DDataViewer(vtkmpr3Ddataviewer_A);
00355 
00356 //--
00357 
00358         wxWindow                        *window3D                       = _wxvtk3Dbaseview_Clipping3D->GetWxVTKRenderWindowInteractor();
00359         wxSplitterWindow        *panelControlSplit      = new wxSplitterWindow(panelClipping3D,-1);     
00360 
00361 //
00362         wxPanel         *panelControl_A                         = new wxPanel(panelControlSplit,-1,wxDefaultPosition,wxSize(800,800));  
00363 
00364         wxPanel         *controlPanelMPR3D_A            = _wxvtkmpr3Dview_A->CreateControlPanel(panelControl_A);
00365         wxPanel         *controlPanelClipping3D_A       = _wxvtkclipping3Dview_A->CreateControlPanel(panelControl_A);
00366 
00367                          _btnCutImageData                       = new wxCheckBox(panelControl_A,-1,_T("Cut Module"));
00368                 Connect(_btnCutImageData->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED  , (wxObjectEventFunction) &wxManualRegistration3D::OnCutImagaData );
00369 
00370 
00371 //      wxBoxSizer              *sizerCtrol_A                           = new wxBoxSizer(wxVERTICAL);
00372         wxFlexGridSizer *sizerCtrol_A               = new wxFlexGridSizer(1);
00373 
00374         sizerCtrol_A->Add(controlPanelMPR3D_A           , 1, wxALL|wxEXPAND, 2);
00375         sizerCtrol_A->Add(controlPanelClipping3D_A      , 1, wxALL|wxEXPAND, 2);
00376         sizerCtrol_A->Add( _btnCutImageData                     , 1, wxALL, 2);
00377 
00378 
00379         panelControl_A->SetAutoLayout(true);
00380         panelControl_A->SetSizer(sizerCtrol_A);
00381         panelControl_A->SetSize(400,350);
00382         panelControl_A->Layout();
00383 
00384 
00385 //
00386         _panelControl_B                         = new wxPanel(panelControlSplit,-1,wxDefaultPosition,wxSize(800,800));  
00387 
00388 
00389         panelControlSplit->SplitVertically(panelControl_A, _panelControl_B);
00390         panelControlSplit->SetMinimumPaneSize( 20 );
00391 
00392         wxBoxSizer  *sizerCtrol             = new wxBoxSizer(wxHORIZONTAL);
00393         sizerCtrol->Add(panelControlSplit , 1, wxALL|wxEXPAND, 2);
00394 
00395         panelControlSplit->SetAutoLayout(true);
00396         panelControlSplit->SetSizer(sizerCtrol);
00397 //      panelControlSplit->SetSize(400,350);
00398         panelControlSplit->Layout();
00399                 
00400         int ww,hh;
00401         wxWindow *pp=this;
00402         while (pp->GetParent()!=NULL) pp=pp->GetParent();
00403         pp->GetSize(&ww,&hh);
00404 
00405 //EEDxx2.4
00406 //              panelClipping3D -> SetMinimumPaneSize( -50 );
00407         panelClipping3D -> SplitHorizontally( panelControlSplit,window3D/*, (int)(hh*0.20)*/ );
00408         panelClipping3D -> SetMinimumPaneSize( 20 );
00409         wxwindow=panelClipping3D;
00410 
00411     wxBoxSizer *sizerH1 = new wxBoxSizer(wxHORIZONTAL);
00412         sizerH1->Add(wxwindow , 1, wxALL|wxEXPAND, 0);
00413         panel->SetAutoLayout(true);
00414         panel->SetSizer(sizerH1);
00415         panel->SetSize(400,400);
00416         panel->Layout();
00417 
00418 //EEDxx2.4
00419 //      panel->FitInside();
00420 //      FitInside();
00421 
00422         return panel;
00423 }

Here is the call graph for this function:

wxPanel * wxManualRegistration3D::CreateRegistration3DControl ( wxWindow *  parent,
vtkMPRBaseData vtkmprbasedata 
) [private]

Definition at line 242 of file wxManualRegistration3D.cxx.

References _angAlfa, _angBeta, _angGama, _btnTrack, _posX, _posY, _posZ, _scaleX, _scaleY, _scaleZ, vtkMPRBaseData::GetMaxPositionX(), vtkMPRBaseData::GetMaxPositionY(), vtkMPRBaseData::GetMaxPositionZ(), OnPositionRotation(), and OnTracking().

00243 {
00244         wxPanel *panel = new wxPanel(parent,-1);
00245 
00246         int maxX = vtkmprbasedata->GetMaxPositionX();
00247         int maxY = vtkmprbasedata->GetMaxPositionY();
00248         int maxZ = vtkmprbasedata->GetMaxPositionZ();
00249         maxX=100;
00250         maxY=100;
00251         maxZ=100;
00252 
00253         _posX = new wxSlider( panel, -1,0 , -maxX*2, maxX*2, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_AUTOTICKS  |wxSL_LABELS );
00254         _posY = new wxSlider( panel, -1,0 , -maxY*2, maxY*2, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_AUTOTICKS  |wxSL_LABELS );
00255         _posZ = new wxSlider( panel, -1,0 , -maxZ*2, maxZ*2, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_AUTOTICKS  |wxSL_LABELS );
00256 
00257         _scaleX = new wxSlider( panel, -1,100 , 0, 200, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_AUTOTICKS  |wxSL_LABELS );
00258         _scaleY = new wxSlider( panel, -1,100 , 0, 200, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_AUTOTICKS  |wxSL_LABELS );
00259         _scaleZ = new wxSlider( panel, -1,100 , 0, 200, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_AUTOTICKS  |wxSL_LABELS );
00260 
00261 
00262         _angAlfa = new wxSlider( panel, -1,0 , -100, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_AUTOTICKS  |wxSL_LABELS );
00263         _angBeta = new wxSlider( panel, -1,0 , -100, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_AUTOTICKS  |wxSL_LABELS );
00264         _angGama = new wxSlider( panel, -1,0 , -100, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_AUTOTICKS  |wxSL_LABELS );
00265 
00266 
00267         _btnTrack = new wxCheckBox(panel, -1,_T("Tracking"));   
00268 
00269         _posX->SetTickFreq( 10, 0 );
00270         _posY->SetTickFreq( 10, 0 );
00271         _posZ->SetTickFreq( 10, 0 );
00272 
00273         _angAlfa->SetTickFreq( 30, 0 );
00274         _angBeta->SetTickFreq( 30, 0 );
00275         _angGama->SetTickFreq( 30, 0 );
00276 
00277 
00278 
00279 
00280         Connect(_posX->GetId()  , wxEVT_COMMAND_SLIDER_UPDATED          , (wxObjectEventFunction) &wxManualRegistration3D::OnPositionRotation   );
00281         Connect(_posY->GetId()  , wxEVT_COMMAND_SLIDER_UPDATED          , (wxObjectEventFunction) &wxManualRegistration3D::OnPositionRotation   );
00282         Connect(_posZ->GetId()  , wxEVT_COMMAND_SLIDER_UPDATED          , (wxObjectEventFunction) &wxManualRegistration3D::OnPositionRotation   );
00283 
00284         Connect(_scaleX->GetId()        , wxEVT_COMMAND_SLIDER_UPDATED          , (wxObjectEventFunction) &wxManualRegistration3D::OnPositionRotation   );
00285         Connect(_scaleY->GetId()        , wxEVT_COMMAND_SLIDER_UPDATED          , (wxObjectEventFunction) &wxManualRegistration3D::OnPositionRotation   );
00286         Connect(_scaleZ->GetId()        , wxEVT_COMMAND_SLIDER_UPDATED          , (wxObjectEventFunction) &wxManualRegistration3D::OnPositionRotation   );
00287 
00288         Connect(_angAlfa->GetId()       , wxEVT_COMMAND_SLIDER_UPDATED          , (wxObjectEventFunction) &wxManualRegistration3D::OnPositionRotation   );
00289         Connect(_angBeta->GetId()       , wxEVT_COMMAND_SLIDER_UPDATED          , (wxObjectEventFunction) &wxManualRegistration3D::OnPositionRotation   );
00290         Connect(_angGama->GetId()       , wxEVT_COMMAND_SLIDER_UPDATED          , (wxObjectEventFunction) &wxManualRegistration3D::OnPositionRotation   );
00291 
00292         Connect(_btnTrack->GetId()      , wxEVT_COMMAND_CHECKBOX_CLICKED                , (wxObjectEventFunction) &wxManualRegistration3D::OnTracking   );
00293 
00294 
00295     wxBoxSizer *sizerH1 = new wxBoxSizer(wxHORIZONTAL);
00296         sizerH1->Add( _posX, 1, wxALL|wxEXPAND, 5);
00297         sizerH1->Add( _posY, 1, wxALL|wxEXPAND, 5);
00298         sizerH1->Add( _posZ, 1, wxALL|wxEXPAND, 5);
00299 
00300 
00301     wxBoxSizer *sizerH2 = new wxBoxSizer(wxHORIZONTAL);
00302         sizerH2->Add( _scaleX, 1, wxALL|wxEXPAND, 5);
00303         sizerH2->Add( _scaleY, 1, wxALL|wxEXPAND, 5);
00304         sizerH2->Add( _scaleZ, 1, wxALL|wxEXPAND, 5);
00305         
00306     wxBoxSizer *sizerH3 = new wxBoxSizer(wxHORIZONTAL);
00307         sizerH3->Add( _angAlfa, 1, wxALL|wxEXPAND, 5);
00308         sizerH3->Add( _angBeta, 1, wxALL|wxEXPAND, 5);
00309         sizerH3->Add( _angGama, 1, wxALL|wxEXPAND, 5);
00310 
00311 
00312     wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
00313         sizer->Add( sizerH1 , 1, wxALL|wxEXPAND, 0);
00314         sizer->Add( sizerH2 , 1, wxALL|wxEXPAND, 0);
00315         sizer->Add( sizerH3 , 1, wxALL|wxEXPAND, 0);
00316         sizer->Add( _btnTrack , 1, wxALL|wxEXPAND, 10);
00317         sizer->Add( new wxPanel(panel,-1) , 1, wxALL|wxEXPAND, 0);
00318         sizer->Add( new wxPanel(panel,-1) , 1, wxALL|wxEXPAND, 0);
00319         sizer->Add( new wxPanel(panel,-1) , 1, wxALL|wxEXPAND, 0);
00320 
00321         panel->SetAutoLayout(true);
00322         panel->SetSizer(sizer);
00323         panel->SetSize(400,400);
00324         panel->Layout();
00325 
00326         return panel;
00327 }

Here is the call graph for this function:

wxManualRegistration3D::DECLARE_EVENT_TABLE (  )  [private]


Member Data Documentation

vtkMPRBaseData* wxManualRegistration3D::_vtkmprbasedata_A [private]

Definition at line 81 of file wxManualRegistration3D.h.

Referenced by OnCutImagaData().

vtkTransform* wxManualRegistration3D::_transform [private]

Definition at line 83 of file wxManualRegistration3D.h.

Referenced by OnTracking(), and RefreshView().

vtkTransform* wxManualRegistration3D::_transformBak [private]

Definition at line 84 of file wxManualRegistration3D.h.

Referenced by OnTracking(), and RefreshView().

wxPanelCuttingImageData* wxManualRegistration3D::_panelCutting [private]

Definition at line 86 of file wxManualRegistration3D.h.

Referenced by OnCutImagaData(), and RefreshView().

wxCheckBox* wxManualRegistration3D::_btnCutImageData [private]

Definition at line 87 of file wxManualRegistration3D.h.

Referenced by Create3DView(), and OnCutImagaData().

wxFrame* wxManualRegistration3D::_framePanelCutting [private]

Definition at line 88 of file wxManualRegistration3D.h.

Referenced by OnCutImagaData().

double wxManualRegistration3D::xBak [private]

Definition at line 90 of file wxManualRegistration3D.h.

Referenced by OnTracking(), and RefreshView().

double wxManualRegistration3D::yBak [private]

Definition at line 91 of file wxManualRegistration3D.h.

Referenced by OnTracking(), and RefreshView().

double wxManualRegistration3D::zBak [private]

Definition at line 92 of file wxManualRegistration3D.h.

Referenced by OnTracking(), and RefreshView().

wxSlider* wxManualRegistration3D::_posX [private]

Definition at line 93 of file wxManualRegistration3D.h.

Referenced by CreateRegistration3DControl(), and RefreshView().

wxSlider* wxManualRegistration3D::_posY [private]

Definition at line 94 of file wxManualRegistration3D.h.

Referenced by CreateRegistration3DControl(), and RefreshView().

wxSlider* wxManualRegistration3D::_posZ [private]

Definition at line 95 of file wxManualRegistration3D.h.

Referenced by CreateRegistration3DControl(), and RefreshView().

wxSlider* wxManualRegistration3D::_scaleX [private]

Definition at line 96 of file wxManualRegistration3D.h.

Referenced by CreateRegistration3DControl(), and RefreshView().

wxSlider* wxManualRegistration3D::_scaleY [private]

Definition at line 97 of file wxManualRegistration3D.h.

Referenced by CreateRegistration3DControl(), and RefreshView().

wxSlider* wxManualRegistration3D::_scaleZ [private]

Definition at line 98 of file wxManualRegistration3D.h.

Referenced by CreateRegistration3DControl(), and RefreshView().

wxSlider* wxManualRegistration3D::_angAlfa [private]

Definition at line 99 of file wxManualRegistration3D.h.

Referenced by CreateRegistration3DControl(), and RefreshView().

wxSlider* wxManualRegistration3D::_angBeta [private]

Definition at line 100 of file wxManualRegistration3D.h.

Referenced by CreateRegistration3DControl(), and RefreshView().

wxSlider* wxManualRegistration3D::_angGama [private]

Definition at line 101 of file wxManualRegistration3D.h.

Referenced by CreateRegistration3DControl(), and RefreshView().

wxCheckBox* wxManualRegistration3D::_btnTrack [private]

Definition at line 102 of file wxManualRegistration3D.h.

Referenced by CreateRegistration3DControl(), and RefreshView().

wxPanel* wxManualRegistration3D::_panelControl_B [private]

Definition at line 103 of file wxManualRegistration3D.h.

Referenced by AddPanelControl_B(), AddSecondVolume(), and Create3DView().

marImageData* wxManualRegistration3D::_marimageData [private]

Definition at line 104 of file wxManualRegistration3D.h.

Referenced by OnTracking(), and RefreshView().

wxVtk3DBaseView* wxManualRegistration3D::_wxvtk3Dbaseview_Clipping3D [private]

Definition at line 106 of file wxManualRegistration3D.h.

Referenced by AddPanelControl_B(), ConfigureVTK(), ConfigureVTK_B(), Create3DView(), OnCutImagaData(), RefreshView(), and ~wxManualRegistration3D().

wxVtkMPR3DView* wxManualRegistration3D::_wxvtkmpr3Dview_A [private]

Definition at line 107 of file wxManualRegistration3D.h.

Referenced by ConfigureVTK(), Create3DView(), OnTracking(), RefreshView(), and ~wxManualRegistration3D().

wxVtkClipping3DView* wxManualRegistration3D::_wxvtkclipping3Dview_A [private]

Definition at line 108 of file wxManualRegistration3D.h.

Referenced by ConfigureVTK(), Create3DView(), RefreshView(), and ~wxManualRegistration3D().

wxVtkMPR3DView* wxManualRegistration3D::_wxvtkmpr3Dview_B [private]

Definition at line 109 of file wxManualRegistration3D.h.

Referenced by AddPanelControl_B(), ConfigureVTK_B(), GetIfSecondVolumeExist(), OnTracking(), RefreshView(), and ~wxManualRegistration3D().

wxVtkClipping3DView* wxManualRegistration3D::_wxvtkclipping3Dview_B [private]

Definition at line 110 of file wxManualRegistration3D.h.

Referenced by AddPanelControl_B(), ConfigureVTK_B(), RefreshView(), and ~wxManualRegistration3D().


The documentation for this class was generated from the following files:
Generated on Wed Jul 29 16:36:18 2009 for creaMaracasVisu_lib by  doxygen 1.5.3