manualView3DContour Class Reference

#include <manualView3DContour.h>

Inheritance diagram for manualView3DContour:
Inheritance graph
[legend]
Collaboration diagram for manualView3DContour:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 manualView3DContour ()
virtual ~manualView3DContour ()
virtual manualView3DContourClone ()
void CopyAttributesTo (manualView3DContour *cloneObject)
virtual void TransfromCoordViewWorld (double &X, double &Y, double &Z, int type)
void SetVtkMPRBaseData (vtkMPRBaseData *vtkmprbasedata)
virtual int SelectPosiblePoint (int x, int y, int z)
void SetDimensions (int w, int h, int d)
int GetIdPoint2 (int x, int y)
virtual int GetType ()
virtual void Save (FILE *pFile)
virtual void Open (FILE *pFile)
virtual void RefreshContour ()
virtual bool ifTouchContour (int x, int y, int z)
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 DeletePoint (int id)
void DeletePoint (int x, int y, int z)
virtual void ClearPoint (int id)
void SetMesureScale (double mesureScale)
void AddPoint ()
virtual void AddPoint (manualViewPoint *manualViewPoint)
void InsertPoint (int id)
void DeleteContour ()
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)
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 ()
void UpdateColorActor ()
void SetRange (double range)
double GetRange ()
void SetZ (int z)
int GetZ ()
wxVtkBaseViewGetWxVtkBaseView ()
virtual void GetMinMax (double &minX, double &minY, double &minZ, double &maxX, double &maxY, double &maxZ)
void ClearContour ()
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 ()
void SetWidthLine (double width)
double GetWidthLine ()
virtual void ConstructVTKObjects ()

Protected Attributes

vtkMPRBaseData_vtkmprbasedata
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 Attributes

int _w
int _h
int _d

Detailed Description

Definition at line 10 of file manualView3DContour.h.


Constructor & Destructor Documentation

manualView3DContour::manualView3DContour (  ) 

Definition at line 6 of file manualView3DContour.cpp.

Referenced by Clone().

00007 {
00008 }

Here is the caller graph for this function:

manualView3DContour::~manualView3DContour (  )  [virtual]

Definition at line 10 of file manualView3DContour.cpp.

00011 {
00012 }


Member Function Documentation

void manualViewBaseContour::AddCompleteContourActor ( bool  ifControlPoints = false  )  [inherited]

Definition at line 81 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_viewControlPoints, manualViewBaseContour::_wxvtkbaseview, manualViewBaseContour::AddControlPoints(), manualViewBaseContour::AddSplineActor(), manualViewBaseContour::AddTextActor(), wxVtkBaseView::GetRenderer(), manualViewBaseContour::Refresh(), and manualViewBaseContour::RefreshContour().

Referenced by manualViewBaseContour::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 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualViewBaseContour::AddControlPoints (  )  [virtual, inherited]

Definition at line 172 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_lstViewPoints, manualViewBaseContour::_viewControlPoints, manualViewBaseContour::_wxvtkbaseview, wxVtkBaseView::GetRenderer(), and manualViewBaseContour::SetIfViewControlPoints().

Referenced by manualViewBaseContour::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 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualViewBaseContour::AddPoint ( manualViewPoint manualViewPoint  )  [virtual, inherited]

Definition at line 345 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_lstViewPoints, manualViewBaseContour::_spc, manualViewBaseContour::_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 }

Here is the call graph for this function:

void manualViewBaseContour::AddPoint (  )  [inherited]
void manualViewBaseContour::AddSplineActor (  )  [virtual, inherited]

Reimplemented in manualViewBullEye, and manualViewPoints.

Definition at line 144 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_contourVtkActor, manualViewBaseContour::_wxvtkbaseview, and wxVtkBaseView::GetRenderer().

Referenced by manualViewBaseContour::AddCompleteContourActor().

