RAWK
Gigapixel Raw Image Processing Toolkit
 All Classes Functions Variables Pages
Public Member Functions | List of all members
swizzle Class Reference

Swizzle filter.

#include <image_swizzle.hpp>

Inheritance diagram for swizzle:
image

Public Member Functions

 swizzle (std::string element, image *L)
 Reorder, replicate, or remove channels of L. Element is a string of digits used as channel indices. The height and width of the output match those of the input, but the depth of the output equals the length of the element string. More...
 
virtual double get (int i, int j, int k) const
 Return the value of the sample at row i, column j, channel k.
 
virtual int get_depth () const
 Return the depth of this image.
 
virtual void doc (std::ostream &out) const
 Produce a string documenting the function of this object.
 
- Public Member Functions inherited from image
 image (image *L=0, image *R=0)
 Create a new image object with left child L and right child R. The parents of L and R are set to this.
 
virtual ~image ()
 Finalize this image object by deleting any children.
 
virtual int get_height () const
 Return the height of this image.
 
virtual int get_width () const
 Return the height of this image.
 
imagegetL ()
 Return the left child.
 
imagegetR ()
 Return the right child.
 
imagegetP ()
 Return the parent.
 
virtual void tweak (int a, int v)
 Tweak image parameter a, changing the value by a factor of v.
 
virtual void process ()
 Process all samples of both children.
 

Additional Inherited Members

- Protected Attributes inherited from image
imageL
 Left child.
 
imageR
 Right child.
 
imageP
 Parent.
 

Constructor & Destructor Documentation

swizzle::swizzle ( std::string  element,
image L 
)
inline

For example 210 would produce a BGR output from an RGB input. 1 would isolate the green channel. 000 would route the red channel to all three channels. 0121 would duplicate the green channel as an alpha channel.

Elements indices are base 36, which allows inputs of up to 36 channels: 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z.


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