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

lti::splitImageToRGB Class Reference
[Color Analysis]

Split image in its Red - Green - Blue channels. More...

#include <ltiSplitImageToRGB.h>

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

List of all members.

Public Member Functions

virtual const char * getTypeName () const
virtual functorclone () const
virtual bool apply (const image &img, channel &red, channel &green, channel &blue) const
virtual bool apply (const image &img, channel &red, channel &green, channel &blue, channel &alpha) const
virtual bool apply (const image &img, channel8 &red, channel8 &green, channel8 &blue) const
virtual bool apply (const image &img, channel8 &red, channel8 &green, channel8 &blue, channel8 &alpha) const
virtual bool apply (const rgbPixel &pixel, float &red, float &green, float &blue) const
virtual bool apply (const rgbPixel &pixel, ubyte &red, ubyte &green, ubyte &blue) const
bool getRed (const image &img, channel &red) const
bool getRed (const image &img, channel8 &red) const
bool getGreen (const image &img, channel &green) const
bool getGreen (const image &img, channel8 &green) const
bool getBlue (const image &img, channel &blue) const
bool getBlue (const image &img, channel8 &blue) const
virtual bool getFirst (const image &img, channel &c1) const
virtual bool getFirst (const image &img, channel8 &c1) const
virtual bool getSecond (const image &img, channel &c2) const
virtual bool getSecond (const image &img, channel8 &c2) const
virtual bool getThird (const image &img, channel &c3) const
virtual bool getThird (const image &img, channel8 &c3) const

Detailed Description

Split image in its Red - Green - Blue channels.

You can split all the channels at the same time (with apply) or get just one channel using the shortcut functions getRed(), getGreen() or getBlue().

See also:
lti::mergeRGBToImage

Member Function Documentation

virtual bool lti::splitImageToRGB::apply ( const rgbPixel pixel,
ubyte red,
ubyte green,
ubyte blue 
) const [virtual]

split the pixel in red green and blue values.

The values of each pixel will be between 0 and 255

Parameters:
pixel the pixel to be splitted
red the red value
green the green value
blue the blue value

Implements lti::splitImage.

virtual bool lti::splitImageToRGB::apply ( const rgbPixel pixel,
float &  red,
float &  green,
float &  blue 
) const [virtual]

split the pixel in red green and blue values.

The values of each pixel will be between 0.0f and 1.0f

Parameters:
pixel the pixel to be splitted
red the red value
green the green value
blue the blue value
Returns:
true if successful, false otherwise.

Implements lti::splitImage.

virtual bool lti::splitImageToRGB::apply ( const image img,
channel8 red,
channel8 green,
channel8 blue,
channel8 alpha 
) const [virtual]

split the image in red green and blue channels.

The values of each pixel will be between 0 and 255

Parameters:
img the image to be splitted
red the red channel
green the green channel
blue the blue channel
alpha or dummy channel
Returns:
true if successful, false otherwise.
virtual bool lti::splitImageToRGB::apply ( const image img,
channel8 red,
channel8 green,
channel8 blue 
) const [virtual]

split the image in red green and blue channels.

The values of each pixel will be between 0 and 255

Parameters:
img the image to be splitted
red the red channel
green the green channel
blue the blue channel
Returns:
true if successful, false otherwise.

Implements lti::splitImage.

virtual bool lti::splitImageToRGB::apply ( const image img,
channel red,
channel green,
channel blue,
channel alpha 
) const [virtual]

split the image in red green and blue channels.

The values of each pixel will be between 0.0f and 1.0f

Parameters:
img the image to be splitted
red the red channel
green the green channel
blue the blue channel
alpha or dummy channel
Returns:
true if successful, false otherwise.
virtual bool lti::splitImageToRGB::apply ( const image img,
channel red,
channel green,
channel blue 
) const [virtual]

Split the image in red green and blue channels.

The values of each pixel will be between 0.0f and 1.0f

Parameters:
img the image to be splitted
red the red channel
green the green channel
blue the blue channel
Returns:
true if successful, false otherwise.

Implements lti::splitImage.

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

returns a pointer to a clone of the functor.

Implements lti::functor.

bool lti::splitImageToRGB::getBlue ( const image img,
channel8 blue 
) const

shortcut to get the red channel only The values of each pixel will be between 0 and 255

Parameters:
img the image to be splitted
blue the blue channel
bool lti::splitImageToRGB::getBlue ( const image img,
channel blue 
) const

shortcut to get the red channel only The values of each pixel will be between 0.0f and 1.0f

Parameters:
img the image to be splitted
blue the blue channel
virtual bool lti::splitImageToRGB::getFirst ( const image img,
channel8 c1 
) const [virtual]

Returns the first of the three channels into which the image is split.

If you need only one channel, this might be faster than calling apply().

Parameters:
img the source image
c1 the extracted channel

Reimplemented from lti::splitImage.

virtual bool lti::splitImageToRGB::getFirst ( const image img,
channel c1 
) const [virtual]

Returns the first of the three channels into which the image is split.

If you need only one channel, this might be faster than calling apply().

Parameters:
img the source image
c1 the extracted channel

Reimplemented from lti::splitImage.

bool lti::splitImageToRGB::getGreen ( const image img,
channel8 green 
) const

shortcut to get the green channel only The values of each pixel will be between 0 and 255

Parameters:
img the image to be splitted
green the green channel
bool lti::splitImageToRGB::getGreen ( const image img,
channel green 
) const

shortcut to get the red channel only The values of each pixel will be between 0.0f and 1.0f

Parameters:
img the image to be splitted
green the green channel
bool lti::splitImageToRGB::getRed ( const image img,
channel8 red 
) const

shortcut to get the red channel only The values of each pixel will be between 0 and 255

Parameters:
img the image to be splitted
red the red channel
bool lti::splitImageToRGB::getRed ( const image img,
channel red 
) const

shortcut to get the red channel only The values of each pixel will be between 0.0f and 1.0f

Parameters:
img the image to be splitted
red the red channel
virtual bool lti::splitImageToRGB::getSecond ( const image img,
channel8 c2 
) const [virtual]

Returns the second of the three channels into which the image is split.

If you need only one channel, this might be faster than calling apply().

Parameters:
img the source image
c2 the extracted channel

Reimplemented from lti::splitImage.

virtual bool lti::splitImageToRGB::getSecond ( const image img,
channel c2 
) const [virtual]

Returns the second of the three channels into which the image is split.

If you need only one channel, this might be faster than calling apply().

Parameters:
img the source image
c2 the extracted channel

Reimplemented from lti::splitImage.

virtual bool lti::splitImageToRGB::getThird ( const image img,
channel8 c3 
) const [virtual]

Returns the third of the three channels into which the image is split.

If you need only one channel, this might be faster than calling apply().

Parameters:
img the source image
c3 the extracted channel

Reimplemented from lti::splitImage.

virtual bool lti::splitImageToRGB::getThird ( const image img,
channel c3 
) const [virtual]

Returns the third of the three channels into which the image is split.

If you need only one channel, this might be faster than calling apply().

Parameters:
img the source image
c3 the extracted channel

Reimplemented from lti::splitImage.

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

returns the name of this type

Reimplemented from lti::splitImage.


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

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