00145 {
00146         vtkRenderer * theRenderer = _wxvtkbaseview->GetRenderer();
00147         if (_contourVtkActor!=NULL)
00148                 theRenderer->AddActor( _contourVtkActor  );
00149 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualViewBaseContour::AddTextActor (  )  [inherited]

Definition at line 187 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_show_text, manualViewBaseContour::_textActor, manualViewBaseContour::_wxvtkbaseview, and wxVtkBaseView::GetRenderer().

Referenced by manualViewBaseContour::AddCompleteContourActor(), and manualContourControler::MouseDLeft().

00188 {
00189         if(_show_text)
00190         {
00191                 _wxvtkbaseview->GetRenderer()->AddActor2D( _textActor );
00192         }
00193 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualViewBaseContour::ClearContour (  )  [inherited]

Definition at line 855 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_contourVtkActor, manualViewBaseContour::_lstViewPoints, manualViewBaseContour::_wxvtkbaseview, manualViewBaseContour::ClearPoint(), manualViewBaseContour::DeleteVtkObjects(), wxVtkBaseView::GetRenderer(), and manualViewBaseContour::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 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualViewContour::ClearPoint ( int  id  )  [virtual, inherited]

Reimplemented from manualViewBaseContour.

Definition at line 230 of file manualViewContour.cpp.

References manualViewContour::DeletePoint().

00231 {
00232         manualViewBaseContour::DeletePoint( id );
00233 }

Here is the call graph for this function:

manualView3DContour * manualView3DContour::Clone (  )  [virtual]

Reimplemented from manualViewContour.

Definition at line 15 of file manualView3DContour.cpp.

References CopyAttributesTo(), and manualView3DContour().

00016 {
00017         manualView3DContour * clone = new manualView3DContour();
00018         CopyAttributesTo(clone);
00019         return clone;
00020 }

Here is the call graph for this function:

void manualViewBaseContour::ConstructVTKObjects (  )  [virtual, inherited]

Reimplemented in manualViewBullEye, and manualViewPoints.

Definition at line 238 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_bboxMapper, manualViewBaseContour::_contourVtkActor, manualViewBaseContour::_manContModel, manualViewBaseContour::_pd, manualViewBaseContour::_pts, manualViewBaseContour::DeleteVtkObjects(), manualBaseModel::GetNumberOfPointsSpline(), manualViewBaseContour::InitTextActor(), and manualViewBaseContour::UpdateColorActor().

Referenced by manualViewBullEye::ConstructVTKObjects(), and manualViewBaseContour::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 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualView3DContour::CopyAttributesTo ( manualView3DContour cloneObject  ) 

Reimplemented from manualViewContour.

Definition at line 23 of file manualView3DContour.cpp.

References _d, _h, _w, and SetDimensions().

Referenced by Clone().

00024 {
00025         // Fathers object
00026         manualViewContour::CopyAttributesTo(cloneObject);
00027 
00028         cloneObject->SetDimensions ( _w , _h , _d );
00029 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualViewBaseContour::CreateNewContour (  )  [inherited]

Definition at line 307 of file manualViewBaseContour.cpp.

References manualViewBaseContour::AddCompleteContourActor(), and manualViewBaseContour::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 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualViewBaseContour::DeleteContour (  )  [inherited]

Definition at line 369 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_lstViewPoints, manualViewBaseContour::DeletePoint(), manualViewBaseContour::DeleteVtkObjects(), manualViewBaseContour::Refresh(), and manualViewBaseContour::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 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualViewBaseContour::DeletePoint ( int  x,
int  y,
int  z 
) [inherited]

Definition at line 398 of file manualViewBaseContour.cpp.

References manualViewBaseContour::GetIdPoint().

Referenced by manualViewBaseContour::ClearPoint(), manualContourBaseControler::DeleteActualMousePoint(), manualContour3VControler::DeleteActualMousePoint_Others(), manualViewBaseContour::DeleteContour(), and manualViewBaseContour::DeleteSelectedPoints().

00399 {
00400         int id=GetIdPoint(x,y,z);
00401         if (id!=-1){
00402                 DeletePoint(id);
00403         }
00404 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualViewContour::DeletePoint ( int  id  )  [virtual, inherited]

Reimplemented from manualViewBaseContour.

Definition at line 221 of file manualViewContour.cpp.

References manualViewBaseContour::_lstViewPoints.

Referenced by manualViewContour::ClearPoint().

00222 {
00223         if (_lstViewPoints.size()>2)
00224         {
00225                 manualViewBaseContour::DeletePoint( id );
00226         }
00227 }

Here is the caller graph for this function:

void manualViewBaseContour::DeleteSelectedPoints (  )  [inherited]

Definition at line 436 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_lstViewPoints, manualViewBaseContour::DeletePoint(), manualViewBaseContour::GetSelected(), and manualViewBaseContour::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 }

Here is the call graph for this function:

void manualViewBaseContour::GetColorEditContour ( double &  r,
double &  g,
double &  b 
) [inherited]
void manualViewBaseContour::GetColorNormalContour ( double &  r,
double &  g,
double &  b 
) [inherited]
void manualViewBaseContour::GetColorSelectContour ( double &  r,
double &  g,
double &  b 
) [inherited]
bool manualViewBaseContour::GetEditable (  )  [inherited]

Definition at line 416 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_editable.

Referenced by manualViewPoints::RefreshContour(), manualViewBaseContour::SelectPosibleContour(), and manualViewBaseContour::UpdateColorActor().

00417 {
00418         return *_editable;
00419 }

Here is the caller graph for this function:

int manualViewBaseContour::GetIdPoint ( int  x,
int  y,
int  z 
) [virtual, inherited]
int manualView3DContour::GetIdPoint2 ( int  x,
int  y 
)

Definition at line 50 of file manualView3DContour.cpp.

References _d, _h, manualViewBaseContour::_manContModel, _w, UtilVtk3DGeometriSelection::DistanceMinPointToLine(), UtilVtk3DGeometriSelection::FindCubePointsFromPoints(), manualBaseModel::GetManualPoint(), manualViewBaseContour::GetRange(), wxVtkBaseView::GetRenderer(), manualBaseModel::GetSizeLstPoints(), manualViewBaseContour::GetWxVtkBaseView(), manualPoint::GetX(), manualPoint::GetY(), manualPoint::GetZ(), and UtilVtk3DGeometriSelection::SetDimentions().

Referenced by manualContour3DControler::MouseClickLeft(), and SelectPosiblePoint().

00051 {
00052         int id = -1;
00053         double p[3],pA[3],pB[3];
00054 
00055         double pickPoint[ 3 ], cameraPos[ 3 ];
00056         vtkPointPicker* picker = vtkPointPicker::New( );
00057         vtkRenderer *pRenderer = this->GetWxVtkBaseView()->GetRenderer();
00058         picker->Pick( x, y, 0.0, pRenderer );
00059         pRenderer->GetActiveCamera( )->GetPosition( cameraPos );
00060         picker->GetPickPosition( pickPoint );
00061         picker->Delete( );
00062 
00063         UtilVtk3DGeometriSelection utilVtk3Dgeometriselection;
00064         utilVtk3Dgeometriselection.SetDimentions(_w,_h,_d);
00065 
00066         if( utilVtk3Dgeometriselection.FindCubePointsFromPoints( pA, pB, pickPoint, cameraPos )  )
00067         {
00068                 double dist,distMin=999999999;
00069                 int i,size=this->_manContModel->GetSizeLstPoints();
00070                 for (i=0;i<size;i++)
00071                 {
00072                         manualPoint *mp = this->_manContModel->GetManualPoint(i);
00073                         p[0] = mp->GetX();
00074                         p[1] = mp->GetY();
00075                         p[2] = mp->GetZ();
00076                         dist=utilVtk3Dgeometriselection.DistanceMinPointToLine(p,pA,pB);
00077                         if ( (dist<=2*GetRange()) && (dist<distMin) )
00078                         {
00079                                 distMin = dist;
00080                                 id              = i;
00081                         }
00082                 }
00083         }
00084         return id;
00085 }

Here is the call graph for this function:

Here is the caller graph for this function:

bool manualViewBaseContour::GetIfViewControlPoints (  )  [inherited]

Definition at line 470 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_viewControlPoints.

Referenced by manualViewBaseContour::CopyAttributesTo().

00471 {
00472         return _viewControlPoints;
00473 }

Here is the caller graph for this function:

void manualViewBaseContour::GetMinMax ( double &  minX,
double &  minY,
double &  minZ,
double &  maxX,
double &  maxY,
double &  maxZ 
) [virtual, inherited]

Definition at line 784 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_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 }

Here is the call graph for this function:

int manualViewBaseContour::GetNumberOfPoints (  )  [inherited]
bool manualViewBaseContour::GetPosibleSelected (  )  [inherited]

Definition at line 431 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_posibleSelected.

Referenced by manualViewBaseContour::CopyAttributesTo(), manualContourBaseControler::MouseDLeft(), and manualViewContour::RefreshText().

00432 {
00433         return _posibleSelected;
00434 }

Here is the caller graph for this function:

double manualViewBaseContour::GetRange (  )  [inherited]
bool manualViewBaseContour::GetSelected (  )  [inherited]

Definition at line 426 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_selected.

Referenced by manualViewBaseContour::CopyAttributesTo(), and manualViewBaseContour::DeleteSelectedPoints().

00427 {
00428         return _selected;
00429 }

Here is the caller graph for this function:

void manualViewBaseContour::GetSpacing ( double  spc[3]  )  [inherited]

Definition at line 908 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_spc.

Referenced by manualViewBullEye::ConstructVTKObjects().

00909 {
00910         spc[0] = _spc[0];
00911         spc[1] = _spc[1];
00912         spc[2] = _spc[2];
00913 }

Here is the caller graph for this function:

int manualViewContour::GetType (  )  [virtual, inherited]

Reimplemented from manualViewBaseContour.

Reimplemented in manualView3VContour, manualViewBullEye, manualViewCircle, manualViewLine, manualViewRoi, and manualViewRotationTool.

Definition at line 40 of file manualViewContour.cpp.

00041 {
00042         return 1;
00043 }

double * manualViewBaseContour::GetVectorPointsXManualContour (  )  [inherited]

Definition at line 574 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_pts, and manualViewBaseContour::_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 }

Here is the caller graph for this function:

double * manualViewBaseContour::GetVectorPointsYManualContour (  )  [inherited]

Definition at line 585 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_pts, and manualViewBaseContour::_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 }

