Layout< T > Class Template Reference

Represents tiled layouts of arbitrary numbers of images of different sizes. More...

#include <Image/Layout.H>

Collaboration diagram for Layout< T >:
Collaboration graph
[legend]

List of all members.

Public Types

enum  Dir { H, V }

Public Member Functions

 Layout (const Image< T > &p)
 Layout (const Layout< T > &p1, const Layout< T > &p2, Dir d)
 Layout (const Image< T > *imgs, const size_t nimgs, Dir d)
 Layout (const ImageSet< T > &imgs, Dir d)
 Layout (const Layout< T > *imgs, const size_t nimgs, Dir d)
bool initialized () const
Dims getDims () const
int getWidth () const
int getHeight () const
Dir getDir () const
size_t numParts () const
const Layout< T > & part (size_t i) const
const Image< T > & leafImage () const
Image< T > render () const
Image< T > render (const T &bgcol) const
void renderInto (Image< T > &x, const Point2D< int > p) const

Detailed Description

template<class T>
class Layout< T >

Represents tiled layouts of arbitrary numbers of images of different sizes.

Previously, when we wanted to build up a big image of different individual images (e.g. for display), we had two choices:

Now, with the Layout class, we get both efficiency and syntactical convenience. Instead of concatX() and concatY(), we use hcat() and vcat() which construct Layout objects (with arbitrary nesting); none of these calls involves any pixel copying. Instead we just keep track of the tile structure that is desired. Then when the final Layout has been constructed, it can be rendered into an Image in a single pass with the render() call.

For example, where previously you would have done

Image<byte> = concatX(e, concatY(concatX(a,b), concatX(c,d)));

now you would do

Image<byte> = hcat(e, vcat(hcat(a,b), hcat(c,d))).render();

Definition at line 76 of file Layout.H.


The documentation for this class was generated from the following file:
Generated on Sun May 8 08:22:56 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3