LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::rotation Class Reference
[Simple geometry classes and functions]

Rotation implements a rotation functor. More...

#include <ltiRotation.h>

Inheritance diagram for lti::rotation:
Inheritance graph
[legend]
Collaboration diagram for lti::rotation:
Collaboration graph
[legend]

List of all members.

Classes

class  parameters
 the parameters for the class rotation More...

Public Member Functions

 rotation ()
 rotation (const parameters &par)
 rotation (const rotation &other)
virtual ~rotation ()
virtual const char * getTypeName () const
bool apply (image &srcdest) const
bool apply (const image &src, image &dest) const
bool apply (matrix< ubyte > &srcdest) const
bool apply (const matrix< ubyte > &src, matrix< ubyte > &dest) const
bool apply (matrix< float > &srcdest) const
bool apply (const matrix< float > &src, matrix< float > &dest) const
bool apply (const double &angle, image &srcdest) const
bool apply (const double &angle, const image &src, image &dest) const
bool apply (const double &angle, matrix< ubyte > &srcdest) const
bool apply (const double &angle, const matrix< ubyte > &src, matrix< ubyte > &dest) const
bool apply (const double &angle, matrix< float > &srcdest) const
bool apply (const double &angle, const matrix< float > &src, matrix< float > &dest) const
rotationcopy (const rotation &other)
rotationoperator= (const rotation &other)
virtual functorclone () const
const rotation::parametersgetParameters () const

Detailed Description

Rotation implements a rotation functor.

The algorithm used is call Rotation by Shear, nicely reviewed at http://www.leptonica.com/rotation.html#ROTATION-BY-SHEAR

The size of the computed image will always be enhanced to contain the whole (rotated) image. In other words, you will get the same result as using lti::geometricTransform using the parameter keepDimensions set to false.

This functor does always a bilinear interpolation, but supports only the boundary type "Zero", to avoid some comparisons and increase efficiency.

Warning:
The speed gains of this functor compared with lti::geometricTransform are marginal or non-existent, i.e. this functor algorithm can be even slower. The functor exists to provide an interface, that can wrap a more efficient algorithm in the future.

For more complex operations you can still use the lti::geometricTransform functor.

See also:
lti::geometricTransform

Constructor & Destructor Documentation

lti::rotation::rotation (  ) 

default constructor

lti::rotation::rotation ( const parameters par  ) 

Construct a functor using the given parameters.

lti::rotation::rotation ( const rotation other  ) 

copy constructor

Parameters:
other the object to be copied
virtual lti::rotation::~rotation (  )  [virtual]

destructor


Member Function Documentation

bool lti::rotation::apply ( const double &  angle,
const matrix< float > &  src,
matrix< float > &  dest 
) const

Operates on a copy of the given parameters.

Parameters:
angle rotation angle used instead of the value in the parameters object, which is ignored.
src matrix<float> with the source data.
dest matrix<float> where the result will be left.
Returns:
true if apply successful or false otherwise.
bool lti::rotation::apply ( const double &  angle,
matrix< float > &  srcdest 
) const

Operates on the given parameter.

Parameters:
angle rotation angle used instead of the value in the parameters object, which is ignored.
srcdest matrix<float> with the source data. The result will be left here too.
Returns:
true if apply successful or false otherwise.
bool lti::rotation::apply ( const double &  angle,
const matrix< ubyte > &  src,
matrix< ubyte > &  dest 
) const

Operates on a copy of the given parameters.

Parameters:
angle rotation angle used instead of the value in the parameters object, which is ignored.
src matrix<ubyte> with the source data.
dest matrix<ubyte> where the result will be left.
Returns:
true if apply successful or false otherwise.
bool lti::rotation::apply ( const double &  angle,
matrix< ubyte > &  srcdest 
) const

Operates on the given parameter.

Parameters:
angle rotation angle used instead of the value in the parameters object, which is ignored.
srcdest matrix<ubyte> with the source data. The result will be left here too.
Returns:
true if apply successful or false otherwise.
bool lti::rotation::apply ( const double &  angle,
const image src,
image dest 
) const

Operates on a copy of the given parameters.

Parameters:
angle rotation angle used instead of the value in the parameters object, which is ignored.
src image with the source data.
dest image where the result will be left.
Returns:
true if apply successful or false otherwise.
bool lti::rotation::apply ( const double &  angle,
image srcdest 
) const

Operates on the given parameter.

Parameters:
angle rotation angle used instead of the value in the parameters object, which is ignored.
srcdest image with the source data. The result will be left here too.
Returns:
true if apply successful or false otherwise.
bool lti::rotation::apply ( const matrix< float > &  src,
matrix< float > &  dest 
) const [virtual]

Operates on a copy of the given parameters.

Parameters:
src matrix<float> with the source data.
dest matrix<float> where the result will be left.
Returns:
true if apply successful or false otherwise.

Reimplemented from lti::modifier.

bool lti::rotation::apply ( matrix< float > &  srcdest  )  const [virtual]

Operates on the given parameter.

Parameters:
srcdest matrix<float> with the source data. The result will be left here too.
Returns:
true if apply successful or false otherwise.

Reimplemented from lti::modifier.

bool lti::rotation::apply ( const matrix< ubyte > &  src,
matrix< ubyte > &  dest 
) const

Operates on a copy of the given parameters.

Parameters:
src matrix<ubyte> with the source data.
dest matrix<ubyte> where the result will be left.
Returns:
true if apply successful or false otherwise.
bool lti::rotation::apply ( matrix< ubyte > &  srcdest  )  const

Operates on the given parameter.

Parameters:
srcdest matrix<ubyte> with the source data. The result will be left here too.
Returns:
true if apply successful or false otherwise.
bool lti::rotation::apply ( const image src,
image dest 
) const [virtual]

Operates on a copy of the given parameters.

Parameters:
src image with the source data.
dest image where the result will be left.
Returns:
true if apply successful or false otherwise.

Reimplemented from lti::modifier.

bool lti::rotation::apply ( image srcdest  )  const [virtual]

Operates on the given parameter.

Parameters:
srcdest image with the source data. The result will be left here too.
Returns:
true if apply successful or false otherwise.

Reimplemented from lti::modifier.

virtual functor* lti::rotation::clone (  )  const [virtual]

returns a pointer to a clone of this functor.

Implements lti::functor.

rotation& lti::rotation::copy ( const rotation other  ) 

copy data of "other" functor.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

Reimplemented from lti::functor.

const rotation::parameters& lti::rotation::getParameters (  )  const

returns used parameters

Reimplemented from lti::modifier.

virtual const char* lti::rotation::getTypeName (  )  const [virtual]

returns the name of this type ("rotation")

Reimplemented from lti::modifier.

rotation& lti::rotation::operator= ( const rotation other  ) 

alias for copy member

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

Reimplemented from lti::functor.


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

Generated on Sat Apr 10 15:27:47 2010 for LTI-Lib by Doxygen 1.6.1