Here is the caller graph for this function:

double * manualViewBaseContour::GetVectorPointsZManualContour (  )  [inherited]

Definition at line 597 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_pts, and manualViewBaseContour::_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 (  )  [inherited]

Definition at line 232 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_widthline.

Referenced by manualViewBullEye::ConstructVTKObjects().

00233 {
00234         return _widthline;
00235 }

Here is the caller graph for this function:

wxVtkBaseView * manualViewBaseContour::GetWxVtkBaseView (  )  [inherited]
int manualViewBaseContour::GetZ (  )  [inherited]

Definition at line 764 of file manualViewBaseContour.cpp.

Referenced by manualViewBaseContour::CopyAttributesTo().

00765 {
00766 //      return _Z;
00767         return 0;
00768 }

Here is the caller graph for this function:

bool manualViewContour::ifTouchContour ( int  x,
int  y,
int  z 
) [virtual, inherited]

Reimplemented from manualViewBaseContour.

Reimplemented in manualView3VContour, manualViewRoi, and manualViewPerpPlaneContour.

Definition at line 177 of file manualViewContour.cpp.

References manualViewBaseContour::_manContModel, manualViewBaseContour::_pts, manualViewBaseContour::_sizePointsContour, manualViewBaseContour::_spc, manualBaseModel::IfCloseContour(), and manualViewBaseContour::TransfromCoordViewWorld().

