manualContourModelBullEye Class Reference

#include <manualContourModelBullEye.h>

Inheritance diagram for manualContourModelBullEye:

Inheritance graph
[legend]
Collaboration diagram for manualContourModelBullEye:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 manualContourModelBullEye ()
virtual ~manualContourModelBullEye ()
virtual
manualContourModelBullEye
Clone ()
void CopyAttributesTo (manualContourModelBullEye *cloneObject)
virtual void Save (FILE *ff)
virtual void Open (FILE *ff)
int GetNumberOfPointsSplineSectorBulleEje ()
void SetNumberOfPointsSplineSectorBulleEje (int)
void AddSector (double radioA, double radioB, double ang, double angDelta)
void GetSector (int id, double *radioA, double *radioB, double *ang, double *angDelta)
manualContourModelBullEyeSectorGetModelSector (int id)
void ResetSectors ()
int GetSizeOfSectorLst ()
virtual void UpdateSpline ()
virtual std::vector
< manualContourModel * > 
ExploseModel ()
void CopyAttributesTo (manualContourModel *cloneObject)
int AddPoint (double x, double y, double z)
int InsertPoint (double x, double y, double z)
void InsertPoint_id (int id, double x, double y, double z)
void AddManualPoint (manualPoint *theManualPoint)
void Transform_Ax_Plus_B (double Ax, double Bx, double Ay, double By)
void DeletePoint (int i)
void DeleteAllPoints ()
void MovePoint (int i, double dx, double dy, double dz)
void MoveLstPoints (double dx, double dy, double dz)
void MoveAllPoints (double dx, double dy, double dz)
int GetIdPoint (double x, double y, double z, int i_range, int type)
manualPointGetManualPoint (int id)
int GetSizeLstPoints ()
int GetNumberOfPointsSpline ()
void SetNumberOfPointsSpline (int size)
void SetCloseContour (bool closeContour)
bool IfCloseContour ()
double GetPathSize ()
double GetPathArea ()
void GetNearestPointAndNormal (double *p, double *rp, double *rn)
virtual void GetSpline_i_Point (int i, double *x, double *y, double *z)
void GetSpline_t_Point (double t, double *x, double *y, double *z)

Private Member Functions

virtual int GetTypeModel ()

Private Attributes

int _numberPointsSlineBySector
std::vector
< manualContourModelBullEyeSector * > 
_lstModelBullEyeSector


Detailed Description

Definition at line 9 of file manualContourModelBullEye.h.


Constructor & Destructor Documentation

manualContourModelBullEye::manualContourModelBullEye (  ) 

Definition at line 8 of file manualContourModelBullEye.cpp.

References _numberPointsSlineBySector.

Referenced by Clone().

00009 : manualContourModel()
00010 {
00011         _numberPointsSlineBySector=101;   // impaire
00012 }

Here is the caller graph for this function:

manualContourModelBullEye::~manualContourModelBullEye (  )  [virtual]

Definition at line 14 of file manualContourModelBullEye.cpp.

00015 {
00016 }


Member Function Documentation

manualContourModelBullEye * manualContourModelBullEye::Clone (  )  [virtual]

Reimplemented from manualContourModel.

Definition at line 20 of file manualContourModelBullEye.cpp.

References CopyAttributesTo(), and manualContourModelBullEye().

00021 {
00022         manualContourModelBullEye * clone = new manualContourModelBullEye();
00023         CopyAttributesTo(clone);
00024         return clone;
00025 }

Here is the call graph for this function:

void manualContourModelBullEye::CopyAttributesTo ( manualContourModelBullEye cloneObject  ) 

Definition at line 29 of file manualContourModelBullEye.cpp.

References manualContourModel::CopyAttributesTo().

Referenced by Clone().

