manualViewPerpPlaneContour Class Reference

#include <manualViewPerpPlaneContour.h>

Inheritance diagram for manualViewPerpPlaneContour:

Inheritance graph
[legend]
Collaboration diagram for manualViewPerpPlaneContour:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 manualViewPerpPlaneContour ()
 ~manualViewPerpPlaneContour ()
virtual
manualViewPerpPlaneContour
Clone ()
void CopyAttributesTo (manualViewPerpPlaneContour *cloneObject)
virtual void UpdateViewPoint (int id)
virtual void RefreshContour ()
virtual void TransfromCoordViewWorld (double &X, double &Y, double &Z, int type)
virtual bool ifTouchContour (int x, int y, int z)
void CopyAttributesTo (manualViewContour *cloneObject)
void CopyAttributesTo (manualViewBaseContour *cloneObject)
virtual int GetType ()
virtual void Save (FILE *pFile)
virtual void Open (FILE *pFile)
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 ()
void AddPoint (manualViewPoint *manualViewPoint)
void InsertPoint (int id)
void DeleteContour ()
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 (manualContourModel *manContModel)
void SetWxVtkBaseView (wxVtkBaseView *wxvtkbaseview)
virtual void Refresh ()
int GetNumberOfPoints ()
void CreateNewContour ()
double * GetVectorPointsXManualContour ()
double * GetVectorPointsYManualContour ()
double * GetVectorPointsZManualContour ()
void UpdateColorActor ()
void SetRange (int range)
int 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 ()
void AddControlPoints ()
void RemoveControlPoints ()
void AddTextActor ()
void RemoveTextActor ()
void SetWidthLine (double width)
double GetWidthLine ()
virtual void ConstructVTKObjects ()

Protected Attributes

bool _show_text
int _id_viewPoint_for_text
vtkTextActor * _textActor
manualContourModel_manContModel
vtkPoints * _pts
int _sizePointsContour
std::vector< manualViewPoint * > _lstViewPoints
double _spc [3]

Private Member Functions

void FilterCordinateXYZ (double &x, double &y, double &z)


Detailed Description

Definition at line 7 of file manualViewPerpPlaneContour.h.


Constructor & Destructor Documentation

manualViewPerpPlaneContour::manualViewPerpPlaneContour (  ) 

Definition at line 6 of file manualViewPerpPlaneContour.cxx.

Referenced by Clone().

00007 {
00008 }

Here is the caller graph for this function:

manualViewPerpPlaneContour::~manualViewPerpPlaneContour (  ) 

Definition at line 10 of file manualViewPerpPlaneContour.cxx.

00011 {
00012 }


Member Function Documentation

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

Definition at line 80 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().

