#include <manualViewBaseContour.h>
Public Member Functions | |
manualViewBaseContour () | |
virtual | ~manualViewBaseContour () |
virtual int | GetType () |
virtual void | Save (FILE *pFile) |
virtual void | Open (FILE *pFile) |
void | AddPoint () |
virtual void | AddPoint (manualViewPoint *manualViewPoint) |
void | InsertPoint (int id) |
void | DeleteContour () |
void | DeletePoint (int x, int y, int z) |
virtual void | DeletePoint (int id) |
virtual void | UpdateViewPoint (int id) |
virtual void | UpdateViewPoints () |
void | SetSelected (bool selected) |
void | SetPosibleSelected (bool posibleSelected) |
bool | GetSelected () |
bool | GetPosibleSelected () |
void | DeleteSelectedPoints () |
bool | GetEditable () |
void | SetEditable (bool *condition) |
virtual int | GetIdPoint (int x, int y, int z) |
void | SelectPoint (int i, bool select) |
void | SelectLstPoints () |
void | SelectAllPoints (bool select) |
virtual int | SelectPosiblePoint (int x, int y, int z) |
bool | SelectPosibleContour (int x, int y, int z) |
void | SelectAllPossibleSelected (bool select) |
void | SetPointSelected (int id, bool select) |
void | SetPointPosibleSelected (int id, bool select) |
void | SetIfViewControlPoints (bool ifShow) |
bool | GetIfViewControlPoints () |
void | UnSelectPoint (int i) |
void | UnSelectLstPoints () |
void | UnSelectAllPoints () |
void | SetModel (manualBaseModel *manContModel) |
void | SetWxVtkBaseView (wxVtkBaseView *wxvtkbaseview) |
virtual void | Refresh () |
int | GetNumberOfPoints () |
void | CreateNewContour () |
double * | GetVectorPointsXManualContour () |
double * | GetVectorPointsYManualContour () |
double * | GetVectorPointsZManualContour () |
virtual bool | ifTouchContour (int x, int y, int z) |
void | UpdateColorActor () |
void | SetRange (double range) |
double | GetRange () |
void | SetZ (int z) |
int | GetZ () |
wxVtkBaseView * | GetWxVtkBaseView () |
virtual void | InitMove (int x, int y, int z) |
virtual void | MoveContour (int x, int y, int z) |
virtual void | MoveContour (int horizontalUnits, int verticalUnits) |
virtual void | GetMinMax (double &minX, double &minY, double &minZ, double &maxX, double &maxY, double &maxZ) |
virtual void | TransfromCoordViewWorld (double &X, double &Y, double &Z, int type=2) |
void | ClearContour () |
virtual void | ClearPoint (int id) |
void | SetVisible (bool ok) |
void | SetShowText (bool ok) |
void | GetSpacing (double spc[3]) |
void | SetSpacing (double spc[3]) |
void | SetColorNormalContour (double r, double g, double b) |
void | GetColorNormalContour (double &r, double &g, double &b) |
void | SetColorEditContour (double r, double g, double b) |
void | GetColorEditContour (double &r, double &g, double &b) |
void | SetColorSelectContour (double r, double g, double b) |
void | GetColorSelectContour (double &r, double &g, double &b) |
void | AddCompleteContourActor (bool ifControlPoints=false) |
void | RemoveCompleteContourActor () |
virtual void | AddSplineActor () |
virtual void | RemoveSplineActor () |
virtual void | AddControlPoints () |
virtual void | RemoveControlPoints () |
void | AddTextActor () |
void | RemoveTextActor () |
void | InitTextActor () |
virtual manualViewBaseContour * | Clone () |
void | CopyAttributesTo (manualViewBaseContour *cloneObject) |
virtual void | RefreshContour () |
void | SetWidthLine (double width) |
double | GetWidthLine () |
virtual void | ConstructVTKObjects () |
Protected Member Functions | |
virtual void | RefreshText () |
Protected Attributes | |
double | _range |
double | _coulorEdit_r |
double | _coulorEdit_g |
double | _coulorEdit_b |
double | _coulorNormal_r |
double | _coulorNormal_g |
double | _coulorNormal_b |
double | _coulorSelection_r |
double | _coulorSelection_g |
double | _coulorSelection_b |
double | _widthline |
wxVtkBaseView * | _wxvtkbaseview |
bool | _selected |
bool * | _editable |
bool | _posibleSelected |
bool | _viewControlPoints |
bool | _show_text |
int | _id_viewPoint_for_text |
vtkTextActor * | _textActor |
manualBaseModel * | _manContModel |
vtkPoints * | _pts |
int | _sizePointsContour |
std::vector< manualViewPoint * > | _lstViewPoints |
double | _spc [3] |
Private Member Functions | |
void | DeleteVtkObjects () |
Private Attributes | |
vtkPolyData * | _pd |
vtkActor * | _contourVtkActor |
vtkPolyDataMapper * | _bboxMapper |
Definition at line 52 of file manualViewBaseContour.h.
manualViewBaseContour::manualViewBaseContour | ( | ) |
Definition at line 8 of file manualViewBaseContour.cpp.
References _bboxMapper, _contourVtkActor, _coulorEdit_b, _coulorEdit_g, _coulorEdit_r, _coulorNormal_b, _coulorNormal_g, _coulorNormal_r, _coulorSelection_b, _coulorSelection_g, _coulorSelection_r, _manContModel, _pd, _posibleSelected, _pts, _range, _selected, _show_text, _sizePointsContour, _spc, _textActor, _viewControlPoints, _widthline, and _wxvtkbaseview.
Referenced by Clone().
00009 { 00010 _show_text = true; 00011 _textActor = NULL; 00012 _manContModel = NULL; 00013 _wxvtkbaseview = NULL; 00014 _selected = false; 00015 _posibleSelected = false; 00016 _viewControlPoints = false; 00017 _pts = NULL; 00018 _pd = NULL; 00019 _contourVtkActor = NULL; 00020 _bboxMapper = NULL; 00021 _range = 1; 00022 _sizePointsContour = 100; 00023 _spc[0] = 1; 00024 _spc[1] = 1; 00025 _spc[2] = 1; 00026 00027 _coulorEdit_r = 1; 00028 _coulorEdit_g = 1; 00029 _coulorEdit_b = 0; 00030 00031 _coulorNormal_r = 1; 00032 _coulorNormal_g = 0; 00033 _coulorNormal_b = 1; 00034 00035 _coulorSelection_r = 0; 00036 _coulorSelection_g = 1; 00037 _coulorSelection_b = 0; 00038 00039 _widthline = 1; 00040 00041 }
manualViewBaseContour::~manualViewBaseContour | ( | ) | [virtual] |
Definition at line 43 of file manualViewBaseContour.cpp.
References _lstViewPoints.
00044 { 00045 int i,size=_lstViewPoints.size(); 00046 for (i=0;i<size; i++){ 00047 delete _lstViewPoints[i]; 00048 } 00049 _lstViewPoints.clear(); 00050 }
void manualViewBaseContour::AddCompleteContourActor | ( | bool | ifControlPoints = false |
) |
Definition at line 81 of file manualViewBaseContour.cpp.
References _viewControlPoints, _wxvtkbaseview, AddControlPoints(), AddSplineActor(), AddTextActor(), wxVtkBaseView::GetRenderer(), Refresh(), and RefreshContour().
Referenced by CreateNewContour().
00082 { 00083 _viewControlPoints = ifControlPoints; 00084 /*vtkRenderer * theRenderer = */ _wxvtkbaseview->GetRenderer(); // JPRx ?? 00085 //Adding the spline 00086 AddSplineActor(); 00087 AddTextActor(); 00088 00089 //Adding each control point 00090 if( ifControlPoints ) 00091 AddControlPoints(); 00092 RefreshContour(); 00093 Refresh(); 00094 }
void manualViewBaseContour::AddControlPoints | ( | ) | [virtual] |
Definition at line 172 of file manualViewBaseContour.cpp.
References _lstViewPoints, _viewControlPoints, _wxvtkbaseview, wxVtkBaseView::GetRenderer(), and SetIfViewControlPoints().
Referenced by AddCompleteContourActor(), and manualContourControler::MouseDLeft().
00173 { 00174 vtkRenderer * theRenderer = _wxvtkbaseview->GetRenderer(); 00175 SetIfViewControlPoints( true ); 00176 if( _viewControlPoints ) 00177 { 00178 int i,size=_lstViewPoints.size(); 00179 for (i=0;i<size; i++) 00180 { 00181 vtkActor * pointActor = _lstViewPoints[i]->GetVtkActor(); 00182 theRenderer->AddActor( pointActor ); 00183 } 00184 } 00185 }
void manualViewBaseContour::AddPoint | ( | manualViewPoint * | manualViewPoint | ) | [virtual] |
Definition at line 345 of file manualViewBaseContour.cpp.
References _lstViewPoints, _spc, _wxvtkbaseview, manualViewPoint::CreateVtkPointActor(), wxVtkBaseView::GetRenderer(), and manualViewPoint::SetSpacing().
00346 { 00347 _lstViewPoints.push_back( manualViewPoint ); 00348 00349 // EED 3 oct 2006 00350 manualViewPoint->SetSpacing(_spc); 00351 00352 vtkActor *actor = manualViewPoint->CreateVtkPointActor(); 00353 _wxvtkbaseview->GetRenderer()->AddActor( actor ); 00354 }
void manualViewBaseContour::AddPoint | ( | ) |
Definition at line 339 of file manualViewBaseContour.cpp.
References GetWxVtkBaseView().
Referenced by manualContourBaseControler::AddPoint(), manualContour3VControler::AddPoint(), manualContour3VControler::AddPoint_Others(), CopyAttributesTo(), manualContourBaseControler::InsertPoint(), manualContourContainer::refreshLumen(), manualContourContainer::refreshWall(), and wxMaracasCoutourTool::SetControlPoints().
00340 { 00341 manualViewPoint *mvp = new manualViewPoint( this->GetWxVtkBaseView() ); 00342 AddPoint( mvp ); 00343 }
void manualViewBaseContour::AddSplineActor | ( | ) | [virtual] |
Reimplemented in manualViewBullEye, and manualViewPoints.
Definition at line 144 of file manualViewBaseContour.cpp.
References _contourVtkActor, _wxvtkbaseview, and wxVtkBaseView::GetRenderer().
Referenced by AddCompleteContourActor().
00145 { 00146 vtkRenderer * theRenderer = _wxvtkbaseview->GetRenderer(); 00147 if (_contourVtkActor!=NULL) 00148 theRenderer->AddActor( _contourVtkActor ); 00149 }
void manualViewBaseContour::AddTextActor | ( | ) |
Definition at line 187 of file manualViewBaseContour.cpp.
References _show_text, _textActor, _wxvtkbaseview, and wxVtkBaseView::GetRenderer().
Referenced by AddCompleteContourActor(), and manualContourControler::MouseDLeft().
00188 { 00189 if(_show_text) 00190 { 00191 _wxvtkbaseview->GetRenderer()->AddActor2D( _textActor ); 00192 } 00193 }
void manualViewBaseContour::ClearContour | ( | ) |
Definition at line 855 of file manualViewBaseContour.cpp.
References _contourVtkActor, _lstViewPoints, _wxvtkbaseview, ClearPoint(), DeleteVtkObjects(), wxVtkBaseView::GetRenderer(), and Refresh().
Referenced by manualContourContainer::clearLumen(), and manualContourContainer::clearWall().
00856 { 00857 if (_contourVtkActor!=NULL){ 00858 _wxvtkbaseview->GetRenderer()->RemoveActor( _contourVtkActor ); 00859 } 00860 DeleteVtkObjects(); 00861 int i,size=_lstViewPoints.size(); 00862 for (i=0;i<size;i++){ 00863 ClearPoint(0); 00864 } 00865 Refresh(); 00866 }
void manualViewBaseContour::ClearPoint | ( | int | id | ) | [virtual] |
Reimplemented in manualViewContour.
Definition at line 868 of file manualViewBaseContour.cpp.
References DeletePoint().
Referenced by ClearContour().
00869 { 00870 DeletePoint(id); 00871 }
manualViewBaseContour * manualViewBaseContour::Clone | ( | ) | [virtual] |
Reimplemented in manualView3DContour, manualView3VContour, manualViewBullEye, manualViewCircle, manualViewContour, manualViewLine, manualViewPoints, manualViewRoi, manualViewRotationTool, and manualViewPerpPlaneContour.
Definition at line 110 of file manualViewBaseContour.cpp.
References CopyAttributesTo(), and manualViewBaseContour().
00111 { 00112 manualViewBaseContour * clone = new manualViewBaseContour(); 00113 CopyAttributesTo(clone); 00114 return clone; 00115 00116 }
void manualViewBaseContour::ConstructVTKObjects | ( | ) | [virtual] |
Reimplemented in manualViewBullEye, and manualViewPoints.
Definition at line 238 of file manualViewBaseContour.cpp.
References _bboxMapper, _contourVtkActor, _manContModel, _pd, _pts, DeleteVtkObjects(), manualBaseModel::GetNumberOfPointsSpline(), InitTextActor(), and UpdateColorActor().
Referenced by manualViewBullEye::ConstructVTKObjects(), and CreateNewContour().
00239 { 00240 00241 00242 //JSTG 29-02-08 ----------------------------------------------- 00243 //int i , nps = _sizePointsContour; 00244 int i; 00245 int nps = _manContModel->GetNumberOfPointsSpline(); 00246 //------------------------------------------------------------- 00247 00248 DeleteVtkObjects(); 00249 _pts = vtkPoints::New(); 00250 _pts->SetNumberOfPoints(nps); 00251 for (i=0 ; i<nps ; i++){ 00252 _pts->SetPoint(i, 0 , 0 , 0 ); 00253 } 00254 // This is for the boundaring inicialisation 00255 00256 //EED 29Mars2009 00257 //_pts->SetPoint(0, 0 , 0 , -1000 ); 00258 //_pts->SetPoint(1, 0 , 0 , 1000 ); 00259 _pts->SetPoint(0, -1000 , -1000 , -1000 ); 00260 _pts->SetPoint(1, 1000 , 1000 , 1000 ); 00261 00262 vtkCellArray *lines = vtkCellArray::New(); 00263 lines->InsertNextCell( nps /* +1 */ ); 00264 for ( i=0 ; i<nps+1 ; i++ ){ 00265 lines->InsertCellPoint(i % nps ); 00266 } 00267 _pd = vtkPolyData::New(); 00268 _pd->SetPoints( _pts ); 00269 _pd->SetLines( lines ); 00270 lines->Delete(); //do not delete lines ?? 00271 00272 _contourVtkActor = vtkActor::New(); 00273 _bboxMapper = vtkPolyDataMapper::New(); 00274 _bboxMapper->ScalarVisibilityOff( ); 00275 00276 _bboxMapper->SetInput(_pd); 00277 _bboxMapper->ImmediateModeRenderingOn(); 00278 _contourVtkActor->SetMapper(_bboxMapper); 00279 _contourVtkActor->GetProperty()->BackfaceCullingOff(); 00280 00281 UpdateColorActor(); 00282 00283 _pd->ComputeBounds(); 00284 00285 InitTextActor(); 00286 }
void manualViewBaseContour::CopyAttributesTo | ( | manualViewBaseContour * | cloneObject | ) |
Reimplemented in manualView3DContour, manualView3VContour, manualViewBullEye, manualViewCircle, manualViewContour, manualViewLine, manualViewPoints, manualViewRoi, manualViewRotationTool, and manualViewPerpPlaneContour.
Definition at line 120 of file manualViewBaseContour.cpp.
References _coulorEdit_b, _coulorEdit_g, _coulorEdit_r, _coulorNormal_b, _coulorNormal_g, _coulorNormal_r, _coulorSelection_b, _coulorSelection_g, _coulorSelection_r, _lstViewPoints, _spc, _wxvtkbaseview, AddPoint(), GetIfViewControlPoints(), GetPosibleSelected(), GetRange(), GetSelected(), GetZ(), SetColorEditContour(), SetColorNormalContour(), SetColorSelectContour(), SetIfViewControlPoints(), SetPosibleSelected(), SetRange(), SetSelected(), SetSpacing(), SetWxVtkBaseView(), and SetZ().
Referenced by Clone().
00121 { 00122 // Fathers object 00123 //XXXX::CopyAttributesTo(cloneObject); 00124 00125 cloneObject-> SetWxVtkBaseView( this->_wxvtkbaseview ); 00126 cloneObject-> SetSelected( this->GetSelected() ); 00127 cloneObject-> SetPosibleSelected( this->GetPosibleSelected() ); 00128 cloneObject-> SetIfViewControlPoints( this->GetIfViewControlPoints() ); 00129 cloneObject-> SetRange( this->GetRange() ); 00130 cloneObject-> SetZ( this->GetZ() ); 00131 cloneObject-> SetSpacing( _spc ); 00132 cloneObject-> SetColorNormalContour( _coulorNormal_r, _coulorNormal_g, _coulorNormal_b ); 00133 cloneObject-> SetColorEditContour( _coulorEdit_r, _coulorEdit_g, _coulorEdit_b ); 00134 cloneObject-> SetColorSelectContour( _coulorSelection_r, _coulorSelection_g, _coulorSelection_b ); 00135 00136 int i, size = _lstViewPoints.size(); 00137 for ( i=0; i<size; i++ ) 00138 { 00139 cloneObject->AddPoint( ); 00140 } 00141 }
void manualViewBaseContour::CreateNewContour | ( | ) |
Definition at line 307 of file manualViewBaseContour.cpp.
References AddCompleteContourActor(), and ConstructVTKObjects().
Referenced by manualContourBaseControler::CreateNewManualContour(), manualContourBaseControler::ResetContour(), manualContour3VControler::ResetContour_Others(), and wxMaracasCoutourTool::SetControlPoints().
00308 { 00309 ConstructVTKObjects(); 00310 /* 00311 _wxvtkbaseview->GetRenderer()->AddActor( _contourVtkActor ); 00312 _wxvtkbaseview->GetRenderer()->AddActor2D(_textActor);*/ 00313 AddCompleteContourActor(); 00314 }
void manualViewBaseContour::DeleteContour | ( | ) |
Definition at line 369 of file manualViewBaseContour.cpp.
References _lstViewPoints, DeletePoint(), DeleteVtkObjects(), Refresh(), and RemoveCompleteContourActor().
Referenced by manualContourBaseControler::DeleteContour(), manualContour3VControler::ResetContour_Others(), and wxMaracasCoutourTool::SetControlPoints().
00370 { 00371 RemoveCompleteContourActor(); 00372 /*if (_contourVtkActor!=NULL){ 00373 _wxvtkbaseview->GetRenderer()->RemoveActor( _contourVtkActor ); 00374 }*/ 00375 DeleteVtkObjects(); 00376 int i,size=_lstViewPoints.size(); 00377 for (i=0;i<size;i++){ 00378 manualViewBaseContour::DeletePoint(0); 00379 } 00380 Refresh(); 00381 }
void manualViewBaseContour::DeletePoint | ( | int | id | ) | [virtual] |
Reimplemented in manualViewContour.
Definition at line 383 of file manualViewBaseContour.cpp.
References _lstViewPoints, _wxvtkbaseview, wxVtkBaseView::GetRenderer(), manualViewPoint::GetVtkActor(), and Refresh().
00384 { 00385 int size=_lstViewPoints.size(); 00386 if ( (id>=0) && (id<size) ){ 00387 manualViewPoint *mvp =_lstViewPoints[id]; 00388 //EED ups1 00389 // _handlePicker->DeletePickList(mvp->GetVtkActor()); 00390 _wxvtkbaseview->GetRenderer()->RemoveActor( mvp->GetVtkActor() ); 00391 std::vector<manualViewPoint*>::iterator itNum = _lstViewPoints.begin() + id; 00392 _lstViewPoints.erase(itNum); 00393 delete mvp; 00394 Refresh(); 00395 } 00396 }
void manualViewBaseContour::DeletePoint | ( | int | x, | |
int | y, | |||
int | z | |||
) |
Definition at line 398 of file manualViewBaseContour.cpp.
References GetIdPoint().
Referenced by ClearPoint(), manualContourBaseControler::DeleteActualMousePoint(), manualContour3VControler::DeleteActualMousePoint_Others(), DeleteContour(), and DeleteSelectedPoints().
00399 { 00400 int id=GetIdPoint(x,y,z); 00401 if (id!=-1){ 00402 DeletePoint(id); 00403 } 00404 }
void manualViewBaseContour::DeleteSelectedPoints | ( | ) |
Definition at line 436 of file manualViewBaseContour.cpp.
References _lstViewPoints, DeletePoint(), GetSelected(), and Refresh().
00437 { 00438 int i,size=_lstViewPoints.size(); 00439 for (i=size-1;i>=0;i--){ 00440 if (_lstViewPoints[i]->GetSelected()==true){ 00441 DeletePoint(i); 00442 } 00443 } 00444 Refresh(); 00445 }
void manualViewBaseContour::DeleteVtkObjects | ( | ) | [private] |
Definition at line 203 of file manualViewBaseContour.cpp.
References _bboxMapper, _contourVtkActor, _pd, and _pts.
Referenced by ClearContour(), ConstructVTKObjects(), and DeleteContour().
00204 { 00205 if ( _contourVtkActor != NULL ) { _contourVtkActor -> Delete(); } 00206 if ( _bboxMapper != NULL ) { _bboxMapper -> Delete(); } 00207 if ( _pts != NULL ) { _pts -> Delete(); } 00208 if ( _pd != NULL ) { _pd -> Delete(); } 00209 _contourVtkActor = NULL; 00210 _bboxMapper = NULL; 00211 _pts = NULL; 00212 _pd = NULL; 00213 }
void manualViewBaseContour::GetColorEditContour | ( | double & | r, | |
double & | g, | |||
double & | b | |||
) |
Definition at line 662 of file manualViewBaseContour.cpp.
References _coulorEdit_b, _coulorEdit_g, and _coulorEdit_r.
00663 { 00664 r = _coulorEdit_r; 00665 g = _coulorEdit_g; 00666 b = _coulorEdit_b; 00667 }
void manualViewBaseContour::GetColorNormalContour | ( | double & | r, | |
double & | g, | |||
double & | b | |||
) |
Definition at line 648 of file manualViewBaseContour.cpp.
References _coulorNormal_b, _coulorNormal_g, and _coulorNormal_r.
00649 { 00650 r = _coulorNormal_r; 00651 g = _coulorNormal_g; 00652 b = _coulorNormal_b; 00653 }
void manualViewBaseContour::GetColorSelectContour | ( | double & | r, | |
double & | g, | |||
double & | b | |||
) |
Definition at line 676 of file manualViewBaseContour.cpp.
References _coulorSelection_b, _coulorSelection_g, and _coulorSelection_r.
00677 { 00678 r = _coulorSelection_r; 00679 g = _coulorSelection_g; 00680 b = _coulorSelection_b; 00681 }
bool manualViewBaseContour::GetEditable | ( | ) |
Definition at line 416 of file manualViewBaseContour.cpp.
References _editable.
Referenced by manualViewPoints::RefreshContour(), SelectPosibleContour(), and UpdateColorActor().
00417 { 00418 return *_editable; 00419 }
int manualViewBaseContour::GetIdPoint | ( | int | x, | |
int | y, | |||
int | z | |||
) | [virtual] |
Reimplemented in manualView3VContour.
Definition at line 700 of file manualViewBaseContour.cpp.
References _manContModel, _range, manualBaseModel::GetIdPoint(), and TransfromCoordViewWorld().
Referenced by manualContourPerpPlaneControler::DeleteActualMousePoint(), manualContourBaseControler::DeleteActualMousePoint(), manualContour3VControler::DeleteActualMousePoint(), manualContour3V3DControler::DeleteActualMousePoint(), DeletePoint(), manualContourBaseControler::Magnet(), manualRotationToolControler::MouseClickLeft(), manualRoiControler::MouseClickLeft(), manualLineControler::MouseClickLeft(), manualContourControler::MouseClickLeft(), manualCircleControler::MouseClickLeft(), manualContourPerpPlaneControler::MouseMove(), manualContour3VControler::MouseMove(), manualContour3V3DControler::MouseMove(), SelectPosibleContour(), and SelectPosiblePoint().
00701 { 00702 int ii = -1; 00703 if (_manContModel!=NULL){ 00704 double xx = x; 00705 double yy = y; 00706 double zz = z; 00707 TransfromCoordViewWorld(xx,yy,zz); 00708 ii=_manContModel->GetIdPoint(xx,yy,zz,_range,-1); 00709 } 00710 return ii; 00711 }
bool manualViewBaseContour::GetIfViewControlPoints | ( | ) |
Definition at line 470 of file manualViewBaseContour.cpp.
References _viewControlPoints.
Referenced by CopyAttributesTo().
00471 { 00472 return _viewControlPoints; 00473 }
void manualViewBaseContour::GetMinMax | ( | double & | minX, | |
double & | minY, | |||
double & | minZ, | |||
double & | maxX, | |||
double & | maxY, | |||
double & | maxZ | |||
) | [virtual] |
Definition at line 784 of file manualViewBaseContour.cpp.
References _manContModel, manualBaseModel::GetManualPoint(), manualBaseModel::GetSizeLstPoints(), manualPoint::GetX(), manualPoint::GetY(), and manualPoint::GetZ().
00785 { 00786 double pp[3]; 00787 manualPoint *mp; 00788 int i; 00789 int size=_manContModel->GetSizeLstPoints(); 00790 minX=99999; 00791 minY=99999; 00792 maxX=-99999; 00793 maxY=-99999; 00794 bool ifFindZ = minZ!=-1.0 && maxZ!=-1.0; 00795 if ( ifFindZ ) 00796 { 00797 minZ=99999; 00798 maxZ=-99999; 00799 } 00800 for( i = 0; i < size; i++ ) 00801 { 00802 mp=_manContModel->GetManualPoint(i); 00803 pp[0]=mp->GetX(); 00804 pp[1]=mp->GetY(); 00805 if ( ifFindZ ) 00806 pp[2]=mp->GetZ(); 00807 00808 // min X 00809 if (pp[0]<minX) 00810 { 00811 minX=pp[0]; 00812 } 00813 //min Y 00814 if (pp[1]<minY) 00815 { 00816 minY=pp[1]; 00817 } 00818 //max X 00819 if (pp[0]>maxX) 00820 { 00821 maxX=pp[0]; 00822 } 00823 // max Y 00824 if (pp[1]>maxY) 00825 { 00826 maxY=pp[1]; 00827 } 00828 if ( ifFindZ ) 00829 { 00830 // min Z 00831 if (pp[2]<minZ) 00832 { 00833 minZ=pp[2]; 00834 } 00835 // max Z 00836 if (pp[2]>maxZ) 00837 { 00838 maxZ=pp[2]; 00839 } 00840 } 00841 } 00842 if ( size<1 ) 00843 { 00844 minX = 0; 00845 maxX = 0; 00846 00847 minY = 0; 00848 maxY = 0; 00849 00850 minZ = 0; 00851 maxZ = 0; 00852 } 00853 }
int manualViewBaseContour::GetNumberOfPoints | ( | ) |
Definition at line 716 of file manualViewBaseContour.cpp.
References _lstViewPoints.
Referenced by wxMaracasCoutourTool::AnalisisContourInside(), manualViewRotationTool::GetMinMax(), manualViewCircle::GetMinMax(), manualContourBaseControler::GetNumberOfPointsManualContour(), manualRotationToolControler::MouseClickLeft(), manualRoiControler::MouseClickLeft(), manualLineControler::MouseClickLeft(), manualContourControler::MouseClickLeft(), manualCircleControler::MouseClickLeft(), manualViewPerpPlaneContour::RefreshContour(), manualViewRoi::RefreshContour(), manualViewPoints::RefreshContour(), manualViewContour::RefreshContour(), manualViewBullEye::RefreshContour(), and manualViewContour::RefreshText().
00717 { 00718 return _lstViewPoints.size(); 00719 }
bool manualViewBaseContour::GetPosibleSelected | ( | ) |
Definition at line 431 of file manualViewBaseContour.cpp.
References _posibleSelected.
Referenced by CopyAttributesTo(), manualContourBaseControler::MouseDLeft(), and manualViewContour::RefreshText().
00432 { 00433 return _posibleSelected; 00434 }
double manualViewBaseContour::GetRange | ( | ) |
Definition at line 754 of file manualViewBaseContour.cpp.
References _range.
Referenced by CopyAttributesTo(), manualView3VContour::GetIdPoint(), manualView3DContour::GetIdPoint2(), manualViewRoi::ifTouchContour(), manualViewContour::RefreshText(), manualViewPerpPlaneContour::UpdateViewPoint(), and manualView3VContour::UpdateViewPoint().
00755 { 00756 return _range; 00757 }
bool manualViewBaseContour::GetSelected | ( | ) |
Definition at line 426 of file manualViewBaseContour.cpp.
References _selected.
Referenced by CopyAttributesTo(), and DeleteSelectedPoints().
00427 { 00428 return _selected; 00429 }
void manualViewBaseContour::GetSpacing | ( | double | spc[3] | ) |
Definition at line 908 of file manualViewBaseContour.cpp.
References _spc.
Referenced by manualViewBullEye::ConstructVTKObjects().
int manualViewBaseContour::GetType | ( | ) | [virtual] |
Reimplemented in manualView3VContour, manualViewBullEye, manualViewCircle, manualViewContour, manualViewLine, manualViewPoints, manualViewRoi, and manualViewRotationTool.
Definition at line 54 of file manualViewBaseContour.cpp.
Referenced by Save().
00055 { 00056 // Information... 00057 //int manualViewBaseContour::GetType() 0; 00058 //int manualViewContour::GetType() 1; 00059 //int manualViewRoi::GetType() 2; 00060 //int manualViewCircle::GetType() 3; 00061 //int manualViewStar::GetType() 4; 00062 //int manualViewLine::GetType() 6; 00063 //int manualViewPoints::GetType() 7; 00064 00065 00066 return 0; 00067 }
double * manualViewBaseContour::GetVectorPointsXManualContour | ( | ) |
Definition at line 574 of file manualViewBaseContour.cpp.
References _pts, and _sizePointsContour.
Referenced by manualContourBaseControler::GetVectorPointsXManualContour().
00574 { 00575 double pp[3]; 00576 int i,size = _sizePointsContour; 00577 double *vx = (double*)malloc(sizeof(double)*size); 00578 for (i=0;i<size;i++){ 00579 _pts->GetPoint(i,pp); 00580 vx[i]=pp[0]; 00581 } 00582 return vx; 00583 }
double * manualViewBaseContour::GetVectorPointsYManualContour | ( | ) |
Definition at line 585 of file manualViewBaseContour.cpp.
References _pts, and _sizePointsContour.
Referenced by manualContourBaseControler::GetVectorPointsYManualContour().
00586 { 00587 double pp[3]; 00588 int i,size = _sizePointsContour; 00589 double *vy = (double*)malloc(sizeof(double)*size); 00590 for (i=0;i<size;i++){ 00591 _pts->GetPoint(i,pp); 00592 vy[i]=pp[1]; 00593 } 00594 return vy; 00595 }
double * manualViewBaseContour::GetVectorPointsZManualContour | ( | ) |
Definition at line 597 of file manualViewBaseContour.cpp.
References _pts, and _sizePointsContour.
00598 { 00599 double pp[3]; 00600 int i,size = _sizePointsContour; 00601 double *vz = (double*)malloc(sizeof(double)*size); 00602 for (i=0;i<size;i++){ 00603 _pts->GetPoint(i,pp); 00604 vz[i]=pp[2]; 00605 } 00606 return vz; 00607 }
double manualViewBaseContour::GetWidthLine | ( | ) |
Definition at line 232 of file manualViewBaseContour.cpp.
References _widthline.
Referenced by manualViewBullEye::ConstructVTKObjects().
00233 { 00234 return _widthline; 00235 }
wxVtkBaseView * manualViewBaseContour::GetWxVtkBaseView | ( | ) |
Definition at line 903 of file manualViewBaseContour.cpp.
References _wxvtkbaseview.
Referenced by AddPoint(), manualViewBullEye::ConstructVTKObjects(), manualViewPerpPlaneContour::FilterCordinateXYZ(), manualView3DContour::GetIdPoint2(), manualViewPerpPlaneContour::ifTouchContour(), InsertPoint(), manualViewPerpPlaneContour::RefreshContour(), and manualViewPerpPlaneContour::TransfromCoordViewWorld().
00904 { 00905 return this->_wxvtkbaseview; 00906 }
int manualViewBaseContour::GetZ | ( | ) |
Definition at line 764 of file manualViewBaseContour.cpp.
Referenced by CopyAttributesTo().
bool manualViewBaseContour::ifTouchContour | ( | int | x, | |
int | y, | |||
int | z | |||
) | [virtual] |
Reimplemented in manualView3VContour, manualViewContour, manualViewPoints, manualViewRoi, and manualViewPerpPlaneContour.
Definition at line 540 of file manualViewBaseContour.cpp.
Referenced by SelectPosibleContour().
void manualViewBaseContour::InitMove | ( | int | x, | |
int | y, | |||
int | z | |||
) | [virtual] |
Reimplemented in manualViewCircle, manualViewContour, manualViewLine, manualViewRoi, and manualViewRotationTool.
Definition at line 770 of file manualViewBaseContour.cpp.
Referenced by manualRotationToolControler::MouseClickLeft(), manualRoiControler::MouseClickLeft(), manualLineControler::MouseClickLeft(), manualContourControler::MouseClickLeft(), manualCircleControler::MouseClickLeft(), and manualContourBaseControler::OnMiddleButtonDown().
void manualViewBaseContour::InitTextActor | ( | ) |
Definition at line 288 of file manualViewBaseContour.cpp.
References _textActor.
Referenced by manualViewPoints::ConstructVTKObjects(), and ConstructVTKObjects().
00289 { 00290 // Text 00291 _textActor = vtkTextActor::New(); 00292 // _textActor->SetDisplayPosition(200, 200); 00293 _textActor->SetInput("00"); 00294 // Set coordinates to match the old vtkScaledTextActor default value 00295 // _textActor->GetPosition2Coordinate()->SetCoordinateSystemToNormalizedViewport(); 00296 // _textActor->GetPosition2Coordinate()->SetValue( 0.2 , 0.2 ); 00297 _textActor->GetPositionCoordinate()->SetCoordinateSystemToWorld (); 00298 // _textActor->GetPositionCoordinate()->SetValue( 0.8 , 0.8 ); 00299 00300 vtkTextProperty *tprop = _textActor->GetTextProperty(); 00301 tprop->SetFontSize(14); 00302 tprop->SetFontFamilyToArial(); 00303 tprop->SetColor(0, 0, 1); 00304 }
void manualViewBaseContour::InsertPoint | ( | int | id | ) |
Definition at line 357 of file manualViewBaseContour.cpp.
References _lstViewPoints, _spc, _wxvtkbaseview, manualViewPoint::CreateVtkPointActor(), wxVtkBaseView::GetRenderer(), GetWxVtkBaseView(), and manualViewPoint::SetSpacing().
Referenced by manualContourBaseControler::InsertPoint(), manualContour3VControler::InsertPoint(), and manualContour3VControler::InsertPoint_Others().
00358 { 00359 manualViewPoint *mvp = new manualViewPoint( this->GetWxVtkBaseView() ); 00360 00361 // EED 3 oct 2006 00362 mvp->SetSpacing(_spc); 00363 00364 std::vector<manualViewPoint*>::iterator itNum = _lstViewPoints.begin() + id; 00365 _lstViewPoints.insert(itNum,mvp); 00366 _wxvtkbaseview->GetRenderer()->AddActor( mvp->CreateVtkPointActor() ); 00367 }
void manualViewBaseContour::MoveContour | ( | int | horizontalUnits, | |
int | verticalUnits | |||
) | [virtual] |
Reimplemented in manualViewContour.
Definition at line 779 of file manualViewBaseContour.cpp.
void manualViewBaseContour::MoveContour | ( | int | x, | |
int | y, | |||
int | z | |||
) | [virtual] |
Reimplemented in manualViewCircle, manualViewContour, manualViewLine, manualViewRoi, and manualViewRotationTool.
Definition at line 775 of file manualViewBaseContour.cpp.
Referenced by manualRotationToolControler::MouseMove(), manualRoiControler::MouseMove(), manualLineControler::MouseMove(), manualContourControler::MouseMove(), manualCircleControler::MouseMove(), and manualContourBaseControler::OnChar().
void manualViewBaseContour::Open | ( | FILE * | pFile | ) | [virtual] |
Reimplemented in manualViewContour.
Definition at line 76 of file manualViewBaseContour.cpp.
void manualViewBaseContour::Refresh | ( | ) | [virtual] |
Reimplemented in manualViewPoints.
Definition at line 609 of file manualViewBaseContour.cpp.
References _contourVtkActor, _lstViewPoints, _show_text, _wxvtkbaseview, wxVtkBaseView::GetRenWin(), wxVtkBaseView::GetWxVTKRenderWindowInteractor(), RefreshContour(), RefreshText(), UpdateColorActor(), and UpdateViewPoint().
Referenced by AddCompleteContourActor(), ClearContour(), wxImageViewerWidget::CreateNewManualContour(), manualContour3VControler::DeleteActualMousePoint_Others(), DeleteContour(), DeletePoint(), DeleteSelectedPoints(), manualRotationToolControler::InitRoi(), manualRoiControler::InitRoi(), manualLineControler::InitRoi(), manualCircleControler::InitRoi(), manualRotationToolControler::MouseClickLeft(), manualRoiControler::MouseClickLeft(), manualLineControler::MouseClickLeft(), manualContourControler::MouseClickLeft(), manualCircleControler::MouseClickLeft(), manualContourControler::MouseDLeft(), manualRotationToolControler::MouseMove(), manualRoiControler::MouseMove(), manualLineControler::MouseMove(), manualContourControler::MouseMove(), manualCircleControler::MouseMove(), manualContour3VControler::MouseMove_Others(), manualContourBaseControler::OnChar(), manualContour3VControler::OnChar_Others(), wxWidgetMesure2D::OnCloseContour(), wxWidgetMesure2D::OnVisibleInformation(), wxWidgetMesure2D::OnVisibleMessureTool(), manualContourContainer::refreshLumen(), manualContourContainer::refreshWall(), RemoveCompleteContourActor(), manualContourContainer::setLumenVisibility(), manualContourContainer::setWallVisibility(), UnSelectAllPoints(), and UnSelectPoint().
00610 { 00611 if (_contourVtkActor!=NULL){ 00612 RefreshContour(); 00613 } 00614 int i,size=_lstViewPoints.size(); 00615 for (i=0;i<size;i++){ 00616 UpdateViewPoint(i); 00617 _lstViewPoints[i]->UpdateColorActor(); 00618 } 00619 UpdateColorActor(); 00620 00621 if (_show_text==true) 00622 { 00623 RefreshText(); 00624 } 00625 00626 vtkRenderWindowInteractor *vri = _wxvtkbaseview->GetWxVTKRenderWindowInteractor (); 00627 if (vri==NULL) 00628 { 00629 _wxvtkbaseview->GetRenWin()->Render(); 00630 printf("EED %p How to optimize manualViewBaseContour::Refresh() \n",this); 00631 } 00632 00633 }
void manualViewBaseContour::RefreshContour | ( | ) | [virtual] |
Reimplemented in manualView3VContour, manualViewBullEye, manualViewBullEyeSector, manualViewContour, manualViewPoints, manualViewRoi, and manualViewPerpPlaneContour.
Definition at line 570 of file manualViewBaseContour.cpp.
Referenced by AddCompleteContourActor(), Refresh(), and RemoveCompleteContourActor().
void manualViewBaseContour::RefreshText | ( | ) | [protected, virtual] |
Reimplemented in manualViewContour.
Definition at line 635 of file manualViewBaseContour.cpp.
References _textActor.
Referenced by Refresh().
00636 { 00637 if( _textActor!=NULL) 00638 _textActor -> SetInput("00"); 00639 }
void manualViewBaseContour::RemoveCompleteContourActor | ( | ) |
Definition at line 97 of file manualViewBaseContour.cpp.
References _wxvtkbaseview, wxVtkBaseView::GetRenderer(), Refresh(), RefreshContour(), RemoveControlPoints(), RemoveSplineActor(), and RemoveTextActor().
Referenced by DeleteContour().
00098 { 00099 /*vtkRenderer * theRenderer =*/ _wxvtkbaseview->GetRenderer(); // JPRx ?? 00100 //Removing the spline 00101 RemoveSplineActor(); 00102 RemoveTextActor(); 00103 00104 //Removing each point 00105 RemoveControlPoints(); 00106 RefreshContour(); 00107 Refresh(); 00108 }
void manualViewBaseContour::RemoveControlPoints | ( | ) | [virtual] |
Definition at line 158 of file manualViewBaseContour.cpp.
References _lstViewPoints, _wxvtkbaseview, wxVtkBaseView::GetRenderer(), and SetIfViewControlPoints().
Referenced by manualContourControler::MouseMove(), RemoveCompleteContourActor(), and manualContourBaseControler::SetEditable().
00159 { 00160 if (_wxvtkbaseview!=NULL){ 00161 vtkRenderer * theRenderer = _wxvtkbaseview->GetRenderer(); 00162 int i,size=_lstViewPoints.size(); 00163 for (i=0;i<size; i++) 00164 { 00165 vtkActor * pointActor = _lstViewPoints[i]->GetVtkActor(); 00166 theRenderer->RemoveActor( pointActor ); 00167 } // for 00168 } // if 00169 SetIfViewControlPoints( false ); 00170 }
void manualViewBaseContour::RemoveSplineActor | ( | ) | [virtual] |
Reimplemented in manualViewBullEye, and manualViewPoints.
Definition at line 151 of file manualViewBaseContour.cpp.
References _contourVtkActor, _wxvtkbaseview, and wxVtkBaseView::GetRenderer().
Referenced by RemoveCompleteContourActor().
00152 { 00153 vtkRenderer * theRenderer = _wxvtkbaseview->GetRenderer(); 00154 if (_contourVtkActor!=NULL) 00155 theRenderer->RemoveActor( _contourVtkActor ); 00156 }
void manualViewBaseContour::RemoveTextActor | ( | ) |
Definition at line 195 of file manualViewBaseContour.cpp.
References _show_text, _textActor, _wxvtkbaseview, and wxVtkBaseView::GetRenderer().
Referenced by RemoveCompleteContourActor().
00196 { 00197 if(_show_text) 00198 { 00199 _wxvtkbaseview->GetRenderer()->RemoveActor2D( _textActor ); 00200 } 00201 }
void manualViewBaseContour::Save | ( | FILE * | pFile | ) | [virtual] |
Reimplemented in manualViewContour.
Definition at line 70 of file manualViewBaseContour.cpp.
References GetType().
00071 { 00072 fprintf(pFile,"TypeView %d\n", GetType() ); 00073 }
void manualViewBaseContour::SelectAllPoints | ( | bool | select | ) |
Definition at line 457 of file manualViewBaseContour.cpp.
References _lstViewPoints, and SelectPoint().
00458 { 00459 int i,size=_lstViewPoints.size(); 00460 for (i=0;i<size;i++){ 00461 SelectPoint(i,select); 00462 } 00463 }
void manualViewBaseContour::SelectAllPossibleSelected | ( | bool | select | ) |
Definition at line 486 of file manualViewBaseContour.cpp.
References _lstViewPoints, and SetPointPosibleSelected().
Referenced by manualContour3VControler::MouseMove_Others(), SelectPosiblePoint(), and manualView3DContour::SelectPosiblePoint().
00487 { 00488 int i,size=_lstViewPoints.size(); 00489 for (i=0;i<size;i++){ 00490 SetPointPosibleSelected(i,select); 00491 } 00492 }
void manualViewBaseContour::SelectLstPoints | ( | ) |
Definition at line 452 of file manualViewBaseContour.cpp.
void manualViewBaseContour::SelectPoint | ( | int | i, | |
bool | select | |||
) |
Definition at line 447 of file manualViewBaseContour.cpp.
References _lstViewPoints.
Referenced by SelectAllPoints().
00448 { 00449 _lstViewPoints[i]->SetSelected(select); 00450 }
bool manualViewBaseContour::SelectPosibleContour | ( | int | x, | |
int | y, | |||
int | z | |||
) |
Definition at line 506 of file manualViewBaseContour.cpp.
References _lstViewPoints, _posibleSelected, _selected, GetEditable(), GetIdPoint(), ifTouchContour(), and SetPosibleSelected().
Referenced by manualContourBaseControler::MouseDLeft(), manualRotationToolControler::MouseMove(), manualRoiControler::MouseMove(), manualLineControler::MouseMove(), manualContourControler::MouseMove(), manualCircleControler::MouseMove(), and manualContourBaseControler::MouseReleaseLeft().
00507 { 00508 bool result=false; 00509 SetPosibleSelected(result); 00510 int id = GetIdPoint(x,y,z); 00511 00512 if( !GetEditable() && !_selected && id!= -1) 00513 { 00514 result=true; 00515 _posibleSelected=true; 00516 } 00517 else 00518 { 00519 if ( (GetEditable()==true) && (id==-1 ) && (this->_lstViewPoints.size()>=2) ) 00520 { 00521 if (ifTouchContour(x,y,z)==true) 00522 { 00523 result=true; 00524 SetPosibleSelected(result); 00525 } 00526 } 00527 00528 if (GetEditable()==false) 00529 { 00530 if (ifTouchContour(x,y,z)==true) 00531 { 00532 result=true; 00533 SetPosibleSelected(result); 00534 } 00535 } 00536 } 00537 return result; 00538 }
int manualViewBaseContour::SelectPosiblePoint | ( | int | x, | |
int | y, | |||
int | z | |||
) | [virtual] |
Reimplemented in manualView3DContour.
Definition at line 494 of file manualViewBaseContour.cpp.
References GetIdPoint(), SelectAllPossibleSelected(), and SetPointPosibleSelected().
Referenced by manualContourBaseControler::MouseDLeft(), manualRotationToolControler::MouseMove(), manualRoiControler::MouseMove(), manualLineControler::MouseMove(), manualContourControler::MouseMove(), and manualCircleControler::MouseMove().
00495 { 00496 SelectAllPossibleSelected(false); 00497 00498 int id = GetIdPoint(x,y,z); 00499 if (id!=-1) 00500 { 00501 SetPointPosibleSelected(id,true); 00502 } 00503 return id; 00504 }
void manualViewBaseContour::SetColorEditContour | ( | double | r, | |
double | g, | |||
double | b | |||
) |
Definition at line 655 of file manualViewBaseContour.cpp.
References _coulorEdit_b, _coulorEdit_g, and _coulorEdit_r.
Referenced by wxEmptyPanel_3_Widget::ConfigureVTK(), wxMaracasCoutourTool::ConfigureVTK(), CopyAttributesTo(), manualContourContainer::createLumenContour(), manualContourContainer::createWallContour(), manualContourContainer::restartLumenContour(), and manualContourContainer::restartWallContour().
00656 { 00657 _coulorEdit_r = r; 00658 _coulorEdit_g = g; 00659 _coulorEdit_b = b; 00660 }
void manualViewBaseContour::SetColorNormalContour | ( | double | r, | |
double | g, | |||
double | b | |||
) |
Definition at line 641 of file manualViewBaseContour.cpp.
References _coulorNormal_b, _coulorNormal_g, and _coulorNormal_r.
Referenced by wxEmptyPanel_3_Widget::ConfigureVTK(), wxMaracasCoutourTool::ConfigureVTK(), manualViewBullEye::ConstructVTKObjects(), CopyAttributesTo(), manualContourContainer::createLumenContour(), manualContourContainer::createWallContour(), manualContourContainer::restartLumenContour(), and manualContourContainer::restartWallContour().
00642 { 00643 _coulorNormal_r = r; 00644 _coulorNormal_g = g; 00645 _coulorNormal_b = b; 00646 }
void manualViewBaseContour::SetColorSelectContour | ( | double | r, | |
double | g, | |||
double | b | |||
) |
Definition at line 669 of file manualViewBaseContour.cpp.
References _coulorSelection_b, _coulorSelection_g, and _coulorSelection_r.
Referenced by CopyAttributesTo().
00670 { 00671 _coulorSelection_r = r; 00672 _coulorSelection_g = g; 00673 _coulorSelection_b = b; 00674 }
void manualViewBaseContour::SetEditable | ( | bool * | condition | ) |
Definition at line 421 of file manualViewBaseContour.cpp.
References _editable.
Referenced by manualContourBaseControler::SetModelView().
00422 { 00423 _editable = condition; 00424 }
void manualViewBaseContour::SetIfViewControlPoints | ( | bool | ifShow | ) |
Definition at line 465 of file manualViewBaseContour.cpp.
References _viewControlPoints.
Referenced by AddControlPoints(), CopyAttributesTo(), and RemoveControlPoints().
00466 { 00467 _viewControlPoints = ifShow; 00468 }
void manualViewBaseContour::SetModel | ( | manualBaseModel * | manContModel | ) |
Definition at line 562 of file manualViewBaseContour.cpp.
References _manContModel.
Referenced by wxWidgetMesure2D::ConfigureA(), wxManualTree_MPRWidget::ConfigureContour(), wxEmptyPanel_3_Widget::ConfigureVTK(), ContourVOIWidget::ConfigureVTK(), wxMaracasCoutourTool::ConfigureVTK(), wxImageViewerWidget::ConstructVTK(), manualViewBullEye::ConstructVTKObjects(), manualContourContainer::createLumenContour(), manualContourContainer::createWallContour(), wxMaracasImageBrowser02::LoadData(), manualContourContainer::restartLumenContour(), and manualContourContainer::restartWallContour().
00562 { 00563 _manContModel=manContModel; 00564 }
void manualViewBaseContour::SetPointPosibleSelected | ( | int | id, | |
bool | select | |||
) |
Definition at line 476 of file manualViewBaseContour.cpp.
References _lstViewPoints.
Referenced by manualContour3VControler::MouseMove_Others(), SelectAllPossibleSelected(), SelectPosiblePoint(), and manualView3DContour::SelectPosiblePoint().
00477 { 00478 _lstViewPoints[id]->SetPosibleSelected(select); 00479 }
void manualViewBaseContour::SetPointSelected | ( | int | id, | |
bool | select | |||
) |
Definition at line 481 of file manualViewBaseContour.cpp.
References _lstViewPoints.
00482 { 00483 _lstViewPoints[id]->SetSelected(select); 00484 }
void manualViewBaseContour::SetPosibleSelected | ( | bool | posibleSelected | ) |
Definition at line 411 of file manualViewBaseContour.cpp.
References _posibleSelected.
Referenced by CopyAttributesTo(), manualContour3VControler::MouseMove_Others(), and SelectPosibleContour().
00412 { 00413 _posibleSelected=posibleSelected; 00414 }
void manualViewBaseContour::SetRange | ( | double | range | ) |
Definition at line 749 of file manualViewBaseContour.cpp.
References _range.
Referenced by manualContourContainer::addCalcificationContour(), manualContourContainer::addHypodenseContour(), wxWidgetMesure2D::ConfigureA(), wxManualTree_MPRWidget::ConfigureContour(), wxEmptyPanel_3_Widget::ConfigureVTK(), ContourVOIWidget::ConfigureVTK(), wxMaracasCoutourTool::ConfigureVTK(), wxImageViewerWidget::ConstructVTK(), manualViewBullEye::ConstructVTKObjects(), CopyAttributesTo(), manualContourContainer::createLumenContour(), manualContourContainer::createWallContour(), wxMaracasImageBrowser02::LoadData(), manualContourContainer::restartLumenContour(), and manualContourContainer::restartWallContour().
00750 { 00751 _range=range; 00752 }
void manualViewBaseContour::SetSelected | ( | bool | selected | ) |
Definition at line 406 of file manualViewBaseContour.cpp.
References _selected.
Referenced by CopyAttributesTo(), manualContourControler::MouseClickLeft(), and manualContourBaseControler::SetEditable().
00407 { 00408 _selected=selected; 00409 }
void manualViewBaseContour::SetShowText | ( | bool | ok | ) |
Definition at line 894 of file manualViewBaseContour.cpp.
References _show_text, and _textActor.
Referenced by wxWidgetMesure2D::OnVisibleInformation().
00895 { 00896 _show_text = ok; 00897 if (_show_text==false && _textActor!=NULL) 00898 { 00899 _textActor->SetInput("00"); 00900 } 00901 }
void manualViewBaseContour::SetSpacing | ( | double | spc[3] | ) |
Definition at line 915 of file manualViewBaseContour.cpp.
References _spc.
Referenced by wxManualTree_MPRWidget::ConfigureContour(), wxEmptyPanel_3_Widget::ConfigureVTK(), ContourVOIWidget::ConfigureVTK(), wxMaracasCoutourTool::ConfigureVTK(), manualViewBullEye::ConstructVTKObjects(), CopyAttributesTo(), and wxMaracasImageBrowser02::LoadData().
void manualViewBaseContour::SetVisible | ( | bool | ok | ) |
Definition at line 873 of file manualViewBaseContour.cpp.
References _contourVtkActor, _lstViewPoints, and _textActor.
Referenced by wxWidgetMesure2D::OnActiveMessureTool(), wxWidgetMesure2D::OnVisibleMessureTool(), manualContourContainer::setLumenVisibility(), and manualContourContainer::setWallVisibility().
00874 { 00875 double opacity; 00876 if (ok==true) 00877 { 00878 opacity=1; 00879 } else { 00880 opacity=0.5; 00881 } 00882 vtkActor *actor; 00883 int i,size=_lstViewPoints.size(); 00884 for (i=0;i<size;i++){ 00885 actor = _lstViewPoints[i]->GetVtkActor(); 00886 actor->GetProperty()->SetOpacity( opacity ); 00887 } 00888 _contourVtkActor->GetProperty()->SetOpacity( opacity ); 00889 _textActor->GetProperty()->SetOpacity( opacity ); 00890 _textActor->SetInput("00"); 00891 00892 }
void manualViewBaseContour::SetWidthLine | ( | double | width | ) |
Definition at line 217 of file manualViewBaseContour.cpp.
References _lstViewPoints, _widthline, and UpdateColorActor().
Referenced by manualViewBullEye::ConstructVTKObjects().
00218 { 00219 _widthline = width; 00220 this->UpdateColorActor(); 00221 00222 // for the control points 00223 int id, size = _lstViewPoints.size(); 00224 for( id=0; id<size; id++) 00225 { 00226 this->_lstViewPoints[id]->SetWidthLine(_widthline); 00227 } 00228 00229 }
void manualViewBaseContour::SetWxVtkBaseView | ( | wxVtkBaseView * | wxvtkbaseview | ) |
Definition at line 566 of file manualViewBaseContour.cpp.
References _wxvtkbaseview.
Referenced by wxWidgetMesure2D::ConfigureA(), wxManualTree_MPRWidget::ConfigureContour(), wxEmptyPanel_3_Widget::ConfigureVTK(), ContourVOIWidget::ConfigureVTK(), wxMaracasCoutourTool::ConfigureVTK(), wxImageViewerWidget::ConstructVTK(), manualViewBullEye::ConstructVTKObjects(), CopyAttributesTo(), manualContourContainer::createLumenContour(), manualContourContainer::createWallContour(), wxMaracasImageBrowser02::LoadData(), manualContourContainer::restartLumenContour(), and manualContourContainer::restartWallContour().
00566 { 00567 _wxvtkbaseview = wxvtkbaseview; 00568 }
void manualViewBaseContour::SetZ | ( | int | z | ) |
Definition at line 759 of file manualViewBaseContour.cpp.
Referenced by wxEmptyPanel_3_Widget::ConfigureVTK(), ContourVOIWidget::ConfigureVTK(), wxMaracasCoutourTool::ConfigureVTK(), manualViewBullEye::ConstructVTKObjects(), CopyAttributesTo(), manualContourContainer::createLumenContour(), manualContourContainer::createWallContour(), manualContourContainer::restartLumenContour(), and manualContourContainer::restartWallContour().
void manualViewBaseContour::TransfromCoordViewWorld | ( | double & | X, | |
double & | Y, | |||
double & | Z, | |||
int | type = 2 | |||
) | [virtual] |
Reimplemented in manualView3DContour, and manualViewPerpPlaneContour.
Definition at line 737 of file manualViewBaseContour.cpp.
References _wxvtkbaseview, and wxVtkBaseView::TransFromCoordScreenToWorld().
Referenced by manualContourBaseControler::AddPoint(), manualContour3VControler::AddPoint(), GetIdPoint(), manualView3VContour::GetIdPoint(), manualViewRoi::ifTouchContour(), manualViewPoints::ifTouchContour(), manualViewContour::ifTouchContour(), manualView3VContour::ifTouchContour(), manualViewRotationTool::InitMove(), manualViewRoi::InitMove(), manualViewLine::InitMove(), manualViewContour::InitMove(), manualViewCircle::InitMove(), manualContourBaseControler::InsertPoint(), manualContour3VControler::InsertPoint(), manualContourBaseControler::Magnet(), manualViewRotationTool::MoveContour(), manualViewRoi::MoveContour(), manualViewLine::MoveContour(), manualViewContour::MoveContour(), manualViewCircle::MoveContour(), manualContourBaseControler::SetPoint(), manualContour3VControler::SetPoint(), manualContourBaseControler::SetPointX(), manualContourBaseControler::SetPointY(), and manualContourBaseControler::SetPointZ().
00738 { 00739 _wxvtkbaseview->TransFromCoordScreenToWorld(X, Y, Z,false, type); 00740 00741 00742 //EED 27 sep 2007 00743 // //EEDx6 00744 // wxVtk2DBaseView *wxvtk2Dbaseview = (wxVtk2DBaseView*)_wxvtkbaseview; 00745 // wxvtk2Dbaseview->TransformCoordinate_spacing_ModelToView(X,Y,Z); 00746 00747 }
void manualViewBaseContour::UnSelectAllPoints | ( | ) |
Definition at line 554 of file manualViewBaseContour.cpp.
References _lstViewPoints, Refresh(), and UnSelectPoint().
00554 { 00555 int i,size=_lstViewPoints.size(); 00556 for (i=0;i<size;i++){ 00557 UnSelectPoint(i); 00558 } 00559 Refresh(); 00560 }
void manualViewBaseContour::UnSelectLstPoints | ( | ) |
Definition at line 550 of file manualViewBaseContour.cpp.
void manualViewBaseContour::UnSelectPoint | ( | int | i | ) |
Definition at line 545 of file manualViewBaseContour.cpp.
References _lstViewPoints, and Refresh().
Referenced by UnSelectAllPoints().
00545 { 00546 _lstViewPoints[i]->SetSelected(false); 00547 Refresh(); 00548 }
void manualViewBaseContour::UpdateColorActor | ( | ) |
Definition at line 683 of file manualViewBaseContour.cpp.
References _contourVtkActor, _coulorEdit_b, _coulorEdit_g, _coulorEdit_r, _coulorNormal_b, _coulorNormal_g, _coulorNormal_r, _coulorSelection_b, _coulorSelection_g, _coulorSelection_r, _posibleSelected, _selected, _widthline, and GetEditable().
Referenced by ConstructVTKObjects(), Refresh(), and SetWidthLine().
00684 { 00685 if (_contourVtkActor!=NULL) 00686 { 00687 _contourVtkActor->GetProperty()->SetLineWidth( _widthline ); 00688 _contourVtkActor->GetProperty()->SetDiffuseColor( _coulorNormal_r , _coulorNormal_g , _coulorNormal_b ); 00689 if (_posibleSelected || (_posibleSelected && GetEditable() ) ) 00690 { 00691 _contourVtkActor->GetProperty()->SetDiffuseColor( _coulorEdit_r , _coulorEdit_g , _coulorEdit_b ); 00692 } 00693 if( _selected ) 00694 { 00695 _contourVtkActor->GetProperty()->SetDiffuseColor( _coulorSelection_r , _coulorSelection_g , _coulorSelection_b ); 00696 } 00697 } 00698 }
void manualViewBaseContour::UpdateViewPoint | ( | int | id | ) | [virtual] |
Reimplemented in manualView3VContour, and manualViewPerpPlaneContour.
Definition at line 316 of file manualViewBaseContour.cpp.
References _lstViewPoints, _manContModel, _range, manualBaseModel::GetManualPoint(), manualPoint::GetX(), manualPoint::GetY(), and manualPoint::GetZ().
Referenced by manualRotationToolControler::InitRoi(), manualRoiControler::InitRoi(), manualLineControler::InitRoi(), manualCircleControler::InitRoi(), manualViewRotationTool::MoveContour(), manualViewRoi::MoveContour(), manualViewLine::MoveContour(), manualViewCircle::MoveContour(), Refresh(), manualContourBaseControler::SetPoint(), manualContourBaseControler::SetPointX(), manualContourBaseControler::SetPointY(), manualContourBaseControler::SetPointZ(), manualRoiControler::SetRoi(), and UpdateViewPoints().
00317 { 00318 manualPoint *mp = _manContModel->GetManualPoint(id); 00319 00320 //EEDx6 00321 double XX=mp->GetX(),YY=mp->GetY(),ZZ=mp->GetZ(); 00322 // wxVtk2DBaseView *wxvtk2Dbasevie = (wxVtk2DBaseView*)this->GetWxVtkBaseView(); 00323 // wxvtk2Dbasevie->TransformCoordinate_spacing_ModelToView(XX,YY,ZZ); 00324 00325 _lstViewPoints[id]->SetPositionXY( XX , YY ,_range, ZZ ); 00326 }
void manualViewBaseContour::UpdateViewPoints | ( | ) | [virtual] |
Definition at line 329 of file manualViewBaseContour.cpp.
References _lstViewPoints, and UpdateViewPoint().
Referenced by manualViewContour::MoveContour().
00330 { 00331 int id, size = _lstViewPoints.size(); 00332 for( id=0; id<size; id++) 00333 { 00334 UpdateViewPoint( id ); 00335 } 00336 }
vtkPolyDataMapper* manualViewBaseContour::_bboxMapper [private] |
Definition at line 175 of file manualViewBaseContour.h.
Referenced by ConstructVTKObjects(), DeleteVtkObjects(), and manualViewBaseContour().
vtkActor* manualViewBaseContour::_contourVtkActor [private] |
Definition at line 174 of file manualViewBaseContour.h.
Referenced by AddSplineActor(), ClearContour(), ConstructVTKObjects(), DeleteVtkObjects(), manualViewBaseContour(), Refresh(), RemoveSplineActor(), SetVisible(), and UpdateColorActor().
double manualViewBaseContour::_coulorEdit_b [protected] |
Definition at line 190 of file manualViewBaseContour.h.
Referenced by CopyAttributesTo(), GetColorEditContour(), manualViewBaseContour(), manualViewPoints::RefreshContour(), SetColorEditContour(), and UpdateColorActor().
double manualViewBaseContour::_coulorEdit_g [protected] |
Definition at line 189 of file manualViewBaseContour.h.
Referenced by CopyAttributesTo(), GetColorEditContour(), manualViewBaseContour(), manualViewPoints::RefreshContour(), SetColorEditContour(), and UpdateColorActor().
double manualViewBaseContour::_coulorEdit_r [protected] |
Definition at line 188 of file manualViewBaseContour.h.
Referenced by CopyAttributesTo(), GetColorEditContour(), manualViewBaseContour(), manualViewPoints::RefreshContour(), SetColorEditContour(), and UpdateColorActor().
double manualViewBaseContour::_coulorNormal_b [protected] |
Definition at line 193 of file manualViewBaseContour.h.
Referenced by CopyAttributesTo(), GetColorNormalContour(), manualViewBaseContour(), manualViewPoints::RefreshContour(), SetColorNormalContour(), and UpdateColorActor().
double manualViewBaseContour::_coulorNormal_g [protected] |
Definition at line 192 of file manualViewBaseContour.h.
Referenced by CopyAttributesTo(), GetColorNormalContour(), manualViewBaseContour(), manualViewPoints::RefreshContour(), SetColorNormalContour(), and UpdateColorActor().
double manualViewBaseContour::_coulorNormal_r [protected] |
Definition at line 191 of file manualViewBaseContour.h.
Referenced by CopyAttributesTo(), GetColorNormalContour(), manualViewBaseContour(), manualViewPoints::RefreshContour(), SetColorNormalContour(), and UpdateColorActor().
double manualViewBaseContour::_coulorSelection_b [protected] |
Definition at line 196 of file manualViewBaseContour.h.
Referenced by CopyAttributesTo(), GetColorSelectContour(), manualViewBaseContour(), manualViewPoints::RefreshContour(), SetColorSelectContour(), and UpdateColorActor().
double manualViewBaseContour::_coulorSelection_g [protected] |
Definition at line 195 of file manualViewBaseContour.h.
Referenced by CopyAttributesTo(), GetColorSelectContour(), manualViewBaseContour(), manualViewPoints::RefreshContour(), SetColorSelectContour(), and UpdateColorActor().
double manualViewBaseContour::_coulorSelection_r [protected] |
Definition at line 194 of file manualViewBaseContour.h.
Referenced by CopyAttributesTo(), GetColorSelectContour(), manualViewBaseContour(), manualViewPoints::RefreshContour(), SetColorSelectContour(), and UpdateColorActor().
bool* manualViewBaseContour::_editable [protected] |
Definition at line 208 of file manualViewBaseContour.h.
Referenced by GetEditable(), and SetEditable().
int manualViewBaseContour::_id_viewPoint_for_text [protected] |
Definition at line 214 of file manualViewBaseContour.h.
Referenced by manualViewContour::manualViewContour(), and manualViewContour::RefreshText().
std::vector<manualViewPoint*> manualViewBaseContour::_lstViewPoints [protected] |
Definition at line 230 of file manualViewBaseContour.h.
Referenced by AddControlPoints(), AddPoint(), ClearContour(), CopyAttributesTo(), DeleteContour(), manualViewContour::DeletePoint(), DeletePoint(), DeleteSelectedPoints(), GetNumberOfPoints(), InsertPoint(), Refresh(), manualViewContour::RefreshText(), RemoveControlPoints(), SelectAllPoints(), SelectAllPossibleSelected(), SelectPoint(), SelectPosibleContour(), SetPointPosibleSelected(), SetPointSelected(), SetVisible(), SetWidthLine(), UnSelectAllPoints(), UnSelectPoint(), manualViewPerpPlaneContour::UpdateViewPoint(), UpdateViewPoint(), manualView3VContour::UpdateViewPoint(), UpdateViewPoints(), and ~manualViewBaseContour().
manualBaseModel* manualViewBaseContour::_manContModel [protected] |
Definition at line 220 of file manualViewBaseContour.h.
Referenced by manualViewBullEye::ConstructVTKObjects(), ConstructVTKObjects(), GetIdPoint(), manualView3VContour::GetIdPoint(), manualView3DContour::GetIdPoint2(), manualViewRotationTool::GetMinMax(), manualViewRoi::GetMinMax(), manualViewCircle::GetMinMax(), GetMinMax(), manualViewPoints::ifTouchContour(), manualViewContour::ifTouchContour(), manualView3VContour::ifTouchContour(), manualViewRotationTool::InitMove(), manualViewRoi::InitMove(), manualViewLine::InitMove(), manualViewContour::InitMove(), manualViewCircle::InitMove(), manualViewBaseContour(), manualViewRotationTool::MoveContour(), manualViewRoi::MoveContour(), manualViewLine::MoveContour(), manualViewContour::MoveContour(), manualViewCircle::MoveContour(), manualViewPerpPlaneContour::RefreshContour(), manualViewRoi::RefreshContour(), manualViewPoints::RefreshContour(), manualViewContour::RefreshContour(), manualViewBullEyeSector::RefreshContour(), manualViewBullEye::RefreshContour(), manualView3VContour::RefreshContour(), manualViewContour::RefreshText(), SetModel(), manualViewPerpPlaneContour::UpdateViewPoint(), UpdateViewPoint(), and manualView3VContour::UpdateViewPoint().
vtkPolyData* manualViewBaseContour::_pd [private] |
Definition at line 173 of file manualViewBaseContour.h.
Referenced by ConstructVTKObjects(), DeleteVtkObjects(), and manualViewBaseContour().
bool manualViewBaseContour::_posibleSelected [protected] |
Definition at line 209 of file manualViewBaseContour.h.
Referenced by GetPosibleSelected(), manualViewBaseContour(), manualViewPoints::RefreshContour(), SelectPosibleContour(), SetPosibleSelected(), and UpdateColorActor().
vtkPoints* manualViewBaseContour::_pts [protected] |
Definition at line 222 of file manualViewBaseContour.h.
Referenced by ConstructVTKObjects(), DeleteVtkObjects(), GetVectorPointsXManualContour(), GetVectorPointsYManualContour(), GetVectorPointsZManualContour(), manualViewPerpPlaneContour::ifTouchContour(), manualViewContour::ifTouchContour(), manualView3VContour::ifTouchContour(), manualViewBaseContour(), manualViewPerpPlaneContour::RefreshContour(), manualViewRoi::RefreshContour(), manualViewContour::RefreshContour(), manualViewBullEyeSector::RefreshContour(), and manualView3VContour::RefreshContour().
double manualViewBaseContour::_range [protected] |
Definition at line 186 of file manualViewBaseContour.h.
Referenced by GetIdPoint(), GetRange(), manualViewPoints::ifTouchContour(), manualViewBaseContour(), manualViewPoints::RefreshContour(), SetRange(), and UpdateViewPoint().
bool manualViewBaseContour::_selected [protected] |
Definition at line 207 of file manualViewBaseContour.h.
Referenced by GetSelected(), manualViewBaseContour(), manualViewPoints::RefreshContour(), SelectPosibleContour(), SetSelected(), and UpdateColorActor().
bool manualViewBaseContour::_show_text [protected] |
Definition at line 213 of file manualViewBaseContour.h.
Referenced by AddTextActor(), manualViewBaseContour(), Refresh(), RemoveTextActor(), and SetShowText().
int manualViewBaseContour::_sizePointsContour [protected] |
Definition at line 224 of file manualViewBaseContour.h.
Referenced by GetVectorPointsXManualContour(), GetVectorPointsYManualContour(), GetVectorPointsZManualContour(), manualViewContour::ifTouchContour(), manualView3VContour::ifTouchContour(), manualViewBaseContour(), manualViewLine::manualViewLine(), and manualViewRoi::manualViewRoi().
double manualViewBaseContour::_spc[3] [protected] |
Definition at line 235 of file manualViewBaseContour.h.
Referenced by AddPoint(), CopyAttributesTo(), GetSpacing(), manualViewPoints::ifTouchContour(), manualViewContour::ifTouchContour(), manualView3VContour::ifTouchContour(), InsertPoint(), manualViewBaseContour(), manualViewPerpPlaneContour::RefreshContour(), manualViewRoi::RefreshContour(), manualViewContour::RefreshContour(), manualViewBullEyeSector::RefreshContour(), manualViewContour::RefreshText(), and SetSpacing().
vtkTextActor* manualViewBaseContour::_textActor [protected] |
Definition at line 215 of file manualViewBaseContour.h.
Referenced by AddTextActor(), InitTextActor(), manualViewBaseContour(), manualViewContour::RefreshText(), RefreshText(), RemoveTextActor(), SetShowText(), and SetVisible().
bool manualViewBaseContour::_viewControlPoints [protected] |
Definition at line 210 of file manualViewBaseContour.h.
Referenced by AddCompleteContourActor(), AddControlPoints(), GetIfViewControlPoints(), manualViewBaseContour(), and SetIfViewControlPoints().
double manualViewBaseContour::_widthline [protected] |
Definition at line 197 of file manualViewBaseContour.h.
Referenced by GetWidthLine(), manualViewBaseContour(), SetWidthLine(), and UpdateColorActor().
wxVtkBaseView* manualViewBaseContour::_wxvtkbaseview [protected] |
Definition at line 202 of file manualViewBaseContour.h.
Referenced by AddCompleteContourActor(), AddControlPoints(), AddPoint(), manualViewPoints::AddSplineActor(), AddSplineActor(), AddTextActor(), ClearContour(), CopyAttributesTo(), DeletePoint(), GetWxVtkBaseView(), InsertPoint(), manualViewBaseContour(), Refresh(), manualViewPoints::RefreshContour(), RemoveCompleteContourActor(), RemoveControlPoints(), manualViewPoints::RemoveSplineActor(), RemoveSplineActor(), RemoveTextActor(), SetWxVtkBaseView(), and TransfromCoordViewWorld().