#include <manualContourBaseControler.h>
Definition at line 56 of file manualContourBaseControler.h.
manualContourBaseControler::manualContourBaseControler | ( | ) |
Definition at line 8 of file manualContourBaseControler.cpp.
References _created, _editable, _keyBoardMoving, _manContModel, _manViewBaseCont, _moving, _posibleToMove, _state, and _z.
Referenced by Clone().
00009 { 00010 _manViewBaseCont = NULL; 00011 _manContModel = NULL; 00012 _state = 0; 00013 _z = 900; 00014 _editable = true; 00015 _posibleToMove = true; 00016 _moving = false; 00017 _created = false; 00018 _keyBoardMoving = false; 00019 }
manualContourBaseControler::~manualContourBaseControler | ( | ) | [virtual] |
manualContourBaseControler * manualContourBaseControler::Clone | ( | ) | [virtual] |
Reimplemented from InteractorStyleMaracas.
Reimplemented in manualCircleControler, manualContour3DControler, manualContour3V3DControler, manualContour3VControler, manualContourControler, manualContourPerpPlaneControler, manualLineControler, and manualRoiControler.
Definition at line 26 of file manualContourBaseControler.cpp.
References CopyAttributesTo(), and manualContourBaseControler().
00027 { 00028 manualContourBaseControler * clone = new manualContourBaseControler(); 00029 CopyAttributesTo(clone); 00030 return clone; 00031 }
void manualContourBaseControler::CopyAttributesTo | ( | manualContourBaseControler * | cloneObject | ) |
Definition at line 35 of file manualContourBaseControler.cpp.
References InteractorStyleMaracas::CopyAttributesTo(), SetCompleteCreation(), SetEditable(), SetKeyBoardMoving(), SetMoving(), SetPosibleToMove(), SetState(), and SetZ().
Referenced by Clone(), manualRoiControler::CopyAttributesTo(), manualLineControler::CopyAttributesTo(), manualContourControler::CopyAttributesTo(), and manualCircleControler::CopyAttributesTo().
00036 { 00037 // Fathers object 00038 InteractorStyleMaracas::CopyAttributesTo(cloneObject); 00039 cloneObject->SetZ( this->GetZ() ); 00040 cloneObject->SetState( this->GetState() ); 00041 cloneObject->SetEditable( this->IsEditable() ); 00042 cloneObject->SetPosibleToMove( this->GetPosibleToMove() ); 00043 cloneObject->SetMoving( this->IsMoving() ); 00044 cloneObject->SetCompleteCreation( this->GetIfCompleteCreation() ); 00045 cloneObject->SetKeyBoardMoving( this->GetKeyBoardMoving() ); 00046 }
bool manualContourBaseControler::OnChar | ( | ) | [virtual] |
Reimplemented from InteractorStyleMaracas.
Reimplemented in manualContour3DControler, manualContour3V3DControler, manualContour3VControler, and manualContourPerpPlaneControler.
Definition at line 54 of file manualContourBaseControler.cpp.
References InteractorStyleMaracas::_vtkInteractorStyleBaseView, DeleteActualMousePoint(), GetKeyBoardMoving(), GetManualViewBaseContour(), vtkInteractorStyleBaseView::GetWxVtk2DBaseView(), wxVtkBaseView::GetWxVTKRenderWindowInteractor(), IsEditable(), Magnet(), manualViewBaseContour::MoveContour(), manualViewBaseContour::Refresh(), SetKeyBoardMoving(), and vtkInteractorStyleBaseView::SetRefresh_waiting().
Referenced by manualContourPerpPlaneControler::OnChar(), manualContour3VControler::OnChar(), and manualContour3DControler::OnChar().
00055 { 00056 if ( _vtkInteractorStyleBaseView!=NULL ) 00057 { 00058 char keyCode = _vtkInteractorStyleBaseView->GetInteractor()-> GetKeyCode(); 00059 00060 int X,Y; 00061 wxVTKRenderWindowInteractor *_wxVTKiren; 00062 _wxVTKiren= _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor(); 00063 _wxVTKiren->GetEventPosition(X, Y); 00064 //int Z = GetZ(); // JPRx 00065 // Delete Point 00066 if ((keyCode==8) || (keyCode==127)) 00067 { 00068 00069 if (!GetManualViewBaseContour()->GetPosibleSelected()==true) 00070 { 00071 DeleteActualMousePoint(X,Y); 00072 } 00073 GetManualViewBaseContour()->Refresh(); 00074 this->_vtkInteractorStyleBaseView->SetRefresh_waiting(); 00075 } 00076 else 00077 { 00078 // Magnet 00079 if (keyCode==32) 00080 { 00081 Magnet(X,Y); 00082 GetManualViewBaseContour()->Refresh(); 00083 this->_vtkInteractorStyleBaseView->SetRefresh_waiting(); 00084 } 00085 else if( !IsEditable() ) 00086 { 00087 if ( keyCode == 'L' ) 00088 { 00089 GetManualViewBaseContour()->MoveContour( -1, 0 ); 00090 SetKeyBoardMoving( true ); 00091 } 00092 else if ( keyCode == 'R' ) 00093 { 00094 GetManualViewBaseContour()->MoveContour( 1, 0 ); 00095 SetKeyBoardMoving( true ); 00096 } 00097 else if ( keyCode == 'U' ) 00098 { 00099 GetManualViewBaseContour()->MoveContour( 0, -1 ); 00100 SetKeyBoardMoving( true ); 00101 } 00102 else if ( keyCode == 'D' ) 00103 { 00104 GetManualViewBaseContour()->MoveContour( 0, 1 ); 00105 SetKeyBoardMoving( true ); 00106 } 00107 else if ( keyCode == 'W' )//Diagonal left down 00108 { 00109 GetManualViewBaseContour()->MoveContour( -1, 1 ); 00110 SetKeyBoardMoving( true ); 00111 } 00112 else if ( keyCode == 'Q' )//Diagonal left up 00113 { 00114 GetManualViewBaseContour()->MoveContour( -1, -1 ); 00115 SetKeyBoardMoving( true ); 00116 } 00117 else if( keyCode == 'P' )//Diagonal right up 00118 { 00119 GetManualViewBaseContour()->MoveContour( 1, -1 ); 00120 SetKeyBoardMoving( true ); 00121 } 00122 else if( keyCode == 'M' )//Diagonal right down 00123 { 00124 GetManualViewBaseContour()->MoveContour( 1, 1 ); 00125 SetKeyBoardMoving( true ); 00126 } 00127 if( GetKeyBoardMoving() ) 00128 { 00129 GetManualViewBaseContour()->Refresh(); 00130 this->_vtkInteractorStyleBaseView->SetRefresh_waiting(); 00131 } 00132 } 00133 } 00134 } 00135 return true; 00136 }
bool manualContourBaseControler::OnMouseMove | ( | ) | [virtual] |
Reimplemented from InteractorStyleMaracas.
Reimplemented in manualContourPerpPlaneControler.
Definition at line 138 of file manualContourBaseControler.cpp.
References InteractorStyleMaracas::_vtkInteractorStyleBaseView, vtkInteractorStyleBaseView::GetWxVtk2DBaseView(), wxVtkBaseView::GetWxVTKRenderWindowInteractor(), and MouseMove().
Referenced by manualContourPerpPlaneControler::OnMouseMove().
00139 { 00140 00141 if ( _vtkInteractorStyleBaseView!=NULL) 00142 { 00143 int X,Y; 00144 wxVTKRenderWindowInteractor *_wxVTKiren; 00145 _wxVTKiren= _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor(); 00146 _wxVTKiren->GetEventPosition( X , Y ); 00147 00148 00149 if ( (_vtkInteractorStyleBaseView->GetInteractor()->GetControlKey()==0) && 00150 (_vtkInteractorStyleBaseView->GetInteractor()->GetShiftKey()==0) ) { 00151 MouseMove(X,Y); 00152 } 00153 } 00154 return true; 00155 }
bool manualContourBaseControler::OnLeftButtonDown | ( | ) | [virtual] |
Reimplemented from InteractorStyleMaracas.
Reimplemented in manualContour3DControler.
Definition at line 157 of file manualContourBaseControler.cpp.
References InteractorStyleMaracas::_vtkInteractorStyleBaseView, vtkInteractorStyleBaseView::GetWxVtk2DBaseView(), wxVtkBaseView::GetWxVTKRenderWindowInteractor(), MouseClickLeft(), and SetKeyBoardMoving().
00158 { 00159 SetKeyBoardMoving( false ); 00160 if ( _vtkInteractorStyleBaseView!=NULL ) 00161 { 00162 int X,Y; 00163 wxVTKRenderWindowInteractor *wxVTKiren; 00164 wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor(); 00165 wxVTKiren->GetEventPosition(X,Y); 00166 00167 MouseClickLeft(X,Y); 00168 } 00169 return true; 00170 }
bool manualContourBaseControler::OnLeftButtonUp | ( | ) | [virtual] |
Reimplemented from InteractorStyleMaracas.
Definition at line 172 of file manualContourBaseControler.cpp.
References InteractorStyleMaracas::_vtkInteractorStyleBaseView, vtkInteractorStyleBaseView::GetWxVtk2DBaseView(), wxVtkBaseView::GetWxVTKRenderWindowInteractor(), and MouseReleaseLeft().
00173 { 00174 if ( _vtkInteractorStyleBaseView!=NULL ) 00175 { 00176 int X,Y; 00177 wxVTKRenderWindowInteractor *wxVTKiren; 00178 wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor(); 00179 wxVTKiren->GetEventPosition(X,Y); 00180 MouseReleaseLeft(X,Y); 00181 } 00182 return true; 00183 }
bool manualContourBaseControler::OnLeftDClick | ( | ) | [virtual] |
Reimplemented from InteractorStyleMaracas.
Reimplemented in manualContourPerpPlaneControler.
Definition at line 185 of file manualContourBaseControler.cpp.
References InteractorStyleMaracas::_vtkInteractorStyleBaseView, vtkInteractorStyleBaseView::GetWxVtk2DBaseView(), wxVtkBaseView::GetWxVTKRenderWindowInteractor(), and MouseDLeft().
Referenced by manualContourPerpPlaneControler::OnLeftDClick().
00186 { 00187 if ( _vtkInteractorStyleBaseView!=NULL ) 00188 { 00189 int X,Y; 00190 wxVTKRenderWindowInteractor *wxVTKiren; 00191 wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor(); 00192 wxVTKiren->GetEventPosition(X,Y); 00193 00194 this->MouseDLeft(X,Y); 00195 } 00196 return true; 00197 }
bool manualContourBaseControler::OnMiddleButtonDown | ( | ) | [virtual] |
Reimplemented from InteractorStyleMaracas.
Definition at line 199 of file manualContourBaseControler.cpp.
References InteractorStyleMaracas::_vtkInteractorStyleBaseView, GetManualViewBaseContour(), vtkInteractorStyleBaseView::GetWxVtk2DBaseView(), wxVtkBaseView::GetWxVTKRenderWindowInteractor(), GetZ(), and manualViewBaseContour::InitMove().
00200 { 00201 // SetKeyBoardMoving( false ); 00202 if ( _vtkInteractorStyleBaseView!=NULL ) 00203 { 00204 int X,Y; 00205 wxVTKRenderWindowInteractor *wxVTKiren; 00206 wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor(); 00207 wxVTKiren->GetEventPosition(X,Y); 00208 GetManualViewBaseContour()->InitMove( X, Y,GetZ()); 00209 } 00210 return true; 00211 }
bool manualContourBaseControler::OnMiddleButtonUp | ( | ) | [virtual] |
Reimplemented from InteractorStyleMaracas.
Definition at line 213 of file manualContourBaseControler.cpp.
bool manualContourBaseControler::OnRightButtonDown | ( | ) | [virtual] |
Reimplemented from InteractorStyleMaracas.
Definition at line 218 of file manualContourBaseControler.cpp.
References InteractorStyleMaracas::_vtkInteractorStyleBaseView, GetManualContourModel(), vtkInteractorStyleBaseView::GetWxVtk2DBaseView(), wxVtkBaseView::GetWxVTKRenderWindowInteractor(), MouseClickRight(), manualContourModel::SetCloseContour(), SetCompleteCreation(), and SetKeyBoardMoving().
00219 { 00220 if( _vtkInteractorStyleBaseView!= NULL ) 00221 { 00222 int X,Y; 00223 wxVTKRenderWindowInteractor *wxVTKiren; 00224 wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor(); 00225 wxVTKiren->GetEventPosition(X, Y); 00226 00227 SetCompleteCreation( true ); 00228 SetKeyBoardMoving( false ); 00229 this->GetManualContourModel()->SetCloseContour(true); 00230 MouseClickRight(X,Y); 00231 } 00232 return true; 00233 }
bool manualContourBaseControler::OnRightButtonUp | ( | ) | [virtual] |
Reimplemented from InteractorStyleMaracas.
Definition at line 235 of file manualContourBaseControler.cpp.
void manualContourBaseControler::SetModelView | ( | manualContourModel * | manContModel, | |
manualViewBaseContour * | manViewBaseCont | |||
) |
Definition at line 240 of file manualContourBaseControler.cpp.
References _editable, _manContModel, _manViewBaseCont, and manualViewBaseContour::SetEditable().
Referenced by wxWidgetMesure2D::ConfigureA(), wxEmptyPanel_3_Widget::ConfigureVTK(), ContourVOIWidget::ConfigureVTK(), wxMaracasCoutourTool::ConfigureVTK(), wxImageViewerWidget::ConstructVTK(), manualContourContainer::createLumenContour(), manualContourContainer::createWallContour(), wxMaracasImageBrowser02::LoadData(), manualContourContainer::restartLumenContour(), and manualContourContainer::restartWallContour().
00240 { 00241 _manContModel = manContModel; 00242 _manViewBaseCont = manViewBaseCont; 00243 _manViewBaseCont->SetEditable( &_editable ); 00244 }
manualContourModel * manualContourBaseControler::GetManualContourModel | ( | ) |
Definition at line 246 of file manualContourBaseControler.cpp.
References _manContModel.
Referenced by AddPoint(), manualContour3VControler::AddPoint(), manualRoiControler::Configure(), manualRoiControler::InitRoi(), manualLineControler::InitRoi(), manualCircleControler::InitRoi(), InsertPoint(), manualContour3VControler::InsertPoint(), Magnet(), manualContourControler::MouseClickLeft(), manualContour3DControler::MouseClickLeft(), OnRightButtonDown(), manualContourContainer::refreshLumen(), manualContourContainer::refreshWall(), manualContourPerpPlaneControler::ResetOrientationPlane(), manualContour3DControler::ResetOrientationPlane(), manualContour3VControler::SetPoint(), and manualRoiControler::SetRoi().
00247 { 00248 return _manContModel; 00249 }
manualViewBaseContour * manualContourBaseControler::GetManualViewBaseContour | ( | ) |
Definition at line 251 of file manualContourBaseControler.cpp.
References _manViewBaseCont.
Referenced by AddPoint(), manualContour3VControler::AddPoint(), manualContourPerpPlaneControler::DeleteActualMousePoint(), manualContour3VControler::DeleteActualMousePoint(), manualContour3V3DControler::DeleteActualMousePoint(), manualRoiControler::InitRoi(), manualLineControler::InitRoi(), manualCircleControler::InitRoi(), InsertPoint(), manualContour3VControler::InsertPoint(), Magnet(), manualRoiControler::MouseClickLeft(), manualLineControler::MouseClickLeft(), manualContourControler::MouseClickLeft(), manualContour3DControler::MouseClickLeft(), manualCircleControler::MouseClickLeft(), manualContourPerpPlaneControler::MouseDLeft(), manualContourControler::MouseDLeft(), MouseDLeft(), manualRoiControler::MouseMove(), manualLineControler::MouseMove(), manualContourPerpPlaneControler::MouseMove(), manualContourControler::MouseMove(), manualContour3VControler::MouseMove(), manualContour3V3DControler::MouseMove(), manualCircleControler::MouseMove(), manualContour3VControler::MouseMove_Others(), MouseReleaseLeft(), OnChar(), OnMiddleButtonDown(), manualContourContainer::refreshLumen(), manualContourContainer::refreshWall(), ResetContour(), SetEditable(), SetPoint(), manualContour3VControler::SetPoint(), SetPointX(), SetPointY(), SetPointZ(), and manualRoiControler::SetRoi().
00252 { 00253 return _manViewBaseCont; 00254 }
void manualContourBaseControler::MouseClickLeft | ( | int | x, | |
int | y | |||
) | [virtual] |
Reimplemented in manualCircleControler, manualContour3DControler, manualContourControler, manualLineControler, and manualRoiControler.
Definition at line 256 of file manualContourBaseControler.cpp.
Referenced by OnLeftButtonDown().
void manualContourBaseControler::MouseClickRight | ( | int | x, | |
int | y | |||
) | [virtual] |
Definition at line 261 of file manualContourBaseControler.cpp.
References _state, SetEditable(), and SetPosibleToMove().
Referenced by wxImageViewerWidget::ExecuteEvent2(), and OnRightButtonDown().
00262 { 00263 // if (_state==1) 00264 // { 00265 // _state=0; 00266 // } 00267 SetEditable( false ); 00268 SetPosibleToMove( false ); 00269 _state = 0; 00270 00271 //EED 24Avril2009 _state=7; 00272 }
void manualContourBaseControler::MouseDLeft | ( | int | x, | |
int | y | |||
) | [virtual] |
Reimplemented in manualContourControler, and manualContourPerpPlaneControler.
Definition at line 288 of file manualContourBaseControler.cpp.
References _editable, _state, GetManualViewBaseContour(), GetZ(), manualViewBaseContour::SelectPosibleContour(), and manualViewBaseContour::SelectPosiblePoint().
Referenced by manualContourControler::MouseDLeft(), and OnLeftDClick().
00289 { 00290 if (_state==0) 00291 { 00292 int z=GetZ(); 00293 GetManualViewBaseContour()->SelectPosibleContour(x,y,z); 00294 GetManualViewBaseContour()->SelectPosiblePoint(x,y,z); 00295 if ( GetManualViewBaseContour()->GetPosibleSelected() ) 00296 { 00297 _editable = true; 00298 } 00299 } 00300 }
void manualContourBaseControler::MouseMove | ( | int | x, | |
int | y | |||
) | [virtual] |
Reimplemented in manualCircleControler, manualContour3V3DControler, manualContour3VControler, manualContourControler, manualContourPerpPlaneControler, manualLineControler, and manualRoiControler.
Definition at line 302 of file manualContourBaseControler.cpp.
Referenced by OnMouseMove().
void manualContourBaseControler::MouseReleaseLeft | ( | int | x, | |
int | y | |||
) | [virtual] |
Definition at line 274 of file manualContourBaseControler.cpp.
References _state, GetIfCompleteCreation(), GetManualViewBaseContour(), GetZ(), IsEditable(), manualViewBaseContour::SelectPosibleContour(), SetEditable(), SetMoving(), and SetPosibleToMove().
Referenced by wxImageViewerWidget::ExecuteEvent2(), and OnLeftButtonUp().
00275 { 00276 if (_state==5){ _state = 0; } 00277 if (_state==6){ _state = 0; } 00278 if (_state==7){ _state = 0; } 00279 SetMoving( false ); 00280 GetManualViewBaseContour()->SelectPosibleContour(x,y,GetZ()); 00281 if( GetIfCompleteCreation() && IsEditable() && !GetManualViewBaseContour()->GetPosibleSelected() && (GetManualViewBaseContour()->GetIdPoint(x,y,GetZ())==-1) ) 00282 { 00283 SetEditable( false ); 00284 SetPosibleToMove( false ); 00285 } 00286 }
void manualContourBaseControler::SetState | ( | int | state | ) |
Definition at line 306 of file manualContourBaseControler.cpp.
References _state.
Referenced by CopyAttributesTo(), manualRoiControler::InitRoi(), manualLineControler::InitRoi(), manualCircleControler::InitRoi(), wxMaracasImageBrowser02::LoadData(), manualRoiControler::MouseClickLeft(), manualLineControler::MouseClickLeft(), manualContourControler::MouseClickLeft(), manualCircleControler::MouseClickLeft(), ResetContour(), and wxImageViewerWidget::SetStateManualContour().
00307 { 00308 _state=state; 00309 }
int manualContourBaseControler::GetState | ( | ) |
Definition at line 311 of file manualContourBaseControler.cpp.
References _state.
Referenced by manualRoiControler::MouseClickLeft(), manualLineControler::MouseClickLeft(), manualContourControler::MouseClickLeft(), manualContour3DControler::MouseClickLeft(), manualCircleControler::MouseClickLeft(), manualRoiControler::MouseMove(), manualLineControler::MouseMove(), manualContourControler::MouseMove(), and manualCircleControler::MouseMove().
00312 { 00313 return _state; 00314 }
bool manualContourBaseControler::IsEditable | ( | ) |
Definition at line 316 of file manualContourBaseControler.cpp.
References _editable.
Referenced by Magnet(), manualRoiControler::MouseClickLeft(), manualLineControler::MouseClickLeft(), manualContourControler::MouseClickLeft(), manualCircleControler::MouseClickLeft(), manualContourControler::MouseDLeft(), manualContourControler::MouseMove(), MouseReleaseLeft(), and OnChar().
00317 { 00318 return _editable; 00319 }
void manualContourBaseControler::SetEditable | ( | bool | condition | ) |
Definition at line 321 of file manualContourBaseControler.cpp.
References _editable, GetManualViewBaseContour(), manualViewBaseContour::RemoveControlPoints(), and manualViewBaseContour::SetSelected().
Referenced by CopyAttributesTo(), MouseClickRight(), and MouseReleaseLeft().
00322 { 00323 if (GetManualViewBaseContour()!=NULL) { 00324 if( !condition ) 00325 { 00326 GetManualViewBaseContour()->RemoveControlPoints(); 00327 } 00328 GetManualViewBaseContour()->SetSelected( condition ); 00329 } 00330 _editable = condition; 00331 }
bool manualContourBaseControler::GetPosibleToMove | ( | ) |
Definition at line 334 of file manualContourBaseControler.cpp.
References _posibleToMove.
Referenced by manualContourControler::MouseMove().
00335 { 00336 return _posibleToMove; 00337 }
void manualContourBaseControler::SetPosibleToMove | ( | bool | condition | ) |
Definition at line 339 of file manualContourBaseControler.cpp.
References _posibleToMove.
Referenced by CopyAttributesTo(), manualContourControler::MouseClickLeft(), MouseClickRight(), and MouseReleaseLeft().
00340 { 00341 _posibleToMove = condition; 00342 }
bool manualContourBaseControler::IsMoving | ( | ) |
Definition at line 344 of file manualContourBaseControler.cpp.
References _moving.
Referenced by manualContourControler::MouseMove().
00345 { 00346 return _moving; 00347 }
void manualContourBaseControler::SetMoving | ( | bool | condition | ) |
Definition at line 349 of file manualContourBaseControler.cpp.
References _moving.
Referenced by CopyAttributesTo(), manualContourControler::MouseClickLeft(), and MouseReleaseLeft().
00350 { 00351 _moving = condition; 00352 }
void manualContourBaseControler::SetCompleteCreation | ( | bool | condition | ) |
Definition at line 354 of file manualContourBaseControler.cpp.
References _created.
Referenced by CopyAttributesTo(), and OnRightButtonDown().
00355 { 00356 _created = condition; 00357 }
bool manualContourBaseControler::GetIfCompleteCreation | ( | ) |
Definition at line 359 of file manualContourBaseControler.cpp.
References _created.
Referenced by MouseReleaseLeft().
00360 { 00361 return _created; 00362 }
void manualContourBaseControler::SetKeyBoardMoving | ( | bool | condition | ) |
Definition at line 364 of file manualContourBaseControler.cpp.
References _keyBoardMoving.
Referenced by CopyAttributesTo(), OnChar(), OnLeftButtonDown(), and OnRightButtonDown().
00365 { 00366 _keyBoardMoving = condition; 00367 }
bool manualContourBaseControler::GetKeyBoardMoving | ( | ) |
Definition at line 369 of file manualContourBaseControler.cpp.
References _keyBoardMoving.
Referenced by OnChar().
00370 { 00371 return _keyBoardMoving; 00372 }
void manualContourBaseControler::CreateNewManualContour | ( | ) |
Definition at line 374 of file manualContourBaseControler.cpp.
References _manViewBaseCont, and manualViewBaseContour::CreateNewContour().
Referenced by wxWidgetMesure2D::ConfigureA(), wxEmptyPanel_3_Widget::ConfigureVTK(), ContourVOIWidget::ConfigureVTK(), wxMaracasCoutourTool::ConfigureVTK(), manualContourContainer::createLumenContour(), wxImageViewerWidget::CreateNewManualContour(), manualContourContainer::createWallContour(), wxMaracasImageBrowser02::LoadData(), manualContourContainer::refreshLumen(), manualContourContainer::refreshWall(), manualContourContainer::restartLumenContour(), and manualContourContainer::restartWallContour().
00374 { 00375 _manViewBaseCont->CreateNewContour(); 00376 }
int manualContourBaseControler::GetNumberOfPointsManualContour | ( | ) |
Definition at line 378 of file manualContourBaseControler.cpp.
References _manViewBaseCont, and manualViewBaseContour::GetNumberOfPoints().
Referenced by manualContourControler::MouseClickLeft().
00378 { 00379 return _manViewBaseCont->GetNumberOfPoints(); 00380 }
int manualContourBaseControler::GetNumberOfPointsSplineManualContour | ( | ) |
Definition at line 384 of file manualContourBaseControler.cpp.
References _manContModel, and manualContourModel::GetNumberOfPointsSpline().
Referenced by manualContourContainer::getNumberOfLumenContourPoints(), wxImageViewerWidget::GetNumberOfPointsSplineManualContour(), and manualContourContainer::getNumberOfWallContourPoints().
00384 { 00385 //return _manViewBaseCont->GetNumberOfPointsSpline(); 00386 return _manContModel->GetNumberOfPointsSpline(); 00387 }
void manualContourBaseControler::DeleteContour | ( | ) |
Definition at line 398 of file manualContourBaseControler.cpp.
References _manContModel, _manViewBaseCont, manualContourModel::DeleteAllPoints(), and manualViewBaseContour::DeleteContour().
Referenced by wxImageViewerWidget::EraseManualContour(), and ResetContour().
00398 { 00399 _manViewBaseCont->DeleteContour(); 00400 _manContModel->DeleteAllPoints(); 00401 }
void manualContourBaseControler::DeleteActualMousePoint | ( | int | x, | |
int | y | |||
) | [virtual] |
Reimplemented in manualCircleControler, manualContour3V3DControler, manualContour3VControler, manualContourPerpPlaneControler, manualLineControler, and manualRoiControler.
Definition at line 403 of file manualContourBaseControler.cpp.
References _manContModel, _manViewBaseCont, _state, manualViewBaseContour::DeletePoint(), manualContourModel::DeletePoint(), manualViewBaseContour::GetIdPoint(), manualContourModel::GetSizeLstPoints(), and GetZ().
Referenced by manualContourPerpPlaneControler::DeleteActualMousePoint(), manualContour3VControler::DeleteActualMousePoint(), manualContour3V3DControler::DeleteActualMousePoint(), wxImageViewerWidget::ExecuteEvent2(), and OnChar().
00404 { 00405 if ((_manContModel!=NULL) && (_manViewBaseCont!=NULL) ) 00406 { 00407 int id=_manViewBaseCont->GetIdPoint(x,y,GetZ()); 00408 if ((id!=-1) && (_manContModel->GetSizeLstPoints()>2) ){ 00409 _manContModel->DeletePoint(id); 00410 _manViewBaseCont->DeletePoint(id); 00411 } 00412 } 00413 _state = 0; 00414 }
double * manualContourBaseControler::GetVectorPointsXManualContour | ( | ) |
Definition at line 390 of file manualContourBaseControler.cpp.
References _manViewBaseCont, and manualViewBaseContour::GetVectorPointsXManualContour().
Referenced by wxImageViewerWidget::GetVectorPointsXManualContour(), manualContourContainer::getXVectorLumenPoints(), and manualContourContainer::getXVectorWallPoints().
00390 { 00391 return _manViewBaseCont->GetVectorPointsXManualContour(); 00392 }
double * manualContourBaseControler::GetVectorPointsYManualContour | ( | ) |
Definition at line 394 of file manualContourBaseControler.cpp.
References _manViewBaseCont, and manualViewBaseContour::GetVectorPointsYManualContour().
Referenced by wxImageViewerWidget::GetVectorPointsYManualContour(), manualContourContainer::getYVectorLumenPoints(), and manualContourContainer::getYVectorWallPoints().
00394 { 00395 return _manViewBaseCont->GetVectorPointsYManualContour(); 00396 }
void manualContourBaseControler::SetZ | ( | int | z | ) |
Definition at line 440 of file manualContourBaseControler.cpp.
References _z.
Referenced by wxWidgetMesure2D::ConfigureA(), wxImageViewerWidget::ConstructVTK(), and CopyAttributesTo().
00441 { 00442 _z=z; 00443 }
int manualContourBaseControler::GetZ | ( | ) | [virtual] |
Definition at line 445 of file manualContourBaseControler.cpp.
References _z.
Referenced by manualContourPerpPlaneControler::DeleteActualMousePoint(), DeleteActualMousePoint(), manualContour3VControler::DeleteActualMousePoint(), manualContour3V3DControler::DeleteActualMousePoint(), manualRoiControler::InitRoi(), manualLineControler::InitRoi(), manualCircleControler::InitRoi(), Magnet(), manualRoiControler::MouseClickLeft(), manualLineControler::MouseClickLeft(), manualContourControler::MouseClickLeft(), manualCircleControler::MouseClickLeft(), MouseDLeft(), manualRoiControler::MouseMove(), manualLineControler::MouseMove(), manualContourPerpPlaneControler::MouseMove(), manualContourControler::MouseMove(), manualContour3VControler::MouseMove(), manualContour3V3DControler::MouseMove(), manualCircleControler::MouseMove(), MouseReleaseLeft(), and OnMiddleButtonDown().
00446 { 00447 return _z; 00448 }
void manualContourBaseControler::AddPoint | ( | int | x, | |
int | y, | |||
int | z | |||
) | [virtual] |
Reimplemented in manualContour3V3DControler, manualContour3VControler, and manualContourPerpPlaneControler.
Definition at line 450 of file manualContourBaseControler.cpp.
References manualViewBaseContour::AddPoint(), manualContourModel::AddPoint(), GetManualContourModel(), GetManualViewBaseContour(), and manualViewBaseContour::TransfromCoordViewWorld().
Referenced by manualContourPerpPlaneControler::AddPoint(), manualContour3V3DControler::AddPoint(), manualRoiControler::InitRoi(), manualLineControler::InitRoi(), manualCircleControler::InitRoi(), manualRoiControler::MouseClickLeft(), manualLineControler::MouseClickLeft(), manualContourControler::MouseClickLeft(), and manualCircleControler::MouseClickLeft().
00451 { 00452 if (GetManualContourModel()!=NULL){ 00453 double xx = x; 00454 double yy = y; 00455 double zz = z; 00456 GetManualViewBaseContour()->TransfromCoordViewWorld(xx,yy,zz); 00457 /*int id =*/ GetManualContourModel()->AddPoint(xx,yy,zz); // JPRx 00458 GetManualViewBaseContour()->AddPoint(); 00459 // GetManualViewBaseContour()->UpdateViewPoint(id); 00460 } 00461 }
void manualContourBaseControler::InsertPoint | ( | int | x, | |
int | y, | |||
int | z | |||
) | [virtual] |
Reimplemented in manualContour3DControler, manualContour3V3DControler, manualContour3VControler, and manualContourPerpPlaneControler.
Definition at line 463 of file manualContourBaseControler.cpp.
References manualViewBaseContour::AddPoint(), manualContourModel::AddPoint(), GetManualContourModel(), GetManualViewBaseContour(), manualViewBaseContour::InsertPoint(), manualContourModel::InsertPoint(), and manualViewBaseContour::TransfromCoordViewWorld().
Referenced by manualContourPerpPlaneControler::InsertPoint(), manualContour3DControler::InsertPoint(), and manualContourControler::MouseClickLeft().
00464 { 00465 //EEDzz 00466 int id=-1; 00467 if (GetManualContourModel()!=NULL){ 00468 double xx = x; 00469 double yy = y; 00470 double zz = z; 00471 GetManualViewBaseContour()->TransfromCoordViewWorld(xx,yy,zz); 00472 if (GetManualContourModel()->GetSizeLstPoints()>1){ 00473 id = GetManualContourModel()->InsertPoint(xx,yy,zz); 00474 GetManualViewBaseContour()->InsertPoint(id); 00475 // GetManualViewBaseContour()->UpdateViewPoint(id); 00476 } else { 00477 GetManualContourModel()->AddPoint(xx,yy,zz); 00478 GetManualViewBaseContour()->AddPoint(); 00479 // AddPoint(x,y,z); 00480 // GetManualViewBaseContour()->UpdateViewPoint(id); 00481 } 00482 } 00483 }
void manualContourBaseControler::SetPoint | ( | int | id, | |
int | x, | |||
int | y, | |||
int | z | |||
) | [virtual] |
Reimplemented in manualContour3VControler.
Definition at line 486 of file manualContourBaseControler.cpp.
References _manContModel, manualContourModel::GetManualPoint(), GetManualViewBaseContour(), manualPoint::SetPoint(), manualViewBaseContour::TransfromCoordViewWorld(), and manualViewBaseContour::UpdateViewPoint().
Referenced by manualRoiControler::MouseMove(), manualLineControler::MouseMove(), manualContourControler::MouseMove(), and manualCircleControler::MouseMove().
00486 { // virtual 00487 if ((GetManualViewBaseContour()!=NULL) && (id>=0)){ 00488 double xx = x; 00489 double yy = y; 00490 double zz = z; 00491 GetManualViewBaseContour()->TransfromCoordViewWorld(xx,yy,zz); 00492 manualPoint *mp = _manContModel->GetManualPoint(id); 00493 mp->SetPoint(xx,yy,zz); 00494 GetManualViewBaseContour()->UpdateViewPoint(id); 00495 } 00496 }
void manualContourBaseControler::SetPointX | ( | int | id, | |
int | x | |||
) |
Definition at line 498 of file manualContourBaseControler.cpp.
References _manContModel, manualContourModel::GetManualPoint(), GetManualViewBaseContour(), manualPoint::SetPointX(), manualViewBaseContour::TransfromCoordViewWorld(), and manualViewBaseContour::UpdateViewPoint().
Referenced by manualRoiControler::MouseMove().
00498 { 00499 if ((GetManualViewBaseContour()!=NULL) && (id>=0)){ 00500 double xx = x; 00501 double yy = 0; 00502 double zz = 0; 00503 GetManualViewBaseContour()->TransfromCoordViewWorld(xx,yy,zz); 00504 manualPoint *mp = _manContModel->GetManualPoint(id); 00505 mp->SetPointX(xx); 00506 GetManualViewBaseContour()->UpdateViewPoint(id); 00507 } 00508 }
void manualContourBaseControler::SetPointY | ( | int | id, | |
int | y | |||
) |
Definition at line 510 of file manualContourBaseControler.cpp.
References _manContModel, manualContourModel::GetManualPoint(), GetManualViewBaseContour(), manualPoint::SetPointY(), manualViewBaseContour::TransfromCoordViewWorld(), and manualViewBaseContour::UpdateViewPoint().
Referenced by manualRoiControler::MouseMove().
00510 { 00511 if ((GetManualViewBaseContour()!=NULL) && (id>=0)){ 00512 double xx = 0; 00513 double yy = y; 00514 double zz = 0; 00515 GetManualViewBaseContour()->TransfromCoordViewWorld(xx,yy,zz); 00516 manualPoint *mp = _manContModel->GetManualPoint(id); 00517 mp->SetPointY(yy); 00518 GetManualViewBaseContour()->UpdateViewPoint(id); 00519 } 00520 }
void manualContourBaseControler::SetPointZ | ( | int | id, | |
int | z | |||
) |
Definition at line 522 of file manualContourBaseControler.cpp.
References _manContModel, manualContourModel::GetManualPoint(), GetManualViewBaseContour(), manualPoint::SetPointZ(), manualViewBaseContour::TransfromCoordViewWorld(), and manualViewBaseContour::UpdateViewPoint().
00522 { 00523 if ((GetManualViewBaseContour()!=NULL) && (id>=0)){ 00524 double xx = 0; 00525 double yy = 0; 00526 double zz = z; 00527 GetManualViewBaseContour()->TransfromCoordViewWorld(xx,yy,zz); 00528 manualPoint *mp = _manContModel->GetManualPoint(id); 00529 mp->SetPointZ(zz); 00530 GetManualViewBaseContour()->UpdateViewPoint(id); 00531 } 00532 }
void manualContourBaseControler::Magnet | ( | int | x, | |
int | y | |||
) |
Definition at line 417 of file manualContourBaseControler.cpp.
References _manViewBaseCont, _state, manualContourModel::GetIdPoint(), manualViewBaseContour::GetIdPoint(), GetManualContourModel(), manualContourModel::GetManualPoint(), GetManualViewBaseContour(), GetZ(), IsEditable(), manualPoint::SetPoint(), and manualViewBaseContour::TransfromCoordViewWorld().
Referenced by OnChar().
00418 { 00419 if( IsEditable()) 00420 { 00421 /*int id= */ _manViewBaseCont->GetIdPoint(x,y,GetZ()); // JPRx 00422 if (GetManualContourModel()!=NULL){ 00423 double xx = x; 00424 double yy = y; 00425 double zz = GetZ(); 00426 GetManualViewBaseContour()->TransfromCoordViewWorld(xx,yy,zz); 00427 int id = GetManualContourModel()->GetIdPoint(xx,yy,zz,32000,-1); 00428 if (id!=-1) 00429 { 00430 manualPoint *mp = GetManualContourModel()->GetManualPoint(id); 00431 mp->SetPoint(xx,yy,zz); 00432 } 00433 // GetManualViewBaseContour()->UpdateViewPoint(id); 00434 } 00435 _state = 0; 00436 } 00437 }
void manualContourBaseControler::ResetContour | ( | ) | [virtual] |
Reimplemented in manualContour3V3DControler, manualContour3VControler, and manualContourPerpPlaneControler.
Definition at line 534 of file manualContourBaseControler.cpp.
References manualViewBaseContour::CreateNewContour(), DeleteContour(), GetManualViewBaseContour(), and SetState().
Referenced by manualContourPerpPlaneControler::ResetContour(), manualContour3VControler::ResetContour(), and manualContour3V3DControler::ResetContour().
00535 { 00536 this->DeleteContour(); 00537 GetManualViewBaseContour()->CreateNewContour(); 00538 this->SetState(0); 00539 }
void manualContourBaseControler::Configure | ( | ) | [virtual] |
Reimplemented in manualCircleControler, manualContourControler, and manualRoiControler.
Definition at line 49 of file manualContourBaseControler.cpp.
void InteractorStyleMaracas::CopyAttributesTo | ( | InteractorStyleMaracas * | cloneObject | ) | [inherited] |
Definition at line 27 of file InteractorStyleMaracas.cxx.
References InteractorStyleMaracas::SetActive().
Referenced by InteractorStyleMaracas::Clone(), and CopyAttributesTo().
00028 { 00029 // Fathers object 00030 //<FATHERCLASS>::CopyAttributesTo(cloneObject); 00031 00032 cloneObject->SetActive( this->GetActive() ); 00033 }
bool InteractorStyleMaracas::OnRightDClick | ( | ) | [virtual, inherited] |
Definition at line 87 of file InteractorStyleMaracas.cxx.
Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().
bool InteractorStyleMaracas::OnMiddleDClick | ( | ) | [virtual, inherited] |
bool InteractorStyleMaracas::OnMouseWheel | ( | ) | [virtual, inherited] |
Definition at line 92 of file InteractorStyleMaracas.cxx.
Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().
void InteractorStyleMaracas::SetVtkInteractorStyleBaseView | ( | vtkInteractorStyleBaseView * | _vtkInteractorStyleBaseView | ) | [inherited] |
Definition at line 99 of file InteractorStyleMaracas.cxx.
References InteractorStyleMaracas::_vtkInteractorStyleBaseView.
Referenced by vtkInteractorStyleBaseView::AddInteractorStyleMaracas(), and vtkInteractorStyleBaseView::InsertInteractorStyleMaracas().
00100 { 00101 _vtkInteractorStyleBaseView = vtkInteractorStyleBaseView; 00102 }
void InteractorStyleMaracas::RemoveVtkInteractorStyleBaseView | ( | ) | [inherited] |
Definition at line 106 of file InteractorStyleMaracas.cxx.
References InteractorStyleMaracas::_vtkInteractorStyleBaseView.
Referenced by vtkInteractorStyleBaseView::RemoveInteractorStyleMaracas().
00107 { 00108 _vtkInteractorStyleBaseView = NULL; 00109 }
void InteractorStyleMaracas::SetActive | ( | bool | active | ) | [inherited] |
Definition at line 111 of file InteractorStyleMaracas.cxx.
References InteractorStyleMaracas::_active.
Referenced by wxWidgetMesure2D::ActiveMessureTool(), wxWidgetMesure2D::ConfigureA(), wxEmptyPanel_3_Widget::ConfigureVTK(), ContourVOIWidget::ConfigureVTK(), wxMaracasCoutourTool::ConfigureVTK(), wxImageViewerWidget::ConstructVTK(), InteractorStyleMaracas::CopyAttributesTo(), manualContourContainer::createLumenContour(), wxImageViewerWidget::CreateNewManualContour(), manualContourContainer::createWallContour(), wxMaracasImageBrowser02::LoadData(), wxMaracasImageBrowser02::OnBtnResetRoi(), manualContourContainer::refreshLumen(), manualContourContainer::refreshWall(), manualContourContainer::restartLumenContour(), manualContourContainer::restartWallContour(), vtkInteractorStyleBaseView::SetActiveAllInteractors(), and wxMaracasImageBrowser02::SetROI().
00112 { 00113 _active = active; 00114 }
bool InteractorStyleMaracas::GetActive | ( | ) | [inherited] |
Definition at line 116 of file InteractorStyleMaracas.cxx.
References InteractorStyleMaracas::_active.
Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().
00117 { 00118 return _active; 00119 }
Definition at line 131 of file manualContourBaseControler.h.
Referenced by CreateNewManualContour(), DeleteActualMousePoint(), DeleteContour(), GetManualViewBaseContour(), GetNumberOfPointsManualContour(), GetVectorPointsXManualContour(), GetVectorPointsYManualContour(), Magnet(), manualContourBaseControler(), and SetModelView().
Definition at line 132 of file manualContourBaseControler.h.
Referenced by DeleteActualMousePoint(), DeleteContour(), GetManualContourModel(), GetNumberOfPointsSplineManualContour(), manualContourBaseControler(), SetModelView(), SetPoint(), SetPointX(), SetPointY(), and SetPointZ().
int manualContourBaseControler::_z [private] |
Definition at line 134 of file manualContourBaseControler.h.
Referenced by GetZ(), manualContourBaseControler(), and SetZ().
int manualContourBaseControler::_state [private] |
Definition at line 135 of file manualContourBaseControler.h.
Referenced by DeleteActualMousePoint(), GetState(), Magnet(), manualContourBaseControler(), MouseClickRight(), MouseDLeft(), MouseReleaseLeft(), and SetState().
bool manualContourBaseControler::_editable [private] |
Definition at line 136 of file manualContourBaseControler.h.
Referenced by IsEditable(), manualContourBaseControler(), MouseDLeft(), SetEditable(), and SetModelView().
bool manualContourBaseControler::_posibleToMove [private] |
Definition at line 137 of file manualContourBaseControler.h.
Referenced by GetPosibleToMove(), manualContourBaseControler(), and SetPosibleToMove().
bool manualContourBaseControler::_moving [private] |
Definition at line 138 of file manualContourBaseControler.h.
Referenced by IsMoving(), manualContourBaseControler(), and SetMoving().
bool manualContourBaseControler::_created [private] |
Definition at line 139 of file manualContourBaseControler.h.
Referenced by GetIfCompleteCreation(), manualContourBaseControler(), and SetCompleteCreation().
bool manualContourBaseControler::_keyBoardMoving [private] |
Definition at line 140 of file manualContourBaseControler.h.
Referenced by GetKeyBoardMoving(), manualContourBaseControler(), and SetKeyBoardMoving().
vtkInteractorStyleBaseView* InteractorStyleMaracas::_vtkInteractorStyleBaseView [protected, inherited] |
Definition at line 45 of file InteractorStyleMaracas.h.
Referenced by manualContour3VControler::AddPoint_Others(), manualContour3VControler::DeleteActualMousePoint_Others(), manualContour3VControler::InsertPoint_Others(), InteractorStyleMaracas::InteractorStyleMaracas(), manualContourControler::MouseClickLeft(), manualContour3DControler::MouseClickLeft(), manualContourPerpPlaneControler::MouseDLeft(), manualContourControler::MouseDLeft(), manualContourPerpPlaneControler::MouseMove(), manualContourControler::MouseMove(), manualContour3V3DControler::MouseMove(), manualContour3VControler::MouseMove_Others(), OnChar(), manualContour3DControler::OnChar(), manualContour3VControler::OnChar_Others(), vtkInteractorStyleSphere::OnLeftButtonDown(), vtkInteractorStylePlane2D::OnLeftButtonDown(), vtkInteractorStyleMPRView::OnLeftButtonDown(), OnLeftButtonDown(), manualContour3DControler::OnLeftButtonDown(), vtkInteractorStyleSphere::OnLeftButtonUp(), vtkInteractorStylePlane2D::OnLeftButtonUp(), OnLeftButtonUp(), vtkInteractorStylePlane2D::OnLeftDClick(), vtkInteractorStyleMPRView::OnLeftDClick(), OnLeftDClick(), manualInteractorWindowLevel::OnMiddleButtonDown(), OnMiddleButtonDown(), vtkInteractorStyleSphere::OnMouseMove(), vtkInteractorStylePlane2D::OnMouseMove(), vtkInteractorStyleMPRView::OnMouseMove(), vtkInteractorScrollZ::OnMouseMove(), vtkInfoTextImageInteractorPlane2D::OnMouseMove(), vtkInfoTextImageInteractor::OnMouseMove(), manualInteractorWindowLevel::OnMouseMove(), OnMouseMove(), vtkInteractorStyleSphere::OnRightButtonDown(), vtkInteractorScrollZ::OnRightButtonDown(), OnRightButtonDown(), vtkInteractorStyleSphere::OnRightButtonUp(), InteractorStyleMaracas::RemoveVtkInteractorStyleBaseView(), vtkInteractorStyle3DView::SelectMarchibCubePoint(), and InteractorStyleMaracas::SetVtkInteractorStyleBaseView().