latest version v1.9 - last update 10 Apr 2010 |
Rotation implements a rotation functor. More...
#include <ltiRotation.h>
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 |
rotation & | copy (const rotation &other) |
rotation & | operator= (const rotation &other) |
virtual functor * | clone () const |
const rotation::parameters & | getParameters () const |
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.
For more complex operations you can still use the lti::geometricTransform functor.
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
other | the object to be copied |
virtual lti::rotation::~rotation | ( | ) | [virtual] |
destructor
bool lti::rotation::apply | ( | const double & | angle, | |
const matrix< float > & | src, | |||
matrix< float > & | dest | |||
) | const |
Operates on a copy of the given 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. |
bool lti::rotation::apply | ( | const double & | angle, | |
matrix< float > & | srcdest | |||
) | const |
Operates on the given parameter.
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. |
bool lti::rotation::apply | ( | const double & | angle, | |
const matrix< ubyte > & | src, | |||
matrix< ubyte > & | dest | |||
) | const |
Operates on a copy of the given 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. |
Operates on the given parameter.
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. |
Operates on a copy of the given 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. |
bool lti::rotation::apply | ( | const double & | angle, | |
image & | srcdest | |||
) | const |
Operates on the given parameter.
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. |
Operates on a copy of the given parameters.
src | matrix<float> with the source data. | |
dest | matrix<float> where the result will be left. |
Reimplemented from lti::modifier.
bool lti::rotation::apply | ( | matrix< float > & | srcdest | ) | const [virtual] |
Operates on the given parameter.
srcdest | matrix<float> with the source data. The result will be left here too. |
Reimplemented from lti::modifier.
Operates on a copy of the given parameters.
src | matrix<ubyte> with the source data. | |
dest | matrix<ubyte> where the result will be left. |
Operates on the given parameter.
srcdest | matrix<ubyte> with the source data. The result will be left here too. |
Operates on a copy of the given parameters.
Reimplemented from lti::modifier.
bool lti::rotation::apply | ( | image & | srcdest | ) | const [virtual] |
Operates on the given parameter.
srcdest | image with the source data. The result will be left here too. |
Reimplemented from lti::modifier.
virtual functor* lti::rotation::clone | ( | ) | const [virtual] |
returns a pointer to a clone of this functor.
Implements lti::functor.
copy data of "other" functor.
other | the functor to be copied |
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.