#ifndef __AutoControlPoints_h_INCLUDED__ #define __AutoControlPoints_h_INCLUDED__ #include "manualContourModel.h" #include "Propagation.h" #include "vectorFunctions.h" class AutoControlPoints : Vector { public: AutoControlPoints(); ~AutoControlPoints(); int GetSizeVector ( std::vector*Vector ); void PointLeft ( std::vector*IndX, std::vector*InY, std::vector*InZ, double* lex, double* ley, double* lez ); void PointRight ( std::vector*IndX, std::vector*InY, std::vector*InZ, double* rix, double* riy, double* riz ); void PointHigh ( std::vector*IndX, std::vector*InY, std::vector*InZ, double* hix, double* hiy, double* hiz ); void PointLow ( std::vector*IndX, std::vector*InY, std::vector*InZ, double* lox, double* loy, double* loz ); void TwoPoints ( std::vector*InX, std::vector*InY, std::vector*InZ ); void Intersection ( double x01, double y01, double x02, double y02, double mn, double m2, double* x, double* y ); void InterBetweenContours ( std::vector*InX, std::vector*InY, std::vector*InZ ); void GetInterBetweenContours ( std::vector*interVX, std::vector*interVY ); void IntersectionPoints ( ); void GetIntersectionPoints ( std::vector*interVX, std::vector*interVY ); void GetErrorBetweenContours ( std::vector*vec ); void CalculeControlPoints ( std::vector*InX, std::vector*InY, std::vector*InZ ); void GetControlPoints ( std::vector*OutX, std::vector*OutY, std::vector*OutZ ); void CalculeInitialControlPoints ( std::vector*InX, std::vector*InY, std::vector*InZ ); void GetInitialControlPoints ( std::vector*OutX, std::vector*OutY, std::vector*OutZ ); void SetNumSplineInterpolation ( int num ); private: void ChargeSpline ( ); double Slope ( double x0, double y0, double x1, double y1 ); double Normal ( double x0, double y0, double* m, double xi ); void CircleCenter ( std::vector*InX, std::vector*InY, std::vector*InZ, double *cx, double *cy, double *r ); void CirclePoints ( double cx, double cy, double r, double grad, double *x, double *y ); void InterCircle ( std::vector*InX, std::vector*InY, std::vector*InZ ); void maxminLocal ( ); void fixBetweenPoints ( double val ); void ErrorBetweenContours ( ); void AddControlPoint ( bool activate ); void InterBetweenControl ( ); void fixBetweenControl ( ); void PossibleIntersections ( std::vector*InX, std::vector*InY, std::vector*InZ ); void ControlInContour ( std::vector*InX, std::vector*InY, std::vector*InZ ); void NearMaxError2Control ( ); void MoveControlPointInContour ( std::vector*InX, std::vector*InY, std::vector*InZ ); double MoveAndAverage ( int dir, std::vector*InX, std::vector*InY, std::vector*InZ ); void MoveControlPoints ( std::vector*InX, std::vector*InY, std::vector*InZ ); void GetNewPoints ( std::vector*InX, std::vector*InY, std::vector*InZ ); void GetInitialNewPoints ( std::vector*InX, std::vector*InY, std::vector*InZ ); int _SizeVectorIn; std::vector _controlpointsX; std::vector _controlpointsY; std::vector _controlpointsZ; manualContourModel *_mContourModel; int _numspline; double _pathsize; std::vector _chargecontrolpointsX; std::vector _chargecontrolpointsY; std::vector _chargecontrolpointsZ; std::vector _circleX; std::vector _circleY; std::vector _intercircleX; std::vector _intercircleY; std::vector _intercircleDist; std::vector _interbewteencircleX; std::vector _interbewteencircleY; std::vector _interbewteencircleDist; std::vector _interbewteencirclePos; std::vector _posmaxlocal; std::vector _posminlocal; std::vector _maxlocalX; std::vector _maxlocalY; std::vector _minlocalX; std::vector _minlocalY; std::vector _minmaxlocalX; std::vector _minmaxlocalY; std::vector _posminmaxlocal; std::vector _intervectorX; std::vector _intervectorY; std::vector _interpointsX; std::vector _interpointsY; int _posA; int _posB; double _errorpos; std::vector _errorvector; std::vector _intervecXX; std::vector _intervecYY; std::vector _interitselfX; std::vector _interitselfY; int _posn; std::vector _contIncontpos; }; #endif // __AutoControlPoints_h_INCLUDED__