00081 {
00082         _viewControlPoints = ifControlPoints;
00083          /*vtkRenderer * theRenderer = */  _wxvtkbaseview->GetRenderer();  // JPRx ??
00084          //Adding the spline
00085          AddSplineActor();
00086 
00087          AddTextActor();
00088          //Adding each control point
00089          if( ifControlPoints )
00090                 AddControlPoints();
00091          RefreshContour();
00092          Refresh();
00093 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualViewBaseContour::AddControlPoints (  )  [inherited]

Definition at line 171 of file manualViewBaseContour.cpp.

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

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

00172 {
00173         vtkRenderer * theRenderer = _wxvtkbaseview->GetRenderer();
00174         SetIfViewControlPoints( true );
00175          if( _viewControlPoints )
00176          {
00177                 int i,size=_lstViewPoints.size();
00178                 for (i=0;i<size; i++)
00179                 {
00180                         vtkActor * pointActor = _lstViewPoints[i]->GetVtkActor();
00181                         theRenderer->AddActor( pointActor );
00182                 }
00183          }
00184 }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 332 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_lstViewPoints, manualViewBaseContour::_spc, manualViewBaseContour::_wxvtkbaseview, manualViewPoint::CreateVtkPointActor(), wxVtkBaseView::GetRenderer(), and manualViewPoint::SetSpacing().

00333 {
00334         _lstViewPoints.push_back( manualViewPoint );
00335 
00336         // EED 3 oct 2006
00337         manualViewPoint->SetSpacing(_spc);
00338 
00339         vtkActor *actor = manualViewPoint->CreateVtkPointActor();
00340         _wxvtkbaseview->GetRenderer()->AddActor( actor );       
00341 }

Here is the call graph for this function:

void manualViewBaseContour::AddPoint (  )  [inherited]

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

Reimplemented in manualViewBullEye.

Definition at line 143 of file manualViewBaseContour.cpp.

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

Referenced by manualViewBaseContour::AddCompleteContourActor().

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

Here is the call graph for this function:

Here is the caller graph for this function:

void manualViewBaseContour::AddTextActor (  )  [inherited]

Definition at line 186 of file manualViewBaseContour.cpp.

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

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

00187 {
00188         _wxvtkbaseview->GetRenderer()->AddActor2D( _textActor );
00189 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualViewBaseContour::ClearContour (  )  [inherited]

Definition at line 842 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().

00843 {
00844         if (_contourVtkActor!=NULL){
00845                 _wxvtkbaseview->GetRenderer()->RemoveActor( _contourVtkActor );
00846         }
00847         DeleteVtkObjects();
00848         int i,size=_lstViewPoints.size();
00849         for (i=0;i<size;i++){
00850                 ClearPoint(0);
00851         }
00852         Refresh();
00853 }

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 218 of file manualViewContour.cpp.

References manualViewContour::DeletePoint().

00219 {
00220         manualViewBaseContour::DeletePoint( id );
00221 }

Here is the call graph for this function:

manualViewPerpPlaneContour * manualViewPerpPlaneContour::Clone (  )  [virtual]

Reimplemented from manualViewContour.

Definition at line 16 of file manualViewPerpPlaneContour.cxx.

References CopyAttributesTo(), and manualViewPerpPlaneContour().

00017 {
00018         manualViewPerpPlaneContour * clone = new manualViewPerpPlaneContour();
00019         CopyAttributesTo(clone);
00020         return clone;
00021 }

Here is the call graph for this function:

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

Reimplemented in manualViewBullEye.

Definition at line 231 of file manualViewBaseContour.cpp.

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

Referenced by manualViewBullEye::ConstructVTKObjects(), and manualViewBaseContour::CreateNewContour().

00232 {
00233 //JSTG 29-02-08 -----------------------------------------------
00234         //int i , nps = _sizePointsContour;
00235         int i;
00236         int nps = _manContModel->GetNumberOfPointsSpline();
00237 //-------------------------------------------------------------
00238         DeleteVtkObjects();
00239         _pts = vtkPoints::New();
00240         _pts->SetNumberOfPoints(nps);
00241 
00242         for (i=0 ; i<nps ; i++){
00243                 _pts->SetPoint(i,       0       , 0     , 0 );
00244         }
00245         // This is for the boundaring inicialisation
00246 
00247 //EED 29Mars2009        
00248         _pts->SetPoint(0,       0       , 0     , -1000 );
00249         _pts->SetPoint(1,       0       , 0     ,  1000 );
00250 //      _pts->SetPoint(0,       -1000   , -1000 , -1000 );
00251 //      _pts->SetPoint(1,       1000    , 1000  , 1000  );
00252 
00253 
00254         vtkCellArray *lines = vtkCellArray::New();
00255         lines->InsertNextCell( nps /* +1 */ );
00256         for ( i=0 ; i<nps+1 ; i++ ){
00257                 lines->InsertCellPoint(i % nps );
00258         }
00259 
00260         _pd = vtkPolyData::New();
00261         _pd->SetPoints( _pts );
00262         _pd->SetLines( lines );
00263         lines->Delete();  //do not delete lines ??
00264 
00265         _contourVtkActor        =       vtkActor::New();
00266     _bboxMapper                 =       vtkPolyDataMapper::New();
00267     _bboxMapper->ScalarVisibilityOff( );
00268 
00269         _bboxMapper->SetInput(_pd);
00270         _bboxMapper->ImmediateModeRenderingOn();
00271         _contourVtkActor->SetMapper(_bboxMapper);
00272         _contourVtkActor->GetProperty()->BackfaceCullingOff();
00273 
00274         UpdateColorActor();
00275 
00276         _pd->ComputeBounds();
00277 
00278         //      Text
00279         _textActor = vtkTextActor::New();
00280 //      _textActor->SetDisplayPosition(200, 200);
00281         _textActor->SetInput("00");
00282         // Set coordinates to match the old vtkScaledTextActor default value
00283 //      _textActor->GetPosition2Coordinate()->SetCoordinateSystemToNormalizedViewport();
00284 //      _textActor->GetPosition2Coordinate()->SetValue( 0.2 , 0.2 );
00285         _textActor->GetPositionCoordinate()->SetCoordinateSystemToWorld ();
00286 //      _textActor->GetPositionCoordinate()->SetValue( 0.8 , 0.8 );
00287 
00288         vtkTextProperty *tprop = _textActor->GetTextProperty();
00289         tprop->SetFontSize(14);
00290         tprop->SetFontFamilyToArial();
00291         tprop->SetColor(0, 0, 1);
00292 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualViewBaseContour::CopyAttributesTo ( manualViewBaseContour cloneObject  )  [inherited]

Definition at line 119 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_coulorEdit_b, manualViewBaseContour::_coulorEdit_g, manualViewBaseContour::_coulorEdit_r, manualViewBaseContour::_coulorNormal_b, manualViewBaseContour::_coulorNormal_g, manualViewBaseContour::_coulorNormal_r, manualViewBaseContour::_coulorSelection_b, manualViewBaseContour::_coulorSelection_g, manualViewBaseContour::_coulorSelection_r, manualViewBaseContour::_lstViewPoints, manualViewBaseContour::_spc, manualViewBaseContour::_wxvtkbaseview, manualViewBaseContour::AddPoint(), manualViewBaseContour::GetIfViewControlPoints(), manualViewBaseContour::GetPosibleSelected(), manualViewBaseContour::GetRange(), manualViewBaseContour::GetSelected(), manualViewBaseContour::GetZ(), manualViewBaseContour::SetColorEditContour(), manualViewBaseContour::SetColorNormalContour(), manualViewBaseContour::SetColorSelectContour(), manualViewBaseContour::SetIfViewControlPoints(), manualViewBaseContour::SetPosibleSelected(), manualViewBaseContour::SetRange(), manualViewBaseContour::SetSelected(), manualViewBaseContour::SetSpacing(), manualViewBaseContour::SetWxVtkBaseView(), and manualViewBaseContour::SetZ().

Referenced by manualViewBaseContour::Clone().

00120 {
00121         // Fathers object
00122         //XXXX::CopyAttributesTo(cloneObject);
00123 
00124         cloneObject-> SetWxVtkBaseView( this->_wxvtkbaseview );
00125         cloneObject-> SetSelected( this->GetSelected() );
00126         cloneObject-> SetPosibleSelected( this->GetPosibleSelected() );
00127         cloneObject-> SetIfViewControlPoints( this->GetIfViewControlPoints() );
00128         cloneObject-> SetRange( this->GetRange() );
00129         cloneObject-> SetZ( this->GetZ() );
00130         cloneObject-> SetSpacing( _spc );
00131         cloneObject-> SetColorNormalContour( _coulorNormal_r, _coulorNormal_g, _coulorNormal_b );
00132         cloneObject-> SetColorEditContour( _coulorEdit_r, _coulorEdit_g, _coulorEdit_b );
00133         cloneObject-> SetColorSelectContour( _coulorSelection_r, _coulorSelection_g, _coulorSelection_b );
00134 
00135         int i, size = _lstViewPoints.size();
00136         for ( i=0; i<size; i++ )
00137         {
00138                 cloneObject->AddPoint(  );
00139         }
00140 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualViewContour::CopyAttributesTo ( manualViewContour cloneObject  )  [inherited]

Definition at line 30 of file manualViewContour.cpp.

References manualViewContour::_mesureScale, and manualViewContour::SetMesureScale().

Referenced by manualViewContour::Clone().

00031 {
00032         // Call to Fathers object
00033         manualViewBaseContour::CopyAttributesTo(cloneObject);
00034 
00035         cloneObject->SetMesureScale(_mesureScale);
00036 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualViewPerpPlaneContour::CopyAttributesTo ( manualViewPerpPlaneContour cloneObject  ) 

Definition at line 25 of file manualViewPerpPlaneContour.cxx.

Referenced by Clone().

00026 {
00027         // Fathers object
00028         manualViewContour::CopyAttributesTo(cloneObject);
00029 }

Here is the caller graph for this function:

void manualViewBaseContour::CreateNewContour (  )  [inherited]

Definition at line 294 of file manualViewBaseContour.cpp.

References manualViewBaseContour::AddCompleteContourActor(), and manualViewBaseContour::ConstructVTKObjects().

Referenced by manualContourBaseControler::CreateNewManualContour(), manualContourBaseControler::ResetContour(), manualContour3VControler::ResetContour_Others(), and wxMaracasCoutourTool::SetControlPoints().

00295 {
00296         ConstructVTKObjects();
00297         /*
00298         _wxvtkbaseview->GetRenderer()->AddActor( _contourVtkActor );
00299         _wxvtkbaseview->GetRenderer()->AddActor2D(_textActor);*/
00300         AddCompleteContourActor();
00301 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualViewBaseContour::DeleteContour (  )  [inherited]

Definition at line 356 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().

00357 {
00358         RemoveCompleteContourActor();
00359         /*if (_contourVtkActor!=NULL){
00360                 _wxvtkbaseview->GetRenderer()->RemoveActor( _contourVtkActor );
00361         }*/
00362         DeleteVtkObjects();
00363         int i,size=_lstViewPoints.size();
00364         for (i=0;i<size;i++){
00365                 manualViewBaseContour::DeletePoint(0);
00366         }
00367         Refresh();
00368 }

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 385 of file manualViewBaseContour.cpp.

References manualViewBaseContour::GetIdPoint().

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

00386 {
00387         int id=GetIdPoint(x,y,z);
00388         if (id!=-1){
00389                 DeletePoint(id);
00390         }
00391 }

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 209 of file manualViewContour.cpp.

References manualViewBaseContour::_lstViewPoints.

Referenced by manualViewContour::ClearPoint().

00210 {
00211         if (_lstViewPoints.size()>2)
00212         {
00213                 manualViewBaseContour::DeletePoint( id );
00214         }
00215 }

Here is the caller graph for this function:

void manualViewBaseContour::DeleteSelectedPoints (  )  [inherited]

Definition at line 423 of file manualViewBaseContour.cpp.

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

00424 {
00425         int i,size=_lstViewPoints.size();
00426         for (i=size-1;i>=0;i--){
00427                 if (_lstViewPoints[i]->GetSelected()==true){
00428                         DeletePoint(i);
00429                 }
00430         }
00431         Refresh();
00432 }

Here is the call graph for this function:

void manualViewPerpPlaneContour::FilterCordinateXYZ ( double &  x,
double &  y,
double &  z 
) [private]

Definition at line 53 of file manualViewPerpPlaneContour.cxx.

References vtkPlane2DView::GetImgSize(), wxVtkBaseView::GetSpacing(), vtkMPRBaseData::GetTransformOrientation(), vtkPlane2DView::GetVtkmprbasedata(), manualViewBaseContour::GetWxVtkBaseView(), vtkMPRBaseData::GetX(), vtkMPRBaseData::GetY(), and vtkBaseData::GetZ().

Referenced by RefreshContour(), and UpdateViewPoint().

00054 {
00055         vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)( this->GetWxVtkBaseView() );
00056         vtkMPRBaseData *vtkmprbasedata = vtkplane2Dview->GetVtkmprbasedata();
00057         vtkTransform *transf1 = vtkTransform::New();
00058         vtkTransform *transf2 = vtkmprbasedata->GetTransformOrientation();
00059         transf1->SetMatrix( transf2->GetMatrix() ); 
00060         transf1->Inverse();
00061 
00062         double in[4], out[4];
00063         double center = vtkplane2Dview->GetImgSize() / 2;
00064 
00065         in[0] = x - vtkmprbasedata->GetX();
00066         in[1] = y - vtkmprbasedata->GetY();
00067         in[2] = z - vtkmprbasedata->GetZ();
00068         in[3] = 0;
00069 
00070         transf1->MultiplyPoint(in,out);
00071         z = out[0];
00072         x = out[1]+center;
00073         y = out[2]+center;
00074 
00075         double spc[3];
00076         this->GetWxVtkBaseView()->GetSpacing(spc);
00077         x = x / spc[0];
00078         y = y / spc[1];
00079         z = z / spc[2];
00080 
00081         transf1->Delete();
00082 }

Here is the call graph for this function:

Here is the caller 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 403 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_editable.

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

00404 {
00405         return *_editable;
00406 }

Here is the caller graph for this function:

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

bool manualViewBaseContour::GetIfViewControlPoints (  )  [inherited]

Definition at line 457 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_viewControlPoints.

Referenced by manualViewBaseContour::CopyAttributesTo().

00458 {
00459         return _viewControlPoints;
00460 }

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 771 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_manContModel, manualContourModel::GetManualPoint(), manualContourModel::GetSizeLstPoints(), manualPoint::GetX(), manualPoint::GetY(), and manualPoint::GetZ().

00772 {
00773         double  pp[3];
00774         manualPoint *mp;
00775         int i;
00776         int size=_manContModel->GetSizeLstPoints();
00777         minX=99999;
00778         minY=99999;
00779         maxX=-99999;
00780         maxY=-99999;
00781         bool ifFindZ = minZ!=-1.0 && maxZ!=-1.0;
00782         if ( ifFindZ )
00783         {
00784                 minZ=99999;
00785                 maxZ=-99999;
00786         }
00787         for( i = 0; i < size; i++ )
00788         {
00789                 mp=_manContModel->GetManualPoint(i);
00790                 pp[0]=mp->GetX();
00791                 pp[1]=mp->GetY();
00792                 if ( ifFindZ )
00793                         pp[2]=mp->GetZ();
00794 
00795                 // min X
00796                 if (pp[0]<minX)
00797                 {
00798                         minX=pp[0];
00799                 }
00800                 //min Y
00801                 if (pp[1]<minY)
00802                 {
00803                         minY=pp[1];
00804                 }
00805                 //max X
00806                 if (pp[0]>maxX)
00807                 {
00808                         maxX=pp[0];
00809                 }
00810                 // max Y
00811                 if (pp[1]>maxY)
00812                 {
00813                         maxY=pp[1];
00814                 }
00815                 if ( ifFindZ )
00816                 {
00817                         // min Z
00818                         if (pp[2]<minZ)
00819                         {
00820                                 minZ=pp[2];
00821                         }
00822                         // max Z
00823                         if (pp[2]>maxZ)
00824                         {
00825                                 maxZ=pp[2];
00826                         }
00827                 }
00828         }
00829         if ( size<1 )
00830         {
00831                 minX = 0;
00832                 maxX = 0;
00833 
00834                 minY = 0;
00835                 maxY = 0;
00836 
00837                 minZ = 0;
00838                 maxZ = 0;
00839         }
00840 }

Here is the call graph for this function:

int manualViewBaseContour::GetNumberOfPoints (  )  [inherited]

bool manualViewBaseContour::GetPosibleSelected (  )  [inherited]

Definition at line 418 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_posibleSelected.

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

00419 {
00420         return _posibleSelected;
00421 }

Here is the caller graph for this function:

int manualViewBaseContour::GetRange (  )  [inherited]

bool manualViewBaseContour::GetSelected (  )  [inherited]

Definition at line 413 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_selected.

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

00414 {
00415         return _selected;
00416 }

Here is the caller graph for this function:

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

Definition at line 895 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_spc.

Referenced by manualViewBullEye::ConstructVTKObjects().

00896 {
00897         spc[0] = _spc[0];
00898         spc[1] = _spc[1];
00899         spc[2] = _spc[2];
00900 }

Here is the caller graph for this function:

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

Reimplemented from manualViewBaseContour.

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

Definition at line 40 of file manualViewContour.cpp.

00041 {
00042         return 1;
00043 }

double * manualViewBaseContour::GetVectorPointsXManualContour (  )  [inherited]

Definition at line 562 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_pts, and manualViewBaseContour::_sizePointsContour.

Referenced by manualContourBaseControler::GetVectorPointsXManualContour().

00562                                                             {
00563         double pp[3];
00564         int i,size = _sizePointsContour;
00565         double *vx = (double*)malloc(sizeof(double)*size);
00566         for (i=0;i<size;i++){
00567                 _pts->GetPoint(i,pp);
00568                 vx[i]=pp[0];
00569         }
00570         return vx;
00571 }

Here is the caller graph for this function:

double * manualViewBaseContour::GetVectorPointsYManualContour (  )  [inherited]

Definition at line 573 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_pts, and manualViewBaseContour::_sizePointsContour.

Referenced by manualContourBaseControler::GetVectorPointsYManualContour().

00574 {
00575         double pp[3];
00576         int i,size = _sizePointsContour;
00577         double *vy = (double*)malloc(sizeof(double)*size);
00578         for (i=0;i<size;i++){
00579                 _pts->GetPoint(i,pp);
00580                 vy[i]=pp[1];
00581         }
00582         return vy;
00583 }

Here is the caller graph for this function:

double * manualViewBaseContour::GetVectorPointsZManualContour (  )  [inherited]

Definition at line 585 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_pts, and manualViewBaseContour::_sizePointsContour.

00586 {
00587         double pp[3];
00588         int i,size = _sizePointsContour;
00589         double *vz = (double*)malloc(sizeof(double)*size);
00590         for (i=0;i<size;i++){
00591                 _pts->GetPoint(i,pp);
00592                 vz[i]=pp[2];
00593         }
00594         return vz;
00595 }

double manualViewBaseContour::GetWidthLine (  )  [inherited]

Definition at line 225 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_widthline.

Referenced by manualViewBullEye::ConstructVTKObjects().

00226 {
00227         return _widthline;
00228 }

Here is the caller graph for this function:

wxVtkBaseView * manualViewBaseContour::GetWxVtkBaseView (  )  [inherited]

int manualViewBaseContour::GetZ (  )  [inherited]

Definition at line 751 of file manualViewBaseContour.cpp.

Referenced by manualViewBaseContour::CopyAttributesTo().

00752 {
00753 //      return _Z;
00754         return 0;
00755 }

Here is the caller graph for this function:

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

Reimplemented from manualViewContour.

Definition at line 188 of file manualViewPerpPlaneContour.cxx.

References manualViewBaseContour::_pts, manualViewBaseContour::GetWxVtkBaseView(), and wxVtkBaseView::TransFromCoordScreenToWorld().

00189 {
00190         bool ok=false;
00191         vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)( this->GetWxVtkBaseView() );
00192         double X=x;
00193         double Y=y;
00194         double Z=z;
00195         vtkplane2Dview->TransFromCoordScreenToWorld(X,Y,Z);
00196         
00197         double ppA[3];
00198         _pts->GetPoint(0, ppA);
00199         if (sqrt( (ppA[0]-X)*(ppA[0]-X) + (ppA[1]-Y)*(ppA[1]-Y) ) <=2)
00200         {
00201                 ok = true;
00202         }
00203         return ok;
00204 }

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, and manualViewRoi.

Definition at line 229 of file manualViewContour.cpp.

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

00230 {
00231         _initialConoturModel->DeleteAllPoints();
00232 
00233         manualPoint *mp = NULL;
00234         double XX=x;
00235         double YY=y;
00236         double ZZ=z;
00237         TransfromCoordViewWorld(XX,YY,ZZ);
00238 
00239         int i, manualPointsSZ = _manContModel->GetSizeLstPoints();
00240         for ( i=0; i<manualPointsSZ; i++ )
00241         {
00242                 mp = _manContModel->GetManualPoint( i );
00243                 this->_initialConoturModel->AddPoint( mp->GetX() - XX, mp->GetY() - YY, mp->GetZ() );
00244         }
00245 }

Here is the call graph for this function:

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

Definition at line 344 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().

00345 {
00346         manualViewPoint         *mvp    = new manualViewPoint( this->GetWxVtkBaseView() );
00347 
00348 // EED 3 oct 2006
00349         mvp->SetSpacing(_spc);
00350 
00351         std::vector<manualViewPoint*>::iterator itNum = _lstViewPoints.begin() + id;
00352         _lstViewPoints.insert(itNum,mvp);
00353         _wxvtkbaseview->GetRenderer()->AddActor( mvp->CreateVtkPointActor() );
00354 }

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 266 of file manualViewContour.cpp.

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

00267 {
00268         manualPoint *mpOrigin = NULL;
00269 
00270         int i, manualPointsSZ = _manContModel->GetSizeLstPoints();
00271         for ( i=0; i<manualPointsSZ; i++ )
00272         {
00273                 mpOrigin = _manContModel->GetManualPoint( i );
00274                 mpOrigin->SetPoint( mpOrigin->GetX()+horizontalUnits, mpOrigin->GetY()+verticalUnits, mpOrigin->GetZ() );
00275         }
00276         UpdateViewPoints();
00277 }

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, and manualViewRoi.

Definition at line 247 of file manualViewContour.cpp.

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

00248 {
00249         manualPoint *mpOrigin = NULL;
00250         manualPoint *mpMoving = NULL;
00251         double XX=x;
00252         double YY=y;
00253         double ZZ=z;
00254 
00255         TransfromCoordViewWorld(XX,YY,ZZ);
00256 
00257         int i, manualPointsSZ = _manContModel->GetSizeLstPoints();
00258         for ( i=0; i<manualPointsSZ; i++ )
00259         {
00260                 mpOrigin = _manContModel->GetManualPoint( i );
00261                 mpMoving = _initialConoturModel->GetManualPoint(i);
00262                 mpOrigin->SetPoint( mpMoving->GetX()+XX, mpMoving->GetY() + YY, mpMoving->GetZ() );
00263         }
00264         UpdateViewPoints();
00265 }

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]

Definition at line 597 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(), manualRoiControler::InitRoi(), manualLineControler::InitRoi(), manualCircleControler::InitRoi(), manualRoiControler::MouseClickLeft(), manualLineControler::MouseClickLeft(), manualContourControler::MouseClickLeft(), manualCircleControler::MouseClickLeft(), manualContourControler::MouseDLeft(), 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().

00598 {
00599         if (_contourVtkActor!=NULL){
00600                 RefreshContour();
00601         }
00602         int i,size=_lstViewPoints.size();
00603         for (i=0;i<size;i++){
00604                 UpdateViewPoint(i);
00605                 _lstViewPoints[i]->UpdateColorActor();
00606         }
00607         UpdateColorActor();
00608 
00609         if (_show_text==true)
00610         {
00611                 RefreshText();
00612         }
00613 
00614         vtkRenderWindowInteractor *vri = _wxvtkbaseview->GetWxVTKRenderWindowInteractor ();
00615         if (vri==NULL)
00616         {
00617                 _wxvtkbaseview->GetRenWin()->Render();
00618         }
00619 
00620 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualViewPerpPlaneContour::RefreshContour (  )  [virtual]

Reimplemented from manualViewContour.

Definition at line 94 of file manualViewPerpPlaneContour.cxx.

References manualViewBaseContour::_manContModel, manualViewBaseContour::_pts, manualViewBaseContour::_spc, FilterCordinateXYZ(), vtkPlane2DView::GetImgSize(), manualViewBaseContour::GetNumberOfPoints(), manualContourModel::GetNumberOfPointsSpline(), manualContourModel::GetSpline_i_Point(), manualViewBaseContour::GetWxVtkBaseView(), and manualContourModel::UpdateSpline().

00095 {
00096 //      manualViewContour::RefreshContour();
00097 
00098         double pp1[3];
00099         double pp2[3];
00100         double u;
00101                 
00102 // JSTG 25-02-08 ----------------------------------------------------------
00103 //              tt;
00104 //--------------------------------------------------------
00105 
00106         double pp[3];
00107         double ppB[3];
00108         double ppC[3];
00109         ppB[0] = 999999;
00110         double dist,distMin = 99999999;
00111 
00112         vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)( this->GetWxVtkBaseView() );
00113         double center = vtkplane2Dview->GetImgSize() / 2;
00114 
00115         int i,np,nps;
00116         np              = GetNumberOfPoints( );
00117 
00118 //JSTG 25-02-08 ------------------------------------------
00119         //double t,delta;
00120     //nps               = GetNumberOfPointsSpline(); 
00121         nps = _manContModel->GetNumberOfPointsSpline();
00122         //delta = ( double ) ( np  ) / ( double ) ( nps-1  );
00123         _manContModel->UpdateSpline();
00124 //--------------------------------------------------------
00125 
00126         if ( np >= 2 )
00127         {
00128                 for( i = 0; i < nps; i++ ) 
00129                 {
00130 // JSTG 25-02-08 ----------------------------------------------------------
00131                         //t     = delta * (double)i ;
00132                         //tt    = delta * (double)(i+1) ;
00133                         //_manContModel->GetSplinePoint(t ,pp1[0],pp1[1],pp1[2]);
00134                         //_manContModel->GetSplinePoint(tt,pp2[0],pp2[1],pp2[2]);
00135                         _manContModel->GetSpline_i_Point(i ,&pp1[0],&pp1[1],&pp1[2]);
00136                         _manContModel->GetSpline_i_Point(i+1,&pp2[0],&pp2[1],&pp2[2]);
00137 //--------------------------------------------------------------------------
00138                         FilterCordinateXYZ(pp1[0],pp1[1],pp1[2]);
00139                         FilterCordinateXYZ(pp2[0],pp2[1],pp2[2]);
00140                         if (pp2[2]*pp1[2]<=0)
00141                         {
00142                                 if (pp1[2]-pp2[2]!=0) { 
00143                                         u = -pp2[2] / (pp1[2]-pp2[2]);
00144                                 } else  {
00145                                         u=9999999;
00146                                 }
00147                                 pp[0]    = ( pp1[0]-pp2[0] )*u + pp2[0];
00148                                 pp[1]    = ( pp1[1]-pp2[1] )*u + pp2[1];
00149                                 pp[2]    = ( pp1[2]-pp2[2] )*u + pp2[2];
00150                                 ppC[0] = pp[0] - center;
00151                                 ppC[1] = pp[1] - center;
00152                                 ppC[2] = pp[2] ;
00153                                 dist = sqrt( ppC[0]*ppC[0] + ppC[1]*ppC[1] + ppC[2]*ppC[2] );
00154                                 if (dist<distMin)
00155                                 {
00156                                         distMin=dist;
00157                                         ppB[0] = pp[0];
00158                                         ppB[1] = pp[1];
00159                                         ppB[2] = pp[2];
00160                                 }
00161                         }
00162 
00163                 }// for 
00164         } else {
00165                         _pts->SetPoint(0, 0 , 0 , 0);   
00166                         _pts->SetPoint(1, 0 , 0 , 0);   
00167         } // if
00168 
00169 //EED 27 sep 2006
00170         ppB[0]=ppB[0]*_spc[0];
00171         ppB[1]=ppB[1]*_spc[1];
00172 
00173         _pts->SetPoint( 0, ppB[0]   , ppB[1]+1 , 1 );   
00174         _pts->SetPoint( 1, ppB[0]   , ppB[1]-1 , 1 );   
00175         _pts->SetPoint( 2, ppB[0]   , ppB[1]   , 1 );   
00176         _pts->SetPoint( 3, ppB[0]-1 , ppB[1]   , 1 );   
00177         _pts->SetPoint( 4, ppB[0]+1 , ppB[1]   , 1 );   
00178 
00179 
00180         for( i = 5; i < nps; i++ ) 
00181         {
00182                 _pts->SetPoint( i, ppB[0] , ppB[1] , 1 );       
00183         }
00184 
00185 }

Here is the call graph for this function:

void manualViewBaseContour::RemoveCompleteContourActor (  )  [inherited]

Definition at line 96 of file manualViewBaseContour.cpp.

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

Referenced by manualViewBaseContour::DeleteContour().

00097 {
00098         /*vtkRenderer * theRenderer =*/  _wxvtkbaseview->GetRenderer(); // JPRx ??
00099          //Removing the spline
00100         RemoveSplineActor();
00101         RemoveTextActor();
00102 
00103         //Removing each point
00104         RemoveControlPoints();
00105         RefreshContour();
00106         Refresh();
00107 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualViewBaseContour::RemoveControlPoints (  )  [inherited]

Definition at line 157 of file manualViewBaseContour.cpp.

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

Referenced by manualContourControler::MouseMove(), manualViewBaseContour::RemoveCompleteContourActor(), and manualContourBaseControler::SetEditable().

00158 {
00159         if (_wxvtkbaseview!=NULL){
00160                 vtkRenderer * theRenderer = _wxvtkbaseview->GetRenderer();
00161                 int i,size=_lstViewPoints.size();
00162                 for (i=0;i<size; i++)
00163                 {
00164                         vtkActor * pointActor = _lstViewPoints[i]->GetVtkActor();
00165                         theRenderer->RemoveActor( pointActor );
00166                 } // for
00167         } // if
00168         SetIfViewControlPoints( false );
00169 }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Reimplemented in manualViewBullEye.

Definition at line 150 of file manualViewBaseContour.cpp.

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

Referenced by manualViewBaseContour::RemoveCompleteContourActor().

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

Here is the call graph for this function:

Here is the caller graph for this function:

void manualViewBaseContour::RemoveTextActor (  )  [inherited]

Definition at line 191 of file manualViewBaseContour.cpp.

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

Referenced by manualViewBaseContour::RemoveCompleteContourActor().

00192 {
00193         _wxvtkbaseview->GetRenderer()->RemoveActor2D( _textActor );
00194 }

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 444 of file manualViewBaseContour.cpp.

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

00445 {
00446         int i,size=_lstViewPoints.size();
00447         for (i=0;i<size;i++){
00448                 SelectPoint(i,select);
00449         }
00450 }

Here is the call graph for this function:

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

Definition at line 473 of file manualViewBaseContour.cpp.

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

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

00474 {
00475         int i,size=_lstViewPoints.size();
00476         for (i=0;i<size;i++){
00477                 SetPointPosibleSelected(i,select);
00478         }
00479 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualViewBaseContour::SelectLstPoints (  )  [inherited]

Definition at line 439 of file manualViewBaseContour.cpp.

00440 {
00441         // ToDo
00442 }

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

Definition at line 434 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_lstViewPoints.

Referenced by manualViewBaseContour::SelectAllPoints().

00435 {
00436         _lstViewPoints[i]->SetSelected(select);
00437 }

Here is the caller graph for this function:

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

Definition at line 493 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_lstViewPoints, manualViewBaseContour::_selected, manualViewBaseContour::GetEditable(), manualViewBaseContour::GetIdPoint(), manualViewBaseContour::ifTouchContour(), and manualViewBaseContour::SetPosibleSelected().

Referenced by manualContourBaseControler::MouseDLeft(), manualRoiControler::MouseMove(), manualLineControler::MouseMove(), manualContourControler::MouseMove(), manualCircleControler::MouseMove(), and manualContourBaseControler::MouseReleaseLeft().

00494 {
00495         bool result=false;
00496         SetPosibleSelected(result);
00497     int id = GetIdPoint(x,y,z);
00498         if( !GetEditable() && !_selected && id!= -1)
00499         {
00500                 result=true;
00501                 SetPosibleSelected(result);
00502         }
00503         else
00504         {
00505                 if ( (GetEditable()==true) && (id==-1 ) && (this->_lstViewPoints.size()>=2) )
00506                 {
00507                         if (ifTouchContour(x,y,z)==true)
00508                         {
00509                                 result=true;
00510                                 SetPosibleSelected(result);
00511                         }
00512                 }
00513 
00514                 if (GetEditable()==false)
00515                 {
00516                         if (ifTouchContour(x,y,z)==true)
00517                         {
00518                                 result=true;
00519                                 SetPosibleSelected(result);
00520                         }
00521                 }
00522 
00523 
00524         }
00525         return result;
00526 }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Reimplemented in manualView3DContour.

Definition at line 481 of file manualViewBaseContour.cpp.

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

Referenced by manualContourBaseControler::MouseDLeft(), manualRoiControler::MouseMove(), manualLineControler::MouseMove(), manualContourControler::MouseMove(), and manualCircleControler::MouseMove().

00482 {
00483         SelectAllPossibleSelected(false);
00484 
00485     int id = GetIdPoint(x,y,z);
00486         if (id!=-1)
00487         {
00488                 SetPointPosibleSelected(id,true);
00489         }
00490         return id;
00491 }

Here is the call graph for this function:

Here is the caller 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 656 of file manualViewBaseContour.cpp.

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

Referenced by manualViewBaseContour::CopyAttributesTo().

00657 {
00658         _coulorSelection_r = r;
00659         _coulorSelection_g = g;
00660         _coulorSelection_b = b;
00661 }

Here is the caller graph for this function:

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

Definition at line 408 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_editable.

Referenced by manualContourBaseControler::SetModelView().

00409 {
00410         _editable = condition;
00411 }

Here is the caller graph for this function:

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

Definition at line 452 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_viewControlPoints.

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

00453 {
00454         _viewControlPoints = ifShow;
00455 }

Here is the caller graph for this function:

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

Definition at line 224 of file manualViewContour.cpp.

References manualViewContour::_mesureScale.

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

00225 {
00226         _mesureScale = mesureScale;
00227 }

Here is the caller graph for this function:

void manualViewBaseContour::SetModel ( manualContourModel manContModel  )  [inherited]

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

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

Definition at line 468 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_lstViewPoints.

00469 {
00470         _lstViewPoints[id]->SetSelected(select);
00471 }

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

Definition at line 398 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_posibleSelected.

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

00399 {
00400         _posibleSelected=posibleSelected;
00401 }

Here is the caller graph for this function:

void manualViewBaseContour::SetRange ( int  range  )  [inherited]

void manualViewBaseContour::SetSelected ( bool  selected  )  [inherited]

Definition at line 393 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_selected.

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

00394 {
00395         _selected=selected;
00396 }

Here is the caller graph for this function:

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

Definition at line 881 of file manualViewBaseContour.cpp.

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

Referenced by wxWidgetMesure2D::OnVisibleInformation().

00882 {
00883         _show_text = ok;
00884         if (_show_text==false)
00885         {
00886                 _textActor->SetInput("00");
00887         }
00888 }

Here is the caller graph for this function:

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

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

Definition at line 860 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_contourVtkActor, manualViewBaseContour::_lstViewPoints, and manualViewBaseContour::_textActor.

Referenced by wxWidgetMesure2D::OnActiveMessureTool(), wxWidgetMesure2D::OnVisibleMessureTool(), manualContourContainer::setLumenVisibility(), and manualContourContainer::setWallVisibility().

00861 {
00862         double opacity;
00863         if (ok==true)
00864         {
00865                 opacity=1;
00866         } else {
00867                 opacity=0.5;
00868         }
00869         vtkActor *actor;
00870         int i,size=_lstViewPoints.size();
00871         for (i=0;i<size;i++){
00872                 actor = _lstViewPoints[i]->GetVtkActor();
00873                 actor->GetProperty()->SetOpacity( opacity );
00874         }
00875         _contourVtkActor->GetProperty()->SetOpacity( opacity );
00876         _textActor->GetProperty()->SetOpacity( opacity );
00877         _textActor->SetInput("00");
00878 
00879 }

Here is the caller graph for this function:

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

Definition at line 210 of file manualViewBaseContour.cpp.

References manualViewBaseContour::_lstViewPoints, manualViewBaseContour::_widthline, and manualViewBaseContour::UpdateColorActor().

Referenced by manualViewBullEye::ConstructVTKObjects().

00211 {
00212         _widthline = width;
00213         this->UpdateColorActor();
00214 
00215         // for the control points
00216         int id, size = _lstViewPoints.size();
00217         for( id=0; id<size; id++)
00218         {
00219                 this->_lstViewPoints[id]->SetWidthLine(_widthline);
00220         }
00221 
00222 }

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 manualViewPerpPlaneContour::TransfromCoordViewWorld ( double &  X,
double &  Y,
double &  Z,
int  type 
) [virtual]

Reimplemented from manualViewBaseContour.

Definition at line 85 of file manualViewPerpPlaneContour.cxx.

References manualViewBaseContour::GetWxVtkBaseView(), and vtkPlane2DView::TransfromCoordViewWorld2().

00086 {
00087         Z = 0;
00088         vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)( this->GetWxVtkBaseView() );
00089         vtkplane2Dview->TransfromCoordViewWorld2(X,Y,Z);
00090 }

Here is the call graph for this function:

void manualViewBaseContour::UnSelectAllPoints (  )  [inherited]

Definition at line 542 of file manualViewBaseContour.cpp.

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

00542                                              {
00543         int i,size=_lstViewPoints.size();
00544         for (i=0;i<size;i++){
00545                 UnSelectPoint(i);
00546         }
00547         Refresh();
00548 }

Here is the call graph for this function:

void manualViewBaseContour::UnSelectLstPoints (  )  [inherited]

Definition at line 538 of file manualViewBaseContour.cpp.

00538                                              {
00539         // ToDo
00540 }

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

Definition at line 533 of file manualViewBaseContour.cpp.

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

Referenced by manualViewBaseContour::UnSelectAllPoints().

00533                                               {
00534         _lstViewPoints[i]->SetSelected(false);
00535         Refresh();
00536 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualViewBaseContour::UpdateColorActor (  )  [inherited]

void manualViewPerpPlaneContour::UpdateViewPoint ( int  id  )  [virtual]

Reimplemented from manualViewBaseContour.

Definition at line 35 of file manualViewPerpPlaneContour.cxx.

References manualViewBaseContour::_lstViewPoints, manualViewBaseContour::_manContModel, FilterCordinateXYZ(), manualContourModel::GetManualPoint(), manualViewBaseContour::GetRange(), manualPoint::GetX(), manualPoint::GetY(), and manualPoint::GetZ().

00036 {  // virtual
00037         double x,y,z;
00038         manualPoint *mp = _manContModel->GetManualPoint(id);
00039         x = mp->GetX();
00040         y = mp->GetY();
00041         z = mp->GetZ();
00042         FilterCordinateXYZ(x,y,z);
00043 
00044         _lstViewPoints[id]->SetPositionXY( x , y ,GetRange(), z );
00045         if ((z>=-1) && (z<=1))
00046         {
00047                 _lstViewPoints[id]->GetVtkActor()->VisibilityOn();
00048         } else {
00049                 _lstViewPoints[id]->GetVtkActor()->VisibilityOff();
00050         }
00051 }

Here is the call graph for this function:

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

Definition at line 316 of file manualViewBaseContour.cpp.

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

Referenced by manualViewContour::MoveContour().

00317 {
00318         int id, size = _lstViewPoints.size();
00319         for( id=0; id<size; id++)
00320         {
00321                 UpdateViewPoint( id );
00322         }
00323 }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

std::vector<manualViewPoint*> manualViewBaseContour::_lstViewPoints [protected, inherited]

vtkPoints* manualViewBaseContour::_pts [protected, inherited]

bool manualViewBaseContour::_show_text [protected, inherited]

int manualViewBaseContour::_sizePointsContour [protected, inherited]

double manualViewBaseContour::_spc[3] [protected, inherited]

vtkTextActor* manualViewBaseContour::_textActor [protected, inherited]


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

Generated on Fri Jun 12 00:08:42 2009 for creaMaracasVisu by  doxygen 1.5.7.1