Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
BIAS::BSplineCurve Class Reference

this class is intended for drawing of quadratic and cubic regular B-Splines from given control points. More...

#include <MathAlgo/BSplineCurve.hh>

+ Inheritance diagram for BIAS::BSplineCurve:
+ Collaboration diagram for BIAS::BSplineCurve:

Public Member Functions

void AddDebugLevel (const long int lv)
 
void AddDebugLevel (const std::string &name)
 
 BSplineCurve ()
 
void CubicUniformBSpline (Vector2< double > &res, double t)
 computes the point on a cubic uniform B-spline curve at time t More...
 
bool DebugLevelIsSet (const long int lv) const
 
bool DebugLevelIsSet (const std::string &name) const
 
int GetDebugLevel () const
 
std::ostream & GetDebugStream () const
 
void GetDebugStream (std::ostream &os) const
 
void InitCubicUniformBSpline ()
 computes coefficients for all segments of a cubic uniform B-spline More...
 
void InitQuadraticUniformBSpline ()
 computes coefficients for all segments of a quadratic uniform B-spline More...
 
long int Name2DebugLevel (const std::string &name) const
 looks up a debuglevel in the internal map, returns 0 if not found More...
 
long int NewDebugLevel (const std::string &name)
 creates a new debuglevel More...
 
void PrintDebugLevel (std::ostream &os=std::cout) const
 
void QuadraticUniformBSpline (Vector2< double > &res, double t)
 computes the point on a quadratic uniform B-spline curve at time t More...
 
void RemoveDebugLevel (const long int lv)
 
void RemoveDebugLevel (const std::string &name)
 
void SetControlPoints (std::vector< BIAS::Vector2< double > > &cPnt)
 set the control points, which control the interpolating curve More...
 
void SetDebugLevel (const long int lv)
 
void SetDebugLevel (const std::string &name)
 
void SetDebugStream (const std::ostream &os)
 
void ShowDebugLevel (std::ostream &os=std::cout) const
 prints all internally known debuglevels More...
 
 ~BSplineCurve ()
 

Static Public Member Functions

static long int GetGlobalDebugLevel ()
 
static void SetGlobalDebugLevel (long int lev)
 

Protected Member Functions

long ConsumeNextFreeDebuglevel_ ()
 returns the next available debuglevel More...
 

Protected Attributes

long int _liDebugLevel
 
long int _liNextDebugLevel
 new concept, debuglevel are managed here in the debug class More...
 
std::map< std::string, long int > _String2Debuglevel
 
std::vector< BIAS::Vector2
< double > > 
cPnts_
 
bool initializedCubic_
 
bool initializedQuadratic_
 
std::vector< BIAS::Vector
< double > > 
xCoeff_
 
std::vector< BIAS::Vector
< double > > 
yCoeff_
 

Static Protected Attributes

static std::ostream _zDebugStream
 
static long int GlobalDebugLevel = 0
 

Detailed Description

this class is intended for drawing of quadratic and cubic regular B-Splines from given control points.

this class is intended for drawing of quadratic and cubic regular B-Splines from given control points. The Spline doesnt interpolate through the control points!!!

The Implementation of BSplineCurve is faster then BSpline. If you only want to draw a BSpline you should use this implementation.

usage:

  1. void SetControlPoints(&cPnts) for quadratic closed Bspline set cPnt[n],cPnt[0],...,cPnt[n],cPnt[0] for cubic closed Bspline set cPnt[n],cPnt[0],...,cPnt[n],cPnt[0],cPnt[1]
  2. void InitXXXUniformBSpline() - computes coefficientvectors for all knots
  3. void XXXUniformSpline(Vector2<double> &res, double t ) - computes point on the curve (0<=t<=1) t=0 returns the first computed knot of the first segment t=1 returns the last computed knot of the last segment

see also 'Computer Graphics & Geometric Modeling' from David Salomon chapter 4.16

Author
Marcel Lilienthal, Mai 2005
Examples:
ExampleBSplineCurve.cpp.

Definition at line 70 of file BSplineCurve.hh.

Constructor & Destructor Documentation

BSplineCurve::BSplineCurve ( )

Definition at line 32 of file BSplineCurve.cpp.

BIAS::BSplineCurve::~BSplineCurve ( )
inline

Definition at line 75 of file BSplineCurve.hh.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::AddDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 362 of file Debug.hh.

long BIAS::Debug::ConsumeNextFreeDebuglevel_ ( )
inlineprotectedinherited

returns the next available debuglevel

Author
woelk 09/2006

Definition at line 521 of file Debug.hh.

void BSplineCurve::CubicUniformBSpline ( Vector2< double > &  res,
double  t 
)

computes the point on a cubic uniform B-spline curve at time t

this function computes the point on a cubic uniform B-spline curve at time t. method is discribed in David Salomons "Computer Graphic & Geometric Modelling" chapter 4.16.2. the value of t must be between 0 and 1. t is used to compute the corresponding segment and the t_ for the result segment.

Parameters
res- reference to the result (return value)
t- time value of which point is to be calculated
Author
Marcel Lilienthal, Mai 2005
Examples:
ExampleBSplineCurve.cpp.

Definition at line 182 of file BSplineCurve.cpp.

References BIAS::Vector< T >::ScalarProduct().