00177                                                        {
00178         bool result=false;
00179         double xx=x;
00180         double yy=y;
00181         double zz=z;
00182         double ppA[3];
00183         double ppB[3];
00184         double d1,d2,d3;
00185         TransfromCoordViewWorld(xx,yy,zz);
00186 
00187 //EED 27 sep 2006
00188         xx = xx * _spc[0];
00189         yy = yy * _spc[1];
00190         zz = zz * _spc[2];
00191 
00192     unsigned int i, nps,nps_t;
00193     nps   = _sizePointsContour;
00194         
00195         if (this->_manContModel->IfCloseContour()==true)
00196         {
00197                 nps_t = nps;
00198         } else {
00199                 nps_t = nps-1;
00200         }
00201 
00202         for( i = 0; i < nps_t; i++ ) 
00203         {
00204                 _pts->GetPoint(i%nps, ppA);
00205                 _pts->GetPoint((i+1)%nps, ppB);
00206                 d1= sqrt( (ppA[0]-xx)*(ppA[0]-xx) + (ppA[1]-yy)*(ppA[1]-yy) + (ppA[2]-zz)*(ppA[2]-zz));
00207                 d2= sqrt( (ppB[0]-xx)*(ppB[0]-xx) + (ppB[1]-yy)*(ppB[1]-yy) + (ppB[2]-zz)*(ppB[2]-zz));
00208                 d3= sqrt( (ppB[0]-ppA[0])*(ppB[0]-ppA[0]) + (ppB[1]-ppA[1])*(ppB[1]-ppA[1]) + (ppB[2]-ppA[2])*(ppB[2]-ppA[2]));
00209 
00210 
00211                 if (  ((d1+d2)>=d3) &&  ((d1+d2)<=d3*1.3) ) 
00212                 {
00213                         result=true;
00214                         i=nps;
00215                 }
00216         }
00217         return result;
00218 }

Here is the call graph for this function:

void manualViewContour::InitMove ( int  x,
int  y,
int  z 
) [virtual, inherited]

Reimplemented from manualViewBaseContour.

Reimplemented in manualViewCircle, manualViewLine, manualViewRoi, and manualViewRotationTool.

Definition at line 241 of file manualViewContour.cpp.

References manualViewContour::_initialConoturModel, manualViewBaseContour::_manContModel, manualContourModel::AddPoint(), manualContourModel::DeleteAllPoints(), manualBaseModel::GetManualPoint(), manualBaseModel::GetSizeLstPoints(), manualPoint::GetX(), manualPoint::GetY(), manualPoint::GetZ(), and manualViewBaseContour::TransfromCoordViewWorld().

00242 {
00243         _initialConoturModel->DeleteAllPoints();
00244 
00245         manualPoint *mp = NULL;
00246         double XX=x;
00247         double YY=y;
00248         double ZZ=z;
00249         TransfromCoordViewWorld(XX,YY,ZZ);
00250 
00251         int i, manualPointsSZ = _manContModel->GetSizeLstPoints();
00252         for ( i=0; i<manualPointsSZ; i++ )
00253         {
00254                 mp = _manContModel->GetManualPoint( i );
00255                 this->_initialConoturModel->AddPoint( mp->GetX() - XX, mp->GetY() - YY, mp->GetZ() );
00256         }
00257 }

Here is the call graph for this function:

void manualViewBaseContour::InitTextActor (  )  [inherited]

Definition at line 288 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_textActor.

Referenced by manualViewPoints::ConstructVTKObjects(), and manualViewBaseContour::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 }

Here is the caller graph for this function:

void manualViewBaseContour::InsertPoint ( int  id  )  [inherited]

Definition at line 357 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_lstViewPoints, manualViewBaseContour::_spc, manualViewBaseContour::_wxvtkbaseview, manualViewPoint::CreateVtkPointActor(), wxVtkBaseView::GetRenderer(), manualViewBaseContour::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 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualViewContour::MoveContour ( int  horizontalUnits,
int  verticalUnits 
) [virtual, inherited]

Reimplemented from manualViewBaseContour.

Definition at line 278 of file manualViewContour.cpp.

References manualViewBaseContour::_manContModel, manualBaseModel::GetManualPoint(), manualBaseModel::GetSizeLstPoints(), manualPoint::GetX(), manualPoint::GetY(), manualPoint::GetZ(), manualPoint::SetPoint(), and manualViewBaseContour::UpdateViewPoints().

