#include <ExtractControlPoints2D.h>
Public Member Functions | |
ExtractControlPoints2D () | |
~ExtractControlPoints2D () | |
void | ResetControlPoints () |
void | SetContour (std::vector< double > *pInX, std::vector< double > *pInY, std::vector< double > *pInZ) |
void | GetControlPoints (std::vector< double > *pOutX, std::vector< double > *pOutY, std::vector< double > *pOutZ) |
void | GetInitialControlPoints (std::vector< double > *pOutX, std::vector< double > *pOutY, std::vector< double > *pOutZ) |
void | SetSamplingControlPoints (double val) |
void | GetSamplingControlPoints (std::vector< double > *pOutX, std::vector< double > *pOutY, std::vector< double > *pOutZ) |
void | SetNumberOfSplineInterpolation (double val) |
Private Attributes | |
double | _numinterspline |
double | _numsampling |
std::vector< double > | _InX |
std::vector< double > | _InY |
std::vector< double > | _InZ |
Definition at line 7 of file ExtractControlPoints2D.h.
ExtractControlPoints2D::ExtractControlPoints2D | ( | ) |
Definition at line 4 of file ExtractControlPoints2D.cxx.
References _numinterspline, and _numsampling.
00005 { 00006 _numinterspline = 100; 00007 _numsampling = 25; 00008 }
ExtractControlPoints2D::~ExtractControlPoints2D | ( | ) |
Definition at line 10 of file ExtractControlPoints2D.cxx.
void ExtractControlPoints2D::GetControlPoints | ( | std::vector< double > * | pOutX, | |
std::vector< double > * | pOutY, | |||
std::vector< double > * | pOutZ | |||
) |
Definition at line 60 of file ExtractControlPoints2D.cxx.
References _InX, _InY, _InZ, _numinterspline, AutoControlPoints::CalculeControlPoints(), AutoControlPoints::GetControlPoints(), and AutoControlPoints::SetNumSplineInterpolation().
Referenced by ContourPropagation::GetControlPoints().
00061 { 00062 AutoControlPoints *autoc = new AutoControlPoints(); 00063 pOutX->clear(); 00064 pOutY->clear(); 00065 pOutZ->clear(); 00066 00067 if(_InX.size() != 0) 00068 { 00069 autoc->SetNumSplineInterpolation((int)_numinterspline); 00070 autoc->CalculeControlPoints(&_InX,&_InY,&_InZ); 00071 autoc->GetControlPoints(pOutX,pOutY,pOutZ); 00072 } 00073 delete autoc; 00074 }
void ExtractControlPoints2D::GetInitialControlPoints | ( | std::vector< double > * | pOutX, | |
std::vector< double > * | pOutY, | |||
std::vector< double > * | pOutZ | |||
) |
Definition at line 43 of file ExtractControlPoints2D.cxx.
References _InX, _InY, _InZ, _numinterspline, AutoControlPoints::CalculeInitialControlPoints(), AutoControlPoints::GetInitialControlPoints(), and AutoControlPoints::SetNumSplineInterpolation().
Referenced by ContourPropagation::GetInitialControlPoints().
00044 { 00045 AutoControlPoints *autoc = new AutoControlPoints(); 00046 pOutX->clear(); 00047 pOutY->clear(); 00048 pOutZ->clear(); 00049 00050 if(_InX.size() != 0) 00051 { 00052 autoc->SetNumSplineInterpolation((int)_numinterspline); 00053 autoc->CalculeInitialControlPoints(&_InX,&_InY,&_InZ); 00054 autoc->GetInitialControlPoints(pOutX,pOutY,pOutZ); 00055 } 00056 delete autoc; 00057 }
void ExtractControlPoints2D::GetSamplingControlPoints | ( | std::vector< double > * | pOutX, | |
std::vector< double > * | pOutY, | |||
std::vector< double > * | pOutZ | |||
) |
Definition at line 86 of file ExtractControlPoints2D.cxx.
References _InX, _InY, _InZ, and _numsampling.
Referenced by ContourPropagation::GetControlPoints().
00087 { 00088 pOutX->clear(); 00089 pOutY->clear(); 00090 pOutZ->clear(); 00091 if(_InX.size() != 0) 00092 { 00093 int h = 1; 00094 //int j=0; // JPRx 00095 int points = (int)(_InX.size()/_numsampling); 00096 for (int i=0; i<(int)(_InX.size()); i++, h++) 00097 { 00098 if( h == points ) 00099 { 00100 pOutX->push_back( _InX[i] ); 00101 pOutY->push_back( _InY[i] ); 00102 pOutZ->push_back( _InZ[i] ); 00103 h = 0; 00104 } 00105 } 00106 } 00107 }
void ExtractControlPoints2D::ResetControlPoints | ( | ) |
Definition at line 14 of file ExtractControlPoints2D.cxx.
void ExtractControlPoints2D::SetContour | ( | std::vector< double > * | pInX, | |
std::vector< double > * | pInY, | |||
std::vector< double > * | pInZ | |||
) |
Definition at line 19 of file ExtractControlPoints2D.cxx.
References _InX, _InY, and _InZ.
Referenced by ContourPropagation::GetControlPoints(), and ContourPropagation::GetInitialControlPoints().
00020 { 00021 _InX.clear(); 00022 _InY.clear(); 00023 _InZ.clear(); 00024 int sizeX = InX->size(); 00025 int sizeY = InY->size(); 00026 int sizeZ = InZ->size(); 00027 if( (sizeX == sizeY) && (sizeY==sizeZ) ) 00028 { 00029 for(int i=0; i<sizeX; i++) 00030 { 00031 _InX.push_back( (*InX)[i] ); 00032 _InY.push_back( (*InY)[i] ); 00033 _InZ.push_back( (*InZ)[i] ); 00034 } 00035 } 00036 else 00037 { 00038 printf("\n The lists Of vectors have diferents sizes"); 00039 } 00040 }
void ExtractControlPoints2D::SetNumberOfSplineInterpolation | ( | double | val | ) |
Definition at line 109 of file ExtractControlPoints2D.cxx.
References _numinterspline.
00110 { 00111 _numinterspline = val; 00112 }
void ExtractControlPoints2D::SetSamplingControlPoints | ( | double | val | ) |
Definition at line 77 of file ExtractControlPoints2D.cxx.
References _InX, and _numsampling.
Referenced by ContourPropagation::GetControlPoints().
00078 { 00079 if(_InX.size() != 0) 00080 { 00081 _numsampling = _InX.size()* (val/100); 00082 } 00083 }
std::vector<double> ExtractControlPoints2D::_InX [private] |
Definition at line 32 of file ExtractControlPoints2D.h.
Referenced by GetControlPoints(), GetInitialControlPoints(), GetSamplingControlPoints(), SetContour(), and SetSamplingControlPoints().
std::vector<double> ExtractControlPoints2D::_InY [private] |
Definition at line 33 of file ExtractControlPoints2D.h.
Referenced by GetControlPoints(), GetInitialControlPoints(), GetSamplingControlPoints(), and SetContour().
std::vector<double> ExtractControlPoints2D::_InZ [private] |
Definition at line 34 of file ExtractControlPoints2D.h.
Referenced by GetControlPoints(), GetInitialControlPoints(), GetSamplingControlPoints(), and SetContour().
double ExtractControlPoints2D::_numinterspline [private] |
Definition at line 30 of file ExtractControlPoints2D.h.
Referenced by ExtractControlPoints2D(), GetControlPoints(), GetInitialControlPoints(), and SetNumberOfSplineInterpolation().
double ExtractControlPoints2D::_numsampling [private] |
Definition at line 31 of file ExtractControlPoints2D.h.
Referenced by ExtractControlPoints2D(), GetSamplingControlPoints(), and SetSamplingControlPoints().