iLab Neuromorphic Robotics Toolkit  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Layout class and functions to build tiled layouts of images

The Layout class provides easy and efficient ways to create composite displays by tiling together several images of possibly different sizes.

A Layout is just a graph where leaf nodes are Image objects, and non-leaf nodes are Layout objects that specify either a horizontal or a vertical adjacency relationship. The Layout thus indicates which Image or Layout is next to which other Layout or Image. After a Layout has been assembled, it can be rendered into a result Image. Specifying a complex arrangement of images in this way is very natural yet more efficient than in using multiple successive concatenations of images (e.g., pace an image above another one, then add another image to the left of that group, etc), as each of these successive concatenations requires allocating a new image and copying pixel data into it. Rendering a Layout is done in one step, by first computing the final size of the concatenation and the coordinates of each of the leaf images, then allocating the final image, and finally pasting each leaf Image into its desired position.

Classes

class  nrt::Layout< T >
 Represents tiled layouts of arbitrary numbers of images of different sizes. More...
 

Enumerations

enum  nrt::LayoutDir { nrt::LayoutDir::H, nrt::LayoutDir::V }
 Direction of a Layout. More...
 

Functions

template<class T >
Layout< T > nrt::hcat (nrt::Image< T > p1, nrt::Image< T > p2)
 Convenience free functions for horizontal Layout concatenation. More...
 
template<class T >
Layout< T > nrt::hcat (nrt::Image< T > p1, Layout< T > const &p2)
 Horizontally concatenate an Image and a Layout.
 
template<class T >
Layout< T > nrt::hcat (Layout< T > const &p1, nrt::Image< T > p2)
 Horizontally concatenate a Layout and an Image.
 
template<class T >
Layout< T > nrt::hcat (Layout< T > const &p1, Layout< T > const &p2)
 Horizontally concatenate two Layout objects.
 
template<class T >
Layout< T > nrt::hcat (Layout< T > const &p1, Layout< T > const &p2, Layout< T > const &p3)
 Horizontally concatenate three Layout objects.
 
template<class T >
Layout< T > nrt::hcat (nrt::ImageSet< T > const imgs)
 Horizontally concatenate a set of Image objects.
 
template<class T >
Layout< T > nrt::vcat (nrt::Image< T > p1, nrt::Image< T > p2)
 Convenience functions for vertical Layout concatenation. More...
 
template<class T >
Layout< T > nrt::vcat (nrt::Image< T > p1, Layout< T > const &p2)
 Vertically concatenate an Image and a Layout.
 
template<class T >
Layout< T > nrt::vcat (Layout< T > const &p1, nrt::Image< T > p2)
 Vertically concatenate a Layout and an Image.
 
template<class T >
Layout< T > nrt::vcat (Layout< T > const &p1, Layout< T > const &p2)
 Vertically concatenate two Layout objects.
 
template<class T >
Layout< T > nrt::vcat (Layout< T > const &p1, Layout< T > const &p2, Layout< T > const &p3)
 Vertically concatenate three Layout objects.
 
template<class T >
Layout< T > nrt::vcat (nrt::ImageSet< T > const imgs)
 Vertically concatenate a set of Image objects.
 
template<class T >
Layout< T > nrt::arrcat (nrt::ImageSet< T > imgs, int32 const nx)
 Convenience functions for combination h/v array Layout concatenation. More...
 

Enumeration Type Documentation

enum nrt::LayoutDir
strong

Direction of a Layout.

Enumerator
H 

Horizontal.

V 

Vertical.

Definition at line 65 of file Layout.H.

Function Documentation

template<class T >
Layout<T> nrt::hcat ( nrt::Image< T >  p1,
nrt::Image< T >  p2 
)
inline

Convenience free functions for horizontal Layout concatenation.

Horizontally concatenate two Image objects

Examples:
tests/test-Pyramid.C.
template<class T >
Layout<T> nrt::vcat ( nrt::Image< T >  p1,
nrt::Image< T >  p2 
)
inline

Convenience functions for vertical Layout concatenation.

Vertically concatenate two Image objects

template<class T >
Layout<T> nrt::arrcat ( nrt::ImageSet< T >  imgs,
int32 const  nx 
)
inline

Convenience functions for combination h/v array Layout concatenation.

Concatenate a set of images into a grid

The concatenation runs from left to right, and top to bottom.

Parameters
imgsImages to concatenate
nxnumber of images in each horizontal row