00279 {
00280         manualPoint *mpOrigin = NULL;
00281 
00282         int i, manualPointsSZ = _manContModel->GetSizeLstPoints();
00283         for ( i=0; i<manualPointsSZ; i++ )
00284         {
00285                 mpOrigin = _manContModel->GetManualPoint( i );
00286                 mpOrigin->SetPoint( mpOrigin->GetX()+horizontalUnits, mpOrigin->GetY()+verticalUnits, mpOrigin->GetZ() );
00287         }
00288         UpdateViewPoints();
00289 }

Here is the call graph for this function:

void manualViewContour::MoveContour ( int  x,
int  y,
int  z 
) [virtual, inherited]

Reimplemented from manualViewBaseContour.

Reimplemented in manualViewCircle, manualViewLine, manualViewRoi, and manualViewRotationTool.

Definition at line 259 of file manualViewContour.cpp.

References manualViewContour::_initialConoturModel, manualViewBaseContour::_manContModel, manualContourModel::GetManualPoint(), manualBaseModel::GetManualPoint(), manualBaseModel::GetSizeLstPoints(), manualPoint::GetX(), manualPoint::GetY(), manualPoint::GetZ(), manualPoint::SetPoint(), manualViewBaseContour::TransfromCoordViewWorld(), and manualViewBaseContour::UpdateViewPoints().

00260 {
00261         manualPoint *mpOrigin = NULL;
00262         manualPoint *mpMoving = NULL;
00263         double XX=x;
00264         double YY=y;
00265         double ZZ=z;
00266 
00267         TransfromCoordViewWorld(XX,YY,ZZ);
00268 
00269         int i, manualPointsSZ = _manContModel->GetSizeLstPoints();
00270         for ( i=0; i<manualPointsSZ; i++ )
00271         {
00272                 mpOrigin = _manContModel->GetManualPoint( i );
00273                 mpMoving = _initialConoturModel->GetManualPoint(i);
00274                 mpOrigin->SetPoint( mpMoving->GetX()+XX, mpMoving->GetY() + YY, mpMoving->GetZ() );
00275         }
00276         UpdateViewPoints();
00277 }

Here is the call graph for this function:

void manualViewContour::Open ( FILE *  pFile  )  [virtual, inherited]

Reimplemented from manualViewBaseContour.

Definition at line 54 of file manualViewContour.cpp.

00055 {
00056 }

void manualViewBaseContour::Refresh (  )  [virtual, inherited]

Reimplemented in manualViewPoints.

Definition at line 609 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_contourVtkActor, manualViewBaseContour::_lstViewPoints, manualViewBaseContour::_show_text, manualViewBaseContour::_wxvtkbaseview, wxVtkBaseView::GetRenWin(), wxVtkBaseView::GetWxVTKRenderWindowInteractor(), manualViewBaseContour::RefreshContour(), manualViewBaseContour::RefreshText(), manualViewBaseContour::UpdateColorActor(), and manualViewBaseContour::UpdateViewPoint().

Referenced by manualViewBaseContour::AddCompleteContourActor(), manualViewBaseContour::ClearContour(), wxImageViewerWidget::CreateNewManualContour(), manualContour3VControler::DeleteActualMousePoint_Others(), manualViewBaseContour::DeleteContour(), manualViewBaseContour::DeletePoint(), manualViewBaseContour::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(), manualViewBaseContour::RemoveCompleteContourActor(), manualContourContainer::setLumenVisibility(), manualContourContainer::setWallVisibility(), manualViewBaseContour::UnSelectAllPoints(), and manualViewBaseContour::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 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualViewContour::RefreshContour (  )  [virtual, inherited]

Reimplemented from manualViewBaseContour.

Reimplemented in manualView3VContour, manualViewBullEye, manualViewBullEyeSector, manualViewRoi, and manualViewPerpPlaneContour.

Definition at line 59 of file manualViewContour.cpp.

References manualViewBaseContour::_manContModel, manualViewBaseContour::_pts, manualViewBaseContour::_spc, manualViewBaseContour::GetNumberOfPoints(), manualBaseModel::GetNumberOfPointsSpline(), manualBaseModel::GetSpline_i_Point(), and manualBaseModel::UpdateSpline().

Referenced by wxWidgetMesure2D::ConfigureA(), wxEmptyPanel_3_Widget::ConfigureVTK(), wxMaracasCoutourTool::ConfigureVTK(), manualContourContainer::createLumenContour(), manualContourContainer::createWallContour(), manualContourContainer::refreshLumen(), manualContourContainer::refreshWall(), manualContourContainer::restartLumenContour(), manualContourContainer::restartWallContour(), and wxMaracasCoutourTool::SetControlPoints().