00030 {
00031         // Fathers object
00032         manualContourModel::CopyAttributesTo(cloneObject);
00033 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualContourModelBullEye::Save ( FILE *  ff  )  [virtual]

Reimplemented from manualContourModel.

Definition at line 122 of file manualContourModelBullEye.cpp.

References _lstModelBullEyeSector, GetSizeOfSectorLst(), and manualContourModel::Save().

00123 {
00124         manualContourModel::Save(ff);
00125         int i,size = GetSizeOfSectorLst();
00126         fprintf(ff,"numberOfSections %d \n",size);
00127         for ( i=0 ; i<size ; i++ )
00128         {
00129                 _lstModelBullEyeSector[i]->Save(ff);
00130         }
00131 }

Here is the call graph for this function:

void manualContourModelBullEye::Open ( FILE *  ff  )  [virtual]

Reimplemented from manualContourModel.

Definition at line 134 of file manualContourModelBullEye.cpp.

References _lstModelBullEyeSector, AddSector(), manualContourModel::Open(), and ResetSectors().

00135 {
00136         manualContourModel::Open(ff);
00137 
00138         ResetSectors();
00139 
00140         char tmp[255];
00141         int i;
00142         int numberOfSections;
00143 //      double radioA,radioB,ang,deltaAng;
00144 
00145         fscanf(ff,"%s",tmp); // NumberOfSections
00146         fscanf(ff,"%s",tmp); // ##
00147         numberOfSections = atoi(tmp);
00148         for (i=0;i<numberOfSections;i++)
00149         {
00150                 AddSector(0,1,90,0);
00151                 _lstModelBullEyeSector[i]->Open(ff);
00152         }
00153 
00154 }

Here is the call graph for this function:

int manualContourModelBullEye::GetNumberOfPointsSplineSectorBulleEje (  ) 

Definition at line 42 of file manualContourModelBullEye.cpp.

References _numberPointsSlineBySector.

00043 {
00044         return _numberPointsSlineBySector;
00045 }

void manualContourModelBullEye::SetNumberOfPointsSplineSectorBulleEje ( int  numpoints  ) 

Definition at line 48 of file manualContourModelBullEye.cpp.

References _numberPointsSlineBySector.

00049 {
00050         this->_numberPointsSlineBySector = numpoints;
00051 }

void manualContourModelBullEye::AddSector ( double  radioA,
double  radioB,
double  ang,
double  angDelta 
)

Definition at line 54 of file manualContourModelBullEye.cpp.

References _lstModelBullEyeSector, manualContourModel::SetNumberOfPointsSpline(), and manualContourModelBullEyeSector::SetSector().

Referenced by Open().

00058 {
00059         manualContourModelBullEyeSector *modelSector = new manualContourModelBullEyeSector();
00060         modelSector->SetSector(radioA,radioB,ang,angDelta);
00061         modelSector->SetNumberOfPointsSpline( this->GetNumberOfPointsSplineSectorBulleEje() );
00062         _lstModelBullEyeSector.push_back(modelSector);
00063 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualContourModelBullEye::GetSector ( int  id,
double *  radioA,
double *  radioB,
double *  ang,
double *  angDelta 
)

Definition at line 72 of file manualContourModelBullEye.cpp.

References _lstModelBullEyeSector.

00077 {
00078         _lstModelBullEyeSector[id]->GetSector(radioA,radioB,ang,angDelta);
00079 }

manualContourModelBullEyeSector * manualContourModelBullEye::GetModelSector ( int  id  ) 

Definition at line 66 of file manualContourModelBullEye.cpp.

References _lstModelBullEyeSector.

Referenced by manualViewBullEye::ConstructVTKObjects().

00067 {
00068         return _lstModelBullEyeSector[id];
00069 }

Here is the caller graph for this function:

void manualContourModelBullEye::ResetSectors (  ) 

Definition at line 105 of file manualContourModelBullEye.cpp.

References _lstModelBullEyeSector.

Referenced by Open().

00106 {
00107         int i,size=_lstModelBullEyeSector.size();
00108         for (i=0;i<size;i++)
00109         {
00110                 delete _lstModelBullEyeSector[i];
00111         }
00112         _lstModelBullEyeSector.clear();
00113 }

Here is the caller graph for this function:

int manualContourModelBullEye::GetSizeOfSectorLst (  ) 

Definition at line 116 of file manualContourModelBullEye.cpp.

References _lstModelBullEyeSector.

Referenced by manualViewBullEye::ConstructVTKObjects(), and Save().

00117 {
00118         return _lstModelBullEyeSector.size();
00119 }

Here is the caller graph for this function:

void manualContourModelBullEye::UpdateSpline (  )  [virtual]

Reimplemented from manualContourModel.

Definition at line 81 of file manualContourModelBullEye.cpp.

References _lstModelBullEyeSector, manualContourModel::GetManualPoint(), manualPoint::GetX(), manualPoint::GetY(), and manualContourModel::UpdateSpline().

00082 {
00083         manualContourModel::UpdateSpline();
00084 
00085         if (this->GetSizeLstPoints()>2){
00086                 double cx,cy;
00087                 double ww,hh;
00088                 manualPoint *mpA = GetManualPoint(0);
00089                 manualPoint *mpB = GetManualPoint(2);
00090                 cx = (mpA->GetX() + mpB->GetX()) / 2.0;
00091                 cy = (mpA->GetY() + mpB->GetY()) / 2.0;
00092                 ww = fabs( mpA->GetX() - mpB->GetX() )/2.0;
00093                 hh = fabs( mpA->GetY() - mpB->GetY() )/2.0;
00094                 int i,size = _lstModelBullEyeSector.size();
00095                 for (i=0;i<size;i++)
00096                 {
00097                         _lstModelBullEyeSector[i]->SetCenter(cx,cy);
00098                         _lstModelBullEyeSector[i]->SetSize(ww,hh);
00099                 } // for
00100         }
00101 }

Here is the call graph for this function:

std::vector< manualContourModel * > manualContourModelBullEye::ExploseModel (  )  [virtual]

Reimplemented from manualContourModel.

Definition at line 157 of file manualContourModelBullEye.cpp.

References _lstModelBullEyeSector.

00158 {
00159 //EED004
00160         std::vector<manualContourModel*> lstTmp;
00161         int i,iSize=_lstModelBullEyeSector.size();
00162         for (i=0;i<iSize;i++)
00163         {
00164                 lstTmp.push_back( _lstModelBullEyeSector[i] );
00165         }
00166         return lstTmp;
00167 }

int manualContourModelBullEye::GetTypeModel (  )  [private, virtual]

Reimplemented from manualContourModel.

Definition at line 36 of file manualContourModelBullEye.cpp.

00037 {
00038         return 4;
00039 }

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

Definition at line 652 of file manualContourModel.cpp.

References manualContourModel::_closeContour, manualContourModel::AddManualPoint(), manualContourModel::Clone(), manualContourModel::GetManualPoint(), manualContourModel::GetNumberOfPointsSpline(), manualContourModel::GetSizeLstPoints(), manualContourModel::SetCloseContour(), manualContourModel::SetNumberOfPointsSpline(), and manualContourModel::UpdateSpline().

Referenced by manualContourModel::Clone(), manualContourModelRoi::CopyAttributesTo(), manualContourModelLine::CopyAttributesTo(), manualContourModelCircle::CopyAttributesTo(), manualContourModelBullEyeSector::CopyAttributesTo(), and CopyAttributesTo().

00653 {
00654         // Fathers object
00655         //XXXX::CopyAttributesTo(cloneObject);
00656 
00657         cloneObject->SetCloseContour( this->IfCloseContour() );
00658         int i, size = GetSizeLstPoints();
00659         for( i=0; i<size; i++ )
00660         {
00661                 cloneObject->AddManualPoint( GetManualPoint( i )->Clone() );
00662         }
00663         cloneObject->SetNumberOfPointsSpline( GetNumberOfPointsSpline () );
00664         cloneObject->SetCloseContour( _closeContour );
00665         cloneObject->UpdateSpline();
00666 }

Here is the call graph for this function:

Here is the caller graph for this function:

int manualContourModel::AddPoint ( double  x,
double  y,
double  z 
) [inherited]

Definition at line 54 of file manualContourModel.cpp.

References manualContourModel::_lstPoints, manualContourModel::AddManualPoint(), and manualPoint::SetPoint().

Referenced by manualContourBaseControler::AddPoint(), manualContour3VControler::AddPoint(), AutoControlPoints::ChargeSpline(), manualViewContour::InitMove(), manualContourBaseControler::InsertPoint(), PropContour::method_Spline(), manualContourModel::Open(), manualContourContainer::refreshLumen(), manualContourContainer::refreshWall(), and wxMaracasCoutourTool::SetControlPoints().

00055 {
00056    manualPoint *mp = new manualPoint();
00057    mp->SetPoint(x,y,z);
00058    AddManualPoint(mp);
00059    //UpdateSpline();
00060 
00061    return _lstPoints.size()-1;
00062 }

Here is the call graph for this function:

Here is the caller graph for this function:

int manualContourModel::InsertPoint ( double  x,
double  y,
double  z 
) [inherited]

Definition at line 64 of file manualContourModel.cpp.

References manualContourModel::_closeContour, manualContourModel::_lstPoints, and manualContourModel::InsertPoint_id().

Referenced by manualContourBaseControler::InsertPoint(), and manualContour3VControler::InsertPoint().

00065 {
00066         double dd,ddmin=9999999;
00067         int    ibak=0;
00068         double xx,x1,x2;
00069         double yy,y1,y2;
00070         double zz,z1,z2;
00071         int i,ii,iii,size=_lstPoints.size();
00072         double j,MaxDivisions=20,porcentage;
00073         int sizeB=size;
00074 
00075         if (_closeContour==false)
00076         {
00077                 size=size-1;
00078         }
00079 
00080         double jbak;
00081 
00082         for ( i=0 ; i<size ; i++ )
00083         {
00084                 ii=i % sizeB ;
00085                 iii=(i+1) % sizeB;
00086                 x1=_lstPoints[ii]->GetX();
00087                 y1=_lstPoints[ii]->GetY();
00088                 z1=_lstPoints[ii]->GetZ();
00089                 x2=_lstPoints[iii]->GetX();
00090                 y2=_lstPoints[iii]->GetY();
00091                 z2=_lstPoints[iii]->GetZ();
00092                 for (j=0; j<=MaxDivisions; j++)
00093                 {
00094                         porcentage=(j/MaxDivisions);
00095                         xx=(x2-x1)*porcentage+x1;
00096                         yy=(y2-y1)*porcentage+y1;
00097                         zz=(z2-z1)*porcentage+z1;
00098                         dd=sqrt( (xx-x)*(xx-x) + (yy-y)*(yy-y) + (zz-z)*(zz-z) );
00099                         if ( dd<ddmin )
00100                         {
00101                                 ddmin=dd;
00102                                 ibak=iii;
00103                                 jbak=j;
00104                         }
00105                 }
00106         }
00107 
00108         if (_closeContour==false)
00109         {
00110                 if ( (ibak==1) && (jbak==0) )
00111                 {
00112                         ibak=0;
00113                 }
00114                 if ( ( ibak==size ) && ( jbak==MaxDivisions ) )
00115                 {
00116                         ibak=sizeB;
00117                 }
00118         }
00119 
00120 
00121 //JSTG - 25-04-08 ----------------------------------------------------------
00122         //manualPoint *mp = new manualPoint();
00123         //mp->SetPoint(x,y,z);
00124         //std::vector<manualPoint*>::iterator itNum = _lstPoints.begin() + ibak;
00125         //_lstPoints.insert(itNum,mp);
00126         InsertPoint_id(ibak,x,y,z);
00127 //----------------------------------------------------------------------------
00128 
00129         return ibak;
00130 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualContourModel::InsertPoint_id ( int  id,
double  x,
double  y,
double  z 
) [inherited]

Definition at line 132 of file manualContourModel.cpp.

References manualContourModel::_lstPoints, and manualPoint::SetPoint().

Referenced by manualContourModel::InsertPoint().

00133 {
00134         manualPoint *mp = new manualPoint();
00135         mp->SetPoint(x,y,z);
00136         std::vector<manualPoint*>::iterator itNum = _lstPoints.begin() + id;
00137         _lstPoints.insert(itNum,mp);
00138 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualContourModel::AddManualPoint ( manualPoint theManualPoint  )  [inherited]

Definition at line 670 of file manualContourModel.cpp.

References manualContourModel::_lstPoints.

Referenced by manualContourModel::AddPoint(), and manualContourModel::CopyAttributesTo().

00671 {
00672         _lstPoints.push_back( theManualPoint );
00673 }

Here is the caller graph for this function:

void manualContourModel::Transform_Ax_Plus_B ( double  Ax,
double  Bx,
double  Ay,
double  By 
) [inherited]

Definition at line 684 of file manualContourModel.cpp.

References manualContourModel::GetManualPoint(), manualContourModel::GetSizeLstPoints(), manualPoint::GetX(), manualPoint::GetY(), manualPoint::SetPointX(), and manualPoint::SetPointY().

00685 {
00686         manualPoint * mp;
00687 
00688         int i, size = GetSizeLstPoints();
00689 
00690         for( i=0; i<size; i++ )
00691         {
00692                 mp = GetManualPoint( i );
00693 
00694                 mp->SetPointX( mp->GetX()*Ax + Bx );
00695                 mp->SetPointY( mp->GetY()*Ay + By );
00696         }
00697 }

Here is the call graph for this function:

void manualContourModel::DeletePoint ( int  i  )  [inherited]

Definition at line 141 of file manualContourModel.cpp.

References manualContourModel::_lstPoints.

Referenced by manualContourBaseControler::DeleteActualMousePoint().

00142 {
00143         std::vector<manualPoint*>::iterator itNum = _lstPoints.begin() + i;
00144    _lstPoints.erase(itNum);
00145 }

Here is the caller graph for this function:

void manualContourModel::DeleteAllPoints (  )  [inherited]

Definition at line 147 of file manualContourModel.cpp.

References manualContourModel::_lstPoints, and manualContourModel::UpdateSpline().

Referenced by AutoControlPoints::ChargeSpline(), manualContourBaseControler::DeleteContour(), manualViewContour::InitMove(), PropContour::method_Spline(), manualContourContainer::refreshLumen(), manualContourContainer::refreshWall(), and wxMaracasCoutourTool::SetControlPoints().

00148 {
00149         int i,size=_lstPoints.size();
00150         for (i=0;i<size;i++){
00151            _lstPoints.erase( _lstPoints.begin() );
00152         }
00153         this->UpdateSpline();
00154 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualContourModel::MovePoint ( int  i,
double  dx,
double  dy,
double  dz 
) [inherited]

Definition at line 157 of file manualContourModel.cpp.

References manualContourModel::_lstPoints, manualPoint::GetX(), manualPoint::GetY(), manualPoint::GetZ(), and manualPoint::SetPoint().

Referenced by manualContourModel::MoveAllPoints().

00158 {
00159         manualPoint *mp=_lstPoints[i];
00160         double x=mp->GetX()+dx;
00161         double y=mp->GetY()+dy;
00162         double z=mp->GetZ()+dz;
00163         mp->SetPoint(x,y,z);
00164 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualContourModel::MoveLstPoints ( double  dx,
double  dy,
double  dz 
) [inherited]

Definition at line 166 of file manualContourModel.cpp.

00167 {
00168         // ToDo
00169 }

void manualContourModel::MoveAllPoints ( double  dx,
double  dy,
double  dz 
) [inherited]

Definition at line 171 of file manualContourModel.cpp.

References manualContourModel::_lstPoints, and manualContourModel::MovePoint().

00172 {
00173         int i,size=_lstPoints.size();
00174         for (i=0;i<size;i++){
00175                 MovePoint(i,dx,dy,dz);
00176         }
00177 }

Here is the call graph for this function:

int manualContourModel::GetIdPoint ( double  x,
double  y,
double  z,
int  i_range,
int  type 
) [inherited]

Definition at line 186 of file manualContourModel.cpp.

References manualContourModel::_lstPoints, manualPoint::GetX(), manualPoint::GetY(), and manualPoint::GetZ().

Referenced by manualViewBaseContour::GetIdPoint(), manualView3VContour::GetIdPoint(), and manualContourBaseControler::Magnet().

00187 {
00188         double range = i_range+1;
00189 
00190         double xx,yy,zz,dd,ddmin=9999999;
00191         int ibak=-1;
00192         int i,size=_lstPoints.size();
00193         for (i=0;i<size;i++){
00194                 manualPoint *mp=_lstPoints[i];
00195                 xx=mp->GetX();
00196                 yy=mp->GetY();
00197                 zz=mp->GetZ();
00198 
00199                 if (type==-1)
00200                 {
00201                         if ((fabs(xx-x)<range) && (fabs(yy-y)<range) && (fabs(zz-z)<range)) {
00202                            dd=sqrt(   (xx-x)*(xx-x) + (yy-y)*(yy-y) + (zz-z)*(zz-z) );
00203                            if (dd<ddmin){
00204                                    ddmin=dd;
00205                                    ibak=i;
00206                            }
00207                         }
00208                 }
00209                 if (type==0)
00210                 {
00211                         if ((fabs(yy-y)<range) && (fabs(zz-z)<range)) {
00212                            dd=sqrt(   (yy-y)*(yy-y) + (zz-z)*(zz-z) );
00213                            if (dd<ddmin){
00214                                    ddmin=dd;
00215                                    ibak=i;
00216                            }
00217                         }
00218                 }
00219                 if (type==1)
00220                 {
00221                         if ((fabs(xx-x)<range) && (fabs(zz-z)<range)) {
00222                            dd=sqrt(   (xx-x)*(xx-x)  + (zz-z)*(zz-z) );
00223                            if (dd<ddmin){
00224                                    ddmin=dd;
00225                                    ibak=i;
00226                            }
00227                         }
00228                 }
00229                 if (type==2)
00230                 {
00231                         if ((fabs(xx-x)<range) && (fabs(yy-y)<range) ) {
00232                            dd=sqrt(   (xx-x)*(xx-x) + (yy-y)*(yy-y)  );
00233                            if (dd<ddmin){
00234                                    ddmin=dd;
00235                                    ibak=i;
00236                            }
00237                         }
00238                 }
00239         }
00240         return ibak;
00241 }

Here is the call graph for this function:

Here is the caller graph for this function:

manualPoint * manualContourModel::GetManualPoint ( int  id  )  [inherited]

Definition at line 243 of file manualContourModel.cpp.

References manualContourModel::_lstPoints.

Referenced by manualContourModel::CopyAttributesTo(), manualView3DContour::GetIdPoint2(), manualViewRoi::GetMinMax(), manualViewCircle::GetMinMax(), manualViewBaseContour::GetMinMax(), manualContourModel::GetSpline_t_Point(), manualViewRoi::InitMove(), manualViewLine::InitMove(), manualViewContour::InitMove(), manualViewCircle::InitMove(), manualRoiControler::InitRoi(), manualLineControler::InitRoi(), manualCircleControler::InitRoi(), manualContourBaseControler::Magnet(), manualContour3DControler::MouseClickLeft(), manualViewRoi::MoveContour(), manualViewLine::MoveContour(), manualViewContour::MoveContour(), manualViewCircle::MoveContour(), wxMaracasCoutourTool::OnSaveControlPoints(), manualViewRoi::RefreshContour(), manualContourContainer::refreshLumen(), manualViewContour::RefreshText(), manualContourContainer::refreshWall(), manualContourBaseControler::SetPoint(), manualContour3VControler::SetPoint(), manualContourBaseControler::SetPointX(), manualContourBaseControler::SetPointY(), manualContourBaseControler::SetPointZ(), manualRoiControler::SetRoi(), manualContourModel::Transform_Ax_Plus_B(), manualContourModelCircle::UpdateSpline(), UpdateSpline(), manualContourModel::UpdateSpline(), manualViewPerpPlaneContour::UpdateViewPoint(), manualViewBaseContour::UpdateViewPoint(), and manualView3VContour::UpdateViewPoint().

00244 {
00245         return _lstPoints[id];
00246 }

Here is the caller graph for this function:

int manualContourModel::GetSizeLstPoints (  )  [inherited]

Definition at line 248 of file manualContourModel.cpp.

References manualContourModel::_lstPoints.

Referenced by manualContourModel::CopyAttributesTo(), manualContourBaseControler::DeleteActualMousePoint(), wxMaracas_ManualTree_MPRDlg::ExportPoints(), manualView3DContour::GetIdPoint2(), manualViewRoi::GetMinMax(), manualViewBaseContour::GetMinMax(), manualViewRoi::InitMove(), manualViewLine::InitMove(), manualViewContour::InitMove(), manualViewCircle::InitMove(), manualViewContour::MoveContour(), wxMaracasCoutourTool::OnSaveControlPoints(), manualContourContainer::refreshLumen(), manualContourContainer::refreshWall(), manualContourModel::Transform_Ax_Plus_B(), and manualContourModelCircle::UpdateSpline().

00249 {
00250         return _lstPoints.size();
00251 }

Here is the caller graph for this function:

int manualContourModel::GetNumberOfPointsSpline (  )  [inherited]

Definition at line 253 of file manualContourModel.cpp.

References manualContourModel::_sizePointsContour.

Referenced by wxMaracasCoutourTool::AnalisisContourInside(), AutoControlPoints::ChargeSpline(), manualViewBaseContour::ConstructVTKObjects(), manualContourModel::CopyAttributesTo(), ContourExtractData::Fill_lstlstlstVecXY(), ContourExtractData::GetMinMaxPoint(), wxMaracasCoutourTool::GetMinMaxPoint(), manualContourModel::GetNearestPointAndNormal(), manualContourBaseControler::GetNumberOfPointsSplineManualContour(), manualContourModel::GetPathArea(), manualContourModel::GetPathSize(), manualContourModelBullEyeSector::GetSpline_i_Point(), wxMaracasCoutourTool::GetSplinePoints(), PropContour::method_Spline(), wxMaracasCoutourTool::OnSaveContour(), manualViewPerpPlaneContour::RefreshContour(), manualViewContour::RefreshContour(), manualViewBullEyeSector::RefreshContour(), manualView3VContour::RefreshContour(), and manualContourModelCircle::UpdateSpline().

00254 {
00255         return _sizePointsContour;
00256 }

Here is the caller graph for this function:

void manualContourModel::SetNumberOfPointsSpline ( int  size  )  [inherited]

Definition at line 258 of file manualContourModel.cpp.

References manualContourModel::_sizePointsContour.

Referenced by AddSector(), AutoControlPoints::ChargeSpline(), manualRoiControler::Configure(), wxMaracasCoutourTool::ConfigureVTK(), manualContourModel::CopyAttributesTo(), manualContourModelLine::manualContourModelLine(), manualContourModelRoi::manualContourModelRoi(), and PropContour::method_Spline().

00259 {
00260         _sizePointsContour = size;
00261 }

Here is the caller graph for this function:

void manualContourModel::SetCloseContour ( bool  closeContour  )  [inherited]

Definition at line 266 of file manualContourModel.cpp.

References manualContourModel::_closeContour, manualContourModel::_cntSplineX, manualContourModel::_cntSplineY, and manualContourModel::_cntSplineZ.

Referenced by AutoControlPoints::ChargeSpline(), wxManualTree_MPRWidget::ConfigureContour(), manualContourModel::CopyAttributesTo(), manualContourModel::manualContourModel(), manualContourModelLine::manualContourModelLine(), PropContour::method_Spline(), manualContourControler::MouseClickLeft(), wxWidgetMesure2D::OnCloseContour(), and manualContourBaseControler::OnRightButtonDown().

00267 {
00268         _closeContour = closeContour;
00269         if (_closeContour==true)
00270         {
00271                 _cntSplineX->ClosedOn();
00272                 _cntSplineY->ClosedOn();
00273                 _cntSplineZ->ClosedOn();
00274         } else {
00275                 _cntSplineX->ClosedOff();
00276                 _cntSplineY->ClosedOff();
00277                 _cntSplineZ->ClosedOff();
00278         }
00279 }

Here is the caller graph for this function:

bool manualContourModel::IfCloseContour (  )  [inherited]

Definition at line 282 of file manualContourModel.cpp.

References manualContourModel::_closeContour.

Referenced by manualContourModel::GetPathArea(), and manualViewContour::RefreshText().

00283 {
00284         return _closeContour;
00285 }

Here is the caller graph for this function:

double manualContourModel::GetPathSize (  )  [inherited]

Definition at line 386 of file manualContourModel.cpp.

References manualContourModel::_lstPoints, manualContourModel::GetNumberOfPointsSpline(), manualContourModel::GetSpline_i_Point(), and manualContourModel::UpdateSpline().

Referenced by AutoControlPoints::ChargeSpline().

00387 {
00388         double result = 0;
00389         double x1,y1,z1;
00390         double x2,y2,z2;
00391 
00392 // JSTG 25-02-08 -----------------------------
00393         //double t,delta;
00394         //int i,np,nps;
00395         int i;
00396 //--------------------------------------------
00397 
00398         if (_lstPoints.size()==2)
00399         {
00400                 x1=_lstPoints[0]->GetX();
00401                 y1=_lstPoints[0]->GetY();
00402                 z1=_lstPoints[0]->GetZ();
00403                 x2=_lstPoints[1]->GetX();
00404                 y2=_lstPoints[1]->GetY();
00405                 z2=_lstPoints[1]->GetZ();
00406                 result = sqrt( (x2-x1)*(x2-x1) + (y2-y1)*(y2-y1) + (z2-z1)*(z2-z1) );
00407         }
00408         if (_lstPoints.size()>2)
00409         {
00410 
00411 // JSTG 25-02-08 ------------------------------------------
00412                 //np  = _lstPoints.size( );
00413                 //nps = 200;
00414                 //delta=( double ) ( np  ) / ( double ) ( nps  );
00415                 UpdateSpline();
00416                 //GetSplinePoint(0,x1,y1,z1);
00417                 GetSpline_i_Point(0,&x1,&y1,&z1);
00418 
00419                 //for( i = 1; i < nps; i++ )
00420                 for( i = 1; i < GetNumberOfPointsSpline(); i++ )
00421                 {
00422                         //t = delta * (double)i;
00423                         //GetSplinePoint(t,x2,y2,z2);
00424                         GetSpline_i_Point(i,&x2,&y2,&z2);
00425 //---------------------------------------------------------
00426                         result=result + sqrt( (x2-x1)*(x2-x1) + (y2-y1)*(y2-y1) + (z2-z1)*(z2-z1) );
00427                         x1=x2;
00428                         y1=y2;
00429                         z1=z2;
00430                 }// for
00431         }
00432 
00433         return result;
00434 }

Here is the call graph for this function:

Here is the caller graph for this function:

double manualContourModel::GetPathArea (  )  [inherited]

Definition at line 436 of file manualContourModel.cpp.

References manualContourModel::_lstPoints, manualContourModel::GetNumberOfPointsSpline(), manualContourModel::GetSpline_i_Point(), manualContourModel::IfCloseContour(), and manualContourModel::UpdateSpline().

00437 {
00438         double result = 555;
00439         if ((_lstPoints.size()>=3) && IfCloseContour()==true )
00440         {
00441                 double area;
00442 //JSTG 25-02-08 ---------------------------------------------
00443                 //double ti,tj;
00444 //-----------------------------------------------------------
00445                 double x1,y1,z1;
00446                 double x2,y2,z2;
00447                 bool okArea=true;
00448                 int i, j;
00449 
00450                 // This uses Green's theorem:
00451                 // A = 1/2 * sum( xiyi+1 - xi+1yi); pO == pN
00452                 // A < 0 -> A = |A| (a negative value could raise because points are
00453                 // given in clockwise order).
00454 
00455 //JSTG 25-02-08 -------------------------------------------------
00456                 //int np  = _lstPoints.size( );
00457                 //int nps = 200;
00458                 int nps = GetNumberOfPointsSpline();
00459                 //double delta=( double ) ( np  ) / ( double ) ( nps  );
00460                 UpdateSpline();
00461                 for( i = 0, area = 0.0; i < nps; i++ )
00462                 {
00463                         j = ( i + 1 ) % nps;
00464                         //ti = delta * (double)i;
00465                         //tj = delta * (double)j;
00466                         //GetSplinePoint(ti,x1,y1,z1);
00467                         //GetSplinePoint(tj,x2,y2,z2);
00468                         GetSpline_i_Point(i,&x1,&y1,&z1);
00469                         GetSpline_i_Point(j,&x2,&y2,&z2);
00470 //----------------------------------------------------------------
00471                         area +=
00472                                         (x1 * y2 ) -
00473                                         ( x2 * y1 );
00474                         if (z1!=z2)
00475                         {
00476                                 okArea=false;
00477                         }
00478                 }// for
00479                 area /= 2.0;
00480                 area = fabs( area );
00481 
00482 /*
00483                 for( i = 0, area = 0.0; i < _lstPoints.size(); i++ )
00484                 {
00485                         j = ( i + 1 ) % _lstPoints.size();
00486                         //  Area
00487                         area +=
00488                                         (_lstPoints[i]->GetX() * _lstPoints[j]->GetY() ) -
00489                                         ( _lstPoints[j]->GetX() * _lstPoints[i]->GetY() );
00490                         if (_lstPoints[0]->GetZ()!=_lstPoints[i]->GetZ())
00491                         {
00492                                 okArea=false;
00493                         }
00494                 } // rof
00495                 area /= 2.0;
00496                 area = fabs( area );
00497 */
00498 
00499                 if (okArea==true)
00500                 {
00501                         result = area;
00502                 } else {
00503                         result = -1;
00504                 }
00505 
00506         } else {
00507                 result = 0;
00508         }
00509         return result;
00510 }

Here is the call graph for this function:

void manualContourModel::GetNearestPointAndNormal ( double *  p,
double *  rp,
double *  rn 
) [inherited]

Definition at line 517 of file manualContourModel.cpp.

References manualContourModel::_lstPoints, manualContourModel::GetNumberOfPointsSpline(), manualContourModel::GetSpline_i_Point(), and manualContourModel::UpdateSpline().

Referenced by manualContourPerpPlaneControler::ResetOrientationPlane(), and manualContour3DControler::ResetOrientationPlane().

00518 {
00519         double  distMin=999999999;
00520         double  dist,dx,dy,dz;
00521         double  x1,y1,z1;
00522         double  x2,y2,z2;
00523         int             i,np,nps;
00524 
00525 //JSTG 25-02-08 -------------------
00526         //double  tback;
00527         int iback;
00528         //double        t,delta;
00529 //---------------------------------
00530 
00531         np      = _lstPoints.size( );
00532         if (np>=2)
00533         {
00534 // JSTG 25-02-08 ------------------------------------------
00535                 //nps           = 200;
00536                 nps = GetNumberOfPointsSpline();
00537                 //delta = ( double ) ( np  ) / ( double ) ( nps  );
00538                 UpdateSpline();
00539                 //GetSplinePoint(0,x1,y1,z1);
00540                 GetSpline_i_Point(0,&x1,&y1,&z1);
00541                 for( i = 0; i < nps; i++ )
00542                 {
00543                         //t = delta * (double)i;
00544                         //GetSplinePoint(t,x1,y1,z1);
00545                         GetSpline_i_Point(i,&x1,&y1,&z1);
00546 //----------------------------------------------------------
00547                         dx= x1-p[0];
00548                         dy= y1-p[1];
00549                         dz= z1-p[2];
00550                         dist = sqrt( dx*dx + dy*dy + dz*dz );
00551                         if (dist<distMin)
00552                         {
00553                                 distMin  = dist;
00554 //JSTG                  tback = t;
00555                                 iback = i;
00556                                 rp[0] = x1;
00557                                 rp[1] = y1;
00558                                 rp[2] = z1;
00559                                 rn[0] = x2-x1;
00560                                 rn[1] = y2-y1;
00561                                 rn[2] = z2-z1;
00562                         }
00563                         x2=x1;
00564                         y2=y1;
00565                         z2=z1;
00566                 }// for
00567 
00568 // JSTG 25-02-08 ------------------------------------------
00569                 //if (tback==0)
00570                 if (iback==0)
00571                 {
00572                         //t = delta * (double)1.0;
00573                         //GetSplinePoint(t,x1,y1,z1);
00574                         GetSpline_i_Point(i,&x1,&y1,&z1);
00575 //----------------------------------------------------------
00576                         rn[0]=rp[0]-x1;
00577                         rn[1]=rp[1]-y1;
00578                         rn[2]=rp[2]-z1;
00579                 }
00580         }
00581         else
00582         {
00583                 rp[0] = 0;
00584                 rp[1] = 0;
00585                 rp[2] = 0;
00586                 rn[0] = -1;
00587                 rn[1] = 0;
00588                 rn[2] = 0;
00589         }
00590 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualContourModel::GetSpline_i_Point ( int  i,
double *  x,
double *  y,
double *  z 
) [virtual, inherited]

Reimplemented in manualContourModelBullEyeSector, and manualContourModelCircle.

Definition at line 327 of file manualContourModel.cpp.

References manualContourModel::_delta_JSTG, and manualContourModel::GetSpline_t_Point().

Referenced by wxMaracasCoutourTool::AnalisisContourInside(), AutoControlPoints::ChargeSpline(), wxMaracas_ManualTree_MPRDlg::ExportPoints(), ContourExtractData::Fill_lstlstlstVecXY(), ContourExtractData::GetMinMaxPoint(), wxMaracasCoutourTool::GetMinMaxPoint(), manualContourModel::GetNearestPointAndNormal(), manualContourModel::GetPathArea(), manualContourModel::GetPathSize(), wxMaracasCoutourTool::GetSplinePoints(), PropContour::method_Spline(), wxMaracasCoutourTool::OnSaveContour(), manualViewPerpPlaneContour::RefreshContour(), manualViewContour::RefreshContour(), and manualViewBullEyeSector::RefreshContour().

00328 {
00329         GetSpline_t_Point(i*_delta_JSTG,x,y,z);
00330 }

Here is the call graph for this function:

Here is the caller graph for this function:

void manualContourModel::GetSpline_t_Point ( double  t,
double *  x,
double *  y,
double *  z 
) [inherited]

Definition at line 335 of file manualContourModel.cpp.

References manualContourModel::_cntSplineX, manualContourModel::_cntSplineY, manualContourModel::_cntSplineZ, manualContourModel::_lstPoints, manualContourModel::GetManualPoint(), manualPoint::GetX(), manualPoint::GetY(), and manualPoint::GetZ().

Referenced by manualContourModel::GetSpline_i_Point().

00336 {
00337                 if (_lstPoints.size()==0)
00338         {
00339                 *x      = 0;
00340                 *y      = 0;
00341                 *z      = 0;
00342         }
00343         if (_lstPoints.size()==1)
00344         {
00345                 manualPoint     *mp;
00346                 mp      = GetManualPoint(0);
00347                 *x      = mp->GetX();
00348                 *y      = mp->GetY();
00349                 *z      = mp->GetZ();
00350         }
00351         if (_lstPoints.size()>=2)
00352         {
00353                 *x      = _cntSplineX->Evaluate(t);
00354                 *y      = _cntSplineY->Evaluate(t);
00355                 *z      = _cntSplineZ->Evaluate(t);
00356         }
00357 }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

int manualContourModelBullEye::_numberPointsSlineBySector [private]

Definition at line 40 of file manualContourModelBullEye.h.

Referenced by GetNumberOfPointsSplineSectorBulleEje(), manualContourModelBullEye(), and SetNumberOfPointsSplineSectorBulleEje().

std::vector<manualContourModelBullEyeSector *> manualContourModelBullEye::_lstModelBullEyeSector [private]

Definition at line 41 of file manualContourModelBullEye.h.

Referenced by AddSector(), ExploseModel(), GetModelSector(), GetSector(), GetSizeOfSectorLst(), Open(), ResetSectors(), Save(), and UpdateSpline().


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