bool BIAS::Debug::DebugLevelIsSet ( const long int  lv) const
inlineinherited
bool BIAS::Debug::DebugLevelIsSet ( const std::string &  name) const
inlineinherited

Definition at line 350 of file Debug.hh.

int BIAS::Debug::GetDebugLevel ( ) const
inlineinherited
std::ostream& BIAS::Debug::GetDebugStream ( ) const
inlineinherited

Definition at line 405 of file Debug.hh.

void BIAS::Debug::GetDebugStream ( std::ostream &  os) const
inlineinherited

Definition at line 414 of file Debug.hh.

static long int BIAS::Debug::GetGlobalDebugLevel ( )
inlinestaticinherited

Definition at line 431 of file Debug.hh.

void BSplineCurve::InitCubicUniformBSpline ( )

computes coefficients for all segments of a cubic uniform B-spline

this function computes the coefficients for all sements of a cubic uniform B-spline and saves these coefficients in protected vectors xCoeff_, yCoeff_. method is discribed in David Salomons "Computer Graphic & Geometric Modelling" chapter 4.16.4

Author
Marcel Lilienthal, Mai 2005
Examples:
ExampleBSplineCurve.cpp.

Definition at line 93 of file BSplineCurve.cpp.

References BIAS::Matrix< T >::clear(), and BIAS::Matrix< T >::Mult().

void BSplineCurve::InitQuadraticUniformBSpline ( )

computes coefficients for all segments of a quadratic uniform B-spline

this function computes the coefficients for all sements of a quadratic uniform B-spline and saves these coefficients in protected vectors xCoeff_, yCoeff_ method is discribed in David Salomons "Computer Graphic & Geometric Modelling" chapter 4.16.2

Author
Marcel Lilienthal, Mai 2005
Examples:
ExampleBSplineCurve.cpp.

Definition at line 39 of file BSplineCurve.cpp.

References BIAS::Matrix< T >::clear(), and BIAS::Matrix< T >::Mult().

long int BIAS::Debug::Name2DebugLevel ( const std::string &  name) const
inlineinherited

looks up a debuglevel in the internal map, returns 0 if not found

Author
woelk 09/2006

Definition at line 454 of file Debug.hh.

long int BIAS::Debug::NewDebugLevel ( const std::string &  name)
inlineinherited
void BIAS::Debug::PrintDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

Definition at line 383 of file Debug.hh.

void BSplineCurve::QuadraticUniformBSpline ( Vector2< double > &  res,
double  t 
)

computes the point on a quadratic uniform B-spline curve at time t

this function computes the point on a quadratic uniform B-spline curve at time t. method is discribed in David Salomons "Computer Graphic & Geometric Modelling" chapter 4.16.2. the value of t must be between 0 and 1. t is used to compute the corresponding segment and the t_ for the result segment.

Parameters
res- reference to the result (return value)
t- time value of which point is to be calculated
Author
Marcel Lilienthal, Mai 2005
Examples:
ExampleBSplineCurve.cpp.

Definition at line 152 of file BSplineCurve.cpp.

References BIAS::Vector< T >::ScalarProduct().

void BIAS::Debug::RemoveDebugLevel ( const long int  lv)
inlineinherited

Definition at line 369 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 376 of file Debug.hh.

void BIAS::BSplineCurve::SetControlPoints ( std::vector< BIAS::Vector2< double > > &  cPnt)
inline

set the control points, which control the interpolating curve

Examples:
ExampleBSplineCurve.cpp.

Definition at line 80 of file BSplineCurve.hh.

void BIAS::Debug::SetDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::SetDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 325 of file Debug.hh.

void BIAS::Debug::SetDebugStream ( const std::ostream &  os)
inlineinherited

Definition at line 398 of file Debug.hh.

static void BIAS::Debug::SetGlobalDebugLevel ( long int  lev)
inlinestaticinherited

Definition at line 424 of file Debug.hh.

void BIAS::Debug::ShowDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

prints all internally known debuglevels

Author
woelk 09/2006

Definition at line 496 of file Debug.hh.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel
protectedinherited

Definition at line 510 of file Debug.hh.

Referenced by BIAS::Debug::operator=(), and BIAS::ImageBase::operator=().

long int BIAS::Debug::_liNextDebugLevel
protectedinherited

new concept, debuglevel are managed here in the debug class

Definition at line 516 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::map<std::string, long int> BIAS::Debug::_String2Debuglevel
protectedinherited

Definition at line 517 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream
staticprotectedinherited

Definition at line 511 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::vector<BIAS::Vector2<double> > BIAS::BSplineCurve::cPnts_
protected

Definition at line 154 of file BSplineCurve.hh.

long int BIAS::Debug::GlobalDebugLevel = 0
staticprotectedinherited

Definition at line 513 of file Debug.hh.

bool BIAS::BSplineCurve::initializedCubic_
protected

Definition at line 152 of file BSplineCurve.hh.

bool BIAS::BSplineCurve::initializedQuadratic_
protected

Definition at line 151 of file BSplineCurve.hh.

std::vector<BIAS::Vector<double> > BIAS::BSplineCurve::xCoeff_
protected

Definition at line 155 of file BSplineCurve.hh.

std::vector<BIAS::Vector<double> > BIAS::BSplineCurve::yCoeff_
protected

Definition at line 156 of file BSplineCurve.hh.


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