00060 {
00061         int i,np,nps;
00062 
00063 //JSTG 25-02-08 --------------------
00064         //double t,delta, x,y,z;
00065         double x,y,z;
00066 //----------------------------------
00067 
00068         _manContModel->UpdateSpline();
00069     np  = GetNumberOfPoints( );
00070         //nps = GetNumberOfPointsSpline();
00071     nps = _manContModel->GetNumberOfPointsSpline();
00072         //delta=( double ) ( np  ) / ( double ) ( nps-1  );             //JSTG 25-02-08
00073 
00074 
00075         if ( _pts!=NULL )
00076         {
00077                 if (np>=2  )
00078                 {
00079                         for( i = 0; i < nps; i++ )
00080                         {
00081 //JSTG 25-02-08 ------------------------------------------------
00082                                 //t = delta * (double)i;
00083                                 //_manContModel->GetSplinePoint(t,x,y,z);
00084                                 _manContModel->GetSpline_i_Point(i,&x,&y,&z);
00085 //--------------------------------------------------------------
00086         // EED 27 sep 2006
00087         //                      _pts->SetPoint(i, x,y,z );
00088                                 _pts->SetPoint(i, x*_spc[0], y*_spc[1], z*_spc[2] );
00089 
00090                         }// for
00091                 }
00092                 else
00093                 {
00094                                 _pts->SetPoint(0, 0 , 0 , 0);
00095                                 _pts->SetPoint(1, 0 , 0 , 0);
00096                 } // if
00097         }
00098 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualViewBaseContour::RemoveCompleteContourActor (  )  [inherited]

Definition at line 97 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_wxvtkbaseview, wxVtkBaseView::GetRenderer(), manualViewBaseContour::Refresh(), manualViewBaseContour::RefreshContour(), manualViewBaseContour::RemoveControlPoints(), manualViewBaseContour::RemoveSplineActor(), and manualViewBaseContour::RemoveTextActor().

Referenced by manualViewBaseContour::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 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualViewBaseContour::RemoveControlPoints (  )  [virtual, inherited]

Definition at line 158 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_lstViewPoints, manualViewBaseContour::_wxvtkbaseview, wxVtkBaseView::GetRenderer(), and manualViewBaseContour::SetIfViewControlPoints().

Referenced by manualContourControler::MouseMove(), manualViewBaseContour::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 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualViewBaseContour::RemoveSplineActor (  )  [virtual, inherited]

Reimplemented in manualViewBullEye, and manualViewPoints.

Definition at line 151 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_contourVtkActor, manualViewBaseContour::_wxvtkbaseview, and wxVtkBaseView::GetRenderer().

Referenced by manualViewBaseContour::RemoveCompleteContourActor().

00152 {
00153         vtkRenderer * theRenderer = _wxvtkbaseview->GetRenderer();
00154         if (_contourVtkActor!=NULL)
00155                 theRenderer->RemoveActor( _contourVtkActor );
00156 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualViewBaseContour::RemoveTextActor (  )  [inherited]

Definition at line 195 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_show_text, manualViewBaseContour::_textActor, manualViewBaseContour::_wxvtkbaseview, and wxVtkBaseView::GetRenderer().

Referenced by manualViewBaseContour::RemoveCompleteContourActor().

00196 {
00197         if(_show_text)
00198         {
00199                 _wxvtkbaseview->GetRenderer()->RemoveActor2D( _textActor );
00200         }
00201 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualViewContour::Save ( FILE *  pFile  )  [virtual, inherited]

Reimplemented from manualViewBaseContour.

Definition at line 47 of file manualViewContour.cpp.

00048 {
00049         manualViewBaseContour::Save(pFile);
00050 }

void manualViewBaseContour::SelectAllPoints ( bool  select  )  [inherited]

Definition at line 457 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_lstViewPoints, and manualViewBaseContour::SelectPoint().

00458 {
00459         int i,size=_lstViewPoints.size();
00460         for (i=0;i<size;i++){
00461                 SelectPoint(i,select);
00462         }
00463 }

Here is the call graph for this function:

void manualViewBaseContour::SelectAllPossibleSelected ( bool  select  )  [inherited]

Definition at line 486 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_lstViewPoints, and manualViewBaseContour::SetPointPosibleSelected().

Referenced by manualContour3VControler::MouseMove_Others(), manualViewBaseContour::SelectPosiblePoint(), and SelectPosiblePoint().

00487 {
00488         int i,size=_lstViewPoints.size();
00489         for (i=0;i<size;i++){
00490                 SetPointPosibleSelected(i,select);
00491         }
00492 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualViewBaseContour::SelectLstPoints (  )  [inherited]

Definition at line 452 of file manualViewBaseContour.cpp.

00453 {
00454         // ToDo
00455 }

void manualViewBaseContour::SelectPoint ( int  i,
bool  select 
) [inherited]

Definition at line 447 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_lstViewPoints.

Referenced by manualViewBaseContour::SelectAllPoints().

00448 {
00449         _lstViewPoints[i]->SetSelected(select);
00450 }

Here is the caller graph for this function:

bool manualViewBaseContour::SelectPosibleContour ( int  x,
int  y,
int  z 
) [inherited]

Definition at line 506 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_lstViewPoints, manualViewBaseContour::_posibleSelected, manualViewBaseContour::_selected, manualViewBaseContour::GetEditable(), manualViewBaseContour::GetIdPoint(), manualViewBaseContour::ifTouchContour(), and manualViewBaseContour::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 }

Here is the call graph for this function:

Here is the caller graph for this function:

int manualView3DContour::SelectPosiblePoint ( int  x,
int  y,
int  z 
) [virtual]

Reimplemented from manualViewBaseContour.

Definition at line 87 of file manualView3DContour.cpp.

References GetIdPoint2(), manualViewBaseContour::SelectAllPossibleSelected(), and manualViewBaseContour::SetPointPosibleSelected().

00088 {
00089         SelectAllPossibleSelected(false);
00090         int id=GetIdPoint2(x,y);
00091         if (id!=-1)
00092         {
00093                 SetPointPosibleSelected(id,true);
00094         }
00095         return id;
00096 }

Here is the call graph for this function:

void manualViewBaseContour::SetColorEditContour ( double  r,
double  g,
double  b 
) [inherited]
void manualViewBaseContour::SetColorNormalContour ( double  r,
double  g,
double  b 
) [inherited]
void manualViewBaseContour::SetColorSelectContour ( double  r,
double  g,
double  b 
) [inherited]

Definition at line 669 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_coulorSelection_b, manualViewBaseContour::_coulorSelection_g, and manualViewBaseContour::_coulorSelection_r.

Referenced by manualViewBaseContour::CopyAttributesTo().

00670 {
00671         _coulorSelection_r = r;
00672         _coulorSelection_g = g;
00673         _coulorSelection_b = b;
00674 }

Here is the caller graph for this function:

void manualView3DContour::SetDimensions ( int  w,
int  h,
int  d 
)

Definition at line 31 of file manualView3DContour.cpp.

References _d, _h, and _w.

Referenced by wxManualTree_MPRWidget::ConfigureContour(), and CopyAttributesTo().

00032 {
00033         _w = w;
00034         _h = h;
00035         _d = d;
00036 }

Here is the caller graph for this function:

void manualViewBaseContour::SetEditable ( bool *  condition  )  [inherited]

Definition at line 421 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_editable.

Referenced by manualContourBaseControler::SetModelView().

00422 {
00423         _editable = condition;
00424 }

Here is the caller graph for this function:

void manualViewBaseContour::SetIfViewControlPoints ( bool  ifShow  )  [inherited]

Definition at line 465 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_viewControlPoints.

Referenced by manualViewBaseContour::AddControlPoints(), manualViewBaseContour::CopyAttributesTo(), and manualViewBaseContour::RemoveControlPoints().

00466 {
00467         _viewControlPoints = ifShow;
00468 }

Here is the caller graph for this function:

void manualViewContour::SetMesureScale ( double  mesureScale  )  [inherited]

Definition at line 236 of file manualViewContour.cpp.

References manualViewContour::_mesureScale.

Referenced by wxManualTree_MPRWidget::ConfigureContour(), manualViewContour::CopyAttributesTo(), and wxWidgetMesure2D::SetMesureScale().

00237 {
00238         _mesureScale = mesureScale;
00239 }

Here is the caller graph for this function:

void manualViewBaseContour::SetModel ( manualBaseModel manContModel  )  [inherited]
void manualViewBaseContour::SetPointPosibleSelected ( int  id,
bool  select 
) [inherited]

Definition at line 476 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_lstViewPoints.

Referenced by manualContour3VControler::MouseMove_Others(), manualViewBaseContour::SelectAllPossibleSelected(), manualViewBaseContour::SelectPosiblePoint(), and SelectPosiblePoint().

00477 {
00478         _lstViewPoints[id]->SetPosibleSelected(select);
00479 }

Here is the caller graph for this function:

void manualViewBaseContour::SetPointSelected ( int  id,
bool  select 
) [inherited]

Definition at line 481 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_lstViewPoints.

00482 {
00483         _lstViewPoints[id]->SetSelected(select);
00484 }

void manualViewBaseContour::SetPosibleSelected ( bool  posibleSelected  )  [inherited]

Definition at line 411 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_posibleSelected.

Referenced by manualViewBaseContour::CopyAttributesTo(), manualContour3VControler::MouseMove_Others(), and manualViewBaseContour::SelectPosibleContour().

00412 {
00413         _posibleSelected=posibleSelected;
00414 }

Here is the caller graph for this function:

void manualViewBaseContour::SetRange ( double  range  )  [inherited]
void manualViewBaseContour::SetSelected ( bool  selected  )  [inherited]

Definition at line 406 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_selected.

Referenced by manualViewBaseContour::CopyAttributesTo(), manualContourControler::MouseClickLeft(), and manualContourBaseControler::SetEditable().

00407 {
00408         _selected=selected;
00409 }

Here is the caller graph for this function:

void manualViewBaseContour::SetShowText ( bool  ok  )  [inherited]

Definition at line 894 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_show_text, and manualViewBaseContour::_textActor.

Referenced by wxWidgetMesure2D::OnVisibleInformation().

00895 {
00896         _show_text = ok;
00897         if (_show_text==false && _textActor!=NULL)
00898         {
00899                 _textActor->SetInput("00");
00900         }
00901 }

Here is the caller graph for this function:

void manualViewBaseContour::SetSpacing ( double  spc[3]  )  [inherited]
void manualViewBaseContour::SetVisible ( bool  ok  )  [inherited]

Definition at line 873 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_contourVtkActor, manualViewBaseContour::_lstViewPoints, and manualViewBaseContour::_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 }

Here is the caller graph for this function:

void manualView3DContour::SetVtkMPRBaseData ( vtkMPRBaseData vtkmprbasedata  ) 

Definition at line 45 of file manualView3DContour.cpp.

References _vtkmprbasedata.

Referenced by wxManualTree_MPRWidget::ConfigureContour().

00046 {
00047         _vtkmprbasedata = vtkmprbasedata;
00048 }

Here is the caller graph for this function:

void manualViewBaseContour::SetWidthLine ( double  width  )  [inherited]

Definition at line 217 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_lstViewPoints, manualViewBaseContour::_widthline, and manualViewBaseContour::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 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualViewBaseContour::SetWxVtkBaseView ( wxVtkBaseView wxvtkbaseview  )  [inherited]
void manualViewBaseContour::SetZ ( int  z  )  [inherited]
void manualView3DContour::TransfromCoordViewWorld ( double &  X,
double &  Y,
double &  Z,
int  type 
) [virtual]

Reimplemented from manualViewBaseContour.

Definition at line 38 of file manualView3DContour.cpp.

References _vtkmprbasedata, vtkMPRBaseData::GetX(), vtkMPRBaseData::GetY(), and vtkBaseData::GetZ().

00039 {
00040         X = _vtkmprbasedata->GetX();
00041         Y = _vtkmprbasedata->GetY();
00042         Z = _vtkmprbasedata->GetZ();
00043 }

Here is the call graph for this function:

void manualViewBaseContour::UnSelectAllPoints (  )  [inherited]

Definition at line 554 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_lstViewPoints, manualViewBaseContour::Refresh(), and manualViewBaseContour::UnSelectPoint().

00554                                              {
00555         int i,size=_lstViewPoints.size();
00556         for (i=0;i<size;i++){
00557                 UnSelectPoint(i);
00558         }
00559         Refresh();
00560 }

Here is the call graph for this function:

void manualViewBaseContour::UnSelectLstPoints (  )  [inherited]

Definition at line 550 of file manualViewBaseContour.cpp.

00550                                              {
00551         // ToDo
00552 }

void manualViewBaseContour::UnSelectPoint ( int  i  )  [inherited]

Definition at line 545 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_lstViewPoints, and manualViewBaseContour::Refresh().

Referenced by manualViewBaseContour::UnSelectAllPoints().

00545                                               {
00546         _lstViewPoints[i]->SetSelected(false);
00547         Refresh();
00548 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualViewBaseContour::UpdateColorActor (  )  [inherited]
void manualViewBaseContour::UpdateViewPoint ( int  id  )  [virtual, inherited]
void manualViewBaseContour::UpdateViewPoints (  )  [virtual, inherited]

Definition at line 329 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_lstViewPoints, and manualViewBaseContour::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 }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

double manualViewBaseContour::_coulorEdit_b [protected, inherited]
double manualViewBaseContour::_coulorEdit_g [protected, inherited]
double manualViewBaseContour::_coulorEdit_r [protected, inherited]
double manualViewBaseContour::_coulorNormal_b [protected, inherited]
double manualViewBaseContour::_coulorNormal_g [protected, inherited]
double manualViewBaseContour::_coulorNormal_r [protected, inherited]
double manualViewBaseContour::_coulorSelection_b [protected, inherited]
double manualViewBaseContour::_coulorSelection_g [protected, inherited]
double manualViewBaseContour::_coulorSelection_r [protected, inherited]
int manualView3DContour::_d [private]

Definition at line 31 of file manualView3DContour.h.

Referenced by CopyAttributesTo(), GetIdPoint2(), and SetDimensions().

bool* manualViewBaseContour::_editable [protected, inherited]
int manualView3DContour::_h [private]

Definition at line 30 of file manualView3DContour.h.

Referenced by CopyAttributesTo(), GetIdPoint2(), and SetDimensions().

std::vector<manualViewPoint*> manualViewBaseContour::_lstViewPoints [protected, inherited]
bool manualViewBaseContour::_posibleSelected [protected, inherited]
vtkPoints* manualViewBaseContour::_pts [protected, inherited]
double manualViewBaseContour::_range [protected, inherited]
bool manualViewBaseContour::_selected [protected, inherited]
bool manualViewBaseContour::_show_text [protected, inherited]
int manualViewBaseContour::_sizePointsContour [protected, inherited]
double manualViewBaseContour::_spc[3] [protected, inherited]
vtkTextActor* manualViewBaseContour::_textActor [protected, inherited]
bool manualViewBaseContour::_viewControlPoints [protected, inherited]

Definition at line 27 of file manualView3DContour.h.

Referenced by SetVtkMPRBaseData(), and TransfromCoordViewWorld().

int manualView3DContour::_w [private]

Definition at line 29 of file manualView3DContour.h.

Referenced by CopyAttributesTo(), GetIdPoint2(), and SetDimensions().

double manualViewBaseContour::_widthline [protected, inherited]

The documentation for this class was generated from the following files:

Generated on 20 Oct 2010 for creaMaracasVisu_lib by  doxygen 1.6.1